From eb30bba2d65ae26b23444732d52217eb10389e9d Mon Sep 17 00:00:00 2001 From: "rob_strong%exchangecode.com" Date: Fri, 2 Feb 2007 05:07:37 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20367540=20-=20When=20launching=20the=20app?= =?UTF-8?q?=20from=20the=20installer=20the=20app=20runs=20with=20elevated?= =?UTF-8?q?=20privileges.=20Also=20fixes=20Bug=20364483=20=C2=96=20Firefox?= =?UTF-8?q?=20stays=20elevated=20after=20update.=20patch=3DMasatoshi=20Kim?= =?UTF-8?q?ura=20(:emk),=20r=3Dsspitzer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@219393 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/toolkit/xre/nsAppRunner.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mozilla/toolkit/xre/nsAppRunner.cpp b/mozilla/toolkit/xre/nsAppRunner.cpp index 6b0cc48b174..354adc53d0a 100644 --- a/mozilla/toolkit/xre/nsAppRunner.cpp +++ b/mozilla/toolkit/xre/nsAppRunner.cpp @@ -1403,7 +1403,8 @@ GetShellFolderPath(int folder, char result[MAXPATHLEN]) // blank command line instead of being launched with the same command line that // it was initially started with. static nsresult LaunchChild(nsINativeAppSupport* aNative, - PRBool aBlankCommandLine = PR_FALSE) + PRBool aBlankCommandLine = PR_FALSE, + int needElevation = 0) { aNative->Quit(); // release DDE mutex, if we're holding it @@ -1431,7 +1432,7 @@ static nsresult LaunchChild(nsINativeAppSupport* aNative, return rv; #if defined(XP_WIN) - if (!WinLaunchChild(exePath.get(), gRestartArgc, gRestartArgv, 0)) + if (!WinLaunchChild(exePath.get(), gRestartArgc, gRestartArgv, needElevation)) return NS_ERROR_FAILURE; #elif defined(XP_OS2) if (_execv(exePath.get(), gRestartArgv) == -1) @@ -2818,7 +2819,7 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData) } #endif - rv = LaunchChild(nativeApp, appInitiatedRestart); + rv = LaunchChild(nativeApp, appInitiatedRestart, upgraded ? -1 : 0); return rv == NS_ERROR_LAUNCHED_CHILD_PROCESS ? 0 : 1; } }