Commit 6882e87f authored by unknown's avatar unknown

Solve compile problem for 4.0.22 on hpita2. (Backport of a 4.1 change)


sql/mysqld.cc:
  Replace 'sete_id(_)' calls by 'setre_id(-1,_)' calls, as the former
  have no prototypes on some platforms. (Backport of a 4.1 change)
parent a8cbb00d
......@@ -1114,14 +1114,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
......@@ -2510,9 +2510,9 @@ You should consider changing lower_case_table_names to 1 or 2",
#if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT)
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