Changeset 176 for trunk/source

Show
Ignore:
Timestamp:
03/05/09 13:28:50 (16 years ago)
Author:
broder
Message:

Add a fix so that unlink(2) and symlink(2) work on OS X.

Files:

Legend:

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

    r167 r176  
    136136        st = MyStat() 
    137137        if path == '/': 
    138             st.st_mode = stat.S_IFDIR | 0755 
     138            # The old liblocker attach expects /mit to not be group- 
     139            # or other-writeable, but OS X's pre-operation access 
     140            # checks make it impossible to unlink or symlink if 
     141            # traditional UNIX permissions say you don't have bits 
     142            # 
     143            # This is a temporary work around that can be punted when 
     144            # I get around to writing the new attach 
     145            if sys.platform == 'darwin': 
     146                st.st_mode = stat.S_IFDIR | 0777 
     147            else: 
     148                st.st_mode = stat.S_IFDIR | 0755 
    139149            st.st_gid = self._gid() 
    140150            st.st_nlink = 2