diff options
author | verigak <verigak@1ebed218-b0a3-11dd-8075-91d349ce83ee> | 2010-01-02 17:16:27 +0000 |
---|---|---|
committer | verigak <verigak@1ebed218-b0a3-11dd-8075-91d349ce83ee> | 2010-01-02 17:16:27 +0000 |
commit | 32bc93ffbff3144a97f33bcc6cc13d098781217d (patch) | |
tree | e33e6da39c7773ac5a850391f6308ddf6f6bb779 /fuse.py | |
parent | 9a91c9fd3ea2b6bec9826cb642e4eaaa202af938 (diff) | |
download | fusepy-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.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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): |