2 from afs import pyafs_error
4 cdef import from "afs/prs_fs.h":
6 PRSFS_READ, PRSFS_WRITE, PRSFS_INSERT, PRSFS_LOOKUP,
7 PRSFS_DELETE, PRSFS_LOCK, PRSFS_ADMINISTER,
8 PRSFS_USR0, PRSFS_USR1, PRSFS_USR2, PRSFS_USR2, PRSFS_USR3,
9 PRSFS_USR4, PRSFS_USR5, PRSFS_USR6, PRSFS_USR7
11 # This is defined in afs/afs.h, but I can't figure how to include the
12 # header. Also, venus/fs.c redefines the struct, so why not!
14 afs_int32 callerAccess
25 ADMINISTER = PRSFS_ADMINISTER
37 def getAcl(char* dir, int follow=1):
38 cdef char space[MAXSIZE]
39 pioctl_read(dir, VIOCGETAL, space, MAXSIZE, follow)
42 def getCallerAccess(char *dir, int follow=1):
44 pioctl_read(dir, VIOC_GETVCXSTATUS2, <void*>&stat, sizeof(vcxstat2), follow)
45 return stat.callerAccess