[asterisk-dev] COMPILE ERROR - branch 1.2 r9861 -
/branches/1.2/asterisk.c
Armin Schindler
armin at melware.de
Tue Feb 14 00:52:51 MST 2006
On Tue, 14 Feb 2006, Aryanto Rachmad wrote:
> Hello everybody,
>
> I tried to get into branch 1.2 r9861, but when I compiled asterisk I got the following error:
>
> asterisk.c: In function 'main':
> asterisk.c:2213: error: 'ast_opt_dump_core' undeclared (first use in this function)
> asterisk.c:2213: error: (Each undeclared identifier is reported only once
> asterisk.c:2213: error: for each function it appears in.)
> make: *** [asterisk.o] Error 1
>
> It complied and running fine when I commented the following lines to revert asterisk.c to r9860:
>
> Line 78:
> #include <sys/prctl.h>
>
> Line 2213:
> if (geteuid() && ast_opt_dump_core) {
> if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) {
> ast_log(LOG_WARNING, "Unable to set the process for core dumps after changing to a non-root user. %s\n", strerror(errno));
> }
> }
>
> I am just curious. What those lines suppose to do actually?
When using setuid() or similar functions, the dumpable flag for the process
is deleted. With prctl(PR_SET_DUMPABLE,...) this flag is set again to create
core dumps again.
I added this to openpbx just yesterday. I'm wondering if putting this into
asterisk may be against Digiums rules, because it is GPL without signed
disclaimer?
Armin
More information about the asterisk-dev
mailing list