From: Alex Musolino <alex@musolino.id.au>
To: 9front@9front.org
Subject: Re: [9front] new user
Date: Sun, 27 Feb 2022 14:21:59 +1030 [thread overview]
Message-ID: <19C4682FE4B1166C8249267810F854E8@musolino.id.au> (raw)
In-Reply-To: <265FE8768E3BAC6EE1A2EDF7DC4855DC@gmail.com>
> 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);
}
next prev parent reply other threads:[~2022-02-27 4:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-27 0:11 thinktankworkspaces
2022-02-27 3:51 ` Alex Musolino [this message]
2022-02-27 3:56 ` Alex Musolino
2022-02-27 5:41 ` thinktankworkspaces
2022-03-08 13:28 ` Alex Musolino
2022-03-10 3:58 ` thinktankworkspaces
2022-03-10 4:12 ` Alex Musolino
2022-03-10 4:42 ` Stanley Lieber
-- strict thread matches above, loose matches on Subject: below --
2021-12-30 18:41 [9front] New user Benjamin Riefenstahl
2021-12-30 19:54 ` Humm
2022-01-01 16:56 ` Benjamin Riefenstahl
2021-12-30 20:32 ` theinicke
2021-12-30 20:45 ` ori
2021-12-30 22:00 ` qwx
2022-01-01 17:03 ` Benjamin Riefenstahl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19C4682FE4B1166C8249267810F854E8@musolino.id.au \
--to=alex@musolino.id.au \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).