Changeset 1262

Show
Ignore:
Timestamp:
01/31/10 22:18:42 (1 month ago)
Author:
astrange
Message:

Don't call AuthorizationExecuteWithPrivileges?() without an auth.

Not sure if this prevents any real problems. I don't think it does.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CPFPerianPrefPaneController.m

    r1261 r1262  
    505505         
    506506        char* const arguments[] = { "-c", cmd, NULL }; 
    507         if(AuthorizationExecuteWithPrivileges(auth, "/bin/sh", kAuthorizationFlagDefaults, arguments, NULL) == errAuthorizationSuccess) 
     507        if(auth && AuthorizationExecuteWithPrivileges(auth, "/bin/sh", kAuthorizationFlagDefaults, arguments, NULL) == errAuthorizationSuccess) 
    508508        { 
    509509                int status; 
     
    538538         
    539539        char* const arguments[] = { "-c", cmd, NULL }; 
    540         if(AuthorizationExecuteWithPrivileges(auth, "/bin/sh", kAuthorizationFlagDefaults, arguments, NULL) == errAuthorizationSuccess) 
     540        if(auth && AuthorizationExecuteWithPrivileges(auth, "/bin/sh", kAuthorizationFlagDefaults, arguments, NULL) == errAuthorizationSuccess) 
    541541        { 
    542542                int status;