aboutsummaryrefslogtreecommitdiff
path: root/inet/netgroup.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-08-14 04:21:09 +0000
committerUlrich Drepper <drepper@redhat.com>2004-08-14 04:21:09 +0000
commit8500b0cabadf7500bdccdf6b94ad3f36bf7a96c9 (patch)
tree5c5eb63f6fa5ee9448988b2a231a8cf8d0608184 /inet/netgroup.h
parenta57532064137c37543e7e8861a8931444a21157c (diff)
downloadglibc-8500b0cabadf7500bdccdf6b94ad3f36bf7a96c9.zip
glibc-8500b0cabadf7500bdccdf6b94ad3f36bf7a96c9.tar.gz
glibc-8500b0cabadf7500bdccdf6b94ad3f36bf7a96c9.tar.bz2
Update.
* nis/nss_nis/nis-netgrp.c: Remove locking by using data in struct __netgrent object passed in instead of global variables. Optimize. * nis/nss_nisplus/nisplus-netgrp.c: Remove locking by using data in struct __netgrent object passed in instead of global variables. * inet/netgroup.h (struct __netgrent): Add service_user field. Move cursor in anonymous union, add new field location to that union. * inet/getnetgrent_r.c: Extensive rewrite to really enable concurrent uset of set/get/endnetgrent and innetgr.
Diffstat (limited to 'inet/netgroup.h')
-rw-r--r--inet/netgroup.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/inet/netgroup.h b/inet/netgroup.h
index aea5218..c6b77ba 100644
--- a/inet/netgroup.h
+++ b/inet/netgroup.h
@@ -20,6 +20,8 @@
#ifndef _NETGROUP_H
#define _NETGROUP_H 1
+#include <nsswitch.h>
+
/* A netgroup can consist of names of other netgroups. We have to
track which netgroups were read and which still have to be read. */
struct name_list
@@ -51,11 +53,19 @@ struct __netgrent
functions. We must avoid global variables. */
char *data;
size_t data_size;
- char *cursor;
+ union
+ {
+ char *cursor;
+ unsigned long int position;
+ };
int first;
struct name_list *known_groups;
struct name_list *needed_groups;
+
+ /* This handle for the NSS data base is shared between all
+ set/get/endXXXent functions. */
+ service_user *nip;
};