[PATCH 1/2] vfs_posixacl: expose acl_t <--> smb_acl_t converter functions

Anand Avati avati at redhat.com
Wed Apr 24 02:06:18 MDT 2013


These converters are used in vfs_glusterfs for storing posix acls
as xattrs (where acl_set_file does not work)

Signed-off-by: Anand Avati <avati at redhat.com>
---
 source3/modules/vfs_posixacl.c |    7 ++-----
 source3/modules/vfs_posixacl.h |    3 +++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c
index 6963aae..7733832 100644
--- a/source3/modules/vfs_posixacl.c
+++ b/source3/modules/vfs_posixacl.c
@@ -26,10 +26,7 @@
 
 static bool smb_ace_to_internal(acl_entry_t posix_ace,
 				struct smb_acl_entry *ace);
-static struct smb_acl_t *smb_acl_to_internal(acl_t acl, TALLOC_CTX *mem_ctx);
 static int smb_acl_set_mode(acl_entry_t entry, SMB_ACL_PERM_T perm);
-static acl_t smb_acl_to_posix(const struct smb_acl_t *acl);
-
 
 /* public functions - the api */
 
@@ -213,7 +210,7 @@ static bool smb_ace_to_internal(acl_entry_t posix_ace,
 	return True;
 }
 
-static struct smb_acl_t *smb_acl_to_internal(acl_t acl, TALLOC_CTX *mem_ctx)
+struct smb_acl_t *smb_acl_to_internal(acl_t acl, TALLOC_CTX *mem_ctx)
 {
 	struct smb_acl_t *result = sys_acl_init(mem_ctx);
 	int entry_id = ACL_FIRST_ENTRY;
@@ -270,7 +267,7 @@ static int smb_acl_set_mode(acl_entry_t entry, SMB_ACL_PERM_T perm)
         return acl_set_permset(entry, permset);
 }
 
-static acl_t smb_acl_to_posix(const struct smb_acl_t *acl)
+acl_t smb_acl_to_posix(const struct smb_acl_t *acl)
 {
 	acl_t result;
 	int i;
diff --git a/source3/modules/vfs_posixacl.h b/source3/modules/vfs_posixacl.h
index b0fe841..424cfe9 100644
--- a/source3/modules/vfs_posixacl.h
+++ b/source3/modules/vfs_posixacl.h
@@ -44,5 +44,8 @@ int posixacl_sys_acl_delete_def_file(vfs_handle_struct *handle,
 
 NTSTATUS vfs_posixacl_init(void);
 
+struct smb_acl_t *smb_acl_to_internal(acl_t acl, TALLOC_CTX *mem_ctx);
+acl_t smb_acl_to_posix(const struct smb_acl_t *acl);
+
 #endif
 
-- 
1.7.1



More information about the samba-technical mailing list