diff options
author | Christopher Faylor <me@cgf.cx> | 2002-06-21 09:01:17 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-06-21 09:01:17 +0400 |
commit | 7c02f861e3512fac608b411cb5be43a41ba8735e (patch) | |
tree | 56618ecd163acfa86ea2c7dcd5a484cd0b9e3c5b /winsup/cygwin/environ.cc | |
parent | a7b23a8f11b2e1f2ef333d2ed95d1c972acad12f (diff) |
* uinfo.cc (cygheap_user::ontherange): Use env_name for NetUserGetInfo.
(cygheap_user::env_logsrv): Verify env_domain is valid.
* environ.cc: Include child_info.h and keep spenvs[] sorted.
(environ_init): Check child_proc_info instead of myself->ppid_handle.
Diffstat (limited to 'winsup/cygwin/environ.cc')
-rw-r--r-- | winsup/cygwin/environ.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index 1b3ff4f28..9fc4d0ab8 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -25,6 +25,7 @@ details. */ #include "cygheap.h" #include "registry.h" #include "environ.h" +#include "child_info.h" extern BOOL allow_daemon; extern BOOL allow_glob; @@ -712,7 +713,7 @@ environ_init (char **envp, int envc) char *eq; if ((eq = strchr (newp, '=')) == NULL) eq = strchr (newp, '\0'); - if (!myself->ppid_handle) + if (!child_proc_info) ucenv (newp, eq); if (*newp == 'T' && strncmp (newp, "TERM=", 5) == 0) sawTERM = 1; @@ -765,8 +766,8 @@ char env_dontadd[] = ""; /* Keep this list in upper case and sorted */ static NO_COPY spenv spenvs[] = { - {NL ("HOMEPATH="), &cygheap_user::env_homepath}, {NL ("HOMEDRIVE="), &cygheap_user::env_homedrive}, + {NL ("HOMEPATH="), &cygheap_user::env_homepath}, {NL ("LOGONSERVER="), &cygheap_user::env_logsrv}, {NL ("SYSTEMDRIVE="), NULL}, {NL ("SYSTEMROOT="), NULL}, @@ -809,7 +810,7 @@ spenv::retrieve (bool no_envblock, const char *const envname) /* Calculate (potentially) value for given environment variable. */ p = (cygheap->user.*from_cygheap) (); if (!p || (no_envblock && !envname)) - return env_dontadd; + return env_dontadd; char *s = (char *) cmalloc (HEAP_1_STR, namelen + strlen (p) + 1); strcpy (s, name); (void) strcpy (s + namelen, p); |