From kh@mogami-wire.co.jp  Mon Jan  3 00:40:38 2000
Return-Path: <kh@mogami-wire.co.jp>
Received: from eve.mogami-wire.co.jp (eve.mogami-wire.co.jp [210.161.93.162])
	by hub.freebsd.org (Postfix) with ESMTP id 3518314F3A
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  3 Jan 2000 00:40:23 -0800 (PST)
	(envelope-from kh@mogami-wire.co.jp)
Received: (from uucp@localhost)
	by eve.mogami-wire.co.jp (8.8.8/3.6W-eve) with UUCP id RAA04576
	for FreeBSD-gnats-submit@freebsd.org; Mon, 3 Jan 2000 17:40:10 +0900 (JST)
Received: (from kh@localhost)
	by poem.mogami-wire.co.jp (8.9.3/3.7W-uucp) id RAA00705;
	Mon, 3 Jan 2000 17:11:05 +0900 (JST)
Message-Id: <200001030811.RAA00705@poem.mogami-wire.co.jp>
Date: Mon, 3 Jan 2000 17:11:05 +0900 (JST)
From: Kouichi Hirabayashi <kh@mogami-wire.co.jp>
Reply-To: kh@mogami-wire.co.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: comsat(8) failes to open system mail box
X-Send-Pr-Version: 3.2

>Number:         15855
>Category:       bin
>Synopsis:       comsat(8) failes to open system mail box
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan  3 00:50:00 PST 2000
>Closed-Date:    Tue May 29 07:03:48 PDT 2001
>Last-Modified:  Tue May 29 07:05:55 PDT 2001
>Originator:     Kouichi Hirabayashi
>Release:        FreeBSD 3.4-RELEASE i386
>Organization:
Mogami Wire & Cable Corp.
>Environment:
FreeBSD 3.4R 
>Description:
The comsat(8) fails to print the first 7 lines or 560
 	characters of the new mail.  Actually, the fopen(file, "r")
 	system call in jkfprintf() function fails because of inappropriate
 	invoked comsat uid.
 
>How-To-Repeat:
 	Execute "biff y" then send any mail to myself and watch the console
 	window.
 
>Fix:
 
 *** /etc/ORGinetd.conf	Mon Jan  3 16:32:26 2000
 --- /etc/inetd.conf	Mon Jan  3 16:26:16 2000
 ***************
 *** 14,20 ****
   #nntp	stream	tcp	nowait	usenet	/usr/libexec/nntpd	nntpd
   # run comsat as root to be able to print partial mailbox contents w/ biff,
   # or use the safer tty:tty to just print that new mail has been received.
 ! comsat	dgram	udp	wait	tty:tty	/usr/libexec/comsat	comsat
   ntalk	dgram	udp	wait	tty:tty	/usr/libexec/ntalkd	ntalkd
   #tftp	dgram	udp	wait	nobody	/usr/libexec/tftpd	tftpd /tftpboot
   #bootps	dgram	udp	wait	root	/usr/libexec/bootpd	bootpd
 --- 14,20 ----
   #nntp	stream	tcp	nowait	usenet	/usr/libexec/nntpd	nntpd
   # run comsat as root to be able to print partial mailbox contents w/ biff,
   # or use the safer tty:tty to just print that new mail has been received.
 ! comsat	dgram	udp	wait	root	/usr/libexec/comsat	comsat
   ntalk	dgram	udp	wait	tty:tty	/usr/libexec/ntalkd	ntalkd
   #tftp	dgram	udp	wait	nobody	/usr/libexec/tftpd	tftpd /tftpboot
   #bootps	dgram	udp	wait	root	/usr/libexec/bootpd	bootpd
 
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: steve 
Responsible-Changed-When: Mon Jan 3 05:07:14 PST 2000 
Responsible-Changed-Why:  
Misfiled PR. 
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Tue May 29 07:03:48 PDT 2001 
State-Changed-Why:  
It is documented in inetd.conf that if you want a summary of the mail 
printed then you must run comsat as root. Given that people prefer to 
run as little as possible as root these days it is probably correct 
that by default comsat runs as tty. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=15855 
>Unformatted:
