diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-09-06 01:05:37 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-09-06 01:05:37 +0200 |
commit | 9c18f300a40496fba95cfea2fe06d02f71bb968a (patch) | |
tree | 1bf888449f4bca272f75805ac977f5ce312a52a4 /sys/src/9/port/devshr.c | |
parent | 577a9f763f0535391ef3190ea8214a4e420717af (diff) |
devshr: honor noattach
Diffstat (limited to 'sys/src/9/port/devshr.c')
-rw-r--r-- | sys/src/9/port/devshr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/src/9/port/devshr.c b/sys/src/9/port/devshr.c index 70c477d53..35e73629b 100644 --- a/sys/src/9/port/devshr.c +++ b/sys/src/9/port/devshr.c @@ -458,6 +458,8 @@ shrcreate(Chan *c, char *name, int omode, ulong perm) cclose(c); return nc; case Qcroot: + if(up->pgrp->noattach) + error(Enoattach); if((perm & DMDIR) == 0 || openmode(omode) != OREAD) error(Eperm); if(strlen(name) >= sizeof(up->genbuf)) @@ -490,6 +492,8 @@ shrcreate(Chan *c, char *name, int omode, ulong perm) sch->shr = shr; break; case Qcshr: + if(up->pgrp->noattach) + error(Enoattach); if((perm & DMDIR) || openmode(omode) != OWRITE) error(Eperm); @@ -720,6 +724,8 @@ shrwrite(Chan *c, void *va, long n, vlong) int flags; }bogus; + if(up->pgrp->noattach) + error(Enoattach); sch = tosch(c); if(sch->level != Qcmpt) error(Egreg); |