[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2205-gb660e51

Volker Lendecke vlendec at samba.org
Tue Jun 9 20:41:15 GMT 2009


The branch, master has been updated
       via  b660e51decaa1da99bce7eac80e6a6fad69b6dcb (commit)
       via  078443bc672ad5dd02fd47c91f52173b0879102e (commit)
      from  fae921e93821329605c8fecacda8eebb768af2f8 (commit)

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


- Log -----------------------------------------------------------------
commit b660e51decaa1da99bce7eac80e6a6fad69b6dcb
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jun 9 22:09:41 2009 +0200

    If there are no mods, don't bother the ldap server

commit 078443bc672ad5dd02fd47c91f52173b0879102e
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Jun 9 22:09:14 2009 +0200

    Some more fields in pdb_ads_init_ads_from_sam()

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

Summary of changes:
 source3/passdb/pdb_ads.c |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c
index 4e63297..8e30dfb 100644
--- a/source3/passdb/pdb_ads.c
+++ b/source3/passdb/pdb_ads.c
@@ -273,6 +273,26 @@ static bool pdb_ads_init_ads_from_sam(struct pdb_ads_state *state,
 		existing, mem_ctx, pnum_mods, pmods, "dBCSPwd",
 		data_blob_const(pdb_get_lanman_passwd(sam), NT_HASH_LEN));
 
+	ret &= tldap_make_mod_fmt(
+		existing, mem_ctx, pnum_mods, pmods, "userAccountControl",
+		"%d", ads_acb2uf(pdb_get_acct_ctrl(sam)));
+
+	ret &= tldap_make_mod_fmt(
+		existing, mem_ctx, pnum_mods, pmods, "homeDirectory",
+		"%s", pdb_get_homedir(sam));
+
+	ret &= tldap_make_mod_fmt(
+		existing, mem_ctx, pnum_mods, pmods, "homeDrive",
+		"%s", pdb_get_dir_drive(sam));
+
+	ret &= tldap_make_mod_fmt(
+		existing, mem_ctx, pnum_mods, pmods, "scriptPath",
+		"%s", pdb_get_logon_script(sam));
+
+	ret &= tldap_make_mod_fmt(
+		existing, mem_ctx, pnum_mods, pmods, "profilePath",
+		"%s", pdb_get_profile_path(sam));
+
 	return ret;
 }
 
@@ -455,6 +475,11 @@ static NTSTATUS pdb_ads_update_sam_account(struct pdb_methods *m,
 		return NT_STATUS_NO_MEMORY;
 	}
 
+	if (num_mods == 0) {
+		/* Nothing to do, just return success */
+		return NT_STATUS_OK;
+	}
+
 	rc = tldap_modify(state->ld, priv->dn, num_mods, mods, NULL, NULL);
 	if (rc != TLDAP_SUCCESS) {
 		DEBUG(10, ("ldap_modify for %s failed: %s\n", priv->dn,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list