summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/passwd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/passwd.cc')
-rw-r--r--winsup/cygwin/passwd.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc
index 54e429ccf..6526243c8 100644
--- a/winsup/cygwin/passwd.cc
+++ b/winsup/cygwin/passwd.cc
@@ -41,8 +41,8 @@ pwdgrp::parse_passwd ()
res.p.pw_dir = next_str (':');
res.p.pw_shell = next_str (':');
cygsid csid;
- csid.getfrompw_gecos (&res.p);
- RtlCopySid (SECURITY_MAX_SID_SIZE, res.sid, csid);
+ if (csid.getfrompw_gecos (&res.p))
+ RtlCopySid (SECURITY_MAX_SID_SIZE, res.sid, csid);
/* lptr points to the \0 after pw_shell. Increment by one to get the correct
required buffer len in getpw_cp. */
res.len = lptr - res.p.pw_name + 1;