Fix to MXS-310: https://mariadb.atlassian.net/browse/MXS-310
The dumpable flag is now reset to true after the uid is changed.
This commit is contained in:
@ -85,6 +85,7 @@
|
||||
|
||||
#include <ini.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/prctl.h>
|
||||
|
||||
/** for procname */
|
||||
#if !defined(_GNU_SOURCE)
|
||||
@ -2218,6 +2219,15 @@ static int set_user(char* user)
|
||||
pwname->pw_name,errno,strerror(errno));
|
||||
return rval;
|
||||
}
|
||||
if(prctl(PR_GET_DUMPABLE) == 0)
|
||||
{
|
||||
if(prctl(PR_SET_DUMPABLE ,1) == -1)
|
||||
{
|
||||
printf("Error: Failed to set dumpable flag on for the process '%s': %d %s\n",
|
||||
pwname->pw_name,errno,strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
#ifdef SS_DEBUG
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user