public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nscd/11928] New: nscd does not account for 'multi on' in /etc/host.conf when ai-resolving hosts
@ 2010-08-19 20:15 pasky at suse dot cz
  2010-08-19 20:23 ` [Bug nscd/11928] " pasky at suse dot cz
  2010-08-22 14:42 ` pasky at suse dot cz
  0 siblings, 2 replies; 3+ messages in thread
From: pasky at suse dot cz @ 2010-08-19 20:15 UTC (permalink / raw)
  To: glibc-bugs

When nscd is handling getaddrinfo() resolution requests, it fails to properly
initialize its resolver options state and ignores /etc/host.conf. An easy way to
reproduce this is by putting 'multi on' in /etc/host.conf and

cat >>/etc/host.conf <<EOT
1.2.3.4 test
1.2.3.5 test
EOT

Then, with nscd stopped:
$ getent ahosts test
1.2.3.4         STREAM test
1.2.3.4         DGRAM  
1.2.3.4         RAW    
1.2.3.5         STREAM 
1.2.3.5         DGRAM  
1.2.3.5         RAW    

However, with nscd running:
$ getent ahosts test
1.2.3.4         STREAM test
1.2.3.4         DGRAM  
1.2.3.4         RAW

-- 
           Summary: nscd does not account for 'multi on' in /etc/host.conf
                    when ai-resolving hosts
           Product: glibc
           Version: 2.12
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nscd
        AssignedTo: drepper at redhat dot com
        ReportedBy: pasky at suse dot cz
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11928

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug nscd/11928] nscd does not account for 'multi on' in /etc/host.conf when ai-resolving hosts
  2010-08-19 20:15 [Bug nscd/11928] New: nscd does not account for 'multi on' in /etc/host.conf when ai-resolving hosts pasky at suse dot cz
@ 2010-08-19 20:23 ` pasky at suse dot cz
  2010-08-22 14:42 ` pasky at suse dot cz
  1 sibling, 0 replies; 3+ messages in thread
From: pasky at suse dot cz @ 2010-08-19 20:23 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From pasky at suse dot cz  2010-08-19 20:23 -------
Created an attachment (id=4940)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=4940&action=view)
proposed patch

This patch makes sure _res_hconf is initialized before resolving is being done.
However, this would not be enough since nscd has its own _res_hconf due to
nscd/res_hconf.c; _res_hconf_init() would work on different _res_hconf instance
than the NSS routines. We just need to make sure nscd and glibc share the same
_res_hconf instance - this should not be a problem since users should run
matching versions of glibc and nscd anyway.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11928

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug nscd/11928] nscd does not account for 'multi on' in /etc/host.conf when ai-resolving hosts
  2010-08-19 20:15 [Bug nscd/11928] New: nscd does not account for 'multi on' in /etc/host.conf when ai-resolving hosts pasky at suse dot cz
  2010-08-19 20:23 ` [Bug nscd/11928] " pasky at suse dot cz
@ 2010-08-22 14:42 ` pasky at suse dot cz
  1 sibling, 0 replies; 3+ messages in thread
From: pasky at suse dot cz @ 2010-08-22 14:42 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From pasky at suse dot cz  2010-08-22 14:42 -------
*** Bug 11536 has been marked as a duplicate of this bug. ***

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11928

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-22 14:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-19 20:15 [Bug nscd/11928] New: nscd does not account for 'multi on' in /etc/host.conf when ai-resolving hosts pasky at suse dot cz
2010-08-19 20:23 ` [Bug nscd/11928] " pasky at suse dot cz
2010-08-22 14:42 ` pasky at suse dot cz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).