Useless setrlimit(RLIMIT_CORE, ...) and typo in mainconfig.c
enrik#freeradius at planb.de
Mon Oct 15 16:49:05 CEST 2007
when coredumps are enabled in the config file, the code in mainconfig.c
does an setrlimit(RLIMIT_CORE, ...) using the core limits retrieved by
an earlier getrlimit(RLIMIT_CORE, ...). This looks useless to me. I
think the original intention of the setrlimit() was to actually enable
core dumping in case the server is started with core dump limit set to 0
but coredumps enabled in the config file.
Further, a prctl() call to set the dumpable flag of the process is
protected by HAVE_SYS_PRTCL_H which should be HAVE_SYS_PRCTL_H. Even
with the typo fixed, the code will never be run, because configure does
not check for prctl.h yet.
I have attached a suggested patch (not including configure / prctl.h).
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Freeradius-Devel