From 3434e0c857d36be3b74495672db2aa4b6d806d97 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 2 Jul 2002 01:53:58 +0000 Subject: [PATCH] * syscalls.cc (seteuid32): Fix incorrect placement of Pierre's patch below. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/syscalls.cc | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a9a3cac9d..f2ab6b6ff 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2002-07-01 Christopher Faylor + + * syscalls.cc (seteuid32): Fix incorrect placement of Pierre's patch + below. + 2002-07-01 Christopher Faylor * syscalls.cc (seteuid32): Fix incorrect use of system_printf. diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 1e837f013..438cb7708 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -2099,16 +2099,16 @@ seteuid32 (__uid32_t uid) return 0; failed: - if (uid == myself->uid) - { - syscall_printf ("special case, returning 0"); - return 0; - } cygheap->user.token = sav_token; cygheap->user.impersonated = sav_impersonated; if (cygheap->user.issetuid () && !ImpersonateLoggedOnUser (cygheap->user.token)) system_printf ("Impersonating in seteuid failed: %E"); + if (uid == myself->uid) + { + syscall_printf ("special case, returning 0"); + return 0; + } return -1; }