summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2010-01-16 13:53:52 +1100
committerDarren Tucker <dtucker@zip.com.au>2010-01-16 13:53:52 +1100
commit612e400c68e644054e476082cb757b0a157a564b (patch)
treec70e86e6aab2fea8c2cd10c230831198e5614dd8
parentdab129bef57139232133a870430a9284858909bf (diff)
- (dtucker) [openbsd-compat/pwcache.c] Shrink ifdef area to prevent unused
variable warnings.
-rw-r--r--ChangeLog2
-rw-r--r--openbsd-compat/pwcache.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 0b533798d..29e555ab1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,8 @@
9 - markus@cvs.openbsd.org 2010/01/15 09:24:23 9 - markus@cvs.openbsd.org 2010/01/15 09:24:23
10 [sftp-common.c] 10 [sftp-common.c]
11 unused 11 unused
12 - (dtucker) [openbsd-compat/pwcache.c] Shrink ifdef area to prevent unused
13 variable warnings.
12 14
1320100115 1520100115
14 - (dtucker) OpenBSD CVS Sync 16 - (dtucker) OpenBSD CVS Sync
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);