| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
I am trying to use AuthorizationExecuteWithPrivileges() in an application_______________________________________________
to correct a kext's permissions. I am successfully using it to call
'kextload' and 'chown' but am having problems with the more complicated:
/usr/bin/find MyKext.kext -type d -exec /bin/chmod 0755 {} \;
I suspect the problem is either that 'find' calls 'chmod' or just a
problem with having so many parameters. My code is like this:
const char* toolPath = "/usr/bin/find";
const char* myArguments[] = {inKextPath, "-type", "d", "-exec", "/bin/
chmod", "0755", "{}", "\\;", NULL};
err = AuthorizationExecuteWithPrivileges (
authRef,
toolPath,
kAuthorizationFlagDefaults,
(char * const*)myArguments,
NULL);
I see the log "/path/to/mykext.kext: -exec: no terminating ";"
| References: | |
| >Prob with AuthorizationExecuteWithPrivileges and 'complex' arguments (From: "Sean McBride" <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.