Date: Thu, 17 Aug 2000 09:51:35 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: Boris Popov <bp@butya.kz> Cc: current@freebsd.org Subject: Re: Patch test & review: vop_stdaccess() Message-ID: <55370.966498695@critter> In-Reply-To: Your message of "Thu, 17 Aug 2000 07:54:10 %2B0700." <Pine.BSF.4.10.10008170721550.16090-100000@lion.butya.kz>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <Pine.BSF.4.10.10008170721550.16090-100000@lion.butya.kz>, Boris Pop ov writes: >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; You are right, but such an optimization should be committed as a the next step. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD coreteam member | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55370.966498695>