diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-08-01 12:48:30 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-08-01 12:48:30 +0000 |
commit | 7b28eaeac5f2d8d591b1b0c94e10b64644017869 (patch) | |
tree | b59344f5b9261da640b0e21ac398093755fdfbae /lib/fuse.c | |
parent | e77cc07e755c1e360455e707653f705d0bd25622 (diff) | |
download | libfuse-7b28eaeac5f2d8d591b1b0c94e10b64644017869.tar.gz |
fix
Diffstat (limited to 'lib/fuse.c')
-rw-r--r-- | lib/fuse.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -724,6 +724,25 @@ static void fuse_setattr(fuse_req_t req, fuse_ino_t ino, struct stat *attr, reply_err(req, err); } +static void fuse_access(fuse_req_t req, fuse_ino_t ino, int mask) +{ + struct fuse *f = req_fuse_prepare(req); + char *path; + int err; + + err = -ENOENT; + pthread_rwlock_rdlock(&f->tree_lock); + path = get_path(f, ino); + if (path != NULL) { + err = -ENOSYS; + if (f->op.access) + err = f->op.access(path, mask); + free(path); + } + pthread_rwlock_unlock(&f->tree_lock); + reply_err(req, err); +} + static void fuse_readlink(fuse_req_t req, fuse_ino_t ino) { struct fuse *f = req_fuse_prepare(req); @@ -1589,6 +1608,7 @@ static struct fuse_ll_operations fuse_path_ops = { .forget = fuse_forget, .getattr = fuse_getattr, .setattr = fuse_setattr, + .access = fuse_access, .readlink = fuse_readlink, .mknod = fuse_mknod, .mkdir = fuse_mkdir, |