diff options
author | Max Khon <fjoe@FreeBSD.org> | 2003-01-23 19:51:48 +0000 |
---|---|---|
committer | Max Khon <fjoe@FreeBSD.org> | 2003-01-23 19:51:48 +0000 |
commit | f3550ab8855c84626745485e7387c4699db9e505 (patch) | |
tree | 20823bf7f906158c96f6f16f074130cbab9d3940 | |
parent | 5151e80832baee1211f79630e67fb4cb4decb5d4 (diff) | |
download | pw-darwin-f3550ab8855c84626745485e7387c4699db9e505.tar.gz pw-darwin-f3550ab8855c84626745485e7387c4699db9e505.tar.zst pw-darwin-f3550ab8855c84626745485e7387c4699db9e505.zip |
Do not expose password if it is empty and PWF_STANDARD format is requested
MFC after: 1 week
-rw-r--r-- | pw/pwupd.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -111,7 +111,8 @@ fmtpwentry(char *buf, struct passwd * pwd, int type) int l; char *pw; - pw = (pwd->pw_passwd == NULL || !*pwd->pw_passwd) ? "" : (type == PWF_MASTER) ? pwd->pw_passwd : "*"; + pw = (type == PWF_MASTER) ? + ((pwd->pw_passwd == NULL) ? "" : pwd->pw_passwd) : "*"; if (type == PWF_PASSWD) l = sprintf(buf, "%s:*:%ld:%ld:%s:%s:%s\n", |