From owner-freebsd-bugs@FreeBSD.ORG Fri Aug 5 07:00:37 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D28816A41F for ; Fri, 5 Aug 2005 07:00:37 +0000 (GMT) (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 859D843D49 for ; Fri, 5 Aug 2005 07:00:36 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7570a3r009991 for ; Fri, 5 Aug 2005 07:00:36 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7570aeo009981; Fri, 5 Aug 2005 07:00:36 GMT (envelope-from gnats) Resent-Date: Fri, 5 Aug 2005 07:00:36 GMT Resent-Message-Id: <200508050700.j7570aeo009981@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, Alexander Botero-Lowry Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00AE916A41F for ; Fri, 5 Aug 2005 06:56:50 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9AC543D45 for ; Fri, 5 Aug 2005 06:56:49 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j756uncI029798 for ; Fri, 5 Aug 2005 06:56:49 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j756unZ1029792; Fri, 5 Aug 2005 06:56:49 GMT (envelope-from nobody) Message-Id: <200508050656.j756unZ1029792@www.freebsd.org> Date: Fri, 5 Aug 2005 06:56:49 GMT From: Alexander Botero-Lowry To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: conf/84574: /etc/rc.d/[cleanvar, cleartmp, abi, power_profile] violate rc.d standards 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: Fri, 05 Aug 2005 07:00:37 -0000 >Number: 84574 >Category: conf >Synopsis: /etc/rc.d/[cleanvar, cleartmp, abi, power_profile] violate rc.d standards >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 05 07:00:35 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Alexander Botero-Lowry >Release: 6.0BETA1 >Organization: >Environment: FreeBSD Laptop 6.0-BETA1 FreeBSD 6.0-BETA1 #1: Sun Jul 31 23:21:29 EDT 2005 root@Laptop:/usr/src/sys/i386/compile/LAPTOP i386 >Description: /etc/rc.d/cleanvar, cleartmp, abi, and power_profile do not follow Design and Implementation of the NetBSD rc.d System. [http://www.mewburn.net/luke/papers/rc.d.pdf]. When executed with rcvar each of these scripts behaves in a non standard way. cleanvar and cleartmp attempt to delete files which is a VERY bad behavior, if these scripts were to be run as root with simply rcvar (which SHOULD be harmless) they could damage the system (cleartmp could bring X11 down). abi prints superfolous garbage to the screen, and power_profile does not have start or stop (or any standard behaviors of an rc.d script really. >How-To-Repeat: Mess around with the above mentioned rc scripts only minimally. (not as root you don't want to ruin X11 for example). >Fix: power_profile should be moved. abi should be re written to only print text when start is called. cleartmp and cleanvar should be rewritten to only delete files within a start function (or in the case of cleartmp possibly split into a script like clearx11, that is set to start by default). Specific patches and recommendations for some of the problems I've already submitted and can be found at misc/83969 and conf/84030. This is a major issue though it may seem trivial because it doesn't allow for good managment tools for the rc.d system. >Release-Note: >Audit-Trail: >Unformatted: