[PATCH] Fix nscd -i {hosts,passwd,group}
Jakub Jelinek
jakub@redhat.com
Fri Sep 17 17:39:00 GMT 2004
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
More information about the Libc-hacker
mailing list