[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Wed Mar 17 07:04:01 UTC 2021
The branch, master has been updated
via 1c1ff48e7a9 selftest/flapping: remove python[23] lines
via 467746da0a3 knownfail: remove python[23] lines
via 48068a58df0 ldb: improve comments for ldb_module_connect_backend()
via 80a8d2f1a4c ldb/test/ldb_tdb: correct introductory comments
via b3c56229fbb pdb_samba_dsdb: remove #if 0 block
via 1a05b58edaf ldb.h: remove undefined async_ctx function signatures
from 8f43c15f627 smb2_sesssetup: validate that sign_algo and encryption_cipher match on a session bind
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 1c1ff48e7a917c1738b6db560cee73e010fe5e0d
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Wed Mar 3 14:11:57 2021 +1300
selftest/flapping: remove python[23] lines
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Wed Mar 17 07:03:27 UTC 2021 on sn-devel-184
commit 467746da0a3ab469cce29c2126617c419006c9a3
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Wed Mar 3 12:37:45 2021 +1300
knownfail: remove python[23] lines
We no longer run any *python2* or *python3* specific tests, so
these knownfail lines are just clutter.
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 48068a58df0313cd904f27e2c918ee10275ae373
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Fri Jan 29 13:49:02 2021 +1300
ldb: improve comments for ldb_module_connect_backend()
There is no flags argument.
There are more URI forms.
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 80a8d2f1a4c31ca6abf27bfe9d2b85b4543d92ab
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Fri Jan 29 10:15:18 2021 +1300
ldb/test/ldb_tdb: correct introductory comments
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit b3c56229fbbb936121f183c360ffcf1d10f6db24
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Sun Dec 20 20:34:16 2020 +1300
pdb_samba_dsdb: remove #if 0 block
Doing nothng since 2011
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1a05b58edaf96e7da707f9ad0a237551dbe13eb5
Author: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Date: Sat Dec 19 11:43:56 2020 +1300
ldb.h: remove undefined async_ctx function signatures
These functions do not exist.
Signed-off-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
lib/ldb/common/ldb_modules.c | 14 ++++--
lib/ldb/include/ldb.h | 12 -----
lib/ldb/tests/ldb_tdb_test.c | 4 +-
selftest/flapping.d/kcc_verify_py3 | 2 -
selftest/flapping.d/samba_tool_visualize | 3 --
selftest/knownfail | 16 +------
selftest/knownfail.d/encrypted_secrets | 6 ---
selftest/knownfail.d/getncchanges | 9 ----
selftest/knownfail.d/ntlmv1-restrictions | 6 ---
selftest/knownfail.d/password_settings | 2 -
selftest/knownfail.d/replica_sync | 14 ------
source3/passdb/pdb_samba_dsdb.c | 81 --------------------------------
12 files changed, 13 insertions(+), 156 deletions(-)
delete mode 100644 selftest/flapping.d/kcc_verify_py3
delete mode 100644 selftest/flapping.d/samba_tool_visualize
Changeset truncated at 500 lines:
diff --git a/lib/ldb/common/ldb_modules.c b/lib/ldb/common/ldb_modules.c
index cc067abdfe0..4366f05e066 100644
--- a/lib/ldb/common/ldb_modules.c
+++ b/lib/ldb/common/ldb_modules.c
@@ -173,11 +173,15 @@ int ldb_register_backend(const char *url_prefix, ldb_connect_fn connectfn, bool
/*
Return the ldb module form of a database.
- The URL can either be one of the following forms
- ldb://path
- ldapi://path
-
- flags is made up of LDB_FLG_*
+ The URL looks something like this:
+ tdb://PATH
+ ldb://PATH
+ mdb://PATH
+ ldapi://PATH
+ PATH (unadorned PATH defaults to tdb://)
+
+ for a complete list of backends (including possibly unmaintained ones) grep
+ for calls to ldb_register_backend().
the options are passed uninterpreted to the backend, and are
backend specific.
diff --git a/lib/ldb/include/ldb.h b/lib/ldb/include/ldb.h
index 08e2096b914..bc44157eaf4 100644
--- a/lib/ldb/include/ldb.h
+++ b/lib/ldb/include/ldb.h
@@ -1093,18 +1093,6 @@ int ldb_global_init(void);
*/
struct ldb_context *ldb_init(TALLOC_CTX *mem_ctx, struct tevent_context *ev_ctx);
-typedef void (*ldb_async_timeout_fn) (void *);
-typedef bool (*ldb_async_callback_fn) (void *);
-typedef int (*ldb_async_ctx_add_op_fn)(void *, time_t, void *, ldb_async_timeout_fn, ldb_async_callback_fn);
-typedef int (*ldb_async_ctx_wait_op_fn)(void *);
-
-void ldb_async_ctx_set_private_data(struct ldb_context *ldb,
- void *private_data);
-void ldb_async_ctx_set_add_op(struct ldb_context *ldb,
- ldb_async_ctx_add_op_fn add_op);
-void ldb_async_ctx_set_wait_op(struct ldb_context *ldb,
- ldb_async_ctx_wait_op_fn wait_op);
-
/**
Connect to a database.
diff --git a/lib/ldb/tests/ldb_tdb_test.c b/lib/ldb/tests/ldb_tdb_test.c
index ef91ba54756..64e5983e2be 100644
--- a/lib/ldb/tests/ldb_tdb_test.c
+++ b/lib/ldb/tests/ldb_tdb_test.c
@@ -1,5 +1,5 @@
/*
- * lmdb backend specific tests for ldb
+ * tdb backend specific tests for ldb
*
* Copyright (C) Andrew Bartlett <abartlet at samba.org> 2018
*
@@ -19,7 +19,7 @@
*/
/*
- * lmdb backend specific tests for ldb
+ * tdb backend specific tests for ldb
*
* Setup and tear down code copied from ldb_mod_op_test.c
*/
diff --git a/selftest/flapping.d/kcc_verify_py3 b/selftest/flapping.d/kcc_verify_py3
deleted file mode 100644
index 8cfadabd671..00000000000
--- a/selftest/flapping.d/kcc_verify_py3
+++ /dev/null
@@ -1,2 +0,0 @@
-samba.tests.kcc.python3.samba.tests.kcc.KCCTests
-samba.tests.kcc.python2.samba.tests.kcc.KCCTests
diff --git a/selftest/flapping.d/samba_tool_visualize b/selftest/flapping.d/samba_tool_visualize
deleted file mode 100644
index 0054132090d..00000000000
--- a/selftest/flapping.d/samba_tool_visualize
+++ /dev/null
@@ -1,3 +0,0 @@
-# Mark this as flapping while I paint a house and think about a solution.
-samba.tests.samba_tool.visualize_drs.python3
-samba.tests.samba_tool.visualize_drs.python2
diff --git a/selftest/knownfail b/selftest/knownfail
index 6a760d6c6e0..f4035a6dec2 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -359,12 +359,6 @@
^samba.tests.dcerpc.dnsserver.samba.tests.dcerpc.dnsserver.DnsserverTests.test_add_duplicate_different_type.*
^samba.tests.dcerpc.dnsserver.samba.tests.dcerpc.dnsserver.DnsserverTests.test_rank_none.*
^samba.tests.dcerpc.dnsserver.samba.tests.dcerpc.dnsserver.DnsserverTests.test_security_descriptor.*
-^samba.tests.dcerpc.dnsserver.python3.samba.tests.dcerpc.dnsserver.DnsserverTests.test_add_duplicate_different_type.*
-^samba.tests.dcerpc.dnsserver.python3.samba.tests.dcerpc.dnsserver.DnsserverTests.test_rank_none.*
-^samba.tests.dcerpc.dnsserver.python3.samba.tests.dcerpc.dnsserver.DnsserverTests.test_security_descriptor.*
-^samba.tests.dcerpc.dnsserver.python2.samba.tests.dcerpc.dnsserver.DnsserverTests.test_add_duplicate_different_type.*
-^samba.tests.dcerpc.dnsserver.python2.samba.tests.dcerpc.dnsserver.DnsserverTests.test_rank_none.*
-^samba.tests.dcerpc.dnsserver.python2.samba.tests.dcerpc.dnsserver.DnsserverTests.test_security_descriptor.*
^samba4.blackbox.dbcheck-links.release-4-5-0-pre1.dbcheck_dangling_multi_valued_clean
^samba4.blackbox.dbcheck-links.release-4-5-0-pre1.dangling_multi_valued_check_missing
#
@@ -381,14 +375,8 @@
# NTLM authentication is (intentionally) disabled in ktest
^samba.tests.ntlmdisabled.python\(ktest\).ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ktest\)
^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ad_dc_no_ntlm\)
-^samba.tests.ntlmdisabled.python\(ktest\).python3.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ktest\)
-^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python3.ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ad_dc_no_ntlm\)
-^samba.tests.ntlmdisabled.python\(ktest\).python2.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ktest\)
-^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python2.ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ad_dc_no_ntlm\)
# Disabling NTLM means you can't use samr to change the password
^samba.tests.ntlmdisabled.python\(ktest\).ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ktest\)
^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\)
-^samba.tests.ntlmdisabled.python\(ktest\).python3.ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ktest\)
-^samba.tests.ntlmdisabled.python\(ktest\).python2.ntlmdisabled.NtlmDisabledTests.test_samr_change_password\(ktest\)
-^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python3.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\)
-^samba.tests.ntlmdisabled.python\(ad_dc_no_ntlm\).python2.ntlmdisabled.NtlmDisabledTests.test_ntlm_connection\(ad_dc_no_ntlm\)
+
+
diff --git a/selftest/knownfail.d/encrypted_secrets b/selftest/knownfail.d/encrypted_secrets
index 6a4b8177d9a..e25a68dd4a7 100644
--- a/selftest/knownfail.d/encrypted_secrets
+++ b/selftest/knownfail.d/encrypted_secrets
@@ -6,14 +6,8 @@
# * secrets are not stored as encrypted text when this option is specified
^samba.tests.encrypted_secrets.samba.tests.encrypted_secrets.EncryptedSecretsTests.test_encrypted_secrets\(fl2000dc:local\)
^samba.tests.encrypted_secrets.samba.tests.encrypted_secrets.EncryptedSecretsTests.test_required_features\(fl2000dc:local\)
-^samba.tests.encrypted_secrets.python3.samba.tests.encrypted_secrets.EncryptedSecretsTests.test_encrypted_secrets\(fl2000dc:local\)
-^samba.tests.encrypted_secrets.python3.samba.tests.encrypted_secrets.EncryptedSecretsTests.test_required_features\(fl2000dc:local\)
-^samba.tests.encrypted_secrets.python2.samba.tests.encrypted_secrets.EncryptedSecretsTests.test_encrypted_secrets\(fl2000dc:local\)
-^samba.tests.encrypted_secrets.python2.samba.tests.encrypted_secrets.EncryptedSecretsTests.test_required_features\(fl2000dc:local\)
#
# The tests for bug 13563 https://bugzilla.samba.org/show_bug.cgi?id=13653
# should fail in the mdb case, as sam.ldb is currently a tdb file.
#
-^samba.tests.blackbox.bug13653.python3.samba.tests.blackbox.bug13653.Bug13653Tests.test_mdb_scheme
-^samba.tests.blackbox.bug13653.python2.samba.tests.blackbox.bug13653.Bug13653Tests.test_mdb_scheme
^samba.tests.blackbox.bug13653.samba.tests.blackbox.bug13653.Bug13653Tests.test_mdb_scheme
diff --git a/selftest/knownfail.d/getncchanges b/selftest/knownfail.d/getncchanges
index df6464e0156..5ef1bc98bef 100644
--- a/selftest/knownfail.d/getncchanges
+++ b/selftest/knownfail.d/getncchanges
@@ -4,12 +4,3 @@ samba4.drs.getncchanges.python\(promoted_dc\).getncchanges.DrsReplicaSyncIntegri
samba4.drs.getncchanges.python\(promoted_dc\).getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_get_tgt_chain\(promoted_dc\)
samba4.drs.getncchanges.python\(promoted_dc\).getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_get_tgt_and_anc\(promoted_dc\)
samba4.drs.getncchanges.python\(promoted_dc\).getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_get_tgt_multivalued_links\(promoted_dc\)
-samba4.drs.getncchanges.python\(promoted_dc\).python3.getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_get_tgt\(promoted_dc\)
-samba4.drs.getncchanges.python\(promoted_dc\).python3.getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_get_tgt_chain\(promoted_dc\)
-samba4.drs.getncchanges.python\(promoted_dc\).python3.getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_get_tgt_and_anc\(promoted_dc\)
-samba4.drs.getncchanges.python\(promoted_dc\).python3.getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_get_tgt_multivalued_links\(promoted_dc\)
-samba4.drs.getncchanges.python\(promoted_dc\).python2.getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_get_tgt\(promoted_dc\)
-samba4.drs.getncchanges.python\(promoted_dc\).python2.getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_get_tgt_chain\(promoted_dc\)
-samba4.drs.getncchanges.python\(promoted_dc\).python2.getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_get_tgt_and_anc\(promoted_dc\)
-samba4.drs.getncchanges.python\(promoted_dc\).python2.getncchanges.DrsReplicaSyncIntegrityTestCase.test_repl_get_tgt_multivalued_links\(promoted_dc\)
-
diff --git a/selftest/knownfail.d/ntlmv1-restrictions b/selftest/knownfail.d/ntlmv1-restrictions
index 796863cf0bf..c5e915af236 100644
--- a/selftest/knownfail.d/ntlmv1-restrictions
+++ b/selftest/knownfail.d/ntlmv1-restrictions
@@ -3,9 +3,3 @@
samba.tests.py_credentials.samba.tests.py_credentials.PyCredentialsTests.test_SamLogonExNTLM\(vampire_dc\)
samba.tests.py_credentials.samba.tests.py_credentials.PyCredentialsTests.test_SamLogonExMSCHAPv2\(promoted_dc\)
samba.tests.py_credentials.samba.tests.py_credentials.PyCredentialsTests.test_SamLogonExNTLM\(promoted_dc\)
-samba.tests.py_credentials.python3.samba.tests.py_credentials.PyCredentialsTests.test_SamLogonExNTLM\(vampire_dc\)
-samba.tests.py_credentials.python3.samba.tests.py_credentials.PyCredentialsTests.test_SamLogonExMSCHAPv2\(promoted_dc\)
-samba.tests.py_credentials.python3.samba.tests.py_credentials.PyCredentialsTests.test_SamLogonExNTLM\(promoted_dc\)
-samba.tests.py_credentials.python2.samba.tests.py_credentials.PyCredentialsTests.test_SamLogonExNTLM\(vampire_dc\)
-samba.tests.py_credentials.python2.samba.tests.py_credentials.PyCredentialsTests.test_SamLogonExMSCHAPv2\(promoted_dc\)
-samba.tests.py_credentials.python2.samba.tests.py_credentials.PyCredentialsTests.test_SamLogonExNTLM\(promoted_dc\)
diff --git a/selftest/knownfail.d/password_settings b/selftest/knownfail.d/password_settings
index 4f708e64707..6e521899f74 100644
--- a/selftest/knownfail.d/password_settings
+++ b/selftest/knownfail.d/password_settings
@@ -1,4 +1,2 @@
# highlights a minor corner-case discrepancy between Windows and Samba
samba4.ldap.passwordsettings.python.password_settings.PasswordSettingsTestCase.test_domain_pwd_history_zero\(ad_dc_default_smb1\)
-samba4.ldap.passwordsettings.python.python3.password_settings.PasswordSettingsTestCase.test_domain_pwd_history_zero\(ad_dc_default_smb1\)
-samba4.ldap.passwordsettings.python.python2.password_settings.PasswordSettingsTestCase.test_domain_pwd_history_zero\(ad_dc_default_smb1\)
diff --git a/selftest/knownfail.d/replica_sync b/selftest/knownfail.d/replica_sync
index 01f12e4307d..1ef77b066d0 100644
--- a/selftest/knownfail.d/replica_sync
+++ b/selftest/knownfail.d/replica_sync
@@ -6,17 +6,3 @@ samba4.drs.replica_sync.python\(vampire_dc\).replica_sync.DrsReplicaSyncTestCase
samba4.drs.replica_sync.python\(promoted_dc\).replica_sync.DrsReplicaSyncTestCase.test_ReplConflictsRenamedVsNewLocalWin\(promoted_dc:local\)
samba4.drs.replica_sync.python\(vampire_dc\).replica_sync.DrsReplicaSyncTestCase.test_ReplReanimationConflict\(vampire_dc:local\)
samba4.drs.replica_sync.python\(promoted_dc\).replica_sync.DrsReplicaSyncTestCase.test_ReplReanimationConflict\(promoted_dc:local\)
-
-samba4.drs.replica_sync.python\(vampire_dc\).python3.replica_sync.DrsReplicaSyncTestCase.test_ReplConflictsRenamedVsNewRemoteWin\(vampire_dc:local\)
-samba4.drs.replica_sync.python\(promoted_dc\).python3.replica_sync.DrsReplicaSyncTestCase.test_ReplConflictsRenamedVsNewRemoteWin\(promoted_dc:local\)
-samba4.drs.replica_sync.python\(vampire_dc\).python3.replica_sync.DrsReplicaSyncTestCase.test_ReplConflictsRenamedVsNewLocalWin\(vampire_dc:local\)
-samba4.drs.replica_sync.python\(promoted_dc\).python3.replica_sync.DrsReplicaSyncTestCase.test_ReplConflictsRenamedVsNewLocalWin\(promoted_dc:local\)
-samba4.drs.replica_sync.python\(vampire_dc\).python3.replica_sync.DrsReplicaSyncTestCase.test_ReplReanimationConflict\(vampire_dc:local\)
-samba4.drs.replica_sync.python\(promoted_dc\).python3.replica_sync.DrsReplicaSyncTestCase.test_ReplReanimationConflict\(promoted_dc:local\)
-
-samba4.drs.replica_sync.python\(vampire_dc\).python2.replica_sync.DrsReplicaSyncTestCase.test_ReplConflictsRenamedVsNewRemoteWin\(vampire_dc:local\)
-samba4.drs.replica_sync.python\(promoted_dc\).python2.replica_sync.DrsReplicaSyncTestCase.test_ReplConflictsRenamedVsNewRemoteWin\(promoted_dc:local\)
-samba4.drs.replica_sync.python\(vampire_dc\).python2.replica_sync.DrsReplicaSyncTestCase.test_ReplConflictsRenamedVsNewLocalWin\(vampire_dc:local\)
-samba4.drs.replica_sync.python\(promoted_dc\).python2.replica_sync.DrsReplicaSyncTestCase.test_ReplConflictsRenamedVsNewLocalWin\(promoted_dc:local\)
-samba4.drs.replica_sync.python\(vampire_dc\).python2.replica_sync.DrsReplicaSyncTestCase.test_ReplReanimationConflict\(vampire_dc:local\)
-samba4.drs.replica_sync.python\(promoted_dc\).python2.replica_sync.DrsReplicaSyncTestCase.test_ReplReanimationConflict\(promoted_dc:local\)
diff --git a/source3/passdb/pdb_samba_dsdb.c b/source3/passdb/pdb_samba_dsdb.c
index 93e8f5bebe6..9d1fcf8bd42 100644
--- a/source3/passdb/pdb_samba_dsdb.c
+++ b/source3/passdb/pdb_samba_dsdb.c
@@ -1624,87 +1624,6 @@ static NTSTATUS pdb_samba_dsdb_delete_alias(struct pdb_methods *m,
return NT_STATUS_OK;
}
-#if 0
-static NTSTATUS pdb_samba_dsdb_set_aliasinfo(struct pdb_methods *m,
- const struct dom_sid *sid,
- struct acct_info *info)
-{
- struct pdb_samba_dsdb_state *state = talloc_get_type_abort(
- m->private_data, struct pdb_samba_dsdb_state);
- struct tldap_context *ld;
- const char *attrs[3] = { "objectSid", "description",
- "samAccountName" };
- struct ldb_message **msg;
- char *sidstr, *dn;
- int rc;
- struct tldap_mod *mods;
- int num_mods;
- bool ok;
-
- ld = pdb_samba_dsdb_ld(state);
- if (ld == NULL) {
- return NT_STATUS_LDAP(TLDAP_SERVER_DOWN);
- }
-
- sidstr = sid_binstring(talloc_tos(), sid);
- NT_STATUS_HAVE_NO_MEMORY(sidstr);
-
- rc = pdb_samba_dsdb_search_fmt(state, state->domaindn, TLDAP_SCOPE_SUB,
- attrs, ARRAY_SIZE(attrs), 0, talloc_tos(),
- &msg, "(&(objectSid=%s)(objectclass=group)"
- "(|(grouptype=%d)(grouptype=%d)))",
- sidstr, GTYPE_SECURITY_BUILTIN_LOCAL_GROUP,
- GTYPE_SECURITY_DOMAIN_LOCAL_GROUP);
- TALLOC_FREE(sidstr)
- if (rc != LDB_SUCCESS) {
- DEBUG(10, ("ldap_search failed %s\n",
- ldb_errstring(state->ldb)));
- return NT_STATUS_LDAP(rc);
- }
- switch talloc_array_length(msg) {
- case 0:
- return NT_STATUS_NO_SUCH_ALIAS;
- case 1:
- break;
- default:
- return NT_STATUS_INTERNAL_DB_CORRUPTION;
- }
-
- if (!tldap_entry_dn(msg[0], &dn)) {
- TALLOC_FREE(msg);
- return NT_STATUS_INTERNAL_DB_CORRUPTION;
- }
-
- mods = NULL;
- num_mods = 0;
- ok = true;
-
- ok &= tldap_make_mod_fmt(
- msg[0], msg, &num_mods, &mods, "description",
- "%s", info->acct_desc);
- ok &= tldap_make_mod_fmt(
- msg[0], msg, &num_mods, &mods, "samAccountName",
- "%s", info->acct_name);
- if (!ok) {
- TALLOC_FREE(msg);
- return NT_STATUS_NO_MEMORY;
- }
- if (num_mods == 0) {
- /* no change */
- TALLOC_FREE(msg);
- return NT_STATUS_OK;
- }
-
- rc = tldap_modify(ld, dn, num_mods, mods, NULL, 0, NULL, 0);
- TALLOC_FREE(msg);
- if (rc != LDB_SUCCESS) {
- DEBUG(10, ("ldap_modify failed: %s\n",
- ldb_errstring(state->ldb)));
- return NT_STATUS_LDAP(rc);
- }
- return NT_STATUS_OK;
-}
-#endif
static NTSTATUS pdb_samba_dsdb_add_aliasmem(struct pdb_methods *m,
const struct dom_sid *alias,
const struct dom_sid *member)
--
Samba Shared Repository
More information about the samba-cvs
mailing list