summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/syscalls.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 4792744e0..31eed42b2 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -2004,7 +2004,7 @@ seteuid32 (__uid32_t uid)
else
{
CloseHandle (ptok);
- return 0; /* No change */
+ goto success; /* No change */
}
}
@@ -2025,7 +2025,7 @@ seteuid32 (__uid32_t uid)
CloseHandle (ptok);
if (!ImpersonateLoggedOnUser (cygheap->user.token))
system_printf ("Impersonating in seteuid failed: %E");
- return 0; /* No change */
+ goto success; /* No change */
}
}
}
@@ -2097,6 +2097,7 @@ seteuid32 (__uid32_t uid)
CloseHandle (sav_token);
cygheap->user.set_name (pw_new->pw_name);
cygheap->user.set_sid (usersid);
+success:
myself->uid = uid;
groups.ischanged = FALSE;
return 0;