diff options
author | DJ Delorie <dj@redhat.com> | 2020-11-09 22:09:34 -0500 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2020-12-04 17:16:32 -0500 |
commit | f4f3b09111e9fa38fd485979a3e40b6cfa6a757d (patch) | |
tree | f2743a776f31b86ebebc9f145dd1305bade66eef /nscd | |
parent | 6eceded941bb6dcc097291757e2aef5cd7212133 (diff) | |
download | glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.tar.gz glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.tar.xz glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.zip |
nsswitch: use new internal API (callers)
Stitch new ABI and types throughout all NSS callers. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'nscd')
-rw-r--r-- | nscd/aicache.c | 17 | ||||
-rw-r--r-- | nscd/gai.c | 2 | ||||
-rw-r--r-- | nscd/initgrcache.c | 8 | ||||
-rw-r--r-- | nscd/netgroupcache.c | 4 | ||||
-rw-r--r-- | nscd/nscd_netgroup.c | 2 |
5 files changed, 14 insertions, 19 deletions
diff --git a/nscd/aicache.c b/nscd/aicache.c index ee9c9b8843..a15ea751a7 100644 --- a/nscd/aicache.c +++ b/nscd/aicache.c @@ -71,20 +71,15 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req, dbg_log (_("Reloading \"%s\" in hosts cache!"), (char *) key); } - static service_user *hosts_database; - service_user *nip; + nss_action_list nip; int no_more; int rc6 = 0; int rc4 = 0; int herrno = 0; - if (hosts_database == NULL) - no_more = __nss_database_lookup2 ("hosts", NULL, - "dns [!UNAVAIL=return] files", - &hosts_database); - else - no_more = 0; - nip = hosts_database; + no_more = __nss_database_lookup2 ("hosts", NULL, + "dns [!UNAVAIL=return] files", + &nip); /* Initialize configurations. */ struct resolv_context *ctx = __resolv_context_get (); @@ -442,10 +437,10 @@ next_nip: if (nss_next_action (nip, status[1]) == NSS_ACTION_RETURN) break; - if (nip->next == NULL) + if (nip[1].module == NULL) no_more = -1; else - nip = nip->next; + ++nip; } /* No result found. Create a negative result record. */ diff --git a/nscd/gai.c b/nscd/gai.c index b0058bc873..1b5dc94c0e 100644 --- a/nscd/gai.c +++ b/nscd/gai.c @@ -48,4 +48,4 @@ #include <check_native.c> /* Some variables normally defined in libc. */ -service_user *__nss_hosts_database attribute_hidden; +nss_action_list __nss_hosts_database attribute_hidden; diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c index a1102e4e46..0436421250 100644 --- a/nscd/initgrcache.c +++ b/nscd/initgrcache.c @@ -77,8 +77,8 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, dbg_log (_("Reloading \"%s\" in group cache!"), (char *) key); } - static service_user *group_database; - service_user *nip; + static nss_action_list group_database; + nss_action_list nip; int no_more; if (group_database == NULL) @@ -161,10 +161,10 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, && nss_next_action (nip, status) == NSS_ACTION_RETURN) break; - if (nip->next == NULL) + if (nip[1].module == NULL) no_more = -1; else - nip = nip->next; + ++nip; } bool all_written; diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c index 88c69d1e9c..67be24e837 100644 --- a/nscd/netgroupcache.c +++ b/nscd/netgroupcache.c @@ -124,7 +124,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, dbg_log (_("Reloading \"%s\" in netgroup cache!"), key); } - static service_user *netgroup_database; + static nss_action_list netgroup_database; time_t timeout; struct dataset *dataset; bool cacheable = false; @@ -175,7 +175,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req, void *ptr; } setfct; - service_user *nip = netgroup_database; + nss_action_list nip = netgroup_database; int no_more = __nss_lookup (&nip, "setnetgrent", NULL, &setfct.ptr); while (!no_more) { diff --git a/nscd/nscd_netgroup.c b/nscd/nscd_netgroup.c index 7b8dc4081a..0ed9c0cda6 100644 --- a/nscd/nscd_netgroup.c +++ b/nscd/nscd_netgroup.c @@ -116,7 +116,7 @@ __nscd_setnetgrent (const char *group, struct __netgrent *datap) datap->data_size = datalen; datap->cursor = respdata; datap->first = 1; - datap->nip = (service_user *) -1l; + datap->nip = (nss_action_list) -1l; datap->known_groups = NULL; datap->needed_groups = NULL; |