Commit 481f8d5b authored by joerg@mysql.com's avatar joerg@mysql.com

Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/M41/mysql-4.1
parents 29c5bfb2 563c5566
......@@ -1126,14 +1126,14 @@ static void set_effective_user(struct passwd *user_info)
{
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__)
DBUG_ASSERT(user_info);
if (setegid(user_info->pw_gid) == -1)
if (setregid((gid_t)-1, user_info->pw_gid) == -1)
{
sql_perror("setegid");
sql_perror("setregid");
unireg_abort(1);
}
if (seteuid(user_info->pw_uid) == -1)
if (setreuid((uid_t)-1, user_info->pw_uid) == -1)
{
sql_perror("seteuid");
sql_perror("setreuid");
unireg_abort(1);
}
#endif
......@@ -2657,9 +2657,9 @@ server.");
#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) && !defined(EMBEDDED_LIBRARY)
if (locked_in_memory && !getuid())
{
if (seteuid(0) == -1)
if (setreuid((uid_t)-1, 0) == -1)
{ // this should never happen
sql_perror("seteuid");
sql_perror("setreuid");
unireg_abort(1);
}
if (mlockall(MCL_CURRENT))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment