pthread_setugid_np

Sujit K M kmsujit at gmail.com
Thu May 28 04:48:19 UTC 2009


As per the Apple Documentation:

In some cases it is helpful to impersonate the user, at least as far
as the permissions checking done by the BSD subsystem of the kernel. A
single-threaded daemon can do this using seteuid and setegid. These
set the effective user and group ID of the process as a whole. This
will cause problems if your daemon is using multiple threads to handle
requests from different users. In that case you can set the effective
user and group ID of a thread using pthread_setugid_np. This was
introduced in Mac OS X 10.4.

(AT) http://developer.apple.com/technotes/tn2005/tn2083.html


I think this is a part of the BSD (Mach) subsystem.


More information about the freebsd-arch mailing list