summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2018-07-27 15:17:24 +0000
committerIan Lepore <ian@FreeBSD.org>2018-07-27 15:17:24 +0000
commitdb702f87b098c449905c03610b4111e06116f9a1 (patch)
tree06be512b0d3702651c7d826bd7ddfc4e3ddc3cb2
parentc9fa89c1c461381296da12d84e7eb81c4641a4ca (diff)
downloadpw-darwin-db702f87b098c449905c03610b4111e06116f9a1.tar.gz
pw-darwin-db702f87b098c449905c03610b4111e06116f9a1.tar.zst
pw-darwin-db702f87b098c449905c03610b4111e06116f9a1.zip
Remove some code that's no longer needed because it's now part of pw_scan(3).
It was also leading to segfaults; pw can be NULL when control reaches these lines now, because of the way my previous change restructured the loops. Reported by: lwhsu@
-rw-r--r--pw/pw_vpw.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/pw/pw_vpw.c b/pw/pw_vpw.c
index 4517a74..192d588 100644
--- a/pw/pw_vpw.c
+++ b/pw/pw_vpw.c
@@ -113,18 +113,6 @@ vnextpwent(char const *nam, uid_t uid, int doclose)
}
free(line);
- /*
- * If we read the non-master passwd, some fields may not have been
- * populated. Clean them up so that the output looks the same as that
- * generated using getpwnam() which also inits them to these values.
- */
- if (!(pw->pw_fields & _PWF_CLASS))
- pw->pw_class = "";
- if (!(pw->pw_fields & _PWF_CHANGE))
- pw->pw_change = 0;
- if (!(pw->pw_fields & _PWF_EXPIRE))
- pw->pw_expire = 0;
-
return (pw);
}