diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-13 00:31:02 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-10-13 00:31:02 +0200 |
commit | b5dabd9078492c6b3366bab57a51e070b83f9b45 (patch) | |
tree | bd4c4e3350256556afa1db979ff297c94ce0167f | |
parent | 966423d4034067f52b419570a1016d1dfc4aeacd (diff) | |
download | busybox-w32-b5dabd9078492c6b3366bab57a51e070b83f9b45.tar.gz busybox-w32-b5dabd9078492c6b3366bab57a51e070b83f9b45.tar.bz2 busybox-w32-b5dabd9078492c6b3366bab57a51e070b83f9b45.zip |
libpwdgrp: fix comment discrepancies
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | libpwdgrp/pwd_grp.c | 13 |
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 | }; |