Bug 137851 - No stderr output from /usr/sbin/dhcpd -d
No stderr output from /usr/sbin/dhcpd -d
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: dhcp (Show other bugs)
rawhide
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-02 01:50 EST by Olaf Manczak
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-03 20:51:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Olaf Manczak 2004-11-02 01:50:37 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; rv:1.7.3)
Gecko/20041020 Firefox/0.10.1

Description of problem:
To monitor what the dhcpd server does I started

  /usr/sbin/dhcpd -d

but there is no standard output.

The /proc/<pid>/fd shows something weird:


  lrwx------  1 root root 64 Nov  1 22:48 0 -> /null
  lrwx------  1 root root 64 Nov  1 22:48 1 -> /null
  lrwx------  1 root root 64 Nov  1 22:48 2 -> /null
  lrwx------  1 root root 64 Nov  1 22:48 3 -> socket:[59688]
  lrwx------  1 root root 64 Nov  1 22:48 4 -> socket:[59689]
  l-wx------  1 root root 64 Nov  1 22:48 5 -> /var/lib/dhcp/dhcpd.leases
  lrwx------  1 root root 64 Nov  1 22:48 6 -> socket:[59692]
  lrwx------  1 root root 64 Nov  1 22:48 7 -> socket:[59691]

The strace output looks ok that is the process sends output
to fd=2

The syslog output looks ok (no missing messages).

The same happens in absence of /etc/dhcpd.conf


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Login as root
2. Remove or rename /etc/dhcpd.conf
3. Start /usr/sbin/dhcpd -d

    

Actual Results:  No output

Expected Results:  Standard dhcp messages

Additional info:
Comment 1 Olaf Manczak 2004-11-02 01:56:33 EST
dhcp-3.0.1-11
kernel-2.6.9-1.649
glibc-2.3.3-74

# uname -a
Linux tullamore.home.olavi.org 2.6.9-1.649 #1 Fri Oct 29 00:36:01 EDT
2004 x86_64 x86_64 x86_64 GNU/Linux

# ifconfig
eth1      Link encap:Ethernet  HWaddr 00:10:18:03:20:7D
          inet addr:10.198.185.65  Bcast:10.198.185.255 
Mask:255.255.255.0
          inet6 addr: fe80::210:18ff:fe03:207d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8830 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9637 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5370152 (5.1 MiB)  TX bytes:4819392 (4.5 MiB)
          Interrupt:12

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:661 errors:0 dropped:0 overruns:0 frame:0
          TX packets:661 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:56497 (55.1 KiB)  TX bytes:56497 (55.1 KiB)

Comment 2 Jason Vas Dias 2004-11-02 10:01:45 EST
 I would guess that you have SELinux enabled ? 
 With SELinux targetted policy, dhcpd does not have permission
 to write to character devices.
 Doing:
      # dhcpd -d | cat 
 or   # dhcpd -d | tee /tmp/dhcpd.log
 USED to work; now, with selinux-policy-targeted-1.17.36-1, even
 this does not. 
 The only way I can get dhcpd to log to stderr is to do:
      # setenforce 0; dhcpd -d
 This works fine.
 I'm taking this up with the SELinux developers.
 
Comment 3 Jason Vas Dias 2004-11-02 10:24:41 EST
 Doing:
    # dhcpd -d 2>&1 | tee /tmp/dhcpd.log
 or # dhcpd -d 2>&1 | cat
 also works fine with SELinux in enforcing mode.
Comment 4 Olaf Manczak 2004-11-03 20:51:00 EST
You are right.

However, this is very confusing since there is no error message
whatsoever. Can anything be done about it?

Note You need to log in before you can comment on or make changes to this bug.