From owner-freebsd-bugs@FreeBSD.ORG Tue Aug 28 09:10:02 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91EAD106564A for ; Tue, 28 Aug 2012 09:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 654868FC14 for ; Tue, 28 Aug 2012 09:10:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q7S9A2Pa044741 for ; Tue, 28 Aug 2012 09:10:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q7S9A2o6044740; Tue, 28 Aug 2012 09:10:02 GMT (envelope-from gnats) Resent-Date: Tue, 28 Aug 2012 09:10:02 GMT Resent-Message-Id: <201208280910.q7S9A2o6044740@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Damien Fleuriot Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E27A3106566C for ; Tue, 28 Aug 2012 09:09:33 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id B55F58FC0A for ; Tue, 28 Aug 2012 09:09:33 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q7S99Xxq053990 for ; Tue, 28 Aug 2012 09:09:33 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q7S99XDB053989; Tue, 28 Aug 2012 09:09:33 GMT (envelope-from nobody) Message-Id: <201208280909.q7S99XDB053989@red.freebsd.org> Date: Tue, 28 Aug 2012 09:09:33 GMT From: Damien Fleuriot To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/171136: NTPd -v flag double parsing X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2012 09:10:02 -0000 >Number: 171136 >Category: bin >Synopsis: NTPd -v flag double parsing >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 28 09:10:02 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Damien Fleuriot >Release: 8.3-STABLE >Organization: hi-media >Environment: FreeBSD 8.3-STABLE #2: Wed Aug 22 10:41:47 CEST 2012 amd64 >Description: # ntpd -v ntpd: option `var' requires an argument ntpd - NTP daemon program - Ver. 4.2.4p5 USAGE: ntpd [ - [] | --[{=| }] ]... Flg Arg Option-Name Description -4 no ipv4 Force IPv4 DNS name resolution -6 no ipv6 Force IPv6 DNS name resolution -a no authreq Require crypto authentication -A no authnoreq Do not require crypto authentication -b no bcastsync Allow us to sync to broadcast servers -c Str configfile configuration file name -f Str driftfile frequency drift file name -g no panicgate Allow the first adjustment to be Big -i Str jaildir Jail directory -I Str interface Listen on interface -k Str keyfile path to symmetric keys -l Str logfile path to the log file -L no novirtualips Do not listen to virtual IPs -n no nofork Do not fork -N no nice Run at high priority -p Str pidfile path to the PID file -P Num priority Process priority -q no quit Set the time and quit -r Str propagationdelay Broadcast/propagation delay -U Num updateinterval interval in seconds between scans for new or dropped interfaces -s Str statsdir Statistics file location -t Str trustedkey Trusted key number -u Str user Run as userid (or userid:groupid) -v Str var make ARG an ntp variable (RW) -V Str dvar make ARG an ntp variable (RW|DEF) -x no slew Slew up to 600 seconds -v opt version Output version information and exit -? no help Display usage information and exit -! no more-help Extended usage information passed thru pager Notice how "-v" is reported twice, like so: -v Str var make ARG an ntp variable (RW) -v opt version Output version information and exit Also notice how ntpd seems to interpret the flag twice : # ntpd -v ntpd: option `var' requires an argument ntpd - NTP daemon program - Ver. 4.2.4p5 The problem doesn't arrive with ntpd --version >How-To-Repeat: "ntpd -v" >Fix: Remove the "show version" use of -v and stick with --version >Release-Note: >Audit-Trail: >Unformatted: