Error: Cannot update core dump limit
Jakob Hirsch
jh at plonk.de
Thu Jul 7 10:20:06 CEST 2016
Alan DeKok wrote on 2016-07-06 15:13:
>>> Tue Jul 5 13:16:42 2016 : Error: Cannot update core dump limit: Operation not permitted
>>> Tue Jul 5 13:16:42 2016 : Info: Core dumps are enabled
>>> Tue Jul 5 13:16:42 2016 : Info: Debugger not attached
>> Any idea what's going wrong here?
> The server is probably changing UID, and trying to update the core limit after that.
I guess that's not a problem (since FR does a prctl(PR_SET_DUMPABLE, 1)
after the UID/GID changes):
> setgroups(1, [106]) = 0
> setgid(106) = 0
> mkdir("/var/log/freeradius", 0700) = -1 EEXIST (File exists)
> geteuid() = 0
> setresuid(4294967295, 104, 0) = 0
> geteuid() = 104
> setrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=0}) = 0
> open("/var/log/freeradius/radius.log", O_WRONLY|O_CREAT|O_APPEND, 0640) = 3
> fchown(3, 104, 106) = 0
> prctl(PR_SET_DUMPABLE, 1) = 0
> setrlimit(RLIMIT_CORE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = -1 EPERM (Operation not permitted)
but FR uses setrlimit() with rlim_max=0, and you can only lower
rlim_max, but not raise it (unless you have the CAP_SYS_RESOURCE
capability). I don't know what the call setrlimit(RLIMIT_CORE,
{rlim_cur=0, rlim_max=0}) is good for...
More information about the Freeradius-Devel
mailing list