Running EUID as root (was Re: libpcap in Cocoa)
Running EUID as root (was Re: libpcap in Cocoa)
- Subject: Running EUID as root (was Re: libpcap in Cocoa)
- From: "Todd Heberlein" <email@hidden>
- Date: Mon, 20 Aug 2001 20:52:57 -0700
- Organization: Net Squared, Inc.
>
From: Ivan Myrvold <email@hidden>
>
>
Yes, that got it through the compile and link cycle without
>
errors. Thank you for holding my hand through this!
Glad we could help.
Now if you can figure out how to open that pcap tap live (which requires
root privilege), I would love to hear about it.
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.
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?
Also, if I want to run EUID==root, should I enter root's username and
password, or should I use my own?
Any suggestions?
Todd