summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/shared.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-09-28 14:40:18 +0000
committerCorinna Vinschen <corinna@vinschen.de>2010-09-28 14:40:18 +0000
commit2f1f8815c037ee0387c30fba98689e544ab75c9a (patch)
tree58a54bb45cbd833ed7169a8669005e7468dbb1ec /winsup/cygwin/shared.cc
parent91e0b943a07e768bbdcd7d8da2b991eee41fc0c4 (diff)
downloadcygnal-2f1f8815c037ee0387c30fba98689e544ab75c9a.tar.gz
cygnal-2f1f8815c037ee0387c30fba98689e544ab75c9a.tar.bz2
cygnal-2f1f8815c037ee0387c30fba98689e544ab75c9a.zip
* Makefile.in (DLL_IMPORTS): Remove libadvapi32.a.
* autoload.cc: Add all advapi32 entry points. * mount.cc (mount_info::init): Read user fstab only if we have a username. * passwd.cc (pwdgrp::read_passwd): Only use username if we have one. * shared.cc (user_info::initialize): Set cb last so as not to override planned behaviour in pwdgrp::read_passwd. * uinfo.cc (cygheap_user::init): Fetch Windows username from environment variable $USERNAME. Don't set name in cygheap if variable is empty. (internal_getlogin): If we still have no username, try GetUserNameW.
Diffstat (limited to 'winsup/cygwin/shared.cc')
-rw-r--r--winsup/cygwin/shared.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
index 10d03b088..5118b432b 100644
--- a/winsup/cygwin/shared.cc
+++ b/winsup/cygwin/shared.cc
@@ -312,7 +312,6 @@ user_info::initialize ()
spinlock sversion (version, CURR_USER_MAGIC);
if (!sversion)
{
- cb = sizeof (*user_shared);
cygpsid sid (cygheap->user.sid ());
struct passwd *pw = internal_getpwsid (sid);
/* Correct the user name with what's defined in /etc/passwd before
@@ -320,6 +319,7 @@ user_info::initialize ()
if (pw)
cygheap->user.set_name (pw->pw_name);
mountinfo.init (); /* Initialize the mount table. */
+ cb = sizeof (*user_shared);
}
else if (sversion != CURR_USER_MAGIC)
sversion.multiple_cygwin_problem ("user shared memory version", version,