From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5858 invoked from network); 21 Jan 2021 16:51:25 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 21 Jan 2021 16:51:25 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 1ess; Thu Jan 21 11:22:34 -0500 2021 Received: from abbatoir.fios-router.home (pool-74-101-2-6.nycmny.fios.verizon.net [74.101.2.6]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 9d728aba (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Thu, 21 Jan 2021 08:22:23 -0800 (PST) Message-ID: <154A2B81E5307985989F46BE958ACBAC@eigenstate.org> To: 9front@9front.org Date: Thu, 21 Jan 2021 08:22:19 -0800 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: lossless open-source deep-learning extension strategy Subject: Re: [9front] user none: cwfs vs hjfs Reply-To: 9front@9front.org Precedence: bulk Quoth Anthony Martin : > /sys/src/cmd/cwfs/sub.c:/^iaccess > /sys/src/cmd/hjfs/auth.c:/^permcheck > /sys/src/cmd/fossil/9p.c:/^permFile > > Hjfs is the odd man out. > > Cheers, > Anthony Unfortunately I can't test, since I don't currently have hjfs -- but I think this change brings hjfs in sync. diff -r 01125acb5565 sys/src/cmd/hjfs/auth.c --- a/sys/src/cmd/hjfs/auth.c Tue Jan 19 19:56:38 2021 -0800 +++ b/sys/src/cmd/hjfs/auth.c Thu Jan 21 08:21:34 2021 -0800 @@ -301,10 +301,13 @@ if((fs->flags & FSNOPERM) != 0) return 1; perm = d->mode & 0777; - if(d->uid == uid) - perm >>= 6; - else if(ingroup(fs, uid, d->gid, 0)) - perm >>= 3; + /* uid none gets only other permissions */ + if(d->uid != 0) { + if(d->uid == uid) + perm >>= 6; + else if(ingroup(fs, uid, d->gid, 0)) + perm >>= 3; + } switch(mode & 3){ case OREAD: return (perm & 4) != 0;