Changeset 160

Show
Ignore:
Timestamp:
12/22/08 13:52:51 (15 years ago)
Author:
broder
Message:

Allow users to delete mounts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/source/pyhesiodfs/pyHesiodFS.py

    r159 r160  
    9898        st = MyStat() 
    9999        if path == '/': 
    100             st.st_mode = stat.S_IFDIR | 0755 
     100            st.st_mode = stat.S_IFDIR | 0777 
    101101            st.st_nlink = 2 
    102102        elif path == hello_path: 
     
    107107            if self.findLocker(path[1:]): 
    108108                st.st_mode = stat.S_IFLNK | 0777 
     109                st.st_uid = self._user() 
    109110                st.st_nlink = 1 
    110111                st.st_size = len(self.findLocker(path[1:])) 
     
    176177            buf = '' 
    177178        return buf 
     179     
     180    def unlink(self, path): 
     181        if path == '/' or path == hello_path: 
     182            return -errno.EPERM 
     183        elif '/' not in path[1:]: 
     184            del self.mounts[self._user()][path[1:]] 
     185        else: 
     186            return -errno.EPERM 
    178187 
    179188def main():