devenv: make #ec files not show up as world writable
This commit is contained in:
parent
182077ac24
commit
a2623fd82a
2 changed files with 4 additions and 4 deletions
|
@ -49,7 +49,6 @@ such as those set in
|
||||||
All processes see the same
|
All processes see the same
|
||||||
.BR #ec ;
|
.BR #ec ;
|
||||||
its contents are writable only by the host owner.
|
its contents are writable only by the host owner.
|
||||||
[XXX actually everything is world writable; that's a mistake.]
|
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.IR rc (1),
|
.IR rc (1),
|
||||||
.IR fork (2),
|
.IR fork (2),
|
||||||
|
|
|
@ -37,7 +37,7 @@ envgen(Chan *c, char *name, Dirtab*, int, int s, Dir *dp)
|
||||||
Evalue *e;
|
Evalue *e;
|
||||||
|
|
||||||
if(s == DEVDOTDOT){
|
if(s == DEVDOTDOT){
|
||||||
devdir(c, c->qid, "#e", 0, eve, DMDIR|0775, dp);
|
devdir(c, c->qid, "#e", 0, eve, 0775, dp);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,8 @@ envgen(Chan *c, char *name, Dirtab*, int, int s, Dir *dp)
|
||||||
|
|
||||||
/* make sure name string continues to exist after we release lock */
|
/* make sure name string continues to exist after we release lock */
|
||||||
kstrcpy(up->genbuf, e->name, sizeof up->genbuf);
|
kstrcpy(up->genbuf, e->name, sizeof up->genbuf);
|
||||||
devdir(c, e->qid, up->genbuf, e->len, eve, 0666, dp);
|
devdir(c, e->qid, up->genbuf, e->len, eve,
|
||||||
|
eg == &confegrp || eg != up->egrp ? 0664: 0666, dp);
|
||||||
runlock(eg);
|
runlock(eg);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -394,7 +395,7 @@ ksetenv(char *ename, char *eval, int conf)
|
||||||
char buf[2*KNAMELEN];
|
char buf[2*KNAMELEN];
|
||||||
|
|
||||||
snprint(buf, sizeof(buf), "#e%s/%s", conf?"c":"", ename);
|
snprint(buf, sizeof(buf), "#e%s/%s", conf?"c":"", ename);
|
||||||
c = namec(buf, Acreate, OWRITE, 0600);
|
c = namec(buf, Acreate, OWRITE, 0666);
|
||||||
devtab[c->type]->write(c, eval, strlen(eval), 0);
|
devtab[c->type]->write(c, eval, strlen(eval), 0);
|
||||||
cclose(c);
|
cclose(c);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue