[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha4-143-g89e9055

Stefan Metzmacher metze at samba.org
Sat Jun 28 08:46:25 GMT 2008


The branch, v4-0-test has been updated
       via  89e90556ec57fce24faf0ed3d6fe262edd974b28 (commit)
       via  c904e28bef95cb0d61bf86f2ba1cef2d4e018d5f (commit)
      from  c161de2245cd26aa26642f09736fc6eeba14cf6d (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit 89e90556ec57fce24faf0ed3d6fe262edd974b28
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jun 28 10:28:15 2008 +0200

    pvfs: create a pvfs_acl subsystem
    
    That means that the pvfs_acl implementations no longer register
    as ntvfs modules (which was wrong)
    
    metze

commit c904e28bef95cb0d61bf86f2ba1cef2d4e018d5f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jun 28 10:27:16 2008 +0200

    pvfs: pvfs_aio should be a subsystem instead of an extra ntvfs module
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source/ntvfs/ntvfs_base.c      |    2 --
 source/ntvfs/posix/config.mk   |   23 ++++++++++++++---------
 source/ntvfs/posix/pvfs_acl.c  |   22 ++++++++++++++++++++++
 source/ntvfs/posix/vfs_posix.c |    7 +++++++
 source/ntvfs/posix/vfs_posix.h |    1 +
 5 files changed, 44 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/ntvfs/ntvfs_base.c b/source/ntvfs/ntvfs_base.c
index 6de13e4..1385481 100644
--- a/source/ntvfs/ntvfs_base.c
+++ b/source/ntvfs/ntvfs_base.c
@@ -209,8 +209,6 @@ NTSTATUS ntvfs_init(struct loadparm_context *lp_ctx)
 	extern NTSTATUS ntvfs_nbench_init(void);
 	extern NTSTATUS ntvfs_unixuid_init(void);
 	extern NTSTATUS ntvfs_ipc_init(void);
-	extern NTSTATUS pvfs_acl_nfs4_init(void);
-	extern NTSTATUS pvfs_acl_xattr_init(void);
 	extern NTSTATUS ntvfs_print_init(void);
 	extern NTSTATUS ntvfs_simple_init(void);
 	extern NTSTATUS ntvfs_cifs_posix_init(void);
diff --git a/source/ntvfs/posix/config.mk b/source/ntvfs/posix/config.mk
index 0ee3e3b..1ea4e8f 100644
--- a/source/ntvfs/posix/config.mk
+++ b/source/ntvfs/posix/config.mk
@@ -1,9 +1,16 @@
+
+[SUBSYSTEM::pvfs_acl]
+
+pvfs_acl_OBJ_FILES = $(ntvfssrcdir)/posix/pvfs_acl.o
+
+$(eval $(call proto_header_template,$(ntvfssrcdir)/posix/vfs_acl_proto.h,$(pvfs_acl_OBJ_FILES:.o=.c)))
+
 ################################################
 # Start MODULE pvfs_acl_xattr
 [MODULE::pvfs_acl_xattr]
 INIT_FUNCTION = pvfs_acl_xattr_init 
-SUBSYSTEM = ntvfs
-PRIVATE_DEPENDENCIES = NDR_XATTR ntvfs_posix
+SUBSYSTEM = pvfs_acl
+PRIVATE_DEPENDENCIES = NDR_XATTR
 # End MODULE pvfs_acl_xattr
 ################################################
 
@@ -13,16 +20,15 @@ pvfs_acl_xattr_OBJ_FILES = $(ntvfssrcdir)/posix/pvfs_acl_xattr.o
 # Start MODULE pvfs_acl_nfs4
 [MODULE::pvfs_acl_nfs4]
 INIT_FUNCTION = pvfs_acl_nfs4_init 
-SUBSYSTEM = ntvfs
-PRIVATE_DEPENDENCIES = NDR_NFS4ACL SAMDB ntvfs_posix
+SUBSYSTEM = pvfs_acl
+PRIVATE_DEPENDENCIES = NDR_NFS4ACL SAMDB
 # End MODULE pvfs_acl_nfs4
 ################################################
 
 pvfs_acl_nfs4_OBJ_FILES = $(ntvfssrcdir)/posix/pvfs_acl_nfs4.o
 
 ################################################
-[MODULE::pvfs_aio]
-SUBSYSTEM = ntvfs
+[SUBSYSTEM::pvfs_aio]
 PRIVATE_DEPENDENCIES = LIBAIO_LINUX
 ################################################
 
@@ -35,8 +41,8 @@ SUBSYSTEM = ntvfs
 OUTPUT_TYPE = MERGED_OBJ
 INIT_FUNCTION = ntvfs_posix_init 
 #PRIVATE_DEPENDENCIES = pvfs_acl_xattr pvfs_acl_nfs4
-PRIVATE_DEPENDENCIES = NDR_XATTR WRAP_XATTR BLKID ntvfs_common MESSAGING pvfs_aio \
-					   LIBWBCLIENT
+PRIVATE_DEPENDENCIES = NDR_XATTR WRAP_XATTR BLKID ntvfs_common MESSAGING \
+			LIBWBCLIENT pvfs_acl pvfs_aio
 # End MODULE ntvfs_posix
 ################################################
 
@@ -65,7 +71,6 @@ ntvfs_posix_OBJ_FILES = $(addprefix $(ntvfssrcdir)/posix/, \
 		pvfs_ioctl.o \
 		pvfs_xattr.o \
 		pvfs_streams.o \
-		pvfs_acl.o \
 		pvfs_notify.o \
 		xattr_system.o \
 		xattr_tdb.o)
diff --git a/source/ntvfs/posix/pvfs_acl.c b/source/ntvfs/posix/pvfs_acl.c
index 9a9200e..57a463a 100644
--- a/source/ntvfs/posix/pvfs_acl.c
+++ b/source/ntvfs/posix/pvfs_acl.c
@@ -24,6 +24,7 @@
 #include "vfs_posix.h"
 #include "librpc/gen_ndr/xattr.h"
 #include "libcli/security/security.h"
+#include "param/param.h"
 
 
 /* the list of currently registered ACL backends */
@@ -79,6 +80,27 @@ const struct pvfs_acl_ops *pvfs_acl_backend_byname(const char *name)
 	return NULL;
 }
 
+NTSTATUS pvfs_acl_init(struct loadparm_context *lp_ctx)
+{
+	static bool initialized = false;
+	extern NTSTATUS pvfs_acl_nfs4_init(void);
+	extern NTSTATUS pvfs_acl_xattr_init(void);
+	init_module_fn static_init[] = { STATIC_pvfs_acl_MODULES };
+	init_module_fn *shared_init;
+
+	if (initialized) return NT_STATUS_OK;
+	initialized = true;
+
+	shared_init = load_samba_modules(NULL, lp_ctx, "pvfs_acl");
+
+	run_init_functions(static_init);
+	run_init_functions(shared_init);
+
+	talloc_free(shared_init);
+
+	return NT_STATUS_OK;
+}
+
 
 /*
   map a single access_mask from generic to specific bits for files/dirs
diff --git a/source/ntvfs/posix/vfs_posix.c b/source/ntvfs/posix/vfs_posix.c
index b5dd270..ce0da70 100644
--- a/source/ntvfs/posix/vfs_posix.c
+++ b/source/ntvfs/posix/vfs_posix.c
@@ -176,6 +176,13 @@ static NTSTATUS pvfs_connect(struct ntvfs_module_context *ntvfs,
 	char *base_directory;
 	NTSTATUS status;
 
+	/*
+	 * TODO: call this from ntvfs_posix_init()
+	 *       but currently we don't have a lp_ctx there
+	 */
+	status = pvfs_acl_init(ntvfs->ctx->lp_ctx);
+	NT_STATUS_NOT_OK_RETURN(status);
+
 	pvfs = talloc_zero(ntvfs, struct pvfs_state);
 	NT_STATUS_HAVE_NO_MEMORY(pvfs);
 
diff --git a/source/ntvfs/posix/vfs_posix.h b/source/ntvfs/posix/vfs_posix.h
index cf39bcf..1a54b57 100644
--- a/source/ntvfs/posix/vfs_posix.h
+++ b/source/ntvfs/posix/vfs_posix.h
@@ -283,6 +283,7 @@ struct pvfs_acl_ops {
 };
 
 #include "ntvfs/posix/vfs_posix_proto.h"
+#include "ntvfs/posix/vfs_acl_proto.h"
 
 NTSTATUS pvfs_aio_pread(struct ntvfs_request *req, union smb_read *rd,
 			struct pvfs_file *f, uint32_t maxcnt);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list