[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Tue Oct 11 04:16:03 MDT 2011


The branch, master has been updated
       via  e568284 s3-passdb: split out passdb/pdb_ipa.h.
       via  6cc2843 s3-passdb: split out passdb/pdb_nds.h.
       via  a1f4fe7 s3-passdb: split out passdb/pdb_ldap.h.
       via  2c3c18c s3-smbldap: rearrange prototypes a bit.
      from  fea02ce ldb:ldb_autotransaction_request - error string shouldn't be set here

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


- Log -----------------------------------------------------------------
commit e5682847fa04f96f5a8546c47727d06218fc3a6c
Author: Günther Deschner <gd at samba.org>
Date:   Mon Oct 10 21:53:15 2011 +0200

    s3-passdb: split out passdb/pdb_ipa.h.
    
    Guenther
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Tue Oct 11 12:15:36 CEST 2011 on sn-devel-104

commit 6cc2843dc67174a795fc9a69020853f44fbca4b7
Author: Günther Deschner <gd at samba.org>
Date:   Mon Oct 10 21:48:35 2011 +0200

    s3-passdb: split out passdb/pdb_nds.h.
    
    Guenther

commit a1f4fe7e08ca4fb0441869e73e3cc1af607e8d8b
Author: Günther Deschner <gd at samba.org>
Date:   Mon Oct 10 21:45:42 2011 +0200

    s3-passdb: split out passdb/pdb_ldap.h.
    
    Guenther

commit 2c3c18c388d4cae107ecc3bb7e8cb43b525a1154
Author: Günther Deschner <gd at samba.org>
Date:   Mon Oct 10 18:46:53 2011 +0200

    s3-smbldap: rearrange prototypes a bit.
    
    Guenther

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

Summary of changes:
 source3/include/smbldap.h                          |   48 +++++++------------
 source3/passdb/pdb_ipa.c                           |    2 +
 .../gssapi-glue.c => source3/passdb/pdb_ipa.h      |   20 ++++----
 source3/passdb/pdb_ldap.c                          |    3 +
 source3/passdb/pdb_ldap.h                          |   42 +++++++++++++++++
 source3/passdb/pdb_nds.c                           |    2 +
 .../kcc_connection.h => source3/passdb/pdb_nds.h   |   36 +++++++-------
 source3/passdb/proto.h                             |   26 -----------
 8 files changed, 95 insertions(+), 84 deletions(-)
 copy source4/heimdal_build/gssapi-glue.c => source3/passdb/pdb_ipa.h (72%)
 create mode 100644 source3/passdb/pdb_ldap.h
 copy source4/dsdb/kcc/kcc_connection.h => source3/passdb/pdb_nds.h (58%)


Changeset truncated at 500 lines:

diff --git a/source3/include/smbldap.h b/source3/include/smbldap.h
index 4ae8476..cce3e1e 100644
--- a/source3/include/smbldap.h
+++ b/source3/include/smbldap.h
@@ -216,36 +216,6 @@ struct ldapsam_privates {
 	} search_cache;
 };
 
-/* Functions shared between pdb_ldap.c and pdb_nds.c. */
-struct pdb_methods;
-NTSTATUS pdb_init_ldapsam_compat( struct pdb_methods **pdb_method, const char *location);
-int ldapsam_search_suffix_by_name(struct ldapsam_privates *ldap_state,
-                                  const char *user,
-                                  LDAPMessage ** result,
-                                  const char **attr);
-NTSTATUS pdb_init_ldapsam( struct pdb_methods **pdb_method, const char *location);
-const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver );
-
-char * smbldap_talloc_single_attribute(LDAP *ldap_struct, LDAPMessage *entry,
-				       const char *attribute,
-				       TALLOC_CTX *mem_ctx);
-char * smbldap_talloc_first_attribute(LDAP *ldap_struct, LDAPMessage *entry,
-				      const char *attribute,
-				      TALLOC_CTX *mem_ctx);
-char * smbldap_talloc_smallest_attribute(LDAP *ldap_struct, LDAPMessage *entry,
-					 const char *attribute,
-					 TALLOC_CTX *mem_ctx);
-bool smbldap_talloc_single_blob(TALLOC_CTX *mem_ctx, LDAP *ld,
-				LDAPMessage *msg, const char *attrib,
-				DATA_BLOB *blob);
-bool smbldap_pull_sid(LDAP *ld, LDAPMessage *msg, const char *attrib,
-		      struct dom_sid *sid);
-void talloc_autofree_ldapmsg(TALLOC_CTX *mem_ctx, LDAPMessage *result);
-void talloc_autofree_ldapmod(TALLOC_CTX *mem_ctx, LDAPMod **mod);
-char *smbldap_talloc_dn(TALLOC_CTX *mem_ctx, LDAP *ld,
-			      LDAPMessage *entry);
-LDAP *priv2ld(struct ldapsam_privates *priv);
-
 /* The following definitions come from lib/smbldap.c  */
 
 int smb_ldap_start_tls(LDAP *ldap_struct, int version);
@@ -276,6 +246,24 @@ bool smbldap_has_control(LDAP *ld, const char *control);
 bool smbldap_has_extension(LDAP *ld, const char *extension);
 bool smbldap_has_naming_context(LDAP *ld, const char *naming_context);
 bool smbldap_set_creds(struct smbldap_state *ldap_state, bool anon, const char *dn, const char *secret);
+char * smbldap_talloc_single_attribute(LDAP *ldap_struct, LDAPMessage *entry,
+				       const char *attribute,
+				       TALLOC_CTX *mem_ctx);
+char * smbldap_talloc_first_attribute(LDAP *ldap_struct, LDAPMessage *entry,
+				      const char *attribute,
+				      TALLOC_CTX *mem_ctx);
+char * smbldap_talloc_smallest_attribute(LDAP *ldap_struct, LDAPMessage *entry,
+					 const char *attribute,
+					 TALLOC_CTX *mem_ctx);
+bool smbldap_talloc_single_blob(TALLOC_CTX *mem_ctx, LDAP *ld,
+				LDAPMessage *msg, const char *attrib,
+				DATA_BLOB *blob);
+bool smbldap_pull_sid(LDAP *ld, LDAPMessage *msg, const char *attrib,
+		      struct dom_sid *sid);
+void talloc_autofree_ldapmsg(TALLOC_CTX *mem_ctx, LDAPMessage *result);
+void talloc_autofree_ldapmod(TALLOC_CTX *mem_ctx, LDAPMod **mod);
+char *smbldap_talloc_dn(TALLOC_CTX *mem_ctx, LDAP *ld,
+			      LDAPMessage *entry);
 
 /* The following definitions come from lib/smbldap_util.c  */
 
diff --git a/source3/passdb/pdb_ipa.c b/source3/passdb/pdb_ipa.c
index 15e65e0..f177a22 100644
--- a/source3/passdb/pdb_ipa.c
+++ b/source3/passdb/pdb_ipa.c
@@ -26,6 +26,8 @@
 #include "secrets.h"
 
 #include "smbldap.h"
+#include "passdb/pdb_ldap.h"
+#include "passdb/pdb_ipa.h"
 
 #define IPA_KEYTAB_SET_OID "2.16.840.1.113730.3.8.3.1"
 #define IPA_MAGIC_ID_STR "999"
diff --git a/source4/heimdal_build/gssapi-glue.c b/source3/passdb/pdb_ipa.h
similarity index 72%
copy from source4/heimdal_build/gssapi-glue.c
copy to source3/passdb/pdb_ipa.h
index 0c27f51..46e6ffe 100644
--- a/source4/heimdal_build/gssapi-glue.c
+++ b/source3/passdb/pdb_ipa.h
@@ -1,9 +1,7 @@
 /*
    Unix SMB/CIFS implementation.
-
-   provide glue functions between heimdal and samba
-
-   Copyright (C) Andrew Tridgell 2005
+   IPA helper functions for SAMBA
+   Copyright (C) Sumit Bose <sbose at redhat.com> 2010
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,12 +15,14 @@
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
 */
 
-#include "../replace/replace.h"
-#include "heimdal/lib/gssapi/gssapi_mech.h"
+#ifndef _PASSDB_PDB_IPA_H_
+#define _PASSDB_PDB_IPA_H_
+
+/* The following definitions come from passdb/pdb_ipa.c  */
+
+NTSTATUS pdb_ipa_init(void);
 
-gssapi_mech_interface __gss_ntlm_initialize(void)
-{
-	return NULL;
-}
+#endif /* _PASSDB_PDB_IPA_H_ */
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 8b6f07c..3d3d16c 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -60,6 +60,9 @@
 
 
 #include "smbldap.h"
+#include "passdb/pdb_ldap.h"
+#include "passdb/pdb_nds.h"
+#include "passdb/pdb_ipa.h"
 
 /**********************************************************************
  Simple helper function to make stuff better readable
diff --git a/source3/passdb/pdb_ldap.h b/source3/passdb/pdb_ldap.h
new file mode 100644
index 0000000..244945d
--- /dev/null
+++ b/source3/passdb/pdb_ldap.h
@@ -0,0 +1,42 @@
+/*
+   Unix SMB/CIFS implementation.
+   LDAP protocol helper functions for SAMBA
+   Copyright (C) Jean François Micouleau	1998
+   Copyright (C) Gerald Carter			2001-2003
+   Copyright (C) Shahms King			2001
+   Copyright (C) Andrew Bartlett		2002-2003
+   Copyright (C) Stefan (metze) Metzmacher	2002-2003
+   Copyright (C) Simo Sorce			2006
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef _PASSDB_PDB_LDAP_H_
+#define _PASSDB_PDB_LDAP_H_
+
+/* The following definitions come from passdb/pdb_ldap.c  */
+
+const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver );
+NTSTATUS pdb_init_ldapsam_compat(struct pdb_methods **pdb_method, const char *location);
+NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location);
+NTSTATUS pdb_ldap_init(void);
+int ldapsam_search_suffix_by_name(struct ldapsam_privates *ldap_state,
+                                  const char *user,
+                                  LDAPMessage ** result,
+                                  const char **attr);
+const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver );
+LDAP *priv2ld(struct ldapsam_privates *priv);
+
+#endif /* _PASSDB_PDB_LDAP_H_ */
diff --git a/source3/passdb/pdb_nds.c b/source3/passdb/pdb_nds.c
index 56375a8..72d6a3d 100644
--- a/source3/passdb/pdb_nds.c
+++ b/source3/passdb/pdb_nds.c
@@ -26,6 +26,8 @@
 #include <wchar.h>
 
 #include "smbldap.h"
+#include "passdb/pdb_ldap.h"
+#include "passdb/pdb_nds.h"
 
 #define NMASLDAP_GET_LOGIN_CONFIG_REQUEST	"2.16.840.1.113719.1.39.42.100.3"
 #define NMASLDAP_GET_LOGIN_CONFIG_RESPONSE	"2.16.840.1.113719.1.39.42.100.4"
diff --git a/source4/dsdb/kcc/kcc_connection.h b/source3/passdb/pdb_nds.h
similarity index 58%
copy from source4/dsdb/kcc/kcc_connection.h
copy to source3/passdb/pdb_nds.h
index 3bc635a..e73a3ba 100644
--- a/source4/dsdb/kcc/kcc_connection.h
+++ b/source3/passdb/pdb_nds.h
@@ -1,10 +1,7 @@
 /*
    Unix SMB/CIFS mplementation.
-
-   KCC service
-
-   Copyright (C) Crístian Deives 2009
-   based on drepl service code
+   NDS LDAP helper functions for SAMBA
+   Copyright (C) Vince Brimhall			2004-2005
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,19 +18,22 @@
 
 */
 
-#ifndef _DSDB_REPL_KCC_CONNECTION_H_
-#define _DSDB_REPL_KCC_CONNECTION_H_
+#ifndef _PASSDB_PDB_NDS_H_
+#define _PASSDB_PDB_NDS_H_
+
+/* The following definitions come from passdb/pdb_nds.c  */
 
-struct kcc_connection {
-	struct GUID obj_guid;
-	struct GUID dsa_guid;
-	struct GUID invocation_id;
-	uint8_t schedule[84];
-};
+struct smbldap_state;
 
-struct kcc_connection_list {
-	unsigned count;
-	struct kcc_connection *servers;
-};
+int pdb_nds_get_password(
+	struct smbldap_state *ldap_state,
+	char *object_dn,
+	size_t *pwd_len,
+	char *pwd );
+int pdb_nds_set_password(
+	struct smbldap_state *ldap_state,
+	char *object_dn,
+	const char *pwd );
+NTSTATUS pdb_nds_init(void);
 
-#endif /* _DSDB_REPL_KCC_CONNECTION_H_ */
+#endif /* _PASSDB_PDB_NDS_H_ */
diff --git a/source3/passdb/proto.h b/source3/passdb/proto.h
index 6a95454..36acc31 100644
--- a/source3/passdb/proto.h
+++ b/source3/passdb/proto.h
@@ -314,32 +314,6 @@ NTSTATUS pdb_set_secret(const char *secret_name,
 			struct security_descriptor *sd);
 NTSTATUS pdb_delete_secret(const char *secret_name);
 
-/* The following definitions come from passdb/pdb_ldap.c  */
-
-const char** get_userattr_list( TALLOC_CTX *mem_ctx, int schema_ver );
-NTSTATUS pdb_init_ldapsam_compat(struct pdb_methods **pdb_method, const char *location);
-NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location);
-NTSTATUS pdb_ldap_init(void);
-
-/* The following definitions come from passdb/pdb_nds.c  */
-
-struct smbldap_state;
-
-int pdb_nds_get_password(
-	struct smbldap_state *ldap_state,
-	char *object_dn,
-	size_t *pwd_len,
-	char *pwd );
-int pdb_nds_set_password(
-	struct smbldap_state *ldap_state,
-	char *object_dn,
-	const char *pwd );
-NTSTATUS pdb_nds_init(void);
-
-/* The following definitions come from passdb/pdb_nds.c  */
-
-NTSTATUS pdb_ipa_init(void);
-
 /* The following definitions come from passdb/pdb_util.c  */
 
 NTSTATUS create_builtin_users(const struct dom_sid *sid);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list