summaryrefslogtreecommitdiff
path: root/fuse.py
diff options
context:
space:
mode:
authorverigak <verigak@1ebed218-b0a3-11dd-8075-91d349ce83ee>2010-01-02 17:16:27 +0000
committerverigak <verigak@1ebed218-b0a3-11dd-8075-91d349ce83ee>2010-01-02 17:16:27 +0000
commit32bc93ffbff3144a97f33bcc6cc13d098781217d (patch)
treee33e6da39c7773ac5a850391f6308ddf6f6bb779 /fuse.py
parent9a91c9fd3ea2b6bec9826cb642e4eaaa202af938 (diff)
downloadfusepy-32bc93ffbff3144a97f33bcc6cc13d098781217d.tar.gz
Fix chown when one of the arguments is -1 (issue 25).
git-svn-id: http://fusepy.googlecode.com/svn/trunk@38 1ebed218-b0a3-11dd-8075-91d349ce83ee
Diffstat (limited to 'fuse.py')
-rw-r--r--fuse.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/fuse.py b/fuse.py
index 3a0efd4..882ccdc 100644
--- a/fuse.py
+++ b/fuse.py
@@ -333,6 +333,11 @@ class FUSE(object):
return self.operations('chmod', path, mode)
def chown(self, path, uid, gid):
+ # Check if any of the arguments is a -1 that has overflowed
+ if c_uid_t(uid + 1).value == 0:
+ uid = -1
+ if c_gid_t(gid + 1).value == 0:
+ gid = -1
return self.operations('chown', path, uid, gid)
def truncate(self, path, length):