Re: Running EUID as root (was Re: libpcap in Cocoa)
Re: Running EUID as root (was Re: libpcap in Cocoa)
- Subject: Re: Running EUID as root (was Re: libpcap in Cocoa)
- From: "Sven A. Schmidt" <email@hidden>
- Date: Tue, 21 Aug 2001 16:24:27 +0200
On Dienstag, August 21, 2001, at 05:52 Uhr, Todd Heberlein wrote:
If I set my program to be SUID root it works fine, but I cannot figure
out how to get the Security Framework to move my process running with my
effective UID into an effective UID of root. There are a number of
examples of using the Security Framework to
AuthorizeExecuteWithPrivileges() another progam (e.g., at Stepwise), but
I want my own process to run in root mode.
You can't promote a process to another uid via the Security Framework,
afaik. For my project I ended up writing a separate foundation tool that
calls seteuid and wraps the program I want to call as root.
I have seen some interesting behavior during experiments. For example,
sometimes the program prompts me for my username and password, and
sometimes it doesn't. Is the system caching the results somewhere?
Like with sudo, there seems to be a timeout for the authorization token.
Sven