Do not expose password if it is empty and PWF_STANDARD format is requested

MFC after:	1 week
This commit is contained in:
fjoe 2003-01-23 19:51:48 +00:00
parent 9297a8ce81
commit 30b555b3ea

View File

@ -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",