Issue #9382 has been updated by James Turnbull.

Description updated
Category set to cron
Status changed from Unreviewed to Requires CLA to be signed
Assignee set to Mike Rawse

Hi Mike - Can I please get you to sign a Contributor License Agreement so we 
can review and merge your patch?  See the link in the top right menu.

Also what Puppet version does this patch apply to?

Many Thanks
----------------------------------------
Bug #9382: AIX cron non root user fails
https://projects.puppetlabs.com/issues/9382

Author: Mike Rawse
Status: Requires CLA to be signed
Priority: Normal
Assignee: Mike Rawse
Category: cron
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


Changing crontab entries for non root users on AIX does not work.

The problem is that Util.execute sets the effective UID before the UID. This 
causes the setreuid system call to fail with EPERM because the effective UID is 
not root when trying to set the uid.

Fix is to reverse the calls in Util.execute. 

<pre>
# diff -c util.rb.orig util.rb
*** util.rb.orig        Thu Sep  8 11:40:48 2011
--- util.rb     Thu Sep  8 11:43:22 2011
***************
*** 312,319 ****
              Process.gid = arguments[:gid] unless @@os == "Darwin"
            end
            if arguments[:uid]
-             Process.euid = arguments[:uid]
              Process.uid = arguments[:uid] unless @@os == "Darwin"
            end
            ENV['LANG'] = ENV['LC_ALL'] = ENV['LC_MESSAGES'] = ENV['LANGUAGE'] 
= 'C'
            if command.is_a?(Array)
--- 312,319 ----
              Process.gid = arguments[:gid] unless @@os == "Darwin"
            end

            if arguments[:uid]
              Process.uid = arguments[:uid] unless @@os == "Darwin"
+             Process.euid = arguments[:uid]
            end
            ENV['LANG'] = ENV['LC_ALL'] = ENV['LC_MESSAGES'] = ENV['LANGUAGE'] 
= 'C'
            if command.is_a?(Array)
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to