* 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.
This commit is contained in:
Corinna Vinschen
2014-11-27 16:49:41 +00:00
parent db880b5642
commit e7d7418270
5 changed files with 40 additions and 11 deletions

View File

@@ -927,7 +927,12 @@ cygheap_pwdgrp::get_home (cyg_ldap *pldap, PCWSTR dom, PCWSTR name,
case NSS_SCHEME_FREEATTR:
val = pldap->get_string_attribute (home_scheme[idx].attrib);
if (val && *val)
sys_wcstombs_alloc (&home, HEAP_NOTHEAP, val);
{
if (isdrive (val) || *val == '\\')
home = (char *) cygwin_create_path (CCP_WIN_W_TO_POSIX, val);
else
sys_wcstombs_alloc (&home, HEAP_NOTHEAP, val);
}
break;
}
}
@@ -1007,7 +1012,12 @@ cygheap_pwdgrp::get_shell (cyg_ldap *pldap, PCWSTR dom, PCWSTR name,
case NSS_SCHEME_FREEATTR:
val = pldap->get_string_attribute (shell_scheme[idx].attrib);
if (val && *val)
sys_wcstombs_alloc (&shell, HEAP_NOTHEAP, val);
{
if (isdrive (val) || *val == '\\')
shell = (char *) cygwin_create_path (CCP_WIN_W_TO_POSIX, val);
else
sys_wcstombs_alloc (&shell, HEAP_NOTHEAP, val);
}
break;
}
}