From anton@belle.urc.ac.ru  Wed Feb 10 03:49:11 1999
Received: from belle.urc.ac.ru (Belle.urc.ac.ru [193.233.85.55])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id DAA14410
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 10 Feb 1999 03:48:39 -0800 (PST)
          (envelope-from anton@belle.urc.ac.ru)
Received: (from anton@localhost)
	by belle.urc.ac.ru (8.9.2/8.8.8) id OAA69084;
	Tue, 9 Feb 1999 14:51:33 +0500 (ES)
	(envelope-from anton)
Message-Id: <199902090951.OAA69084@belle.urc.ac.ru>
Date: Tue, 9 Feb 1999 14:51:33 +0500 (ES)
From: anton@urc.ac.ru
Reply-To: anton@urc.ac.ru
To: FreeBSD-gnats-submit@freebsd.org
Subject: Update /etc/motd
X-Send-Pr-Version: 3.2

>Number:         10005
>Category:       misc
>Synopsis:       Update /etc/motd
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sheldonh
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 10 03:50:02 PST 1999
>Closed-Date:    Mon Jun 21 08:59:58 PDT 1999
>Last-Modified:  Mon Jun 21 09:01:24 PDT 1999
>Originator:     Anton Voronin
>Release:        FreeBSD 3.0-STABLE i386
>Organization:
Southern Ural State University, Chelyabinsk, Russia
>Environment:


>Description:

If an administrator leaves rc.conf parameters clear_tmp_enable="NO" and
update_motd="YES" unchanged then any user can prevent updating of /etc/motd

>How-To-Repeat:

Leave original /etc/rc.conf unchanged and check that your /etc/rc.conf.local
does not redefine clear_tmp_enable and update_motd;
Create a directory /tmp/_motd.

>Fix:
	
Change /etc/rc:

366c366
<       rm -f $T
---
>       rm -rf $T
371c371
<       rm -f $T
---
>       rm -rf $T

>Release-Note:
>Audit-Trail:

From: Dag-Erling Smorgrav <des@flood.ping.uio.no>
To: anton@urc.ac.ru
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: misc/10005: Update /etc/motd
Date: 10 Feb 1999 14:40:47 +0100

 anton@urc.ac.ru writes:
 > Leave original /etc/rc.conf unchanged and check that your /etc/rc.conf.local
 > does not redefine clear_tmp_enable and update_motd;
 > Create a directory /tmp/_motd.
 
 What do you do to prevent root from removing that directory?
 
 DES
 -- 
 Dag-Erling Smorgrav - des@flood.ping.uio.no

From: Anton Voronin <anton@urc.ac.ru>
To: Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: misc/10005: Update /etc/motd
Date: Wed, 10 Feb 1999 18:51:06 +0500

 Dag-Erling Smorgrav wrote:
 
 > anton@urc.ac.ru writes:
 > > Leave original /etc/rc.conf unchanged and check that your /etc/rc.conf.local
 > > does not redefine clear_tmp_enable and update_motd;
 > > Create a directory /tmp/_motd.
 >
 > What do you do to prevent root from removing that directory?
 >
 > DES
 > --
 > Dag-Erling Smorgrav - des@flood.ping.uio.no
 
 Nothing - rm does not remove directories without -r or -d
 
 bash-2.01# ls -l /tmp
 
 drwxr-xr-x  2 anton  wheel  512 10 feb 18:43 _motd
 
 bash-2.01# rm -f /tmp/_motd
 
 rm: _motd: is a directory
 
 --
 Anton Voronin                | Ural Regional Center of FREEnet,
 anton@urc.ac.ru              | Southern Ural University, Chelyabinsk, Russia
 http://www.urc.ac.ru/~anton  | Programmer & System Administrator
 
 
 
State-Changed-From-To: open->closed 
State-Changed-By: sheldonh 
State-Changed-When: Mon Jun 21 08:59:58 PDT 1999 
State-Changed-Why:  
Committed, thanks! 


Responsible-Changed-From-To: freebsd-bugs->sheldonh 
Responsible-Changed-By: sheldonh 
Responsible-Changed-When: Mon Jun 21 08:59:58 PDT 1999 
Responsible-Changed-Why:  
My commit, see src/etc/rc rev 1.189 . 
>Unformatted:
