Bug 904 - sudo: setrlimit(8): Invalid argument
sudo: setrlimit(8): Invalid argument
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.8.29
Macintosh MacOS X
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-29 06:24 MDT by Marius Schamschula
Modified: 2019-12-31 15:08 MST (History)
0 users

See Also:


Attachments
Avoid setrlimit warnings on macOS (1.67 KB, patch)
2019-10-29 08:29 MDT, Todd C. Miller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Schamschula 2019-10-29 06:24:53 MDT
After updating to sudo 1.8.29 for MacPorts, I get the following message when invoking sudo:

sudo: setrlimit(8): Invalid argument

Also see: https://trac.macports.org/ticket/59513

This message is seen by multiple macOS versions. The ticket reporter is running 10.7.5, while my build machine has 10.14.6.
Comment 1 Todd C. Miller 2019-10-29 08:29:59 MDT
Created attachment 533 [details]
Avoid setrlimit warnings on macOS

macOS does not allow rlim_cur to be set to RLIM_INFINITY for RLIMIT_NOFILE.
We need to use OPEN_MAX instead as per the macOS setrlimit manual.
Comment 2 Todd C. Miller 2019-10-29 08:30:46 MDT
Committed as https://www.sudo.ws/repos/sudo/rev/2a00e62eaeb0
Comment 3 Todd C. Miller 2019-12-31 15:08:32 MST
Fixed in sudo 1.8.30