ref: 6231895f9f6cdea78a39c398f725b4b559e6362b
parent: b3e1a9e2057a7f30200d4f70a5779546898b22f6
author: Michael Forney <mforney@mforney.org>
date: Sat Feb 12 20:59:49 EST 2022
fs: fix access check for Tremove
--- a/fs.c
+++ b/fs.c
@@ -1255,7 +1255,7 @@
rlock(f->dent);
if((e = candelete(f)) != nil)
goto Error;
- if(fsaccess(f, f->dmode, f->duid, f->dgid, OWRITE) == -1){
+ if(fsaccess(f, f->dmode, f->duid, f->dgid, DMWRITE) == -1){
e = Eperm;
goto Error;
}
@@ -1389,8 +1389,6 @@
case ARok:
if(m->count < rpc->narg)
return Eauthd;
- if((r->data = malloc(rpc->narg)) == nil)
- return Enomem;
memmove(r->data, rpc->arg, rpc->narg);
r->count = rpc->narg;
return nil;