about summary refs log tree commit diff
path: root/nscd/connections.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-30 02:24:51 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-30 02:24:51 +0000
commitf7e7a396812f5e6a6ec49ad84204d334630964a0 (patch)
treed1a47d6911b5992497cc8aa30d392e7c0f175e12 /nscd/connections.c
parent04c785b27fd35c740cc9b759b324adb8d6ab9747 (diff)
downloadglibc-f7e7a396812f5e6a6ec49ad84204d334630964a0.tar.gz
glibc-f7e7a396812f5e6a6ec49ad84204d334630964a0.tar.xz
glibc-f7e7a396812f5e6a6ec49ad84204d334630964a0.zip
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 <sys/mman.h>.

	* 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.
Diffstat (limited to 'nscd/connections.c')
-rw-r--r--nscd/connections.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/nscd/connections.c b/nscd/connections.c
index 164fdfbc84..5de7c3b331 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -85,7 +85,8 @@ const char *serv2str[LASTREQ] =
   [GETFDPW] = "GETFDPW",
   [GETFDGR] = "GETFDGR",
   [GETFDHST] = "GETFDHST",
-  [GETAI] = "GETAI"
+  [GETAI] = "GETAI",
+  [INITGROUPS] = "INITGROUPS"
 };
 
 /* The control data structures for the services.  */
@@ -154,6 +155,7 @@ static struct database_dyn *const serv2db[LASTREQ] =
   [GETFDGR] = &dbs[grpdb],
   [GETFDHST] = &dbs[hstdb],
   [GETAI] = &dbs[hstdb],
+  [INITGROUPS] = &dbs[grpdb]
 };
 
 
@@ -604,9 +606,11 @@ cannot handle old request version %d; current version is %d"),
 
   struct database_dyn *db = serv2db[req->type];
 
+  // XXX Clean up so that each new command need not introduce a
+  // XXX new conditional.
   if ((__builtin_expect (req->type, GETPWBYNAME) >= GETPWBYNAME
        && __builtin_expect (req->type, LASTDBREQ) <= LASTDBREQ)
-      || req->type == GETAI)
+      || req->type == GETAI || req->type == INITGROUPS)
     {
       if (__builtin_expect (debug_level, 0) > 0)
 	{
@@ -719,6 +723,10 @@ cannot handle old request version %d; current version is %d"),
       addhstai (db, fd, req, key, uid);
       break;
 
+    case INITGROUPS:
+      addinitgroups (db, fd, req, key, uid);
+      break;
+
     case GETSTAT:
     case SHUTDOWN:
     case INVALIDATE: