devproc: allow anyone to change user of its own processes to "none"

This commit is contained in:
cinap_lenrek 2020-12-23 13:09:31 +01:00
parent 7bcdd1b5d8
commit ab103ba349

View file

@ -539,7 +539,7 @@ procwstat(Chan *c, uchar *db, int n)
error(Eperm); error(Eperm);
if(!emptystr(d->uid) && strcmp(d->uid, p->user) != 0){ if(!emptystr(d->uid) && strcmp(d->uid, p->user) != 0){
if(!iseve()) if(strcmp(d->uid, "none") != 0 && !iseve())
error(Eperm); error(Eperm);
kstrdup(&p->user, d->uid); kstrdup(&p->user, d->uid);
} }