From b2939a814cc551c7619798e41c18bc60ce6543d5 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 29 May 2001 20:43:40 +0000 Subject: * sec_helper.cc (cygsid::getfrompw): Change parameter to `const'. (cygsid::getfromgr): Ditto. * security.cc: Use `sys_mbstowcs' and `sys_wcstombs' throughout. (extract_nt_dom_user): Try to get user and domain from SID in pw->pw_gecos first. * security.h (class cygsid): Change parameter of getfrompw() and getfromgr() to `const'. * uinfo.cc (internal_getlogin): Change order for evaluating user information in winNT case. Drop usage of NetWkstaUserGetInfo(). --- winsup/cygwin/sec_helper.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/sec_helper.cc') diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc index 264aac4ec..4789732a4 100644 --- a/winsup/cygwin/sec_helper.cc +++ b/winsup/cygwin/sec_helper.cc @@ -121,14 +121,14 @@ cygsid::getfromstr (const char *nsidstr) } BOOL -cygsid::getfrompw (struct passwd *pw) +cygsid::getfrompw (const struct passwd *pw) { char *sp = (pw && pw->pw_gecos) ? strrchr (pw->pw_gecos, ',') : NULL; return (*this = sp ? sp + 1 : "") != NULL; } BOOL -cygsid::getfromgr (struct group *gr) +cygsid::getfromgr (const struct group *gr) { char *sp = (gr && gr->gr_passwd) ? gr->gr_passwd : NULL; return (*this = sp ?: "") != NULL; -- cgit v1.2.3