diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 1995-03-21 15:30:59 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 1995-03-21 15:30:59 +0000 |
commit | 5f109145c6868b3b3c4458a3d4f3c9a803d38ed3 (patch) | |
tree | 73d73bb1948d37a4ec8341eb932cbfc87e7af3cd /chpass/edit.c | |
parent | df3e060f6ca69cec91cb52d0e0f1b6cd2b856884 (diff) | |
download | pw-darwin-5f109145c6868b3b3c4458a3d4f3c9a803d38ed3.tar.gz pw-darwin-5f109145c6868b3b3c4458a3d4f3c9a803d38ed3.tar.zst pw-darwin-5f109145c6868b3b3c4458a3d4f3c9a803d38ed3.zip |
Bug fixed: even root was unable to edit restricted fields
Diffstat (limited to 'chpass/edit.c')
-rw-r--r-- | chpass/edit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/chpass/edit.c b/chpass/edit.c index b62b40f..b0ef308 100644 --- a/chpass/edit.c +++ b/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()); |