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 | 6a151c16645f90b21f171a44661b109f06e9097e (patch) | |
tree | 360f0809465e12b2c59fc2cacd0ca27bd6d6d8e1 | |
parent | e4991920d98d5e5afad673e5d537d558426b7716 (diff) | |
download | pw-darwin-6a151c16645f90b21f171a44661b109f06e9097e.tar.gz pw-darwin-6a151c16645f90b21f171a44661b109f06e9097e.tar.zst pw-darwin-6a151c16645f90b21f171a44661b109f06e9097e.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", |