* syscalls.c (seteuid32): Do not return an error when the token cannot be
created only because of a problem with the gid.
This commit is contained in:
parent
a8983b39f5
commit
96edd0a9da
|
@ -1,3 +1,8 @@
|
||||||
|
2002-07-01 Pierre Humblet <pierre.humblet@ieee.org>
|
||||||
|
|
||||||
|
* syscalls.c (seteuid32): Do not return an error when the token cannot
|
||||||
|
be created only because of a problem with the gid.
|
||||||
|
|
||||||
2002-07-01 Christopher Faylor <cgf@redhat.com>
|
2002-07-01 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* fhandler_clipboard.c (fhandler_dev_clipboard::open): Force text mode.
|
* fhandler_clipboard.c (fhandler_dev_clipboard::open): Force text mode.
|
||||||
|
|
|
@ -135,7 +135,7 @@ geterrno_from_win_error (DWORD code, int deferrno)
|
||||||
void __stdcall
|
void __stdcall
|
||||||
seterrno_from_win_error (const char *file, int line, DWORD code)
|
seterrno_from_win_error (const char *file, int line, DWORD code)
|
||||||
{
|
{
|
||||||
syscall_printf ("%s:%d errno %d", file, line, code);
|
syscall_printf ("%s:%d windows error %d", file, line, code);
|
||||||
set_errno (geterrno_from_win_error (code, EACCES));
|
set_errno (geterrno_from_win_error (code, EACCES));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2054,7 +2054,8 @@ seteuid32 (__uid32_t uid)
|
||||||
/* create_token failed. Try subauthentication. */
|
/* create_token failed. Try subauthentication. */
|
||||||
debug_printf ("create token failed, try subauthentication.");
|
debug_printf ("create token failed, try subauthentication.");
|
||||||
cygheap->user.token = subauth (pw_new);
|
cygheap->user.token = subauth (pw_new);
|
||||||
if (cygheap->user.token == INVALID_HANDLE_VALUE) goto failed;
|
if (cygheap->user.token == INVALID_HANDLE_VALUE)
|
||||||
|
goto failed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2098,6 +2099,11 @@ seteuid32 (__uid32_t uid)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
failed:
|
failed:
|
||||||
|
if (uid == myself->uid)
|
||||||
|
{
|
||||||
|
system_printf ("special case, returning 0");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
cygheap->user.token = sav_token;
|
cygheap->user.token = sav_token;
|
||||||
cygheap->user.impersonated = sav_impersonated;
|
cygheap->user.impersonated = sav_impersonated;
|
||||||
if (cygheap->user.issetuid ()
|
if (cygheap->user.issetuid ()
|
||||||
|
|
Loading…
Reference in New Issue