Bug 83

Summary: aix limits are not reset
Product: Sudo Reporter: Ken Foskey <ken.foskey>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal CC: lool, peter.oliver, sehnis
Priority: normal    
Version: 1.6.6   
Hardware: IBM   
OS: AIX   
Attachments: Read /etc/environment

Description Ken Foskey 2002-06-06 21:30:05 MDT
I have a limit of .5 gig for my file size.  When I sudo to my production userid
(unlimited) I retain my original settings cuasing the script to fail.

How do I force a reset of ulimit under sudo.  ulimit man page says you cannot
increase this limit without root permissions.
Comment 1 Todd C. Miller 2002-12-13 11:17:04 MST
I really have no idea how AIX does per-user resource limits or what library functions exist to set them.  I don't have access to any AIX machines at the moment.  If you were able to give me a login on one I could poke around and see if I can solve this.
Comment 2 Ken Foskey 2003-03-19 19:01:57 MST
We worked around this problem in another way.  I don't have a machine that you 
can access at present so if you may want to close this issue as wont fix.
Comment 3 Todd C. Miller 2005-03-30 08:10:22 MST
*** Bug 174 has been marked as a duplicate of this bug. ***
Comment 4 Todd C. Miller 2005-05-09 13:30:55 MDT
*** Bug 177 has been marked as a duplicate of this bug. ***
Comment 5 Peter Oliver 2007-12-21 06:56:08 MST
Created attachment 217 [details]
Read /etc/environment

The attached patch causes sudo to read /etc/environment when it is called with the -i option.  It uses code taken from OpenSSH.  You can test this on Linux, since that has an /etc/environment file too.
Comment 6 Todd C. Miller 2007-12-21 16:54:16 MST
Thanks, I've committed similar code to the sudo cvs tree.  I need to do a little research and determine whether I want to read /etc/environment on operating systems other than AIX and Linux.
Comment 7 Todd C. Miller 2008-03-06 16:16:26 MST
This has been addressed in the sudo 1.7 code base.  The current beta version of sudo, 1.7b3 has support for /etc/environment as well as user rlimits.  See http://www.sudo.ws/sudo/dist/beta/
Comment 8 Loïc Minier 2009-06-22 11:43:24 MDT
This change caused bug #359 for Ubuntu systems.