aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libpwdgrp/pwd_grp.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c
index 139b93007..1b13325cf 100644
--- a/libpwdgrp/pwd_grp.c
+++ b/libpwdgrp/pwd_grp.c
@@ -16,11 +16,10 @@
16 * a) must contain the expected number of fields (as per count of field 16 * a) must contain the expected number of fields (as per count of field
17 * delimeters ":") or we will complain with a error message. 17 * delimeters ":") or we will complain with a error message.
18 * b) leading and trailing whitespace in fields is stripped. 18 * b) leading and trailing whitespace in fields is stripped.
19 * c) some fields are not allowed to be empty (e.g. username, uid/gid, 19 * c) some fields are not allowed to be empty (e.g. username, uid/gid),
20 * homedir, shell) and in this case NULL is returned and errno is 20 * and in this case NULL is returned and errno is set to EINVAL.
21 * set to EINVAL. This behaviour could be easily changed by 21 * This behaviour could be easily changed by modifying PW_DEF, GR_DEF,
22 * modifying PW_DEF, GR_DEF, SP_DEF strings (uppercase 22 * SP_DEF strings (uppercase makes a field mandatory).
23 * makes a field mandatory).
24 * d) the string representing uid/gid must be convertible by strtoXX 23 * d) the string representing uid/gid must be convertible by strtoXX
25 * functions, or errno is set to EINVAL. 24 * functions, or errno is set to EINVAL.
26 * e) leading and trailing whitespace in group member names is stripped. 25 * e) leading and trailing whitespace in group member names is stripped.
@@ -70,8 +69,8 @@ static const struct const_passdb const_pw_db = {
70 offsetof(struct passwd, pw_uid), /* 2 I */ 69 offsetof(struct passwd, pw_uid), /* 2 I */
71 offsetof(struct passwd, pw_gid), /* 3 I */ 70 offsetof(struct passwd, pw_gid), /* 3 I */
72 offsetof(struct passwd, pw_gecos), /* 4 s */ 71 offsetof(struct passwd, pw_gecos), /* 4 s */
73 offsetof(struct passwd, pw_dir), /* 5 S */ 72 offsetof(struct passwd, pw_dir), /* 5 s */
74 offsetof(struct passwd, pw_shell) /* 6 S */ 73 offsetof(struct passwd, pw_shell) /* 6 s */
75 }, 74 },
76 sizeof(PW_DEF)-1, sizeof(struct passwd) 75 sizeof(PW_DEF)-1, sizeof(struct passwd)
77}; 76};