From owner-freebsd-stable Fri Aug 3 4:23:27 2001 Delivered-To: freebsd-stable@freebsd.org Received: from host-2.jes-2.demon.nl (host-2.jes-2.demon.nl [212.238.176.234]) by hub.freebsd.org (Postfix) with ESMTP id 7193A37B405 for ; Fri, 3 Aug 2001 04:23:22 -0700 (PDT) (envelope-from jes@host-2.jes-2.demon.nl) Received: (from jes@localhost) by host-2.jes-2.demon.nl (8.9.3/8.9.3) id NAA94697 for stable@FreeBSD.ORG; Fri, 3 Aug 2001 13:23:19 +0200 (CEST) (envelope-from jes) Date: Fri, 3 Aug 2001 13:23:19 +0200 From: Jim Segrave To: stable@FreeBSD.ORG Subject: Re: Patch to modify default inetd.conf, have sysinstall prompt... Message-ID: <20010803132319.A90860@jes-2.demon.nl> Reply-To: jes@jes-2.demon.nl References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from "stable-digest" on Wed 01 Aug 2001 (13:13 -0700) Organisation: Demon Internet Netherlands Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Date: Wed, 1 Aug 2001 09:05:56 -0400 (EDT) > From: Robert Watson > Subject: Re: Patch to modify default inetd.conf, have sysinstall prompt to edit , inetd.conf > > On Tue, 31 Jul 2001, Mike Porter wrote: [snip] > This is true--however, the inetd.conf file doesn't lend itself to > automated management, as it doesn't have an inline "disabled" flag. To > disable a service, you comment it out, making it hard for a program to > distinguish things which are legitimately comments, and things that are > disabled services. In the long term, it would probably make sense to > develop some sort of administrative tool for inetd.conf: however, I > concluded that doing so prior to 4.4-RELEASE was unlikely, and opted for > this. In the future, if such a tool is developed, I'd be happy to slot it > in instead of invoking EDITOR on it :-). > allowing it to either be manually enabled, or enabled by virtue of > dependencies (something we already support). I think it's trivial to distinguish services from comments - Perl regex: $commented_line =~ /^#+\s*(\S+)\s+(stream|dgram|raw|rdm|seqpacket)/; $service_name = $1; $active_service =~ /^(\S+)\s+(stream|dgram|raw|rdm|seqpacket)/; $service_name = $1; This is enough to let you parse a file and find all the services which are enabled or not. It should be a SMOP to have a little perl script to take the user through a list of services likely to be wanted and get a yes/no for each one, then go through the inetd.conf and ensure that all non-wanted services are commented out and wanted ones are uncommented if need be. -- Jim Segrave jes@jes-2.demon.nl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message