Repository
chown implementation
Parent commits : ccb7ae7cb1c47ef0db9bf408d56e074f547e2425,Children commits :
By Laurent Defert on 2012-09-17 14:06:07
chown implementation
Difference with parent commit ccb7ae7cb1c47ef0db9bf408d56e074f547e2425
Files modified:
bin/ficus_mount.in
---
+++
@@ -36,7 +36,7 @@
return path.split('/')
class FicusFS(fuse.Fuse):
- IMPLEMENTED_METHODS = ['getattr', 'readdir', 'chmod']
+ IMPLEMENTED_METHODS = ['getattr', 'readdir', 'chmod', 'chown']
def __init__(self, *args, **kw):
self.host = '127.0.0.1'
self.port = 9801
ficus/mount/client.py
---
+++
@@ -127,11 +127,9 @@
def chmod(self, path, mode):
self.setattr(path, 'mode', mode)
+ return 0
def setattr(self, path, attr, val):
- #def chmod(self, path, mode):
- #val = mode
- #attr = 'mode'
print '*** setattr', path, oct(val)
self.send('dset_attr %s %i %s' % (attr, val, path))
cmd, data = self.receive()
@@ -142,9 +140,11 @@
return
return 0
- def chown ( self, path, uid, gid ):
+ def chown (self, path, uid, gid):
print '*** chown', path, uid, gid
- return -errno.ENOSYS
+ self.setattr(path, 'uid', uid)
+ self.setattr(path, 'gid', gid)
+ return 0
def fsync ( self, path, isFsyncFile ):
print '*** fsync', path, isFsyncFile