aboutsummaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2020-11-09 22:09:34 -0500
committerDJ Delorie <dj@redhat.com>2020-12-04 17:16:32 -0500
commitf4f3b09111e9fa38fd485979a3e40b6cfa6a757d (patch)
treef2743a776f31b86ebebc9f145dd1305bade66eef /nscd
parent6eceded941bb6dcc097291757e2aef5cd7212133 (diff)
downloadglibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.zip
glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.tar.gz
glibc-f4f3b09111e9fa38fd485979a3e40b6cfa6a757d.tar.bz2
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.c17
-rw-r--r--nscd/gai.c2
-rw-r--r--nscd/initgrcache.c8
-rw-r--r--nscd/netgroupcache.c4
-rw-r--r--nscd/nscd_netgroup.c2
5 files changed, 14 insertions, 19 deletions
diff --git a/nscd/aicache.c b/nscd/aicache.c
index ee9c9b8..a15ea75 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 b0058bc..1b5dc94 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 a1102e4..0436421 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 88c69d1..67be24e 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 7b8dc40..0ed9c0c 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;