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.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/winsup/cygwin/passwd.cc b/winsup/cygwin/passwd.cc
index d2f7b2c2e..dfa90acb3 100644
--- a/winsup/cygwin/passwd.cc
+++ b/winsup/cygwin/passwd.cc
@@ -27,16 +27,16 @@ bool
pwdgrp::parse_passwd ()
{
pg_pwd &res = passwd ()[curr_lines];
- res.p.pw_name = next_str (':');
- res.p.pw_passwd = next_str (':');
+ res.p.pw_name = next_str (pwd_sep);
+ res.p.pw_passwd = next_str (pwd_sep);
if (!next_num (res.p.pw_uid))
return false;
if (!next_num (res.p.pw_gid))
return false;
res.p.pw_comment = NULL;
- res.p.pw_gecos = next_str (':');
- res.p.pw_dir = next_str (':');
- res.p.pw_shell = next_str (':');
+ res.p.pw_gecos = next_str (pwd_sep);
+ res.p.pw_dir = next_str (pwd_sep);
+ res.p.pw_shell = next_str (pwd_sep);
cygsid csid;
if (csid.getfrompw_gecos (&res.p))
RtlCopySid (SECURITY_MAX_SID_SIZE, res.sid, csid);
@@ -51,6 +51,7 @@ pwdgrp::init_pwd ()
{
pwdgrp_buf_elem_size = sizeof (pg_pwd);
parse = &pwdgrp::parse_passwd;
+ pwd_sep = ':';
}
struct passwd *