From: Corinna Vinschen Date: Tue, 10 Jun 2008 15:16:01 +0000 (+0000) Subject: * sec_auth.cc (lsaauth): Make returned token inheritable. X-Git-Tag: pre-ripout-set_console_state_for_spawn~8 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=93e9098f7c0c7cf16776ebd41e373551e6323726;p=newlib-cygwin.git * sec_auth.cc (lsaauth): Make returned token inheritable. --- diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 36e6d8494..38e81276a 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2008-06-10 Corinna Vinschen + + * sec_auth.cc (lsaauth): Make returned token inheritable. + 2008-06-10 Corinna Vinschen * devices.cc: Regenerate. diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec_auth.cc index 8ae2424c3..dca2e18c8 100644 --- a/winsup/cygwin/sec_auth.cc +++ b/winsup/cygwin/sec_auth.cc @@ -1118,6 +1118,11 @@ lsaauth (cygsid &usersid, user_groups &new_groups, struct passwd *pw) } } + /* The token returned by LsaLogonUser is not inheritable. Make it so. */ + if (!SetHandleInformation (user_token, HANDLE_FLAG_INHERIT, + HANDLE_FLAG_INHERIT)) + system_printf ("SetHandleInformation %E"); + out: if (privs) free (privs);