From owner-freebsd-alpha Tue Sep 25 2:24:40 2001 Delivered-To: freebsd-alpha@freebsd.org Received: from malkavian.org (malkavian.org [206.136.132.23]) by hub.freebsd.org (Postfix) with ESMTP id B97AF37B439; Tue, 25 Sep 2001 02:24:27 -0700 (PDT) Received: (from rbw@localhost) by malkavian.org (8.11.6/8.11.1) id f8P9OQ448442; Tue, 25 Sep 2001 05:24:26 -0400 (EDT) (envelope-from rbw@myplace.org) Date: Tue, 25 Sep 2001 02:24:26 -0700 From: "brian j. peterson" To: alpha@FreeBSD.ORG, security@FreeBSD.ORG Subject: Re: bogon in 4.x memory device Message-ID: <20010925022426.D74245@malkavian.org> Mail-Followup-To: alpha@FreeBSD.ORG, security@FreeBSD.ORG References: <20010925020701.X97903@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010925020701.X97903@elvis.mu.org>; from bright@mu.org on Tue, Sep 25, 2001 at 02:07:01AM -0500 X-URL: http://rbw.myplace.org/ Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org the patch needed an include added: --- sys/alpha/alpha/mem.c.RELENG_4_4_0_RELEASE Sat May 13 17:29:44 2000 +++ sys/alpha/alpha/mem.c Tue Sep 25 00:36:06 2001 @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -138,7 +139,7 @@ switch (minor(dev)) { case 0: case 1: - if (securelevel >= 1) + if ((flags & FWRITE) && securelevel > 0) return (EPERM); break; case 32: anyway, top(1) now works on my box with securelevel at 2. thanks again to bright. -brian On Tue, Sep 25, 2001 at 02:07:01AM -0500, Alfred Perlstein wrote: > without this top(1) fails on machines with raised securelevel. > > can anyone review/comment? > > Reported by: brian j. peterson > > Index: mem.c > =================================================================== > RCS file: /home/ncvs/src/sys/alpha/alpha/mem.c,v > retrieving revision 1.19.2.3 > diff -u -r1.19.2.3 mem.c > --- mem.c 2000/05/14 00:29:44 1.19.2.3 > +++ mem.c 2001/09/25 06:55:30 > @@ -138,7 +138,7 @@ > switch (minor(dev)) { > case 0: > case 1: > - if (securelevel >= 1) > + if ((flags & FWRITE) && securelevel > 0) > return (EPERM); > break; > case 32: > > > -- > -Alfred Perlstein [alfred@freebsd.org] > 'Instead of asking why a piece of software is using "1970s technology," > start asking why software is ignoring 30 years of accumulated wisdom.' > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-alpha" in the body of the message -- --===-----=======-----------=============-----------------=================== rbw aka bjp | and did you exchange a walk on part in the war rbw@myplace.org | for a lead role in a cage? ===================-----------------=============-----------=======-----===-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message