[sudo-users] Sudo and ulimits

Johan Marcusson independence at blinkenlights.se
Tue Jan 22 09:07:21 EST 2008


I have some problems with sudo and ulimits. I understand that you do not
get the ulimits of the user you are sudoing to, but I wonder if there is
some way to configure this to happen?
My problem is like this: I have ulimits for all users on the system for
a certain number of processes. When one of these users tries to use sudo
(to root), they get denied and sudo exits with this message:
"setresuid(ROOT_UID, ROOT_UID, ROOT_UID) failed, your operating system
may have a broken setresuid() function"
I think this is because root is running more processes than the ulimit
of the user that is trying to use sudo, and sudo then exits or fails to
fork(?) because root is over the ulimit.
I can't really call the ulimit with sudo, since it won't start, and
can't raise the ulimit as a normal user, thus I'm stuck.
I would need for sudo to raise the process ulimit on it's own, after it
has called setuid and before it forks (if it does fork?)
Or is there some other way to solve this problem?
(I would like to not have to raise the ulimits of the users to allow for
more processes than what root could possibly run!)
Any help much appreciated! I tried patching the source a bit, but I'm
not very good with C and setuid etc so I did not manage to get it

Regards, Johan

More information about the sudo-users mailing list