Hi,

> 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.

Process.uid was telling me 500, which was the intended user. whoami
inside the execpipe was root though.

I've ended up doing this

 def self.exec_as_user(op, pkg)

    Puppet::Util::SUIDManager.asuser("node", "node") do
      s = execute ["my", "command", "and", "args"]
      s.split("\n").collect do | line |
        yield line
      end
    end
  end


which is doing what I want

-- 
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.

Reply via email to