Bug #9228
Darwin (Mac OS X) excepted from changing UID, GID
| Status: | Closed | Start date: | 08/28/2011 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | - | % Done: | 100% |
|
| Category: | exec | |||
| Target version: | 2.7.12 | |||
| Affected Puppet version: | 2.7.3 | Branch: | ||
| Keywords: | euid uid egid gid darwin macosx | |||
| Votes: | 0 |
Description
I’m unsure why, but it seems like Puppet thinks it’s not possible to set the UID or GID via Process.uid= on Darwin/Mac OS X. Unfortunately this severely impacts the Exec type when user => or group => is set. Because lots of things execute through the bash shell bash will revert the euid (setting it back to the real uid) if it’s different than the uid, making the euid setting almost useless.
By applying the supplied patch things work as expected. I’m not sure the history of why Puppet was doing this but it appears to work fine with it.
This is Puppet 2.7.3 on Mac OS X 10.6.8 using the Mac’s built-in Ruby 1.8.7-pl174.
See also #8770 for related discussion and less related but similar issue in #374.
History
Updated by James Turnbull 9 months ago
- Status changed from Unreviewed to Needs Decision
- Assignee set to Nigel Kersten
- Priority changed from Normal to Urgent
I am now a little lost given Nick’s recent changes as to why/what is happening?
Updated by Nigel Kersten 9 months ago
- Status changed from Needs Decision to Accepted
- Assignee deleted (
Nigel Kersten) - Priority changed from Urgent to High
- Target version set to 2.7.x
Jesse, this really didn’t use to work. I believe Apple only fixed it in 10.6 from memory.
I really thought we’d resolved this, but clearly not.
Updated by Jesse Peterson 9 months ago
It would seem this would have to work going back many versions in Mac OS X lest things like sudo -u simply wouldn’t be possible. Unless of course I’m missing something about how setting UID/EUID works. Could it have been a Ruby bug perhaps? In any case no worries. I’m manually patching gem installations at the moment until a release is complete. Thanks!
Updated by Franz Pletz 4 months ago
- Status changed from Accepted to Closed
- % Done changed from 0 to 100
This issue seems fixed in recent 2.7.x versions.
Updated by Daniel Pittman 2 months ago
- Target version changed from 2.7.x to 2.7.12