From owner-freebsd-current Wed Aug 16 17:54:22 2000 Delivered-To: freebsd-current@freebsd.org Received: from relay.butya.kz (butya-gw.butya.kz [212.154.129.94]) by hub.freebsd.org (Postfix) with ESMTP id 703AA37B569; Wed, 16 Aug 2000 17:54:14 -0700 (PDT) (envelope-from bp@butya.kz) Received: by relay.butya.kz (Postfix, from userid 1000) id 90107288C8; Thu, 17 Aug 2000 07:54:10 +0700 (ALMST) Received: from localhost (localhost [127.0.0.1]) by relay.butya.kz (Postfix) with ESMTP id 7CA7A28688; Thu, 17 Aug 2000 07:54:10 +0700 (ALMST) Date: Thu, 17 Aug 2000 07:54:10 +0700 (ALMST) From: Boris Popov To: Poul-Henning Kamp Cc: current@freebsd.org Subject: Re: Patch test & review: vop_stdaccess() In-Reply-To: <53850.966458102@critter> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 16 Aug 2000, Poul-Henning Kamp wrote: > Please test and review this patch: > > http://phk.freebsd.dk/patch/vop_stdaccess.patch Looks fine to me except vop_stdaccess() itself. Since VREAD, VWRITE and VEXEC bits are carefully layed this function can be rewritten to use single shift operation instead of 3 'or's: if (cred->cr_uid != uid) { amode >>= 3; if (!groupmember(gid, cred)) amode >>= 3; } return (fmode & amode) == amode ? 0 : EACCES; -- Boris Popov http://www.butya.kz/~bp/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message