In message <[EMAIL PROTECTED]>, 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
[EMAIL PROTECTED]         | 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to