VirtualBox

Ignore:
Timestamp:
Dec 17, 2010 1:11:08 PM (14 years ago)
Author:
vboxsync
Message:

VBoxExtPackHelperApp: corrected the 'su' invocation so it should work on solaris as well as linux.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/VBoxExtPackHelperApp.cpp

    r35219 r35224  
    13821382        if (RT_SUCCESS(rc))
    13831383        {
    1384             iSuArg = cSuArgs - 8;
    1385             papszArgs[cSuArgs - 8] = szXterm;
    1386             papszArgs[cSuArgs - 7] = "-T";
    1387             papszArgs[cSuArgs - 6] = papszArgs[cSuArgs - 1] = iCmd == CMD_INSTALL
     1384            iSuArg = cSuArgs - 9;
     1385            papszArgs[cSuArgs - 9] = szXterm;
     1386            papszArgs[cSuArgs - 8] = "-T";
     1387            papszArgs[cSuArgs - 7] = iCmd == CMD_INSTALL
    13881388                                   ? "VirtualBox extension pack installer - su"
    13891389                                   : iCmd == CMD_UNINSTALL
    13901390                                   ? "VirtualBox extension pack uninstaller - su"
    13911391                                   : "VirtualBox extension pack maintainer - su";
    1392             papszArgs[cSuArgs - 5] = "-e";
    1393             papszArgs[cSuArgs - 4] = szExecTool;
    1394             papszArgs[cSuArgs - 3] = "-c";
    1395             papszArgs[cSuArgs - 2] = pszCmdLine;
    1396             papszArgs[cSuArgs - 1] = "-";
     1392            papszArgs[cSuArgs - 6] = "-e";
     1393            papszArgs[cSuArgs - 5] = szExecTool;
     1394            papszArgs[cSuArgs - 4] = "-";
     1395            papszArgs[cSuArgs - 3] = "root";
     1396            papszArgs[cSuArgs - 2] = "-c";
     1397            papszArgs[cSuArgs - 1] = pszCmdLine;
    13971398            papszArgs[cSuArgs] = NULL;
    13981399        }
     
    14951496                 * change the order here.
    14961497                 */
    1497                 int const    cSuArgs   = 10;
     1498                int const    cSuArgs   = 12;
    14981499                int          cArgs     = argc + 5 + 1;
    14991500                char const **papszArgs = (char const **)RTMemTmpAllocZ((cSuArgs + cArgs + 1) * sizeof(const char *));
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette