From 7da232abd7aa193219d471c36f85bae882a59d21 Mon Sep 17 00:00:00 2001 From: Egor Duda Date: Tue, 14 Aug 2001 14:57:44 +0000 Subject: [PATCH] * spawn.cc (spawn_guts): Enable appropriate privilege before loading user's registry hive. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/spawn.cc | 7 +++++++ 2 files changed, 12 insertions(+) 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); -- 2.43.5