Bug 82713

Summary: ntp rc.d script fails to open firewall for peers
Product: [Retired] Red Hat Linux Reporter: John Mellor <john>
Component: ntpAssignee: Harald Hoyer <harald>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: davidbh-redhatbeta, mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-10-08 11:59:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Mellor 2003-01-25 06:15:27 UTC
Description of problem:
Only NTP servers are punched through the firewall.  Peers should also punch
through, as specified peers are normally outside the trusted network.

Version-Release number of selected component (if applicable):
ntp-4.1.1b-1.rpm

How reproducible:
every time

Steps to Reproduce:
1.Construct an ntp.conf that has peers
2.restart ntp using the rc script
    
Actual results:
note servers punch through firewall but peers do not

Expected results:
explicit peers also punch through the firewall

Additional info:

Comment 1 John Mellor 2003-02-04 00:33:11 UTC
Please alter the code in /etc/rc.d/init.d/ntpd script to determine timeservers
to be:
        timeservers=`/bin/sed \
                 -n -e 's/\#.*$//;/127.*/d' \
                 -e
's/^[[:blank:]]*server[[:blank:]][[:blank:]]*\([[:alnum:].]*\)[[:blank:]]*.*/\1/p' \
                 -e
's/^[[:blank:]]*peer[[:blank:]][[:blank:]]*\([[:alnum:].]*\)[[:blank:]]*.*/\1/p' \
                 $ntpconf`
                                                                                
This should resolve all of the problems.

Comment 2 John Mellor 2003-02-22 22:22:28 UTC
Still not fixed in Phoebe-3.  Please re-open.  Sites listed as peers are not
being punched through the firewall.

Comment 3 John Mellor 2003-02-23 04:00:57 UTC
Suggested code change:

replace the sed script assignment of timeserver (2 places) with:

timeservers=`/usr/bin/awk '$1=="peer"||$1=="server"{print $2}' $ntpconf`

This change also fixes bug 82714 correctly.

Comment 4 Harald Hoyer 2003-03-10 14:49:11 UTC
*** Bug 85894 has been marked as a duplicate of this bug. ***

Comment 5 Harald Hoyer 2003-03-10 14:50:04 UTC
*** Bug 85090 has been marked as a duplicate of this bug. ***

Comment 6 Harald Hoyer 2003-03-10 14:50:50 UTC
*** Bug 82714 has been marked as a duplicate of this bug. ***