From 9444e9d9f350961b594a1acbe7a7652d97faec0a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 13 Apr 2001 21:11:57 +0000 Subject: Michael Davidson pointed out that acl_get_qualifier can potentially return a malloced area so added sys_acl_free_qualifier() calls to all supported ACL interfaces to code with this (only Linux needs actual free call). Jeremy. (This used to be commit 5870e6019b82d2088b99acdc0f84e9e4847a1fa5) --- source3/lib/sysacls.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'source3/lib/sysacls.c') diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c index 29630495725..02018a52b37 100644 --- a/source3/lib/sysacls.c +++ b/source3/lib/sysacls.c @@ -63,6 +63,7 @@ extern int DEBUGLEVEL; int sys_acl_free_text(char *text) - free acl_to_text int sys_acl_free_acl(SMB_ACL_T posix_acl) + int sys_acl_free_qualifier(SMB_ACL_T posix_acl) */ @@ -170,6 +171,11 @@ int sys_acl_free_acl(SMB_ACL_T the_acl) return acl_free(the_acl); } +int sys_acl_free_qualifier(void *qual) +{ + return acl_free(qual); +} + #elif defined(HAVE_UNIXWARE_ACLS) || defined(HAVE_SOLARIS_ACLS) /* @@ -762,6 +768,11 @@ int sys_acl_free_acl(SMB_ACL_T acl_d) return 0; } +int sys_acl_free_qualifier(void *qual) +{ + return 0; +} + #elif defined(HAVE_IRIX_ACLS) int sys_acl_get_entry(SMB_ACL_T acl_d, int entry_id, SMB_ACL_ENTRY_T *entry_p) @@ -1007,6 +1018,11 @@ int sys_acl_free_acl(SMB_ACL_T acl_d) return 0; } +int sys_acl_free_qualifier(void *qual) +{ + return 0; +} + #elif defined(HAVE_XFS_ACLS) /* For Linux SGI/XFS Filesystems * contributed by J Trostel, Connex @@ -1221,6 +1237,11 @@ int sys_acl_free_acl(SMB_ACL_T the_acl) return acl_free(the_acl); } +int sys_acl_free_qualifier(void *qual) +{ + return 0; +} + #else /* No ACLs. */ int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p) @@ -1342,4 +1363,11 @@ int sys_acl_free_acl(SMB_ACL_T the_acl) errno = ENOSYS; return -1; } + +int sys_acl_free_qualifier(void *qual) +{ + errno = ENOSYS; + return -1; +} + #endif /* No ACLs. */ -- cgit