From setantae@submonkey.net  Tue Nov 20 03:28:44 2001
Return-Path: <setantae@submonkey.net>
Received: from relay3-gui.server.ntli.net (relay3-gui.server.ntli.net [194.168.4.200])
	by hub.freebsd.org (Postfix) with ESMTP id 627FB37B405
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 20 Nov 2001 03:28:43 -0800 (PST)
Received: from pc3-card3-0-cust122.cdf.cable.ntl.com
	([62.254.251.122] helo=rhadamanth.private.submonkey.net ident=exim)
	by relay3-gui.server.ntli.net with esmtp (Exim 3.03 #2)
	id 166950-0007RL-00
	for FreeBSD-gnats-submit@freebsd.org; Tue, 20 Nov 2001 11:28:42 +0000
Received: from setantae by rhadamanth.private.submonkey.net with local (Exim 3.33 #1)
	id 16694u-000Js2-00
	for FreeBSD-gnats-submit@freebsd.org; Tue, 20 Nov 2001 11:28:36 +0000
Message-Id: <E16694u-000Js2-00@rhadamanth.private.submonkey.net>
Date: Tue, 20 Nov 2001 11:28:36 +0000
From: Ceri <setantae@submonkey.net>
Sender: setantae <setantae@submonkey.net>
Reply-To: Ceri <setantae@submonkey.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ntpdc -c does not work as advertised
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         32129
>Category:       bin
>Synopsis:       ntpdc -c does not work as advertised
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 20 03:30:00 PST 2001
>Closed-Date:    Tue Nov 20 15:51:42 PST 2001
>Last-Modified:  Tue Nov 20 16:00:00 PST 2001
>Originator:     setantae@submonkey.net
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD rhadamanth.private.submonkey.net 4.4-STABLE FreeBSD 4.4-STABLE #0: Fri Nov 16 21:14:33 GMT 2001 root@rhadamanth.private.submonkey.net:/usr/obj/usr/src/sys/RHADAMANTH i386


	
>Description:

Not sure if this is a documentation bug or a software bug.

The manpage for ntpdc states :

SYNOPSIS
     ntpdc [-ilnps] [-c command] [host ...]

     -c command
             The command argument is interpreted as an interactive format com-
             mand and is added to the list of commands to be executed on the
             specified host(s).  Multiple -c options may be given.

which indicates that all commands specified should default to the host
given on the command line.
This does not happen, since the host is not passed to the command to
be executed unless quotes are used.

>How-To-Repeat:

root@rhadamanth setantae# ntpdc -c showpeer ntp2b.mcc.ac.uk
usage: showpeer peer_address [ peer2_addr ] [ peer3_addr ] [ peer4_addr ]
root@rhadamanth setantae# ntpdc -c "showpeer ntp2b.mcc.ac.uk"
remote 130.88.200.98, local 62.254.251.122
hmode client, pmode unspec, stratum 2, precision -26
leap 00, refid [129.132.2.21], rootdistance 0.02753, rootdispersion 0.02296
ppoll 6, hpoll 6, keyid 0, version 4, association 8676
valid 0, reach 001, unreach 1, flash 0x0000, boffset 0.00400, ttl/mode 0
timer 0s, flags config, bclient
reference time:      bfa4b80b.3691d9b1  Tue, Nov 20 2001 11:07:55.213
originate timestamp: bfa4bb35.13702602  Tue, Nov 20 2001 11:21:25.075
receive timestamp:   bfa4bb35.1581f106  Tue, Nov 20 2001 11:21:25.084
transmit timestamp:  bfa4bb35.03d230b9  Tue, Nov 20 2001 11:21:25.014
filter delay:  0.06892  0.00000  0.00000  0.00000
               0.00000  0.00000  0.00000  0.00000
filter offset: 0.026381 0.000000 0.000000 0.000000
               0.000000 0.000000 0.000000 0.000000
filter order:  0        1        2        3
               4        5        6        7
offset 0.026381, delay 0.06892, error bound 2.81735, filter error 0.02467
root@rhadamanth setantae#

>Fix:
The above _is_ a workaround.
However, the documentation suggests that the first method attempted should
work.

Ceri

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: wollman 
State-Changed-When: Tue Nov 20 15:51:42 PST 2001 
State-Changed-Why:  
Pilot error. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32129 

From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To: Ceri <setantae@submonkey.net>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: bin/32129: ntpdc -c does not work as advertised
Date: Tue, 20 Nov 2001 18:51:15 -0500 (EST)

 <<On Tue, 20 Nov 2001 11:28:36 +0000, Ceri <setantae@submonkey.net> said:
 
 >      -c command
 >              The command argument is interpreted as an interactive format com-
 >              mand and is added to the list of commands to be executed on the
 >              specified host(s).  Multiple -c options may be given.
 
 > which indicates that all commands specified should default to the host
 > given on the command line.
 
 Yes, but that doesn't mean what you think it means.
 
 > root@rhadamanth setantae# ntpdc -c "showpeer ntp2b.mcc.ac.uk"
 > remote 130.88.200.98, local 62.254.251.122
 
 This is a query for information *about* ntp2b.mcc.ac.uk from your
 machine, pc3-card3-0-cust122.cdf.cable.ntl.com.
 
 The host on the command line is the host to query.  Compare the output
 of:
 
 	ntpdc -c peers ntp2b.mcc.ac.uk
 
 and:
 
 	ntpdc -c "peers ntp2b.mcc.ac.uk"
 
 When you said:
 
 > root@rhadamanth setantae# ntpdc -c showpeer ntp2b.mcc.ac.uk
 
 ntpdc correctly interepreted that as a request to query
 ntp2b.mcc.ac.uk for some information, but then determined that the
 command you gave it (`showpeer') was not properly formed.
 
 -GAWollman
 
>Unformatted:
