]> andersk Git - openssh.git/blobdiff - openbsd-compat/pwcache.c
Oops, forgot to document second change to roaming_client.c
[openssh.git] / openbsd-compat / pwcache.c
index fa60935d0d0508828efac3db8417e4084dcb60be..5a8b78801b91138fd93575936429d1052176bd9d 100644 (file)
@@ -58,12 +58,12 @@ user_from_uid(uid_t uid, int nouser)
 
        cp = c_uid + (uid & MASK);
        if (cp->uid != uid || cp->name == NULL) {
-#ifdef HAVE_SETPASSENT
                if (pwopen == 0) {
+#ifdef HAVE_SETPASSENT
                        setpassent(1);
+#endif
                        pwopen = 1;
                }
-#endif
                if ((pw = getpwuid(uid)) == NULL) {
                        if (nouser)
                                return (NULL);
@@ -93,12 +93,12 @@ group_from_gid(gid_t gid, int nogroup)
 
        cp = c_gid + (gid & MASK);
        if (cp->gid != gid || cp->name == NULL) {
-#ifdef HAVE_SETGROUPENT
                if (gropen == 0) {
+#ifdef HAVE_SETGROUPENT
                        setgroupent(1);
+#endif
                        gropen = 1;
                }
-#endif
                if ((gr = getgrgid(gid)) == NULL) {
                        if (nogroup)
                                return (NULL);
This page took 0.045473 seconds and 4 git commands to generate.