Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Authorization Question



On Thursday, July 31, 2003, at 01:26 am, Isaac Sherman wrote:

How would I make a program that always runs with Root access, but doesn't
ask for administrator authorization every time it's launched?
I've been working on the docs and example code, and it appears that I always
need said permission, contrary to the docs. After setting it's UID Bit, it
still requires me to authorize to execute it.

Are you talking about the setuid bit (the filesystem attribute)? If so, remember that you need to change the file so that it is owned by root if you want it to run with root privileges.

It's also worth mentioning that Cocoa programs that run with the setuid bit set are a security risk because of things like input managers. See pp. 838-839 of Cocoa Programming (Anguish, Buck & Yacktman) for an explanation of why you shouldn't do things that way.

Kind regards,

Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Authorization Question (From: Isaac Sherman <email@hidden>)



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.