hjfs: fix group ownership of home dirs created by newuser command
This commit is contained in:
parent
21b501c27f
commit
af6f03e528
1 changed files with 6 additions and 1 deletions
|
@ -366,13 +366,18 @@ static void
|
||||||
createuserdir(Fs *fs, char *name, short uid)
|
createuserdir(Fs *fs, char *name, short uid)
|
||||||
{
|
{
|
||||||
Chan *ch;
|
Chan *ch;
|
||||||
|
Dir di;
|
||||||
|
|
||||||
ch = chanattach(fs, CHFNOPERM);
|
ch = chanattach(fs, CHFNOPERM);
|
||||||
if(ch == nil)
|
if(ch == nil)
|
||||||
return;
|
return;
|
||||||
ch->uid = uid;
|
ch->uid = uid;
|
||||||
if(chanwalk(ch, "usr") > 0)
|
if(chanwalk(ch, "usr") > 0){
|
||||||
chancreat(ch, name, DMDIR | 0775, OREAD);
|
chancreat(ch, name, DMDIR | 0775, OREAD);
|
||||||
|
nulldir(&di);
|
||||||
|
di.gid = name;
|
||||||
|
chanwstat(ch, &di);
|
||||||
|
}
|
||||||
chanclunk(ch);
|
chanclunk(ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue