From gnats@FreeBSD.org  Wed Sep 20 14:37:53 2006
Return-Path: <gnats@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0CD7616A412;
	Wed, 20 Sep 2006 14:37:53 +0000 (UTC)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by mx1.FreeBSD.org (Postfix) with ESMTP id CCF1043D67;
	Wed, 20 Sep 2006 14:37:52 +0000 (GMT)
	(envelope-from gnats@FreeBSD.org)
Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1])
	by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k8KEbq7l047018;
	Wed, 20 Sep 2006 14:37:52 GMT
	(envelope-from gnats@freefall.freebsd.org)
Received: (from gnats@localhost)
	by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k8KEbqni047017;
	Wed, 20 Sep 2006 14:37:52 GMT
	(envelope-from gnats)
Message-Id: <200609201437.k8KEbqni047017@freefall.freebsd.org>
Date: Wed, 20 Sep 2006 14:37:52 GMT
From: Mindaugas <gloomy@gloomy.eu>
To: freebsd-gnats-submit@FreeBSD.org
Cc: Mark Linimon <linimon@FreeBSD.org>
Subject: ntpdate(8) utility does not obey the -s option the right way
X-Send-Pr-Version: www-2.3

>Number:         103425
>Category:       bin
>Synopsis:       ntpdate(8) utility does not obey the -s option the right way
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 20 14:40:30 GMT 2006
>Closed-Date:    Wed Feb 21 21:07:08 GMT 2007
>Last-Modified:  Wed Feb 21 21:07:08 GMT 2007
>Originator:     Mindaugas
>Release:        5.4-STABLE
>Organization:
>Environment:
FreeBSD floridamortgagemadeeasy.com 5.4-STABLE FreeBSD 5.4-STABLE #1: Fri Jan 13 06:21:03 UTC 2006     mindaugas@beta.floridamortgagemadeeasy.com:/usr/src/sys/i386/compile/beta  i386

>Description:
the manual of ntpdate (man ntpdate) tells:
 -s      Divert logging output from the standard output (default) to the
             system syslog(3) facility.  This is designed primarily for conve-
             nience of cron(8) scripts.

I have ntpdate command executed every 4 to 24 hours on various servers by
the cron. While using -s option i still get information output to the
standard output (the cron emails that output text by the email). The -s
option *does not* divert the output from the standart output to the syslog.
It just adds extra logging to the syslog.

Examining ntpdate source confirms that.

According to the manual it should shutdown the output to the standard output
and use syslog instead.

And this is quite annoying to get email from crontab every time ntpdate
updates the time ;)
>How-To-Repeat:
set ntpdate with -s option on crontab
>Fix:
Parse the ntpdate.c
(http://www.freebsd.org/cgi/cvsweb.cgi/src/contrib/ntp/ntpdate/ntpdate.c?rev=1.1.1.7&content-type=text/x-cvsweb-markup)
and maybe other files to properly check the status of syslogit variable
each time the program has anything to output.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Wed Feb 21 21:07:04 UTC 2007 
State-Changed-Why:  
Please refer to the ntp people to get this straight. We use it as 
contributed code and we do not change those files to keep  the changes 
needed to a minimum, if they fix it we can do a vendor import to resolve 
this. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=103425 
>Unformatted:
