diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2000-07-21 19:34:35 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2000-07-21 19:34:35 +0000 |
commit | ede1fee4caabd8cceaceb9447dcf3376a837e29d (patch) | |
tree | 8b52d5d2970e540248dc8f265ee742f9bbb16d94 | |
parent | 4c02a6ab9c113d409323e56bf881382a503778ac (diff) | |
download | newlib-ede1fee4caabd8cceaceb9447dcf3376a837e29d.zip newlib-ede1fee4caabd8cceaceb9447dcf3376a837e29d.tar.gz newlib-ede1fee4caabd8cceaceb9447dcf3376a837e29d.tar.bz2 |
* spawn.cc (span_guts): Retrieve security attributes before setting
psid to NULL.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/spawn.cc | 14 |
2 files changed, 13 insertions, 6 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 6a33572..7b5ae0b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Fri Jul 21 21:33:00 2000 Corinna Vinschen <corinna@vinschen.de> + + * spawn.cc (span_guts): Retrieve security attributes before setting + psid to NULL. + Fri Jul 21 12:03:00 2000 Corinna Vinschen <corinna@vinschen.de> * security.cc (acl_worker): Use stat_suffixes in call to path_conv diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index f9660d9..c12882c 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -536,6 +536,12 @@ skip_arg_parsing: else system_printf ("GetTokenInformation: %E"); + /* Retrieve security attributes before setting psid to NULL + since it's value is needed by `sec_user'. */ + PSECURITY_ATTRIBUTES sec_attribs = allow_ntsec && sid + ? sec_user (sa_buf, sid) + : &sec_all_nih; + /* Remove impersonation */ uid_t uid = geteuid(); if (myself->impersonated && myself->token != INVALID_HANDLE_VALUE) @@ -553,12 +559,8 @@ skip_arg_parsing: rc = CreateProcessAsUser (hToken, real_path, /* image name - with full path */ one_line.buf, /* what was passed to exec */ - /* process security attrs */ - allow_ntsec && sid ? sec_user (sa_buf, sid) - : &sec_all_nih, - /* thread security attrs */ - allow_ntsec && sid ? sec_user (sa_buf, sid) - : &sec_all_nih, + sec_attribs, /* process security attrs */ + sec_attribs, /* thread security attrs */ TRUE, /* inherit handles from parent */ flags, envblock,/* environment */ |