From bb34ad9674effea3d4401186cd729e4feb9ad881 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 24 Jun 2000 17:37:52 +0000 Subject: * fork.cc (fork): Fix error in copying SID pointer. * spawn.cc (_spawnve): Ditto. * passwd.cc: Remove static from `passwd_in_memory_p'. (read_etc_passwd): Remove static. * uinfo.cc: Move global declaration of `read_etc_group' and `group_in_memory_p' into `uinfo_init'. (internal_getlogin): Try to get SID from current process first. (uinfo_init): Don't set uid and gid if `myself' has a valid SID. Only load /etc/passwd and /etc/group in that case. --- winsup/cygwin/passwd.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/passwd.cc') diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc index f385b7d54..33c1d6fe8 100644 --- a/winsup/cygwin/passwd.cc +++ b/winsup/cygwin/passwd.cc @@ -24,7 +24,7 @@ static int max_lines = 0; /* Set to 1 when /etc/passwd has been read in by read_etc_passwd (). */ /* Functions in this file need to check the value of passwd_in_memory_p and read in the password file if it isn't set. */ -static int passwd_in_memory_p = 0; +int passwd_in_memory_p = 0; /* Position in the passwd cache */ #ifdef _MT_SAFE @@ -103,7 +103,7 @@ add_pwd_line (char *line) /* Read in /etc/passwd and save contents in the password cache. This sets passwd_in_memory_p to 1 so functions in this file can tell that /etc/passwd has been read in */ -static void +void read_etc_passwd () { extern int passwd_sem; -- cgit v1.2.3