diff options
Diffstat (limited to 'openbsd-compat/pwcache.c')
-rw-r--r-- | openbsd-compat/pwcache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsd-compat/pwcache.c b/openbsd-compat/pwcache.c index fa60935d0..5a8b78801 100644 --- a/openbsd-compat/pwcache.c +++ b/openbsd-compat/pwcache.c | |||
@@ -58,12 +58,12 @@ user_from_uid(uid_t uid, int nouser) | |||
58 | 58 | ||
59 | cp = c_uid + (uid & MASK); | 59 | cp = c_uid + (uid & MASK); |
60 | if (cp->uid != uid || cp->name == NULL) { | 60 | if (cp->uid != uid || cp->name == NULL) { |
61 | #ifdef HAVE_SETPASSENT | ||
62 | if (pwopen == 0) { | 61 | if (pwopen == 0) { |
62 | #ifdef HAVE_SETPASSENT | ||
63 | setpassent(1); | 63 | setpassent(1); |
64 | #endif | ||
64 | pwopen = 1; | 65 | pwopen = 1; |
65 | } | 66 | } |
66 | #endif | ||
67 | if ((pw = getpwuid(uid)) == NULL) { | 67 | if ((pw = getpwuid(uid)) == NULL) { |
68 | if (nouser) | 68 | if (nouser) |
69 | return (NULL); | 69 | return (NULL); |
@@ -93,12 +93,12 @@ group_from_gid(gid_t gid, int nogroup) | |||
93 | 93 | ||
94 | cp = c_gid + (gid & MASK); | 94 | cp = c_gid + (gid & MASK); |
95 | if (cp->gid != gid || cp->name == NULL) { | 95 | if (cp->gid != gid || cp->name == NULL) { |
96 | #ifdef HAVE_SETGROUPENT | ||
97 | if (gropen == 0) { | 96 | if (gropen == 0) { |
97 | #ifdef HAVE_SETGROUPENT | ||
98 | setgroupent(1); | 98 | setgroupent(1); |
99 | #endif | ||
99 | gropen = 1; | 100 | gropen = 1; |
100 | } | 101 | } |
101 | #endif | ||
102 | if ((gr = getgrgid(gid)) == NULL) { | 102 | if ((gr = getgrgid(gid)) == NULL) { |
103 | if (nogroup) | 103 | if (nogroup) |
104 | return (NULL); | 104 | return (NULL); |