root tool acting on behalf of a user - what to set and how
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com I have a server process running as root that needs to create a file on behalf of a user. I want the file creation operation to be subjected to the requesting user's permissions, so I'm using seteuid(). However, this is not enough, since additional permissions may be given to the user's group, so I also call setegid(). This isn't enough either, since the user may belong to several groups, so I call setgroups() as well. Questions: 1. Given the user's uid, what's the best way to determine the user's gid and groups list? 2. Am I forgetting something? Thanks in advance, -- Dan Bernstein _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Dan Bernstein