From 66e963519ad0d42a227442a36bde93de06fce4f7 Mon Sep 17 00:00:00 2001 From: "jamiewalch@chromium.org" Date: Sat, 17 Nov 2012 06:27:12 +0000 Subject: Fixed gyp to work with both xcodebuild and ninja. This also implements the PAM local-login check from issue 11358258. BUG=158631 Review URL: https://chromiumcodereview.appspot.com/11415032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168388 0039d316-1c4b-4281-b951-d872f2087c98 --- .../installer/mac/Scripts/remoting_postflight.sh | 27 ++++++++++++++++++++++ remoting/host/remoting_me2me_host.cc | 6 ++--- remoting/remoting.gyp | 1 + 3 files changed, 31 insertions(+), 3 deletions(-) (limited to 'remoting') diff --git a/remoting/host/installer/mac/Scripts/remoting_postflight.sh b/remoting/host/installer/mac/Scripts/remoting_postflight.sh index 6016fca..4659735 100755 --- a/remoting/host/installer/mac/Scripts/remoting_postflight.sh +++ b/remoting/host/installer/mac/Scripts/remoting_postflight.sh @@ -10,6 +10,7 @@ HELPERTOOLS=/Library/PrivilegedHelperTools NAME=org.chromium.chromoting CONFIG_FILE="$HELPERTOOLS/$NAME.json" PLIST=/Library/LaunchAgents/org.chromium.chromoting.plist +PAM_CONFIG=/etc/pam.d/chrome-remote-desktop ENABLED_FILE="$HELPERTOOLS/$NAME.me2me_enabled" ENABLED_FILE_BACKUP="$ENABLED_FILE.backup" @@ -33,6 +34,32 @@ if [[ -f "$ENABLED_FILE_BACKUP" ]]; then mv "$ENABLED_FILE_BACKUP" "$ENABLED_FILE" fi +# Create the PAM configuration unless it already exists and has been edited. +update_pam=1 +CONTROL_LINE="# If you edit this file, please delete this line." +if [[ -f "$PAM_CONFIG" ]] && ! grep -qF "$CONTROL_LINE" "$PAM_CONFIG"; then + update_pam=0 +fi + +if [[ "$update_pam" == "1" ]]; then + logger Creating PAM config. + cat > "$PAM_CONFIG" < #include "base/file_descriptor_posix.h" +#include "remoting/host/pam_authorization_factory_posix.h" #include "remoting/host/posix/signal_handler.h" #endif // defined(OS_POSIX) @@ -78,7 +79,6 @@ #if defined(OS_LINUX) #include #include "remoting/host/audio_capturer_linux.h" -#include "remoting/host/pam_authorization_factory_posix.h" #endif // defined(OS_LINUX) // N.B. OS_WIN is defined by including src/base headers. @@ -429,8 +429,8 @@ void HostProcess::CreateAuthenticatorFactory() { scoped_ptr factory( new protocol::Me2MeHostAuthenticatorFactory( local_certificate, *key_pair_.private_key(), host_secret_hash_)); -#if defined(OS_LINUX) - // On Linux, perform a PAM authorization step after authentication. +#if defined(OS_POSIX) + // On Linux and Mac, perform a PAM authorization step after authentication. factory.reset(new PamAuthorizationFactory(factory.Pass())); #endif host_->SetAuthenticatorFactory(factory.Pass()); diff --git a/remoting/remoting.gyp b/remoting/remoting.gyp index d70bd1a..9b55d5f 100644 --- a/remoting/remoting.gyp +++ b/remoting/remoting.gyp @@ -1714,6 +1714,7 @@ 'link_settings': { 'libraries': [ '$(SDKROOT)/System/Library/Frameworks/OpenGL.framework', + 'libpam.a', ], }, }], -- cgit v1.1