[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Tue Jun 1 03:34:15 MDT 2010


The branch, master has been updated
       via  3f14d03... s3:winbindd: make sure we only call static_init_idmap once
       via  e67b0cf... s3:winbind Ensure we always init idmap_passdb before we use it
       via  b05c18c... s3:idmap Use idmap.idl defined structures and constants
      from  c256eb8... s4-configure: Fix typo in comment.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3f14d03adbda03b821210115af4fae044a9b4a3e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon May 31 10:57:52 2010 +0200

    s3:winbindd: make sure we only call static_init_idmap once
    
    metze
    
    Signed-off-by: Michael Adam <obnox at samba.org>

commit e67b0cf603483aefe823ab3c86b02db27c48b6eb
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 24 14:55:17 2010 +1000

    s3:winbind Ensure we always init idmap_passdb before we use it
    
    It seems that it is possible for idmap_init_passdb_domain() to be run
    before idmap_init_domain(), so ensure we run the static init functions
    in both.
    
    Andrew Bartlett
    
    Signed-off-by: Michael Adam <obnox at samba.org>

commit b05c18cff275650b4caa74db6ba82975df3abe9d
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Mon May 24 10:51:10 2010 +1000

    s3:idmap Use idmap.idl defined structures and constants
    
    This allows these structures to be shared across all of Samba
    
    The additional name type ID_TYPE_BOTH is unused in source3 code at
    this time.
    
    Andrew Bartlett
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Signed-off-by: Michael Adam <obnox at samba.org>

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

Summary of changes:
 source3/include/smb.h    |   25 +------------------------
 source3/winbindd/idmap.c |   23 +++++++++++++++++++----
 2 files changed, 20 insertions(+), 28 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb.h b/source3/include/smb.h
index a93caa7..89b3572 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -197,30 +197,7 @@ typedef union unid_t {
 					|LOOKUP_NAME_WKN\
 					|LOOKUP_NAME_DOMAIN)
 
-enum id_mapping {
-	ID_UNKNOWN = 0,
-	ID_MAPPED,
-	ID_UNMAPPED,
-	ID_EXPIRED
-};
-
-enum id_type {
-	ID_TYPE_NOT_SPECIFIED = 0,
-	ID_TYPE_UID,
-	ID_TYPE_GID
-};
-
-struct unixid {
-	uint32_t id;
-	enum id_type type;
-};
-
-struct id_map {
-	struct dom_sid *sid;
-	struct unixid xid;
-	enum id_mapping status;
-};
-
+#include "librpc/gen_ndr/idmap.h"
 #include "librpc/gen_ndr/epmapper.h"
 #include "librpc/gen_ndr/krb5pac.h"
 #include "librpc/gen_ndr/dcerpc.h"
diff --git a/source3/winbindd/idmap.c b/source3/winbindd/idmap.c
index 4aa229c..4229bf4 100644
--- a/source3/winbindd/idmap.c
+++ b/source3/winbindd/idmap.c
@@ -28,6 +28,21 @@
 
 static_decl_idmap;
 
+static void idmap_init(void)
+{
+	static bool initialized;
+
+	if (initialized) {
+		return;
+	}
+
+	DEBUG(10, ("idmap_init(): calling static_init_idmap\n"));
+
+	static_init_idmap;
+
+	initialized = true;
+}
+
 /**
  * Pointer to the backend methods. Modules register themselves here via
  * smb_register_idmap.
@@ -346,9 +361,7 @@ static struct idmap_domain *idmap_init_default_domain(TALLOC_CTX *mem_ctx)
 	char *modulename;
 	char *params;
 
-	DEBUG(10, ("idmap_init_default_domain: calling static_init_idmap\n"));
-
-	static_init_idmap;
+	idmap_init();
 
 	if (!parse_idmap_module(talloc_tos(), lp_idmap_backend(), &modulename,
 				&params)) {
@@ -428,6 +441,8 @@ fail:
 
 static struct idmap_domain *idmap_init_passdb_domain(TALLOC_CTX *mem_ctx)
 {
+	idmap_init();
+
 	if (passdb_idmap_domain != NULL) {
 		return passdb_idmap_domain;
 	}
@@ -536,7 +551,7 @@ static NTSTATUS idmap_alloc_init(struct idmap_alloc_context **ctx)
 	char *modulename, *params;
 	NTSTATUS ret = NT_STATUS_NO_MEMORY;;
 
-	static_init_idmap;
+	idmap_init();
 
 	if (idmap_alloc_ctx != NULL) {
 		*ctx = idmap_alloc_ctx;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list