Changeset 167 for trunk

Show
Ignore:
Timestamp:
12/30/08 02:21:26 (16 years ago)
Author:
broder
Message:

Make the pyHesiodFS negcache per-uid instead of per-pid.

Files:

Legend:

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

    r166 r167  
    144144            st.st_size = len(hello_str) 
    145145        elif '/' not in path[1:]: 
    146             if path[1:] not in self.negcache[self._pid()] and self.findLocker(path[1:]): 
     146            if path[1:] not in self.negcache[self._uid()] and self.findLocker(path[1:]): 
    147147                st.st_mode = stat.S_IFLNK | 0777 
    148148                st.st_uid = self._uid() 
     
    222222        elif '/' not in path[1:]: 
    223223            self.mounts[self._uid()][path[1:]] = src 
    224             self.negcache[self._pid()].remove(path[1:]) 
     224            self.negcache[self._uid()].remove(path[1:]) 
    225225        else: 
    226226            return -errno.EPERM 
     
    231231        elif '/' not in path[1:]: 
    232232            del self.mounts[self._uid()][path[1:]] 
    233             self.negcache[self._pid()].add(path[1:]) 
     233            self.negcache[self._uid()].add(path[1:]) 
    234234        else: 
    235235            return -errno.EPERM