FreeBSD fixes (Lou Kamenov)
This commit is contained in:
parent
8f8ef0c6a9
commit
143cdf5758
2 changed files with 97 additions and 51 deletions
|
|
@ -689,7 +689,7 @@ fuseaccess(FuseMsg *m)
|
|||
{
|
||||
struct fuse_access_in *in;
|
||||
CFid *fid;
|
||||
int err;
|
||||
int err, omode;
|
||||
static int a2o[] = {
|
||||
0,
|
||||
OEXEC,
|
||||
|
|
@ -706,7 +706,14 @@ fuseaccess(FuseMsg *m)
|
|||
replyfuseerrno(m, EINVAL);
|
||||
return;
|
||||
}
|
||||
if((fid = _fuseopenfid(m->hdr->nodeid, 0, a2o[in->mask], &err)) == nil){
|
||||
omode = a2o[in->mask];
|
||||
if((fid = nodeid2fid(m->hdr->nodeid)) == nil){
|
||||
replyfuseerrno(m, ESTALE);
|
||||
return;
|
||||
}
|
||||
if(fsqid(fid).type&QTDIR)
|
||||
omode = OREAD;
|
||||
if((fid = _fuseopenfid(m->hdr->nodeid, 0, omode, &err)) == nil){
|
||||
replyfuseerrno(m, err);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue