This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix nscd -i {hosts,passwd,group}


Hi!

Not tested, but I can't believe the code works as is.
key is an integer, req.key_len is strlen (arg) + 1.

BTW, what should invalidate AI cache?  nscd -i hosts as well
or nscd -i aicache?

2004-09-17  Jakub Jelinek  <jakub@redhat.com>

	* nscd/nscd.c (parse_opt): Write arg string instead of (void *) key
	to the socket.

--- libc/nscd/nscd.c.jj	2004-09-16 11:35:28.000000000 +0200
+++ libc/nscd/nscd.c	2004-09-17 19:34:16.096437944 +0200
@@ -332,7 +332,7 @@ parse_opt (int key, char *arg, struct ar
 
 	  iov[0].iov_base = &req;
 	  iov[0].iov_len = sizeof (req);
-	  iov[1].iov_base = (void *) key;
+	  iov[1].iov_base = arg;
 	  iov[1].iov_len = req.key_len;
 
 	  nbytes = TEMP_FAILURE_RETRY (writev (sock, iov, 2));

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]