[SCM] Samba Shared Repository - branch master updated
Douglas Bagnall
dbagnall at samba.org
Sun Aug 4 01:36:02 UTC 2024
The branch, master has been updated
via 5851ae55542 ldb: Fix ldb public library header files being unusable
via 20e841b7936 python:tests: Remove unused variable
via b6c25ed271b python:provision: Do not suppress errors produced setting up BIND database
via bf8a22b2e45 lib:cmdline: Load network interfaces in _samba_cmdline_load_config_s4()
via 58b4d988fac s3:libsmb: Return a more sensible error if no interfaces are available
via 786265ad7ff s3:libsmb: Fix invalid array dereference
via 1d945b0f230 python:tests: Account for new user ‘joe’
via 18b078a8b96 dsdb periodic: Produce a debugging message if kccsrv_samba_kcc() fails
via c07c91733cf ldb-samba: Fix code spelling
via 62ecbc0afc4 buildtools: Fix code spelling
via f13df85b995 buildtools: Remove trailing whitespace
via 7b020492230 s4-kcc: Remove nonfunctional fallback code
via 9e7c37550a9 python:netcmd: Explicitly delete samdb variables
via 9542c419a07 tests/krb5: Remove unneeded machine account creation
via 7b184bb317c tests/krb5: Remove unneeded parameter ‘samdb’
via 1616a640dd2 s4:dsdb: Fix code spelling
via 7485d4d5881 s4:dsdb: Remove trailing whitespace
via d603d8b3929 s3:libnet: Fix code spelling
via 3a06f34e68d python:tests: Fix code spelling
via f7d92814c43 python:tests: Fix code spelling
via 3588d6c33d4 libcli:auth: Fix code spelling
via df4d6c404cb lib:util: Fix code spelling
via 9130ca413af lib:cmdline: Fix code spelling
via 3249bce0fe8 buildtools: Use isinstance() to compare types
from 48963251fb0 s4:torture: Fix memory leak
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 5851ae555425ea2ba8e431162142ebae47be802e
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Fri Aug 2 10:14:52 2024 +1200
ldb: Fix ldb public library header files being unusable
An accidental negation means that ldb_version.h is not installed when
ldb is built as a public library.
This is a regression introduced by commit
625fb48326ec62a33ce0abdbfb0f6f3d33d7cc64.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15690
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall at samba.org>
Autobuild-Date(master): Sun Aug 4 01:35:55 UTC 2024 on atb-devel-224
commit 20e841b79362a9054027fe29426cb378b1c90be9
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Thu Aug 1 15:51:03 2024 +1200
python:tests: Remove unused variable
assertMatch() returns None, which isn’t very useful.
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit b6c25ed271b354152709e0fe92969a3171f751ff
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Thu Aug 1 15:47:13 2024 +1200
python:provision: Do not suppress errors produced setting up BIND database
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit bf8a22b2e459b990403e5593db404ed36deba78f
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Tue Jul 30 16:55:17 2024 +1200
lib:cmdline: Load network interfaces in _samba_cmdline_load_config_s4()
This makes the samba.tests.domain_backup tests start working again when
they are run standalone. Without the load_interfaces() call,
smb_sysvol_conn() fails to make a connection to the sysvol share.
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 58b4d988fac0bf3574cf9e71931d4a42c1857821
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Tue Jul 30 15:46:14 2024 +1200
s3:libsmb: Return a more sensible error if no interfaces are available
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 786265ad7ffd6d3b8438c18f62a2a027c50fde6d
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Tue Jul 30 15:42:32 2024 +1200
s3:libsmb: Fix invalid array dereference
If ‘num_addrs’ is equal to zero, name_queries_send() will pass an
invalid address to name_query_send().
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 1d945b0f230054eb1b94c39aa99acd7f25389f04
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Tue Jul 30 14:49:11 2024 +1200
python:tests: Account for new user ‘joe’
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 18b078a8b96afc648c733d60f7b1e3f11ad885c3
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Tue Jul 30 13:53:57 2024 +1200
dsdb periodic: Produce a debugging message if kccsrv_samba_kcc() fails
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit c07c91733cfc593cfe136ccd4b96dc8e51c9fe14
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Tue Jul 30 11:10:03 2024 +1200
ldb-samba: Fix code spelling
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 62ecbc0afc443cae7cfa63473c47eb075517f22d
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Mon Jul 29 17:04:54 2024 +1200
buildtools: Fix code spelling
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit f13df85b9951cd9773b27301746e8eed16c316ee
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Mon Jul 29 17:04:46 2024 +1200
buildtools: Remove trailing whitespace
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 7b020492230107111731952f4f002a9279356f45
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Mon Jul 29 14:45:49 2024 +1200
s4-kcc: Remove nonfunctional fallback code
The following line in the pre‐2003 attributes fallback code:
attrs = post_2003_attrs;
presumably should have read
attrs = pre_2003_attrs;
As it is this fallback, added in commit
2fc233b78f35e4bc5062869d77985567d61d0f8a and subsequently modified in
commit 783ff68628fee6d5681b3a9abd80b74a78588926, does not do what it was
intended to do.
Besides, attempting a failed search again, just with different
attributes, will presumably not yield any more of a result.
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 9e7c37550a904040c711c53b868ec60ad84ee6c6
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Fri Jul 19 10:21:56 2024 +1200
python:netcmd: Explicitly delete samdb variables
This makes our intent clear, and avoids accidental attempts to use these
objects after they have been ‘disconnect()’ed.
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 9542c419a07ae03c8de6ae5ebf634f925e9f69ea
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Thu Jul 18 13:53:09 2024 +1200
tests/krb5: Remove unneeded machine account creation
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 7b184bb317c138e3355010d0ceaca5b4a25b5152
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Thu Jul 18 13:51:52 2024 +1200
tests/krb5: Remove unneeded parameter ‘samdb’
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 1616a640dd2d25b11e1c5ad7d1bca765a2b65c05
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Tue Jul 16 13:32:32 2024 +1200
s4:dsdb: Fix code spelling
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 7485d4d588188c1167d10c05b637d969f8241864
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Fri Aug 2 11:26:49 2024 +1200
s4:dsdb: Remove trailing whitespace
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit d603d8b3929411b9fab8dcb67fb28654d42fe306
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Tue Jul 9 12:57:13 2024 +1200
s3:libnet: Fix code spelling
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 3a06f34e68d7b6439d3e37ffb2860f45aa5ad24e
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Thu Aug 1 15:50:44 2024 +1200
python:tests: Fix code spelling
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit f7d92814c4301d184eea9b716271a48a8e9940c6
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Tue Jul 16 15:53:05 2024 +1200
python:tests: Fix code spelling
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 3588d6c33d44c058fb1d8810cb5643f3fd5caa32
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Tue Jul 16 13:32:05 2024 +1200
libcli:auth: Fix code spelling
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit df4d6c404cbe73212608d93d22f7c04dc1c6e9be
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Tue Jul 9 12:52:03 2024 +1200
lib:util: Fix code spelling
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 9130ca413af16ec01d9dd0d1f5a58f54915f8059
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Wed Jul 17 11:28:02 2024 +1200
lib:cmdline: Fix code spelling
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
commit 3249bce0fe85938ec1980fb6b0f678aceb4d2f3e
Author: Jo Sutton <josutton at catalyst.net.nz>
Date: Tue Jul 2 16:40:49 2024 +1200
buildtools: Use isinstance() to compare types
Signed-off-by: Jo Sutton <josutton at catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall at catalyst.net.nz>
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_python.py | 4 +--
buildtools/wafsamba/samba_version.py | 2 +-
lib/cmdline/cmdline.c | 2 +-
lib/cmdline/cmdline_s4.c | 11 +++++++
lib/cmdline/wscript | 2 +-
lib/ldb-samba/ldb_matching_rules.c | 2 +-
lib/ldb/wscript | 2 +-
lib/util/debug.h | 2 +-
libcli/auth/smbencrypt.c | 2 +-
python/samba/netcmd/domain/backup.py | 4 +--
python/samba/provision/sambadns.py | 12 ++++----
python/samba/tests/domain_backup.py | 2 +-
python/samba/tests/dsdb.py | 2 +-
python/samba/tests/kcc/kcc_utils.py | 2 +-
.../krb5/ms_kile_client_principal_lookup_tests.py | 35 +++++++---------------
python/samba/tests/samba_tool/group.py | 2 +-
source3/libnet/libnet_dssync_keytab.c | 2 +-
source3/libsmb/namequery.c | 12 ++++++++
source4/dsdb/kcc/kcc_drs_replica_info.c | 14 ++-------
source4/dsdb/kcc/kcc_periodic.c | 28 +++++++++--------
source4/dsdb/repl/drepl_partitions.c | 22 +++++++-------
source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 4 +--
22 files changed, 86 insertions(+), 84 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py
index 12a94c8079d..544261e79f0 100644
--- a/buildtools/wafsamba/samba_python.py
+++ b/buildtools/wafsamba/samba_python.py
@@ -114,7 +114,7 @@ def SAMBA_PYTHON(bld, name,
# including Python.h. If the macro is defined, length is a Py_ssize_t
# rather than an int.
- # Because <Python.h> if often included before includes.h/config.h
+ # Because <Python.h> is often included before includes.h/config.h
# This must be in the -D compiler options
cflags += ' -DPY_SSIZE_T_CLEAN=1'
@@ -153,5 +153,3 @@ def pyembed_libname(bld, name):
return name
Build.BuildContext.pyembed_libname = pyembed_libname
-
-
diff --git a/buildtools/wafsamba/samba_version.py b/buildtools/wafsamba/samba_version.py
index 1533e01198f..5b240e32085 100644
--- a/buildtools/wafsamba/samba_version.py
+++ b/buildtools/wafsamba/samba_version.py
@@ -202,7 +202,7 @@ also accepted as dictionary entries here
string_types = str
if isinstance(value, string_types):
string += "\"%s\"" % value
- elif type(value) is int:
+ elif isinstance(value, int):
string += "%d" % value
else:
raise Exception("Unknown type for %s: %r" % (name, value))
diff --git a/lib/cmdline/cmdline.c b/lib/cmdline/cmdline.c
index 8efefc67a64..a42707238f6 100644
--- a/lib/cmdline/cmdline.c
+++ b/lib/cmdline/cmdline.c
@@ -160,7 +160,7 @@ static bool strneq_cmdline_exact(const char *p, const char *option, size_t len)
* there, we return false.
*
* If the option is not in either list, we assume it might be secret and
- * redact the argument, but warn loadly about it. The hope is that developers
+ * redact the argument, but warn loudly about it. The hope is that developers
* will see what they're doing and add the option to the appropriate list.
*
* If true is returned, *ulen will be set to the apparent length of the
diff --git a/lib/cmdline/cmdline_s4.c b/lib/cmdline/cmdline_s4.c
index f8be4ed670c..d26e1de93c1 100644
--- a/lib/cmdline/cmdline_s4.c
+++ b/lib/cmdline/cmdline_s4.c
@@ -20,9 +20,11 @@
#include "lib/param/param.h"
#include "lib/util/debug.h"
#include "lib/util/fault.h"
+#include "lib/util/talloc_stack.h"
#include "auth/credentials/credentials.h"
#include "dynconfig/dynconfig.h"
#include "cmdline_private.h"
+#include "source3/lib/interface.h"
static bool _require_smbconf;
static enum samba_cmdline_config_type _config_type;
@@ -82,6 +84,15 @@ static bool _samba_cmdline_load_config_s4(void)
break;
}
+ {
+ /* load_interfaces() requires a talloc stackframe. */
+ TALLOC_CTX *frame = talloc_stackframe();
+
+ load_interfaces();
+
+ TALLOC_FREE(frame);
+ }
+
return true;
}
diff --git a/lib/cmdline/wscript b/lib/cmdline/wscript
index 01ead85e2c4..7ea6467b502 100644
--- a/lib/cmdline/wscript
+++ b/lib/cmdline/wscript
@@ -26,7 +26,7 @@ def build(bld):
bld.SAMBA_SUBSYSTEM('CMDLINE_S4',
source='cmdline_s4.c',
- deps='cmdline')
+ deps='cmdline samba3core')
bld.SAMBA_BINARY('test_cmdline',
source='tests/test_cmdline.c',
diff --git a/lib/ldb-samba/ldb_matching_rules.c b/lib/ldb-samba/ldb_matching_rules.c
index dd1f80628c9..9520c805558 100644
--- a/lib/ldb-samba/ldb_matching_rules.c
+++ b/lib/ldb-samba/ldb_matching_rules.c
@@ -351,7 +351,7 @@ static int ldb_comparator_trans(struct ldb_context *ldb,
* where the value is a number of hours since the start of 1601.
*
* This allows the caller to find records that should become a DNS
- * tomestone, despite that information being deep within an NDR packed
+ * tombstone, despite that information being deep within an NDR packed
* object
*/
static int dsdb_match_for_dns_to_tombstone_time(struct ldb_context *ldb,
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index 51a8cef7b1e..87aa3bb6d77 100644
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
@@ -174,7 +174,7 @@ def build(bld):
dep_vars=['LDB_VERSION'],
target='include/ldb_version.h',
public_headers='include/ldb_version.h',
- public_headers_install=not bld.env.ldb_is_public_library)
+ public_headers_install=bld.env.ldb_is_public_library)
t.env.LDB_VERSION = LDB_VERSION
bld.SAMBA_MODULE('ldb_asq',
diff --git a/lib/util/debug.h b/lib/util/debug.h
index a4ad56048ff..f188105c9f4 100644
--- a/lib/util/debug.h
+++ b/lib/util/debug.h
@@ -142,7 +142,7 @@ bool dbgsetclass(int level, int cls);
*
* DEBUGADD(), DEBUGADDC()
* Same as DEBUG() and DEBUGC() except the text is appended to the previous
- * DEBUG(), DEBUGC(), DEBUGADD(), DEBUGADDC() with out another interviening
+ * DEBUG(), DEBUGC(), DEBUGADD(), DEBUGADDC() without another intervening
* header.
*
* Example: DEBUGADD( 2, ("Some text and a value %d.\n", value) );
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c
index bddc843f524..7818d2921f8 100644
--- a/libcli/auth/smbencrypt.c
+++ b/libcli/auth/smbencrypt.c
@@ -1106,7 +1106,7 @@ NTSTATUS encode_rc4_passwd_buffer(const char *passwd,
/*
* The packet format is the 516 byte RC4 encrypted
- * password followed by the 16 byte counfounder
+ * password followed by the 16 byte confounder
* The confounder is a salt to prevent pre-computed hash attacks on the
* database.
*/
diff --git a/python/samba/netcmd/domain/backup.py b/python/samba/netcmd/domain/backup.py
index b27105116dc..b1b57c04a7f 100644
--- a/python/samba/netcmd/domain/backup.py
+++ b/python/samba/netcmd/domain/backup.py
@@ -1182,7 +1182,7 @@ class cmd_domain_backup_offline(samba.netcmd.Command):
# not use this any more as the data has all been copied under
# the transaction
samdb.disconnect()
- samdb = None
+ del samdb
# Open the new backed up samdb, flag it as backed up, and write
# the next SID so the restore tool can add objects. We use
@@ -1200,7 +1200,7 @@ class cmd_domain_backup_offline(samba.netcmd.Command):
# Close the backed up samdb
samdb.disconnect()
- samdb = None
+ del samdb
# Now handle all the LDB and TDB files that are not linked to
# anything else. Use transactions for LDBs.
diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py
index 01398bbc346..952e875c862 100644
--- a/python/samba/provision/sambadns.py
+++ b/python/samba/provision/sambadns.py
@@ -874,9 +874,9 @@ def create_samdb_copy(samdb, logger, paths, names, domainsid, domainguid):
setup_add_ldif(dom_ldb,
setup_path("provision_basedn_options.ldif"), None)
- except:
+ except Exception as err:
logger.error(
- "Failed to setup database for BIND, AD based DNS cannot be used")
+ f"Failed to setup database for BIND, AD based DNS cannot be used: {err}")
raise
# This line is critical to the security of the whole scheme.
@@ -914,9 +914,9 @@ def create_samdb_copy(samdb, logger, paths, names, domainsid, domainguid):
# lock file as well
os.link(os.path.join(private_dir, forestzone_file + "-lock"),
os.path.join(dns_dir, forestzone_file + "-lock"))
- except OSError:
+ except OSError as err:
logger.error(
- "Failed to setup database for BIND, AD based DNS cannot be used")
+ f"Failed to setup database for BIND, AD based DNS cannot be used: {err}")
raise
del partfile[domainzonedn]
if forestzone_file:
@@ -935,9 +935,9 @@ def create_samdb_copy(samdb, logger, paths, names, domainsid, domainguid):
else:
tdb_copy(os.path.join(private_dir, pfile),
os.path.join(dns_dir, pfile))
- except:
+ except Exception as err:
logger.error(
- "Failed to setup database for BIND, AD based DNS cannot be used")
+ f"Failed to setup database for BIND, AD based DNS cannot be used: {err}")
raise
# Give bind read/write permissions dns partitions
diff --git a/python/samba/tests/domain_backup.py b/python/samba/tests/domain_backup.py
index 7ec5d3afa52..af87a93f736 100644
--- a/python/samba/tests/domain_backup.py
+++ b/python/samba/tests/domain_backup.py
@@ -358,7 +358,7 @@ class DomainBackupBase(BlackboxTestCase):
"""Check the user secrets in the restored DB match what's expected"""
# check secrets for the built-in testenv users match what's expected
- test_users = ["alice", "bob", "jane"]
+ test_users = ["alice", "bob", "jane", "joe"]
for user in test_users:
self.assert_user_secrets(samdb, user, expect_secrets)
diff --git a/python/samba/tests/dsdb.py b/python/samba/tests/dsdb.py
index 4d5b620401d..3d5e7484629 100644
--- a/python/samba/tests/dsdb.py
+++ b/python/samba/tests/dsdb.py
@@ -946,7 +946,7 @@ class DsdbTests(TestCase):
self.samdb.modify(msg)
#
- # Finally ry the non-linked attribute 'assistant'
+ # Finally try the non-linked attribute 'assistant'
# but with non existing GUID, SID, DN
#
msg = ldb.Message()
diff --git a/python/samba/tests/kcc/kcc_utils.py b/python/samba/tests/kcc/kcc_utils.py
index c1af998f402..e6b11d614e0 100644
--- a/python/samba/tests/kcc/kcc_utils.py
+++ b/python/samba/tests/kcc/kcc_utils.py
@@ -338,7 +338,7 @@ class SiteCoverageTests(samba.tests.TestCase):
[site4, site5, site6, uncovered_dn1],
cost=50)
- # Join to Uncovered2 (no preferene on site links)
+ # Join to Uncovered2 (no preference on site links)
self._add_site_link(self.prefix + "link1B",
[site1, site2, site3, uncovered_dn2],
cost=50)
diff --git a/python/samba/tests/krb5/ms_kile_client_principal_lookup_tests.py b/python/samba/tests/krb5/ms_kile_client_principal_lookup_tests.py
index 4feb3bb7611..23a3fce55ed 100755
--- a/python/samba/tests/krb5/ms_kile_client_principal_lookup_tests.py
+++ b/python/samba/tests/krb5/ms_kile_client_principal_lookup_tests.py
@@ -50,7 +50,7 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
self.do_asn1_print = global_asn1_print
self.do_hexdump = global_hexdump
- def check_pac(self, samdb, auth_data, uc, name, upn=None):
+ def check_pac(self, auth_data, uc, name, upn=None):
pac_data = self.get_pac_data(auth_data)
if upn is None:
@@ -134,7 +134,7 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
# Check the contents of the pac, and the ticket
ticket = rep['ticket']
enc_part = self.decode_service_ticket(mc, ticket)
- self.check_pac(samdb, enc_part['authorization-data'], uc, user_name)
+ self.check_pac(enc_part['authorization-data'], uc, user_name)
# check the crealm and cname
cname = enc_part['cname']
self.assertEqual(NT_PRINCIPAL, cname['name-type'])
@@ -192,7 +192,7 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
# Check the contents of the pac, and the ticket
ticket = rep['ticket']
enc_part = self.decode_service_ticket(mc, ticket)
- self.check_pac(samdb, enc_part['authorization-data'], mc, mach_name + '$')
+ self.check_pac(enc_part['authorization-data'], mc, mach_name + '$')
# check the crealm and cname
cname = enc_part['cname']
self.assertEqual(NT_PRINCIPAL, cname['name-type'])
@@ -256,7 +256,7 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
# Check the contents of the service ticket
ticket = rep['ticket']
enc_part = self.decode_service_ticket(mc, ticket)
- self.check_pac(samdb, enc_part['authorization-data'], uc, upn_name)
+ self.check_pac(enc_part['authorization-data'], uc, upn_name)
# check the crealm and cname
cname = enc_part['cname']
self.assertEqual(NT_PRINCIPAL, cname['name-type'])
@@ -387,8 +387,7 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
# Check the contents of the pac, and the ticket
ticket = rep['ticket']
enc_part = self.decode_service_ticket(mc, ticket)
- self.check_pac(samdb,
- enc_part['authorization-data'], uc, user_name)
+ self.check_pac(enc_part['authorization-data'], uc, user_name)
# check the crealm and cname
cname = enc_part['cname']
self.assertEqual(NT_PRINCIPAL, cname['name-type'])
@@ -403,7 +402,7 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
This test uses the altsecid, so the AS-REQ should fail.
"""
- # Create user and machine accounts for the test.
+ # Create a user account for the test.
#
samdb = self.get_samdb()
user_name = "mskileusr"
@@ -413,10 +412,6 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
alt_sec = "Kerberos:%s@%s" % (alt_name, realm)
self.add_attribute(samdb, dn, "altSecurityIdentities", alt_sec)
- mach_name = "mskilemac"
- (mc, _) = self.create_account(samdb, mach_name,
- account_type=self.AccountType.COMPUTER)
-
# Do the initial AS-REQ, should get a pre-authentication required
# response
etype = (AES256_CTS_HMAC_SHA1_96, ARCFOUR_HMAC_MD5)
@@ -492,8 +487,7 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
# Check the contents of the pac, and the ticket
ticket = rep['ticket']
enc_part = self.decode_service_ticket(mc, ticket)
- self.check_pac(
- samdb, enc_part['authorization-data'], uc, upn, upn=upn)
+ self.check_pac(enc_part['authorization-data'], uc, upn, upn=upn)
# check the crealm and cname
cname = enc_part['cname']
crealm = enc_part['crealm']
@@ -557,8 +551,7 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
# Check the contents of the pac, and the ticket
ticket = rep['ticket']
enc_part = self.decode_service_ticket(mc, ticket)
- self.check_pac(
- samdb, enc_part['authorization-data'], uc, ename, upn=ename)
+ self.check_pac(enc_part['authorization-data'], uc, ename, upn=ename)
# check the crealm and cname
cname = enc_part['cname']
crealm = enc_part['crealm']
@@ -623,8 +616,7 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
# Check the contents of the pac, and the ticket
ticket = rep['ticket']
enc_part = self.decode_service_ticket(mc, ticket)
- self.check_pac(
- samdb, enc_part['authorization-data'], mc, ename, upn=uname)
+ self.check_pac(enc_part['authorization-data'], mc, ename, upn=uname)
# check the crealm and cname
cname = enc_part['cname']
crealm = enc_part['crealm']
@@ -759,8 +751,7 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
# Check the contents of the pac, and the ticket
ticket = rep['ticket']
enc_part = self.decode_service_ticket(mc, ticket)
- self.check_pac(
- samdb, enc_part['authorization-data'], uc, uname, upn=uname)
+ self.check_pac(enc_part['authorization-data'], uc, uname, upn=uname)
# check the crealm and cname
cname = enc_part['cname']
self.assertEqual(NT_ENTERPRISE_PRINCIPAL, cname['name-type'])
@@ -775,7 +766,7 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
This test uses the altsecid, so the AS-REQ should fail.
"""
- # Create user and machine accounts for the test.
+ # Create a user account for the test.
#
samdb = self.get_samdb()
user_name = "mskileusr"
@@ -786,10 +777,6 @@ class MS_Kile_Client_Principal_Lookup_Tests(KDCBaseTest):
self.add_attribute(samdb, dn, "altSecurityIdentities", alt_sec)
ename = alt_name + "@" + realm
- mach_name = "mskilemac"
- (mc, _) = self.create_account(samdb, mach_name,
- account_type=self.AccountType.COMPUTER)
-
# Do the initial AS-REQ, should get a pre-authentication required
# response
etype = (AES256_CTS_HMAC_SHA1_96, ARCFOUR_HMAC_MD5)
diff --git a/python/samba/tests/samba_tool/group.py b/python/samba/tests/samba_tool/group.py
index e7a660c75e1..e8c0960849f 100644
--- a/python/samba/tests/samba_tool/group.py
+++ b/python/samba/tests/samba_tool/group.py
@@ -332,7 +332,7 @@ class GroupCmdTestCase(SambaToolCmdTest):
for groupobj in grouplist:
name = str(groupobj.get("dn", idx=0))
- found = self.assertMatch(out, name, "group '%s' not found" % name)
+ self.assertMatch(out, name, "group '%s' not found" % name)
def test_move(self):
diff --git a/source3/libnet/libnet_dssync_keytab.c b/source3/libnet/libnet_dssync_keytab.c
index a4fc4e98b0c..0c437da2f43 100644
--- a/source3/libnet/libnet_dssync_keytab.c
+++ b/source3/libnet/libnet_dssync_keytab.c
@@ -248,7 +248,7 @@ static NTSTATUS store_or_fetch_attribute(TALLOC_CTX *mem_ctx,
struct libnet_keytab_entry *entry = NULL;
char *principal = NULL;
- D_DEBUG("looking for %s/%s@%s in keytayb...\n",
+ D_DEBUG("looking for %s/%s@%s in keytab...\n",
attr, object_dn, ctx->dns_domain_name);
principal = talloc_asprintf(mem_ctx,
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 9a47f034d38..b1500b85e0b 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -1701,6 +1701,10 @@ static struct tevent_req *name_queries_send(
struct tevent_req *req, *subreq;
struct name_queries_state *state;
+ if (num_addrs == 0) {
+ return NULL;
+ }
+
req = tevent_req_create(mem_ctx, &state,
struct name_queries_state);
if (req == NULL) {
@@ -1905,6 +1909,14 @@ struct tevent_req *name_resolve_bcast_send(TALLOC_CTX *mem_ctx,
"for name %s<0x%x>\n", name, name_type));
num_addrs = iface_count();
+ if (num_addrs == 0) {
+ DBG_INFO("name_resolve_bcast(%s#%02x): no interfaces are available\n",
+ name,
+ name_type);
+ tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
+ return tevent_req_post(req, ev);
+ }
+
bcast_addrs = talloc_array(state, struct sockaddr_storage, num_addrs);
if (tevent_req_nomem(bcast_addrs, req)) {
return tevent_req_post(req, ev);
diff --git a/source4/dsdb/kcc/kcc_drs_replica_info.c b/source4/dsdb/kcc/kcc_drs_replica_info.c
index 59759267e01..e52388e8557 100644
--- a/source4/dsdb/kcc/kcc_drs_replica_info.c
+++ b/source4/dsdb/kcc/kcc_drs_replica_info.c
@@ -386,9 +386,7 @@ struct ncList {
static WERROR get_master_ncs(TALLOC_CTX *mem_ctx, struct ldb_context *samdb,
const char *ntds_guid_str, struct ncList **master_nc_list)
{
- const char *post_2003_attrs[] = { "msDS-hasMasterNCs", "hasPartialReplicaNCs", NULL };
- const char *pre_2003_attrs[] = { "hasMasterNCs", "hasPartialReplicaNCs", NULL };
- const char **attrs = post_2003_attrs;
+ const char *attrs[] = { "msDS-hasMasterNCs", "hasPartialReplicaNCs", NULL };
struct ldb_result *res;
struct ncList *nc_list = NULL;
struct ncList *nc_list_elem;
@@ -398,15 +396,7 @@ static WERROR get_master_ncs(TALLOC_CTX *mem_ctx, struct ldb_context *samdb,
/* In W2003 and greater, msDS-hasMasterNCs attribute lists the writable NC replicas */
ret = ldb_search(samdb, mem_ctx, &res, ldb_get_config_basedn(samdb),
- LDB_SCOPE_DEFAULT, post_2003_attrs, "(objectguid=%s)", ntds_guid_str);
-
- if (ret != LDB_SUCCESS) {
- DEBUG(0,(__location__ ": Failed objectguid search - %s\n", ldb_errstring(samdb)));
-
- attrs = post_2003_attrs;
- ret = ldb_search(samdb, mem_ctx, &res, ldb_get_config_basedn(samdb),
- LDB_SCOPE_DEFAULT, pre_2003_attrs, "(objectguid=%s)", ntds_guid_str);
- }
+ LDB_SCOPE_DEFAULT, attrs, "(objectguid=%s)", ntds_guid_str);
if (ret != LDB_SUCCESS) {
DEBUG(0,(__location__ ": Failed objectguid search - %s\n", ldb_errstring(samdb)));
diff --git a/source4/dsdb/kcc/kcc_periodic.c b/source4/dsdb/kcc/kcc_periodic.c
index 7f0a5320a2a..df38f00e776 100644
--- a/source4/dsdb/kcc/kcc_periodic.c
+++ b/source4/dsdb/kcc/kcc_periodic.c
@@ -1,23 +1,23 @@
-/*
+/*
Unix SMB/CIFS Implementation.
KCC service periodic handling
-
+
Copyright (C) Andrew Tridgell 2009
based on repl service code
-
+
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/>.
-
+
*/
#include "includes.h"
@@ -207,7 +207,7 @@ NTSTATUS kccsrv_add_repsFrom(struct kccsrv_service *s, TALLOC_CTX *mem_ctx,
werr = dsdb_loadreps(s->samdb, mem_ctx, p->dn, "repsFrom", &our_reps, &our_count);
if (!W_ERROR_IS_OK(werr)) {
- DEBUG(0,(__location__ ": Failed to load repsFrom from %s - %s\n",
--
Samba Shared Repository
More information about the samba-cvs
mailing list