]> andersk Git - nss_nonlocal.git/commitdiff
end{pw,gr}ent, initgroups_dyn: Call all functions from the nonlocal chain
authorAnders Kaseorg <andersk@mit.edu>
Wed, 12 Jun 2013 23:24:06 +0000 (19:24 -0400)
committerAnders Kaseorg <andersk@mit.edu>
Thu, 13 Jun 2013 03:17:25 +0000 (23:17 -0400)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
nonlocal-group.c
nonlocal-passwd.c
nonlocal.h
walk_nss.h

index 4c0a5b10469940631a343f6b01bb835d401eccf5..57f01e2c8d1dce948687cd732c378dc244202d97 100644 (file)
@@ -213,7 +213,7 @@ _nss_nonlocal_endgrent(void)
     enum nss_status status;
     const struct walk_nss w = {
        .lookup = &__nss_group_nonlocal_lookup, .fct_name = "endgrent",
-       .status = &status
+       .status = &status, .all_values = 1,
     };
     const __typeof__(&_nss_nonlocal_endgrent) self = NULL;
 
@@ -361,7 +361,7 @@ _nss_nonlocal_initgroups_dyn(const char *user, gid_t group, long int *start,
     enum nss_status status;
     const struct walk_nss w = {
        .lookup = &__nss_group_nonlocal_lookup, .fct_name = "initgroups_dyn",
-       .status = &status, .errnop = errnop
+       .status = &status, .all_values = 1, .errnop = errnop
     };
     const __typeof__(&_nss_nonlocal_initgroups_dyn) self = NULL;
 
index f8e7f96f823ded1760977b01a28025ea8b851f43..41ea498689cbd707e03c08a88c4fb19b7986cc09 100644 (file)
@@ -204,7 +204,7 @@ _nss_nonlocal_endpwent(void)
     enum nss_status status;
     const struct walk_nss w = {
        .lookup = &__nss_passwd_nonlocal_lookup, .fct_name = "endpwent",
-       .status = &status
+       .status = &status, .all_values = 1,
     };
     const __typeof__(&_nss_nonlocal_endpwent) self = NULL;
 
index 9574ff8f99d6bce8f57ed5930a6bf1d9788b5bd1..7b8ca2f326c58ba680d0ba6f9ab49e916f4eba0b 100644 (file)
@@ -49,6 +49,7 @@ typedef bool _Bool;
 
 struct walk_nss {
     enum nss_status *status;
+    int all_values;
     int (*lookup)(service_user **ni, const char *fct_name,
                  void **fctp) internal_function;
     const char *fct_name;
index 78d3575539be152e3c624609f3e73e3c2b6ea4ae..24cf4c5c2580f1cbd452daadc7c1f981555cc846 100644 (file)
@@ -79,7 +79,8 @@
            }
            goto walk_nss_morebuf;
        }
-    } while (__nss_next(&nip, w.fct_name, &fct.ptr, *w.status, 0) == 0);
+    } while (__nss_next(&nip, w.fct_name, &fct.ptr, *w.status, w.all_values) ==
+            0);
 
     if (w.buf != NULL && *w.status != NSS_STATUS_SUCCESS) {
        free(*w.buf);
This page took 0.252955 seconds and 5 git commands to generate.