From f7e7a396812f5e6a6ec49ad84204d334630964a0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 30 Sep 2004 02:24:51 +0000 Subject: Update. * grp/initgroups.c: Move compat_call implementation... * grp/compat-initgroups.c: ...to here. New file. * grp/Makefile (distribute): Add compat-initgroups.c. (CFLAGS-initgroups.c): Add -DUSE_NSCD=1. * mscd/initgrcache.c: New file. * nscd/nscd_initgroups.c: New file. * nscd/Makefile (routines): Add nscd_initgroups. (nscd-modules): Add initgrcache. * nscd/cache.c (prune_cache): Add support for INITGROUPS entries. * nscd/connections.c: Handle INITGROUPS requests. * nscd/nscd-client.h: Define INITGROUPS, initgr_response_header. Add initgrdata element to struct datahead. Fix typo in comment. * nscd/nscd_proto.h: Declare __nscd_getgrouplist. Fix parameter type in __nscd_getgrgrid_r. * nscd/selinux.c (perms): Add INITGROUPS entry. * nscd/nscd_getai.c: No need to include . * sunrpc/get_myaddr.c (get_myaddress): Account for interfaces without assigned addresses. * sunrpc/pmap_clnt.c (__get_myaddress): Likewise. * sunrpc/pmap_rmt.c (getbroadcastnets): Likewise. * sunrpc/clnt_udp.c (is_network_up): Likewise. --- nscd/nscd-client.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'nscd/nscd-client.h') diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index 4451349278..930255cb81 100644 --- a/nscd/nscd-client.h +++ b/nscd/nscd-client.h @@ -62,6 +62,7 @@ typedef enum GETFDGR, GETFDHST, GETAI, + INITGROUPS, LASTREQ } request_type; @@ -140,6 +141,15 @@ struct nscd_ai_result char *addrs; }; +/* Structure sent in reply to initgroups query. Note that this struct is + sent also if the service is disabled or there is no record found. */ +typedef struct +{ + int32_t version; + int32_t found; + nscd_ssize_t ngrps; +} initgr_response_header; + /* Type for offsets in data part of database. */ typedef uint32_t ref_t; @@ -173,6 +183,7 @@ struct datahead gr_response_header grdata; hst_response_header hstdata; ai_response_header aidata; + initgr_response_header initgrdata; nscd_ssize_t align1; nscd_time_t align2; } data[0]; @@ -244,7 +255,7 @@ struct mapped_database const struct database_pers_head *head; const char *data; size_t mapsize; - int counter; /* > 0 indicates it isusable. */ + int counter; /* > 0 indicates it is usable. */ }; #define NO_MAPPING ((struct mapped_database *) -1l) -- cgit 1.4.1