* 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.
This commit is contained in:
parent
a7b23a8f11
commit
7c02f861e3
|
@ -1,3 +1,10 @@
|
|||
2002-06-20 Pierre Humblet <pierre.humblet@ieee.org>
|
||||
|
||||
* 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.
|
||||
|
||||
2002-06-19 Christopher Faylor <cgf@redhat.com>
|
||||
|
||||
* fhandler.cc (fhandler_base::set_flags): Change priority of "linked
|
||||
|
|
|
@ -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},
|
||||
|
|
|
@ -251,7 +251,7 @@ cygheap_user::ontherange (homebodies what, struct passwd *pw)
|
|||
WCHAR wlogsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
|
||||
sys_mbstowcs (wlogsrv, env_logsrv (),
|
||||
sizeof (wlogsrv) / sizeof(*wlogsrv));
|
||||
sys_mbstowcs (wuser, name (), sizeof (wuser) / sizeof (*wuser));
|
||||
sys_mbstowcs (wuser, env_name (), sizeof (wuser) / sizeof (*wuser));
|
||||
if (!(ret = NetUserGetInfo (wlogsrv, wuser, 3,(LPBYTE *)&ui)))
|
||||
{
|
||||
char *p;
|
||||
|
@ -304,7 +304,7 @@ cygheap_user::env_logsrv ()
|
|||
if (plogsrv)
|
||||
return plogsrv;
|
||||
|
||||
if (strcasematch (env_name (), "SYSTEM"))
|
||||
if (!env_domain () || strcasematch (env_name (), "SYSTEM"))
|
||||
return NULL;
|
||||
|
||||
char logsrv[INTERNET_MAX_HOST_NAME_LENGTH + 3];
|
||||
|
|
Loading…
Reference in New Issue