On Sun, Jan 16, 2011 at 20:00, pl <patrick.b....@gmail.com> wrote: >> Puppet::Util::SUIDManager.asuser("username", "group") do >> # do stuff here as different user >> end > > Not sure this works how you suggested as this
In the current codebase, it will silently ignore the request if you are either on Windows, or not running as root. Otherwise it juts delegates everything except the extended group list operations to the Ruby Process class, and should follow the semantics of that; we also verify that we can find the user by name or UID on the way and raise an exception if it doesn't work. So, yeah: I don't doubt you are seeing that behaviour, but I can't understand how from code inspection. Can you instrument your code to dump Process.uid and Process.gid from Ruby-space in the block? That way we can help narrow down where things are going wrong. Regards, Daniel -- ✉ Daniel Pittman <dan...@rimspace.net> ⌨ dan...@rimspace.net (XMPP) ☎ +1 503 893 2285 ♻ made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.