diff options
author | Marco Nelissen <marcone@google.com> | 2014-12-10 10:44:20 -0800 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2014-12-10 10:44:20 -0800 |
commit | a80f0986bb39ae03ba9014bf4974fc26ae48da70 (patch) | |
tree | 0e59000662b44f877d02be077aa69a260ecc6d9f /sdcard | |
parent | e90159b070a773fa33fdbb2aaf2f84ac0189f699 (diff) |
Allow updates for open file descriptors
even if the calling process itself would not be able to open the file.
Bug: 18688419
Change-Id: I640db19f19c1a677735fd0c14b7e2e38977d0f4d
Diffstat (limited to 'sdcard')
-rw-r--r-- | sdcard/sdcard.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c index 9ba81ff10..d7bcceaef 100644 --- a/sdcard/sdcard.c +++ b/sdcard/sdcard.c @@ -904,7 +904,9 @@ static int handle_setattr(struct fuse* fuse, struct fuse_handler* handler, if (!node) { return -ENOENT; } - if (!check_caller_access_to_node(fuse, hdr, node, W_OK, has_rw)) { + + if (!(req->valid & FATTR_FH) && + !check_caller_access_to_node(fuse, hdr, node, W_OK, has_rw)) { return -EACCES; } |