diff options
author | ache <ache@FreeBSD.org> | 1995-03-21 15:30:59 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1995-03-21 15:30:59 +0000 |
commit | 976a4f67ae008839e122c53d31472ce88ec98a17 (patch) | |
tree | a1c6f43822d029a1013be065149670aaf4169de5 /usr.bin/chpass | |
parent | 2fe73346e8cf81089c1d58be2b5c9f3cdfd2de21 (diff) | |
download | FreeBSD-src-976a4f67ae008839e122c53d31472ce88ec98a17.zip FreeBSD-src-976a4f67ae008839e122c53d31472ce88ec98a17.tar.gz |
Bug fixed: even root was unable to edit restricted fields
Diffstat (limited to 'usr.bin/chpass')
-rw-r--r-- | usr.bin/chpass/edit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/chpass/edit.c b/usr.bin/chpass/edit.c index b62b40f..b0ef308 100644 --- a/usr.bin/chpass/edit.c +++ b/usr.bin/chpass/edit.c @@ -124,25 +124,25 @@ display(fd, pw) p = strsep(&bp, ","); if (p) list[E_NAME].save = strdup(p); - if (!list[E_NAME].restricted) + if (!list[E_NAME].restricted || !uid) (void)fprintf(fp, "Full Name: %s\n", p ? p : ""); p = strsep(&bp, ","); if (p) list[E_LOCATE].save = strdup(p); - if (!list[E_LOCATE].restricted) + if (!list[E_LOCATE].restricted || !uid) (void)fprintf(fp, "Location: %s\n", p ? p : ""); p = strsep(&bp, ","); if (p) list[E_BPHONE].save = strdup(p); - if (!list[E_BPHONE].restricted) + if (!list[E_BPHONE].restricted || !uid) (void)fprintf(fp, "Office Phone: %s\n", p ? p : ""); p = strsep(&bp, ","); if (p) list[E_HPHONE].save = strdup(p); - if (!list[E_HPHONE].restricted) + if (!list[E_HPHONE].restricted || !uid) (void)fprintf(fp, "Home Phone: %s\n", p ? p : ""); (void)fchown(fd, getuid(), getgid()); |