[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Mon Sep 3 20:46:02 MDT 2012


The branch, master has been updated
       via  9983ad7 s3-passdb: Rename pdb_samba4 to samba_dsdb and autoconfigure when we are a AD DC
      from  68f68d0 docs: Move Samba4 HOWTO link into README

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


- Log -----------------------------------------------------------------
commit 9983ad7a80477d8aaaa16488a93dffc6a32dd1ef
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Tue Sep 4 10:27:50 2012 +1000

    s3-passdb: Rename pdb_samba4 to samba_dsdb and autoconfigure when we are a AD DC
    
    The name samba_dsdb is not ideal, but it matches the primary ldb
    module we use, and more importantly it avoids having '4' in the name.
    We should slowly avoid using the term samba4 in long-term places like
    the smb.conf because it is confusing to users given we are shipping
    Samba 4.0 as an AD DC as well as all the other supported roles (domain
    member/standalone server/classic DC)
    
    Additionally, samba4 will be an odd name when we eventually release
    Samba 5.0!
    
    samba4 remains accepted as an alias to ensure existing smb.conf files
    load, but to allow changes here in the future, we set the value during
    the smb.conf load, and not during the provision when we are an AD DC.
    
    This simplifies the default smb.conf for the vast majority of our
    users and reduces the number of things listed in smb.conf files that
    we later have to work around if we wish to change the
    name/implementation of the passdb glue module again.
    
    Andrew Bartlett
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Tue Sep  4 04:45:16 CEST 2012 on sn-devel-104

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

Summary of changes:
 selftest/target/Samba4.pm                          |    2 -
 source3/param/loadparm.c                           |    1 +
 source3/passdb/{pdb_samba4.c => pdb_samba_dsdb.c}  |  549 ++++++++++----------
 source3/passdb/wscript_build                       |    8 +-
 source3/wscript                                    |    2 +-
 source4/scripting/python/samba/netcmd/ntacl.py     |    4 +-
 .../scripting/python/samba/provision/__init__.py   |   23 +-
 7 files changed, 297 insertions(+), 292 deletions(-)
 rename source3/passdb/{pdb_samba4.c => pdb_samba_dsdb.c} (76%)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index fb437d7..d2e890e 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -603,8 +603,6 @@ sub provision_raw_step1($$)
 	dreplsrv:periodic_startup_interval = 0
 	dsdb:schema update allowed = yes
 
-	passdb backend = samba4
-
         vfs objects = dfs_samba4 acl_xattr fake_acls xattr_tdb streams_depot
 
 	# remove this again, when our smb2 client library
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index c92b631..1e41825 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -4914,6 +4914,7 @@ static bool lp_load_ex(const char *pszFname,
 				lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr");
 			}
 		}
+		lp_do_parameter(-1, "passdb backend", "samba_dsdb");
 	}
 
 	bAllowIncludeRegistry = true;
diff --git a/source3/passdb/pdb_samba4.c b/source3/passdb/pdb_samba_dsdb.c
similarity index 76%
rename from source3/passdb/pdb_samba4.c
rename to source3/passdb/pdb_samba_dsdb.c
index 01eb4ba..2552fb9 100644
--- a/source3/passdb/pdb_samba4.c
+++ b/source3/passdb/pdb_samba_dsdb.c
@@ -1,8 +1,8 @@
 /*
    Unix SMB/CIFS implementation.
-   pdb glue module for samba4
+   pdb glue module for direct access to the dsdb via LDB APIs
    Copyright (C) Volker Lendecke 2009-2011
-   Copyright (C) Andrew Bartlett 2010
+   Copyright (C) Andrew Bartlett 2010-2012
    Copyright (C) Matthias Dieter Wallnöfer                 2009
 
    This program is free software; you can redistribute it and/or modify
@@ -36,24 +36,24 @@
 #include "source4/dsdb/common/util.h"
 #include "source3/include/secrets.h"
 
-struct pdb_samba4_state {
+struct pdb_samba_dsdb_state {
 	struct tevent_context *ev;
 	struct ldb_context *ldb;
 	struct idmap_context *idmap_ctx;
 	struct loadparm_context *lp_ctx;
 };
 
-static NTSTATUS pdb_samba4_getsampwsid(struct pdb_methods *m,
+static NTSTATUS pdb_samba_dsdb_getsampwsid(struct pdb_methods *m,
 				    struct samu *sam_acct,
 				    const struct dom_sid *sid);
-static NTSTATUS pdb_samba4_getsamupriv(struct pdb_samba4_state *state,
+static NTSTATUS pdb_samba_dsdb_getsamupriv(struct pdb_samba_dsdb_state *state,
 				    const char *filter,
 				    TALLOC_CTX *mem_ctx,
 				    struct ldb_message **pmsg);
-static bool pdb_samba4_sid_to_id(struct pdb_methods *m, const struct dom_sid *sid,
+static bool pdb_samba_dsdb_sid_to_id(struct pdb_methods *m, const struct dom_sid *sid,
 				 struct unixid *id);
 
-static bool pdb_samba4_pull_time(struct ldb_message *msg, const char *attr,
+static bool pdb_samba_dsdb_pull_time(struct ldb_message *msg, const char *attr,
 			      time_t *ptime)
 {
 	uint64_t tmp;
@@ -65,18 +65,18 @@ static bool pdb_samba4_pull_time(struct ldb_message *msg, const char *attr,
 	return true;
 }
 
-static struct pdb_domain_info *pdb_samba4_get_domain_info(
+static struct pdb_domain_info *pdb_samba_dsdb_get_domain_info(
 	struct pdb_methods *m, TALLOC_CTX *mem_ctx)
 {
-	struct pdb_samba4_state *state = talloc_get_type_abort(
-		m->private_data, struct pdb_samba4_state);
+	struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
+		m->private_data, struct pdb_samba_dsdb_state);
 	struct pdb_domain_info *info;
 	struct dom_sid *domain_sid;
 	struct ldb_dn *forest_dn, *domain_dn;
 	struct ldb_result *dom_res = NULL;
 	const char *dom_attrs[] = {
-		"objectSid", 
-		"objectGUID", 
+		"objectSid",
+		"objectGUID",
 		"fSMORoleOwner",
 		NULL
 	};
@@ -88,7 +88,7 @@ static struct pdb_domain_info *pdb_samba4_get_domain_info(
 		return NULL;
 	}
 
-	domain_dn = ldb_get_default_basedn(state->ldb); 
+	domain_dn = ldb_get_default_basedn(state->ldb);
 
 	ret = ldb_search(state->ldb, info, &dom_res,
 			 domain_dn, LDB_SCOPE_BASE, dom_attrs, NULL);
@@ -142,11 +142,11 @@ fail:
 	return NULL;
 }
 
-static struct ldb_message *pdb_samba4_get_samu_private(
+static struct ldb_message *pdb_samba_dsdb_get_samu_private(
 	struct pdb_methods *m, struct samu *sam)
 {
-	struct pdb_samba4_state *state = talloc_get_type_abort(
-		m->private_data, struct pdb_samba4_state);
+	struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
+		m->private_data, struct pdb_samba_dsdb_state);
 	struct ldb_message *msg;
 	char *sidstr, *filter;
 	NTSTATUS status;
@@ -170,7 +170,7 @@ static struct ldb_message *pdb_samba4_get_samu_private(
 		return NULL;
 	}
 
-	status = pdb_samba4_getsamupriv(state, filter, sam, &msg);
+	status = pdb_samba_dsdb_getsamupriv(state, filter, sam, &msg);
 	TALLOC_FREE(filter);
 	if (!NT_STATUS_IS_OK(status)) {
 		return NULL;
@@ -179,12 +179,12 @@ static struct ldb_message *pdb_samba4_get_samu_private(
 	return msg;
 }
 
-static NTSTATUS pdb_samba4_init_sam_from_priv(struct pdb_methods *m,
+static NTSTATUS pdb_samba_dsdb_init_sam_from_priv(struct pdb_methods *m,
 					   struct samu *sam,
 					   struct ldb_message *msg)
 {
-	struct pdb_samba4_state *state = talloc_get_type_abort(
-		m->private_data, struct pdb_samba4_state);
+	struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
+		m->private_data, struct pdb_samba_dsdb_state);
 	TALLOC_CTX *frame = talloc_stackframe();
 	NTSTATUS status = NT_STATUS_INTERNAL_DB_CORRUPTION;
 	const char *str;
@@ -200,16 +200,16 @@ static NTSTATUS pdb_samba4_init_sam_from_priv(struct pdb_methods *m,
 	}
 	pdb_set_username(sam, str, PDB_SET);
 
-	if (pdb_samba4_pull_time(msg, "lastLogon", &tmp_time)) {
+	if (pdb_samba_dsdb_pull_time(msg, "lastLogon", &tmp_time)) {
 		pdb_set_logon_time(sam, tmp_time, PDB_SET);
 	}
-	if (pdb_samba4_pull_time(msg, "lastLogoff", &tmp_time)) {
+	if (pdb_samba_dsdb_pull_time(msg, "lastLogoff", &tmp_time)) {
 		pdb_set_logoff_time(sam, tmp_time, PDB_SET);
 	}
-	if (pdb_samba4_pull_time(msg, "pwdLastSet", &tmp_time)) {
+	if (pdb_samba_dsdb_pull_time(msg, "pwdLastSet", &tmp_time)) {
 		pdb_set_pass_last_set_time(sam, tmp_time, PDB_SET);
 	}
-	if (pdb_samba4_pull_time(msg, "accountExpires", &tmp_time)) {
+	if (pdb_samba_dsdb_pull_time(msg, "accountExpires", &tmp_time)) {
 		pdb_set_kickoff_time(sam, tmp_time, PDB_SET);
 	}
 
@@ -288,7 +288,7 @@ static NTSTATUS pdb_samba4_init_sam_from_priv(struct pdb_methods *m,
 		}
 		pdb_set_nt_passwd(sam, blob->data, PDB_SET);
 	}
-	
+
 	blob = ldb_msg_find_ldb_val(msg, "dBCSPwd");
 	if (blob) {
 		if (blob->length != LM_HASH_LEN) {
@@ -298,7 +298,7 @@ static NTSTATUS pdb_samba4_init_sam_from_priv(struct pdb_methods *m,
 		}
 		pdb_set_lanman_passwd(sam, blob->data, PDB_SET);
 	}
-	
+
 	n = ldb_msg_find_attr_as_uint(msg, "primaryGroupID", 0);
 	if (n == 0) {
 		DEBUG(10, ("Could not pull primaryGroupID\n"));
@@ -313,7 +313,7 @@ fail:
 	return status;
 }
 
-static bool pdb_samba4_add_time(struct ldb_message *msg, 
+static bool pdb_samba_dsdb_add_time(struct ldb_message *msg,
 				const char *attrib, time_t t)
 {
 	uint64_t nt_time;
@@ -323,7 +323,7 @@ static bool pdb_samba4_add_time(struct ldb_message *msg,
 	return ldb_msg_add_fmt(msg, attrib, "%llu", (unsigned long long) nt_time);
 }
 
-static int pdb_samba4_replace_by_sam(struct pdb_samba4_state *state,
+static int pdb_samba_dsdb_replace_by_sam(struct pdb_samba_dsdb_state *state,
 				     bool (*need_update)(const struct samu *,
 							 enum pdb_elements),
 				     struct ldb_dn *dn,
@@ -357,8 +357,8 @@ static int pdb_samba4_replace_by_sam(struct pdb_samba4_state *state,
 	 * force the pwdLastSet to now() */
 	if (need_update(sam, PDB_PASSLASTSET)) {
 		dsdb_flags = DSDB_PASSWORD_BYPASS_LAST_SET;
-		
-		ret |= pdb_samba4_add_time(msg, "pwdLastSet",
+
+		ret |= pdb_samba_dsdb_add_time(msg, "pwdLastSet",
 					   pdb_get_pass_last_set_time(sam));
 	}
 
@@ -369,7 +369,7 @@ static int pdb_samba4_replace_by_sam(struct pdb_samba4_state *state,
 			talloc_free(frame);
 			return LDB_ERR_OPERATIONS_ERROR;
 		}
-		
+
 		if (!convert_string_talloc(msg,
 					   CH_UNIX, CH_UTF16,
 					   pw, strlen(pw),
@@ -506,17 +506,17 @@ static int pdb_samba4_replace_by_sam(struct pdb_samba4_state *state,
 	}
 
 	if (need_update(sam, PDB_KICKOFFTIME)) {
-		ret |= pdb_samba4_add_time(msg, "accountExpires",
+		ret |= pdb_samba_dsdb_add_time(msg, "accountExpires",
 					pdb_get_kickoff_time(sam));
 	}
 
 	if (need_update(sam, PDB_LOGONTIME)) {
-		ret |= pdb_samba4_add_time(msg, "lastLogon",
+		ret |= pdb_samba_dsdb_add_time(msg, "lastLogon",
 					pdb_get_logon_time(sam));
 	}
 
 	if (need_update(sam, PDB_LOGOFFTIME)) {
-		ret |= pdb_samba4_add_time(msg, "lastLogoff",
+		ret |= pdb_samba_dsdb_add_time(msg, "lastLogoff",
 					pdb_get_logoff_time(sam));
 	}
 
@@ -567,13 +567,13 @@ static int pdb_samba4_replace_by_sam(struct pdb_samba4_state *state,
 				       "%i", (int)pdb_get_code_page(sam));
 	}
 
-	/* Not yet handled here or not meaningful for modifies on a Samba4 backend:
+	/* Not yet handled here or not meaningful for modifies on a Samba_Dsdb backend:
 	PDB_BAD_PASSWORD_TIME,
 	PDB_CANCHANGETIME, - these are calculated per policy, not stored
 	PDB_DOMAIN,
 	PDB_NTUSERNAME, - this makes no sense, and never really did
 	PDB_LOGONDIVS,
-	PDB_USERSID, - Handled in pdb_samba4_add_sam_account()
+	PDB_USERSID, - Handled in pdb_samba_dsdb_add_sam_account()
 	PDB_FIELDS_PRESENT,
 	PDB_BAD_PASSWORD_COUNT,
 	PDB_LOGON_COUNT,
@@ -604,7 +604,7 @@ static int pdb_samba4_replace_by_sam(struct pdb_samba4_state *state,
 	return ret;
 }
 
-static NTSTATUS pdb_samba4_getsamupriv(struct pdb_samba4_state *state,
+static NTSTATUS pdb_samba_dsdb_getsamupriv(struct pdb_samba_dsdb_state *state,
 				    const char *filter,
 				    TALLOC_CTX *mem_ctx,
 				    struct ldb_message **msg)
@@ -628,8 +628,8 @@ static NTSTATUS pdb_samba4_getsamupriv(struct pdb_samba4_state *state,
 	return NT_STATUS_OK;
 }
 
-static NTSTATUS pdb_samba4_getsampwfilter(struct pdb_methods *m,
-					  struct pdb_samba4_state *state,
+static NTSTATUS pdb_samba_dsdb_getsampwfilter(struct pdb_methods *m,
+					  struct pdb_samba_dsdb_state *state,
 					  struct samu *sam_acct,
 					  const char *exp_fmt, ...) _PRINTF_ATTRIBUTE(4, 5)
 {
@@ -643,23 +643,23 @@ static NTSTATUS pdb_samba4_getsampwfilter(struct pdb_methods *m,
 	va_start(ap, exp_fmt);
 	expression = talloc_vasprintf(tmp_ctx, exp_fmt, ap);
 	va_end(ap);
-	
+
 	if (!expression) {
 		talloc_free(tmp_ctx);
 		return NT_STATUS_NO_MEMORY;
 	}
 
-	status = pdb_samba4_getsamupriv(state, expression, sam_acct, &priv);
+	status = pdb_samba_dsdb_getsamupriv(state, expression, sam_acct, &priv);
 	talloc_free(tmp_ctx);
 	if (!NT_STATUS_IS_OK(status)) {
-		DEBUG(10, ("pdb_samba4_getsamupriv failed: %s\n",
+		DEBUG(10, ("pdb_samba_dsdb_getsamupriv failed: %s\n",
 			   nt_errstr(status)));
 		return status;
 	}
 
-	status = pdb_samba4_init_sam_from_priv(m, sam_acct, priv);
+	status = pdb_samba_dsdb_init_sam_from_priv(m, sam_acct, priv);
 	if (!NT_STATUS_IS_OK(status)) {
-		DEBUG(10, ("pdb_samba4_init_sam_from_priv failed: %s\n",
+		DEBUG(10, ("pdb_samba_dsdb_init_sam_from_priv failed: %s\n",
 			   nt_errstr(status)));
 		TALLOC_FREE(priv);
 		return status;
@@ -669,44 +669,44 @@ static NTSTATUS pdb_samba4_getsampwfilter(struct pdb_methods *m,
 	return NT_STATUS_OK;
 }
 
-static NTSTATUS pdb_samba4_getsampwnam(struct pdb_methods *m,
+static NTSTATUS pdb_samba_dsdb_getsampwnam(struct pdb_methods *m,
 				    struct samu *sam_acct,
 				    const char *username)
 {
-	struct pdb_samba4_state *state = talloc_get_type_abort(
-		m->private_data, struct pdb_samba4_state);
+	struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
+		m->private_data, struct pdb_samba_dsdb_state);
 
-	return pdb_samba4_getsampwfilter(m, state, sam_acct, 
+	return pdb_samba_dsdb_getsampwfilter(m, state, sam_acct,
 					 "(&(samaccountname=%s)(objectclass=user))",
 					 username);
 }
 
-static NTSTATUS pdb_samba4_getsampwsid(struct pdb_methods *m,
+static NTSTATUS pdb_samba_dsdb_getsampwsid(struct pdb_methods *m,
 				    struct samu *sam_acct,
 				    const struct dom_sid *sid)
 {
 	NTSTATUS status;
-	struct pdb_samba4_state *state = talloc_get_type_abort(
-		m->private_data, struct pdb_samba4_state);
+	struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
+		m->private_data, struct pdb_samba_dsdb_state);
 	char *sidstr;
 
 	sidstr = dom_sid_string(talloc_tos(), sid);
 	NT_STATUS_HAVE_NO_MEMORY(sidstr);
 
-	status = pdb_samba4_getsampwfilter(m, state, sam_acct,  
-					   "(&(objectsid=%s)(objectclass=user))", 
+	status = pdb_samba_dsdb_getsampwfilter(m, state, sam_acct,
+					   "(&(objectsid=%s)(objectclass=user))",
 					   sidstr);
 	talloc_free(sidstr);
 	return status;
 }
 
-static NTSTATUS pdb_samba4_create_user(struct pdb_methods *m,
+static NTSTATUS pdb_samba_dsdb_create_user(struct pdb_methods *m,
 				    TALLOC_CTX *mem_ctx,
 				    const char *name, uint32 acct_flags,
 				    uint32 *rid)
 {
-	struct pdb_samba4_state *state = talloc_get_type_abort(
-		m->private_data, struct pdb_samba4_state);
+	struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
+		m->private_data, struct pdb_samba_dsdb_state);
 	struct dom_sid *sid;
 	struct ldb_dn *dn;
 	NTSTATUS status;
@@ -726,12 +726,12 @@ static NTSTATUS pdb_samba4_create_user(struct pdb_methods *m,
 	return NT_STATUS_OK;
 }
 
-static NTSTATUS pdb_samba4_delete_user(struct pdb_methods *m,
+static NTSTATUS pdb_samba_dsdb_delete_user(struct pdb_methods *m,
 				       TALLOC_CTX *mem_ctx,
 				       struct samu *sam)
 {
-	struct pdb_samba4_state *state = talloc_get_type_abort(
-		m->private_data, struct pdb_samba4_state);
+	struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
+		m->private_data, struct pdb_samba_dsdb_state);
 	struct ldb_dn *dn;
 	int rc;
 	TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
@@ -758,14 +758,14 @@ static NTSTATUS pdb_samba4_delete_user(struct pdb_methods *m,
  * the database.  This is not implemented at this time as we need to
  * be careful around the creation of arbitary SIDs (ie, we must ensrue
  * they are not left in a RID pool */
-static NTSTATUS pdb_samba4_add_sam_account(struct pdb_methods *m,
+static NTSTATUS pdb_samba_dsdb_add_sam_account(struct pdb_methods *m,
 					struct samu *sampass)
 {
 	int ret;
 	NTSTATUS status;
 	struct ldb_dn *dn;
-	struct pdb_samba4_state *state = talloc_get_type_abort(
-		m->private_data, struct pdb_samba4_state);
+	struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
+		m->private_data, struct pdb_samba_dsdb_state);
 	uint32_t acb_flags = pdb_get_acct_ctrl(sampass);
 	const char *username = pdb_get_username(sampass);
 	const struct dom_sid *user_sid = pdb_get_user_sid(sampass);
@@ -787,7 +787,7 @@ static NTSTATUS pdb_samba4_add_sam_account(struct pdb_methods *m,
 		return status;
 	}
 
-	ret = pdb_samba4_replace_by_sam(state, pdb_element_is_set_or_changed,
+	ret = pdb_samba_dsdb_replace_by_sam(state, pdb_element_is_set_or_changed,
 					dn, sampass);
 	if (ret != LDB_SUCCESS) {
 		ldb_transaction_cancel(state->ldb);
@@ -808,37 +808,37 @@ static NTSTATUS pdb_samba4_add_sam_account(struct pdb_methods *m,
 }
 
 /*
- * Update the Samba4 LDB with the changes from a struct samu.
+ * Update the Samba_Dsdb LDB with the changes from a struct samu.
  *
  * This takes care not to update elements that have not been changed
  * by the caller
  */
-static NTSTATUS pdb_samba4_update_sam_account(struct pdb_methods *m,
+static NTSTATUS pdb_samba_dsdb_update_sam_account(struct pdb_methods *m,
 					   struct samu *sam)
 {
-	struct pdb_samba4_state *state = talloc_get_type_abort(
-		m->private_data, struct pdb_samba4_state);
-	struct ldb_message *msg = pdb_samba4_get_samu_private(
+	struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
+		m->private_data, struct pdb_samba_dsdb_state);
+	struct ldb_message *msg = pdb_samba_dsdb_get_samu_private(
 		m, sam);
 	int ret;
 
-	ret = pdb_samba4_replace_by_sam(state, pdb_element_is_changed, msg->dn,
+	ret = pdb_samba_dsdb_replace_by_sam(state, pdb_element_is_changed, msg->dn,
 					sam);
 	return dsdb_ldb_err_to_ntstatus(ret);
 }
 
-static NTSTATUS pdb_samba4_delete_sam_account(struct pdb_methods *m,
+static NTSTATUS pdb_samba_dsdb_delete_sam_account(struct pdb_methods *m,
 					   struct samu *username)
 {
 	NTSTATUS status;
 	TALLOC_CTX *tmp_ctx = talloc_new(NULL);
 	NT_STATUS_HAVE_NO_MEMORY(tmp_ctx);
-	status = pdb_samba4_delete_user(m, tmp_ctx, username);
+	status = pdb_samba_dsdb_delete_user(m, tmp_ctx, username);
 	talloc_free(tmp_ctx);
 	return status;
 }
 
-static NTSTATUS pdb_samba4_rename_sam_account(struct pdb_methods *m,
+static NTSTATUS pdb_samba_dsdb_rename_sam_account(struct pdb_methods *m,
 					   struct samu *oldname,
 					   const char *newname)
 {
@@ -846,21 +846,21 @@ static NTSTATUS pdb_samba4_rename_sam_account(struct pdb_methods *m,
 }
 
 /* This is not implemented, as this module is exptected to be used
- * with auth_samba4, and this is responible for login counters etc
+ * with auth_samba_dsdb, and this is responible for login counters etc
  *
  */
-static NTSTATUS pdb_samba4_update_login_attempts(struct pdb_methods *m,
+static NTSTATUS pdb_samba_dsdb_update_login_attempts(struct pdb_methods *m,
 					      struct samu *sam_acct,
 					      bool success)
 {
 	return NT_STATUS_NOT_IMPLEMENTED;
 }
 
-static NTSTATUS pdb_samba4_getgrfilter(struct pdb_methods *m, GROUP_MAP *map,
+static NTSTATUS pdb_samba_dsdb_getgrfilter(struct pdb_methods *m, GROUP_MAP *map,
 				    const char *exp_fmt, ...) _PRINTF_ATTRIBUTE(4, 5)
 {
-	struct pdb_samba4_state *state = talloc_get_type_abort(
-		m->private_data, struct pdb_samba4_state);
+	struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
+		m->private_data, struct pdb_samba_dsdb_state);
 	const char *attrs[] = { "objectSid", "description", "samAccountName", "groupType",
 				NULL };
 	struct ldb_message *msg;
@@ -873,11 +873,11 @@ static NTSTATUS pdb_samba4_getgrfilter(struct pdb_methods *m, GROUP_MAP *map,
 	struct id_map *id_maps[2];
 	TALLOC_CTX *tmp_ctx = talloc_stackframe();
 	NT_STATUS_HAVE_NO_MEMORY(tmp_ctx);
-	
+
 	va_start(ap, exp_fmt);
 	expression = talloc_vasprintf(tmp_ctx, exp_fmt, ap);
 	va_end(ap);
-	
+
 	if (!expression) {
 		talloc_free(tmp_ctx);
 		return NT_STATUS_NO_MEMORY;
@@ -900,9 +900,9 @@ static NTSTATUS pdb_samba4_getgrfilter(struct pdb_methods *m, GROUP_MAP *map,
 		DEBUG(10, ("Could not pull SID\n"));
 		return NT_STATUS_INTERNAL_DB_CORRUPTION;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list