From owner-freebsd-security Fri Sep 25 08:32:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA17556 for freebsd-security-outgoing; Fri, 25 Sep 1998 08:32:03 -0700 (PDT) (envelope-from owner-freebsd-security@FreeBSD.ORG) Received: from super-g.inch.com (super-g.com [207.240.140.161]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA17487 for ; Fri, 25 Sep 1998 08:31:59 -0700 (PDT) (envelope-from spork@super-g.com) Received: from localhost (localhost [127.0.0.1]) by super-g.inch.com (8.8.8/8.8.5) with SMTP id LAA24084; Fri, 25 Sep 1998 11:31:08 -0400 (EDT) Date: Fri, 25 Sep 1998 11:31:08 -0400 (EDT) From: spork X-Sender: spork@super-g.inch.com To: Andrzej Szydlo cc: freebsd-security@FreeBSD.ORG Subject: Re: Checking for uids 0 in /etc/security In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org As long as you've verified that uid "000" is taken as uid "0", why don't you use send-pr to file this as a bug. Someone will most likely commit this for you. Attach a diff with your fixes after checking that it hasn't already been fixed (http://www.freebsd.org/cgi/cvsweb.cgi). Nice catch! Charles --- Charles Sprickman spork@super-g.com On Thu, 24 Sep 1998, Andrzej Szydlo wrote: > Hi, > > I've just noticed that /etc/security checks for strings "0" in the uid > field of the master.passwd file. > > awk 'BEGIN {FS=":"} $3=="0" {print $1, $3}' /etc/master.passwd > ^^^^^^ > In this way it doesn't notice entries like this: > > myroot:xxxx:000:000:.... > > while such an entry still gives uid 0. > Changing this line to: > > awk 'BEGIN {FS=":"} $3==0 {print $1, $3}' /etc/master.passwd > ^^^^^ > solves the problem. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-security" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message