diff options
author | Christopher Faylor <me@cgf.cx> | 2002-06-14 21:46:19 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-06-14 21:46:19 +0000 |
commit | 6d171b4482689bd1c8a49af94e57d451c8f66448 (patch) | |
tree | babdadeed9f28974354c25073eb06863c7f9da03 /winsup/cygwin/uinfo.cc | |
parent | b56d7e7937d0604025833e8c881f96c1d0e4147f (diff) | |
download | cygnal-6d171b4482689bd1c8a49af94e57d451c8f66448.tar.gz cygnal-6d171b4482689bd1c8a49af94e57d451c8f66448.tar.bz2 cygnal-6d171b4482689bd1c8a49af94e57d451c8f66448.zip |
* cygheap.h (cygheap_user::userprofile_env_buf): New static member.
* environ.cc (build_env): Add debugging statement.
(spenvs): Switch functions for USERDOMAIN and USERNAME.
* spawn.cc (spawn_guts): Move environment initialization prior to
cygheap_setup_for_child or environment info will never be copied to child.
Diffstat (limited to 'winsup/cygwin/uinfo.cc')
-rw-r--r-- | winsup/cygwin/uinfo.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index bd7b3cb8b..e20c4b704 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -190,6 +190,7 @@ cuserid (char *src) char cygheap_user::homepath_env_buf[MAX_PATH + 1]; char cygheap_user::homedrive_env_buf[3]; +char cygheap_user::userprofile_env_buf[MAX_PATH + 1]; const char * cygheap_user::ontherange (homebodies what, struct passwd *pw) @@ -335,12 +336,11 @@ cygheap_user::env_domain () const char * cygheap_user::env_userprofile () { - static char buf[512]; /* FIXME: This shouldn't be static. */ if (strcasematch (name (), "SYSTEM") || !env_domain () || !env_logsrv ()) return NULL; - if (get_registry_hive_path (sid (), buf)) - return buf; + if (get_registry_hive_path (sid (), userprofile_env_buf)) + return userprofile_env_buf; else return NULL; } |