diff options
author | Jeremy Allison <jra@samba.org> | 2000-12-07 05:38:01 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-12-07 05:38:01 +0000 |
commit | 423227d7ca87a6a4b9412e9ecbc3d6dd073818b1 (patch) | |
tree | e8e68c7bc2b7cee20b986d0510911647e735d937 /source3/lib | |
parent | 70922b9bbe412dc43397ecfd3feeb01169ed0b96 (diff) | |
download | samba-423227d7ca87a6a4b9412e9ecbc3d6dd073818b1.tar.gz samba-423227d7ca87a6a4b9412e9ecbc3d6dd073818b1.tar.bz2 samba-423227d7ca87a6a4b9412e9ecbc3d6dd073818b1.zip |
Working code to read POSIX ACLs on a Linux system using the bestbits
ACL patch from http://acl.bestbits.at/.
configure support needs more work (just assumes correct headers at
the moment). ACL writing needs adding.
Jeremy.
(This used to be commit 6ae63e502e6adf3666a34aa87860c74e106fdb84)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/sysacls.c | 51 |
1 files changed, 49 insertions, 2 deletions
diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c index da62479cd8..22fbaee26f 100644 --- a/source3/lib/sysacls.c +++ b/source3/lib/sysacls.c @@ -37,7 +37,14 @@ extern int DEBUGLEVEL; SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type) SMB_ACL_T sys_acl_get_fd(int fd) int sys_acl_free( void *obj_p) - + int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset); + int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm); + char *sys_acl_to_text( SMB_ACL_T acl, ssize_t *plen) + + This next one is not POSIX complient - but we *have* to have it ! + More POSIX braindamage. + + int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm) */ #if defined(HAVE_POSIX_ACLS) @@ -66,7 +73,7 @@ void *sys_acl_get_qualifier( SMB_ACL_ENTRY_T entry_d) SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type) { - sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type) + return sys_acl_get_file( path_p, type); } SMB_ACL_T sys_acl_get_fd(int fd) @@ -79,6 +86,26 @@ int sys_acl_free( void *obj_p) return acl_free(obj_p); } +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset) +{ + return acl_clear_perms(permset); +} + +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm) +{ + return acl_add_perm(permset, perm); +} + +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm) +{ + return acl_get_perm(permset, perm); +} + +char *sys_acl_to_text( SMB_ACL_T acl, ssize_t *plen) +{ + return acl_to_text( acl, plen); +} + #elif defined(HAVE_SOLARIS_ACLS) #elif defined(HAVE_IRIX_ACLS) @@ -119,4 +146,24 @@ int sys_acl_free( void *obj_p) { return -1; } + +int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset) +{ + return -1; +} + +int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm) +{ + return -1; +} + +int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm) +{ + return (permset & perm) ? 1 : 0; +} + +char *sys_acl_to_text( SMB_ACL_T acl, ssize_t *plen) +{ + return NULL; +} #endif /* No ACLs. */ |