Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-06-15 01:46:19 +0400
committerChristopher Faylor <me@cgf.cx>2002-06-15 01:46:19 +0400
commit6d171b4482689bd1c8a49af94e57d451c8f66448 (patch)
treebabdadeed9f28974354c25073eb06863c7f9da03 /winsup/cygwin/uinfo.cc
parentb56d7e7937d0604025833e8c881f96c1d0e4147f (diff)
* 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.cc6
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;
}