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);