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=T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5245 invoked from network); 27 Feb 2022 04:12:44 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 27 Feb 2022 04:12:44 -0000 Received: from vultr.musolino.id.au ([45.76.123.158]) by 4ess; Sat Feb 26 23:08:06 -0500 2022 Received: from 180.150.115.171 ([180.150.115.171]) by vultr; Sun Feb 27 14:52:00 +1100 2022 Message-ID: <19C4682FE4B1166C8249267810F854E8@musolino.id.au> To: 9front@9front.org From: Alex Musolino Date: Sun, 27 Feb 2022 14:21:59 +1030 In-Reply-To: <265FE8768E3BAC6EE1A2EDF7DC4855DC@gmail.com> 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: encrypted proven out-scaling STM database Subject: Re: [9front] new user Reply-To: 9front@9front.org Precedence: bulk > I created a new user on another system. Its running hjfs > > I noticed permission had sys? > > cpu% ls -l > d-rwxrwxr-x M 184 glenda glenda 0 Feb 26 14:46 glenda > d-rwxrwxr-x M 184 www sys 0 Feb 26 16:08 www > > This does not seem right? This is a bug in hjfs that has been uncovered by changeset e1907b41d32441e79e8cc3db26afc5f0c4cdcef9. New directories *are* supposed to inherit their group from the parent directory. However, this is not what we want when creating home directories for new users. I think the following ought to fix it. Can you give this a try? diff facb0e757ac63f763bd942a2714f979538b99eb0 uncommitted --- a/sys/src/cmd/hjfs/auth.c +++ b/sys/src/cmd/hjfs/auth.c @@ -366,13 +366,18 @@ createuserdir(Fs *fs, char *name, short uid) { Chan *ch; + Dir di; ch = chanattach(fs, CHFNOPERM); if(ch == nil) return; ch->uid = uid; - if(chanwalk(ch, "usr") > 0) + if(chanwalk(ch, "usr") > 0){ chancreat(ch, name, DMDIR | 0775, OREAD); + nulldir(&di); + di.gid = name; + chanwstat(ch, &di); + } chanclunk(ch); }