Allow opening files with OTRUNC set

This commit is contained in:
Kris Maglione 2006-06-26 18:37:33 -04:00
parent f1c1f7fc44
commit d4d4b77003
1 changed files with 1 additions and 1 deletions

View File

@ -785,7 +785,7 @@ fs_open(P9Req *r) {
return respond(r, Enoperm);
if((r->ifcall.mode&3) != P9OWRITE && !(f->tab.perm & 0400))
return respond(r, Enoperm);
if((r->ifcall.mode&~(3|P9OAPPEND)))
if((r->ifcall.mode&~(3|P9OAPPEND|P9OTRUNC)))
return respond(r, Enoperm);
respond(r, nil);
}