summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/shared.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-11-27 16:49:41 +0000
committerCorinna Vinschen <corinna@vinschen.de>2014-11-27 16:49:41 +0000
commite7d7418270fd17998e09017f013816788b32651d (patch)
tree4615fa9e3fd977828a3211a927bcba832475e021 /winsup/cygwin/shared.cc
parentdb880b56427272aaea287a42541fe127dc5590a6 (diff)
downloadcygnal-e7d7418270fd17998e09017f013816788b32651d.tar.gz
cygnal-e7d7418270fd17998e09017f013816788b32651d.tar.bz2
cygnal-e7d7418270fd17998e09017f013816788b32651d.zip
* mount.cc (mount_info::init): Take bool argument and allow to
initialize mount table in two steps, system and user, depending on bool value. * mount.h (class mount_info): Align declaration of init function to above change. * shared.cc (user_info::initialize): Initialize mount table in two steps to allow internal_getpwsid to create valid POSIX paths from DOS paths given in AD. Add comments. * uinfo.cc (cygheap_pwdgrp::get_home): Allow DOS paths in NSS_SCHEME_FREEATTR attributes. (cygheap_pwdgrp::get_shell): Ditto.
Diffstat (limited to 'winsup/cygwin/shared.cc')
-rw-r--r--winsup/cygwin/shared.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
index 4510d02ab..202d8ccfa 100644
--- a/winsup/cygwin/shared.cc
+++ b/winsup/cygwin/shared.cc
@@ -230,13 +230,18 @@ user_info::initialize ()
if (!sversion)
{
cb = sizeof (*user_shared);
+ /* Initialize mount table from system fstab prior to calling
+ internal_getpwsid. This allows to convert pw_dir and pw_shell
+ paths given in DOS notation to valid POSIX paths. */
+ mountinfo.init (false);
cygpsid sid (cygheap->user.sid ());
struct passwd *pw = internal_getpwsid (sid);
/* Correct the user name with what's defined in /etc/passwd before
loading the user fstab file. */
if (pw)
cygheap->user.set_name (pw->pw_name);
- mountinfo.init (); /* Initialize the mount table. */
+ /* After fetching the user infos, add mount entries from user's fstab. */
+ mountinfo.init (true);
}
else if (sversion != CURR_USER_MAGIC)
sversion.multiple_cygwin_problem ("user shared memory version", version,