From: Egor Duda Date: Tue, 14 Aug 2001 14:57:44 +0000 (+0000) Subject: * spawn.cc (spawn_guts): Enable appropriate privilege before X-Git-Tag: Z-cygwin_daemon_merge-new_HEAD~255 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=7da232abd7aa193219d471c36f85bae882a59d21;p=newlib-cygwin.git * spawn.cc (spawn_guts): Enable appropriate privilege before loading user's registry hive. --- diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 90b743ac7..d76a51b0f 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2001-08-14 Egor Duda + + * spawn.cc (spawn_guts): Enable appropriate privilege before + loading user's registry hive. + Mon Aug 13 22:34:00 2001 Corinna Vinschen * fhandler.cc (fhandler_base::fcntl): Use new O_NONBLOCK_MASK define. diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index c6750b4db..73df3f31f 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -631,6 +631,13 @@ skip_arg_parsing: && cygheap->user.token != INVALID_HANDLE_VALUE) RevertToSelf (); + static BOOL first_time = TRUE; + if (first_time) + { + set_process_privilege (SE_RESTORE_NAME); + first_time = FALSE; + } + /* Load users registry hive. */ load_registry_hive (sid);