pcp
[Top] [All Lists]

[Bug 982] New: pmcd access control logic should not try to resolve hostn

To: pcp@xxxxxxxxxxx
Subject: [Bug 982] New: pmcd access control logic should not try to resolve hostname(1) vice localhost
From: bugzilla-daemon@xxxxxxxxxxx
Date: Tue, 16 Jul 2013 21:37:16 +0000
Auto-submitted: auto-generated
Delivered-to: pcp@xxxxxxxxxxx
Bug ID 982
Summary pmcd access control logic should not try to resolve hostname(1) vice localhost
Product pcp
Version unspecified
Hardware All
OS Linux
Status NEW
Severity major
Priority P5
Component pcp
Assignee pcp@kenj.com.au
Reporter fche@redhat.com
CC pcp@oss.sgi.com
Classification Unclassified

src/libpcp/src/access.c pmGetHostAccess presumes that DNS-resolving the
machine's hostname(1) is an appropriate substitute for the string
'localhost' in a pmcd.conf [access] clause.  This is wrong for several
reasons:

- there is no requirement that a machine's hostname even be present
  in DNS or /etc/hosts, so machines that get machine-generated
  random hostnames will all fail to start usable pmcds

- there is no requirement that all a machine's local network addresses
  be resolved via DNS, even if we hope just one is, so a multihomed
  machine may randomly get some but not others

To make the situation worse, if this hostname-dns-resolution fails,
pmGetHostAccess doesn't even try taking 'localhost' literally, and
resolve that (to 127.0.0.1 or whatever the OS would supply).

A more correct solution would:

- take 'localhost' literally

- not use 'hostname' at all in a vain quest to identify local network
  interface addresses.  Instead, use proper OS-specific query functions
  such as getifaddrs() or ioctl(SIOCGIFCONF).  Optionally trigger this
  heuristic for another magic pseudo-hostname like LOCALHOST.


You are receiving this mail because:
  • You are on the CC list for the bug.
<Prev in Thread] Current Thread [Next in Thread>
  • [Bug 982] New: pmcd access control logic should not try to resolve hostname(1) vice localhost, bugzilla-daemon <=