From 28b9d50f0ab7ca9f5ea42ce2c06ae94512050aca Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 22 Aug 2011 14:55:31 +0100 Subject: [PATCH] Update the TODO file after Mac testing and make a note that elevation on Mac only works when running the app directly on the Mac (as opposed to over an SSH session). --- TODO | 6 +++--- src/ProcessUtils.cpp | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index b188462..d787489 100644 --- a/TODO +++ b/TODO @@ -2,18 +2,18 @@ Updater Tasks: * Elevation for Linux [done - needs testing] * Set file permissions for Unix [done] + * Elevation for Mac [done] + * Basic functionality for Mac [done] + * Unit test working under Mac [done] * Set file permissions for Windows * Basic functionality for Windows - * Basic functionality for Mac * Elevation for Windows - * Elevation for Mac * Win32 UI for Windows * Cocoa UI for Mac * Gtk or Qt UI for Linux * Retry/cancel support if updater cannot overwrite file (eg. due to file being in use by Microsoft Word or another application) * Unit test working under Windows - * Unit test working under Mac * Start new application once installation is finished Mendeley Desktop <= 1.0 auto-update system compatibility: diff --git a/src/ProcessUtils.cpp b/src/ProcessUtils.cpp index f4449a5..e2d84ae 100644 --- a/src/ProcessUtils.cpp +++ b/src/ProcessUtils.cpp @@ -144,6 +144,12 @@ void ProcessUtils::runElevatedLinux(const std::string& executable, void ProcessUtils::runElevatedMac(const std::string& executable, const std::list& args) { + // request elevation using the Security Service. + // + // This only works when the application is being run directly + // from the Mac. Attempting to run the app via a remote SSH session + // (for example) will fail with an interaction-not-allowed error + OSStatus status; AuthorizationRef authorizationRef;