[SCM] Samba Shared Repository - branch master updated

2023-05-04 Thread Andrew Bartlett
The branch, master has been updated
   via  5fcb675a8b0 s4/scripting: fix % len(res) was in the wrong place
   via  3eccaf5d1eb s4/dsdb: fix unnecessary backslash
   via  8c19775a27c s4/scripting: fix a few trailing semicolons in 
gen_{hresult,ntstatus,werror}.py
   via  18cbec4ba07 s4/scripting: fix a few invalid docstring args
   via  bb34d93277f dsdb/tests: fix assignment to for loop variable
  from  6258173a62e s4:kdc: Don’t call memcpy() with a NULL pointer

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


- Log -
commit 5fcb675a8b064aa6b2a2529703ed7911bff3bb04
Author: Rob van der Linde 
Date:   Fri Feb 24 12:58:29 2023 +1300

s4/scripting: fix % len(res) was in the wrong place

Signed-off-by: Rob van der Linde 
Reviewed-by: Joseph Sutton 
Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Fri May  5 05:54:11 UTC 2023 on atb-devel-224

commit 3eccaf5d1ebf397f4900d4126765f7a21a951f10
Author: Rob van der Linde 
Date:   Fri Feb 24 12:57:57 2023 +1300

s4/dsdb: fix unnecessary backslash

Signed-off-by: Rob van der Linde 
Reviewed-by: Joseph Sutton 
Reviewed-by: Andrew Bartlett 

commit 8c19775a27c596024c4351b90fb063c1c1c27c14
Author: Rob van der Linde 
Date:   Fri Feb 24 12:54:16 2023 +1300

s4/scripting: fix a few trailing semicolons in 
gen_{hresult,ntstatus,werror}.py

Signed-off-by: Rob van der Linde 
Reviewed-by: Joseph Sutton 
Reviewed-by: Andrew Bartlett 

commit 18cbec4ba07c2f29e684f207a3bd2cbe51b3e852
Author: Rob van der Linde 
Date:   Fri Feb 24 12:48:23 2023 +1300

s4/scripting: fix a few invalid docstring args

One arg "dn" was removed, the others just had a typo.

Signed-off-by: Rob van der Linde 
Reviewed-by: Joseph Sutton 
Reviewed-by: Andrew Bartlett 

commit bb34d93277f375e718788d8e42399e23cf371ab0
Author: Rob van der Linde 
Date:   Fri Feb 24 12:43:50 2023 +1300

dsdb/tests: fix assignment to for loop variable

because the loop variables are all called 'k' and the inner and outer loop 
both use 'k'.

Signed-off-by: Rob van der Linde 
Reviewed-by: Joseph Sutton 
Reviewed-by: Andrew Bartlett 

---

Summary of changes:
 source4/dsdb/tests/python/priv_attrs.py   |  8 
 source4/dsdb/tests/python/user_account_control.py |  4 ++--
 source4/dsdb/tests/python/vlv.py  | 10 +-
 source4/scripting/bin/gen_hresult.py  |  8 
 source4/scripting/bin/gen_ntstatus.py | 14 +++---
 source4/scripting/bin/gen_werror.py   | 12 ++--
 source4/scripting/bin/samba_upgradeprovision  | 13 ++---
 7 files changed, 34 insertions(+), 35 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/tests/python/priv_attrs.py 
b/source4/dsdb/tests/python/priv_attrs.py
index 4dfdfb9cbb8..0450cc561db 100644
--- a/source4/dsdb/tests/python/priv_attrs.py
+++ b/source4/dsdb/tests/python/priv_attrs.py
@@ -329,11 +329,11 @@ class PrivAttrsTests(samba.tests.TestCase):
 except LdbError as e5:
 (enum, estr) = e5.args
 if "unpriv-add-error" in attrs[test_name]:
-
self.assertGotLdbError(attrs[test_name]["unpriv-add-error"], \
- enum)
+
self.assertGotLdbError(attrs[test_name]["unpriv-add-error"],
+   enum)
 else:
-
self.assertGotLdbError(attrs[test_name]["unpriv-error"], \
- enum)
+
self.assertGotLdbError(attrs[test_name]["unpriv-error"],
+   enum)
 elif "only-2" in attrs[test_name] and \
  attrs[test_name]["only-2"] != objectclass:
 try:
diff --git a/source4/dsdb/tests/python/user_account_control.py 
b/source4/dsdb/tests/python/user_account_control.py
index b54b33678dc..ca99ce3fba1 100755
--- a/source4/dsdb/tests/python/user_account_control.py
+++ b/source4/dsdb/tests/python/user_account_control.py
@@ -96,7 +96,7 @@ class UserAccountControlTests(samba.tests.TestCase):
  UF_SERVER_TRUST_ACCOUNT]:
 account_type_str = 
dsdb.user_account_control_flag_bit_to_string(account_type)
 for objectclass in ["computer", "user"]:
-for name in [("oc_uac_lock$", "withdollar"), \
+for name in [("oc_uac_lock$", "withdollar"),
 ("oc_uac_lock", "plain")]:
 test_name = 
f"{account_type_str}_{objectclass}_{priv[1]}_{name[1]}"
 

[SCM] Samba Shared Repository - branch master updated

2023-05-04 Thread Andrew Bartlett
The branch, master has been updated
   via  6258173a62e s4:kdc: Don’t call memcpy() with a NULL pointer
   via  2eb458118c3 lib:addns: Don’t call memcpy() with a NULL pointer
   via  f60249eed58 tests/krb5: Improve _test_samr_change_password() method
   via  e959485550e tests/krb5: Don’t delete silo until all tests have 
finished
   via  0e27b297a29 tests/krb5: Add remove_attribute() helper function
   via  98e23d7eed6 tests/krb5: Have set_forced_key() also set the NT hash
   via  1a53d3514f8 auth/credentials: Add set_nt_hash()
   via  506c2d1b8a3 s3:lib: Fix typos
   via  6f1852c9538 s4:kdc: Remove unused parameter
   via  87f7bd60071 tests/krb5: Make _tgs_req() more configurable
   via  9d206948c9c tests/krb5: Make use of check_tgs_reply()
   via  ab8a3e87bbe tests/krb5: Allow specifying an encoded security 
descriptor
   via  9d84f3384e6 tests/krb5: Rename ‘objectclass’ to use correct case
   via  0a7cbe1e953 tests/krb5: Rename ‘auth_silo’ to ‘authn_silo’
   via  2f993306408 s4/scripting/bin: Remove unused imports
   via  2727e33dbdb s4/scripting/bin: Fix resource leak
   via  37450ec3c2c s4:kdc: Fix typo
   via  3ae3499b70b tests/krb5: Create account cache key only if needed
   via  4dc9abc777b tests/krb5: Delete non-resuable accounts as soon as 
possible
   via  9c4a71de472 s4:kdc: Use correct target principal name in log message
   via  86f07cad945 docs-xml: Fix typos
   via  db889249abb auth/credentials: Fix NULL dereference
   via  bd9eb63450f tests/krb5: Refactor _test_samlogon()
   via  443d70ee58f lib:util: Fix undefined bitshift
   via  dd88d7a89f2 param: Fix resource leak
   via  d497829bf1a python/samba: Fix invalid escape sequence
   via  2e41c73e98e lib/http: Remove unused structure
   via  c6f29f0039c tests/krb5: Allow setting a servicePrincipalName on a 
user account
   via  4ae9fe48aa8 tests/krb5: Fix parameter default
   via  57d73b24b2e tests/krb5: Remove unused parameter
   via  1a90a94ff1d tests/krb5: Test that the salt for a managed service 
account is computed correctly
   via  762e184216f tests/krb5: Allow creating managed service accounts
   via  c7295b1dc54 pydsdb: Add Managed Service Accounts GUID constant
   via  2f5cebfef92 libds: Add Managed Service Accounts well-known GUID
   via  8a3dacd39ec tests/krb5: Always heed the add_dollar parameter
   via  1ba0953d65b tests/krb5: Remove unused import
   via  07f3dbbf38e s4:dsdb: Fix leak
   via  722bbf0544a tests/krb5: Remove unneeded assertions
   via  eb4b46d326e tests/krb5: Allow creating an account with an assigned 
policy or silo
   via  e7b2cd7d831 tests/krb5: Add method to create an authentication 
policy
   via  c4972272227 tests/krb5: Generify protected users test methods
   via  6f3b7f95f3c tests/krb5: Handle NT hashes being disabled
   via  e4ec3d6f3d3 tests/krb5: Pass client credentials down into 
kdc_exchange_dict
   via  c07ac154627 tests/krb5: Remove test for OemChangePasswordUser2()
   via  58bf53c973d tests/krb5: Split out functions for testing logons and 
password changes
   via  34f378f4809 auth/credentials: Allow resetting bind DN on 
Credentials object
   via  963688b3a5a librpc: Always call ndr_push_compression_state_init() 
for compression
   via  ff2de50aa4b librpc: Fix talloc hierarchy for ndr_compression_state
   via  7dab9edca86 python:descriptor: add missing schema 2019 aces in 
builtin and dns partition
  from  6752bcaf4de s3:utils: Move error-handling code into more suitable 
spot (CID 1524680)

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


- Log -
commit 6258173a62e3fbb9cd103b72175874e8346571ea
Author: Joseph Sutton 
Date:   Mon May 1 13:04:58 2023 +1200

s4:kdc: Don’t call memcpy() with a NULL pointer

Doing so is undefined behaviour.

Signed-off-by: Joseph Sutton 
Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Fri May  5 03:52:30 UTC 2023 on atb-devel-224

commit 2eb458118c3de09cea42749098df1f93dc0e9eca
Author: Joseph Sutton 
Date:   Mon May 1 11:22:02 2023 +1200

lib:addns: Don’t call memcpy() with a NULL pointer

Doing so is undefined behaviour.

Signed-off-by: Joseph Sutton 
Reviewed-by: Andrew Bartlett 

commit f60249eed58d9c282b21fd83dcb0654f310ac8db
Author: Joseph Sutton 
Date:   Mon May 1 09:48:15 2023 +1200

tests/krb5: Improve _test_samr_change_password() method

Instead of using anonymous credentials, we now connect using the
passed-in credentials.

We now correctly construct nt_password and nt_verifier so as to
successfully change the password, instead of having to distinguish
between a WRONG_PASSWORD error and an error caused by the password
change being disallowed.