summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-12-19 18:41:51 +0000
committerJeremy Allison <jra@samba.org>2000-12-19 18:41:51 +0000
commited7ecca3aa12afab6feb5cf176a84a76994c9194 (patch)
tree2dd5373c8e6ed6802d6950bfe856621329ab4f7a /source3/lib
parente28f0a1f55fb8184f1edfb0bd8333f3d71e12225 (diff)
downloadsamba-ed7ecca3aa12afab6feb5cf176a84a76994c9194.tar.gz
samba-ed7ecca3aa12afab6feb5cf176a84a76994c9194.tar.bz2
samba-ed7ecca3aa12afab6feb5cf176a84a76994c9194.zip
Split the one sys_acl_free call into sys_acl_free_TYPE calls, to allow
easier wrapping of non-POSIX ACL interfaces. Jeremy. (This used to be commit 1a31b4eb082b23d60e3d9040b3c0110eef1f9385)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/sysacls.c43
1 files changed, 32 insertions, 11 deletions
diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c
index e2cf535d3e..6f26ff8007 100644
--- a/source3/lib/sysacls.c
+++ b/source3/lib/sysacls.c
@@ -36,7 +36,6 @@ extern int DEBUGLEVEL;
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)
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)
@@ -45,6 +44,18 @@ extern int DEBUGLEVEL;
More POSIX braindamage.
int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
+
+ The generic POSIX free is the following call. We split this into
+ several different free functions as we may need to add tag info
+ to structures when emulating the POSIX interface.
+
+ int sys_acl_free( void *obj_p)
+
+ The calls we actually use are :
+
+ int sys_acl_free_text(char *text) - free acl_to_text
+ int sys_acl_free_acl(SMB_ACL_T posix_acl)
+
*/
#if defined(HAVE_POSIX_ACLS)
@@ -81,11 +92,6 @@ SMB_ACL_T sys_acl_get_fd(int fd)
return acl_get_fd(fd);
}
-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);
@@ -106,6 +112,16 @@ char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen)
return acl_to_text( the_acl, plen);
}
+int sys_acl_free_text(char *text)
+{
+ return acl_free(text);
+}
+
+int sys_acl_free_acl(SMB_ACL_T the_acl)
+{
+ return acl_free(the_acl);
+}
+
#elif defined(HAVE_SOLARIS_ACLS)
#elif defined(HAVE_IRIX_ACLS)
@@ -142,11 +158,6 @@ SMB_ACL_T sys_acl_get_fd(int fd)
return (SMB_ACL_T)NULL;
}
-int sys_acl_free( void *obj_p)
-{
- return -1;
-}
-
int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset)
{
return -1;
@@ -166,4 +177,14 @@ char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen)
{
return NULL;
}
+
+int sys_acl_free_text(char *text)
+{
+ return -1;
+}
+
+int sys_acl_free_acl(SMB_ACL_T the_acl)
+{
+ return -1;
+}
#endif /* No ACLs. */