[SCM] Samba Shared Repository - branch master updated

2022-05-10 Thread Andrew Bartlett
The branch, master has been updated
   via  0b214d666a9 gitignore: Add .ropeproject for pylsp-rope plugin
   via  ede2fcb5fe8 tests/user_check_password_script: Don't try to delete 
user after failed add
   via  187635ff6ff tests/user_check_password_script: Remove unused imports
   via  e6712751dd9 samdb: Avoid half-created accounts
   via  e6b61869772 tests/samba-tool user: Add test for adding a user over 
LDAP
   via  9b0f25ec498 tests/samba-tool user_wdigest: Check command results
   via  c87ec2d3315 tests/samba-tool user_wdigest: Add accounts to local 
database
   via  05a7092fdaf tests/samba-tool user_wdigest: Fix flapping test
   via  a71c62404ab tests/samba-tool user_wdigest: Remove unused imports
   via  7244a64478a bootstrap: matplotlib is not a real Samba dep
   via  c771d197eee bootstrap: chown the whole cloned repo, not just the 
subfolders
   via  dd568490089 .gitlab-ci: Work around new git restrictions arising 
from CVE-2022-24765
  from  17ba8120ed6 gpo: Add Centrify Compatible Crontab Extensions

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


- Log -
commit 0b214d666a973e9ede9fd70f92b6874cb7fa8ccb
Author: Andreas Schneider 
Date:   Tue May 10 08:38:33 2022 +0200

gitignore: Add .ropeproject for pylsp-rope plugin

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Wed May 11 00:04:55 UTC 2022 on sn-devel-184

commit ede2fcb5fe855ceb81b8f7f40975334f52c811b5
Author: Joseph Sutton 
Date:   Tue May 10 16:18:14 2022 +1200

tests/user_check_password_script: Don't try to delete user after failed add

The user account should not exist if account creation failed.

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

commit 187635ff6ff1d62a9c5630d3969e65867cb3bb4a
Author: Joseph Sutton 
Date:   Wed May 11 08:47:40 2022 +1200

tests/user_check_password_script: Remove unused imports

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

commit e6712751dd9df5f4a7f2531ee0069d3958cc3b3b
Author: Joseph Sutton 
Date:   Tue May 10 13:02:30 2022 +1200

samdb: Avoid half-created accounts

If newuser() or newcomputer() create an account over LDAP, and an
attempt to modify it (e.g. to change the password) fails, ensure that we
properly clean up the account. If we are connected over LDAP, we won't
have transactions to clean things up for us.

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

commit e6b6186977220530a2a05319a4a121fc582170c9
Author: Joseph Sutton 
Date:   Tue May 10 13:01:43 2022 +1200

tests/samba-tool user: Add test for adding a user over LDAP

Ensure that we do not end up with half-created accounts.

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

commit 9b0f25ec498a318111a5f4fdbba3e1ce82bc0124
Author: Joseph Sutton 
Date:   Tue May 10 12:59:59 2022 +1200

tests/samba-tool user_wdigest: Check command results

Ensure that the commands to create and delete the user execute
successfully.

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

commit c87ec2d331521569a88bfdbfabd936187963c822
Author: Joseph Sutton 
Date:   Tue May 10 12:59:06 2022 +1200

tests/samba-tool user_wdigest: Add accounts to local database

Adding accounts over LDAP means transactions cannot be used, potentially
leading to problems.

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

commit 05a7092fdaf31b9264318208eeba3f306712f638
Author: Joseph Sutton 
Date:   Tue May 10 12:49:50 2022 +1200

tests/samba-tool user_wdigest: Fix flapping test

The randomly-generated password for the user account may be too weak,
causing account creation to fail. This leads to further problems, as the
result of the command is not checked, and connecting over LDAP means
transactions cannot be used, leading to a half-created account and
failing tests.

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

commit a71c62404ab1e669841cc40f98a5f1b51aba2c65
Author: Joseph Sutton 
Date:   Wed May 11 08:45:24 2022 +1200

tests/samba-tool user_wdigest: Remove unused imports

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

commit 7244a64478a6425ee720c752b6cf73a576bbb6c8
Author: Andrew Bartlett 
Date:   Thu May 5 15:44:05 2022 +1200

bootstrap: matplotlib is not a real Samba dep

This came in via the original list of packages used
at Catalyst when building Samba for testing, in particular
related to an example LDB module to trace LDB requests.

There is no testing need for this even in make test.

Signed-off-by: Andrew Bartlett 
Reviewed-by: Andreas Schneider 

commit c771d197eeebf2b01d46451cc51b698a99502935

[SCM] Samba Shared Repository - branch master updated

2022-05-10 Thread Jeremy Allison
The branch, master has been updated
   via  17ba8120ed6 gpo: Add Centrify Compatible Crontab Extensions
   via  fe0aa82b621 gpo: Test Centrify Compatible Crontab Extensions
   via  d68270eb4b7 gpo: Add Centrify Compatible Sudoers Extension
   via  c28e4396de2 gpo: Test Centrify Compatible Sudoers Extension
  from  4580fd10468 winbind: send "debug traceid" from winbindd parent to 
child

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


- Log -
commit 17ba8120ed61f58d927164d67408399becac27bb
Author: David Mulder 
Date:   Fri Apr 29 15:21:33 2022 -0600

gpo: Add Centrify Compatible Crontab Extensions

Signed-off-by: David Mulder 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Tue May 10 20:05:48 UTC 2022 on sn-devel-184

commit fe0aa82b621bf01bbd81186a5ebbae10559facc1
Author: David Mulder 
Date:   Fri Apr 29 14:40:41 2022 -0600

gpo: Test Centrify Compatible Crontab Extensions

Signed-off-by: David Mulder 
Reviewed-by: Jeremy Allison 

commit d68270eb4b7418327c4f06b46f3686d955831e66
Author: David Mulder 
Date:   Fri Apr 29 10:29:01 2022 -0600

gpo: Add Centrify Compatible Sudoers Extension

Signed-off-by: David Mulder 
Reviewed-by: Jeremy Allison 

commit c28e4396de27be05c5ba8f96eb9b1e86d01f58ec
Author: David Mulder 
Date:   Fri Apr 29 09:14:10 2022 -0600

gpo: Test Centrify Compatible Sudoers Extension

Signed-off-by: David Mulder 
Reviewed-by: Jeremy Allison 

---

Summary of changes:
 ...p_scripts_ext.py => gp_centrify_crontab_ext.py} |  68 -
 ...p_sudoers_ext.py => gp_centrify_sudoers_ext.py} |  53 +++
 python/samba/tests/gpo.py  | 166 +
 source4/scripting/bin/samba-gpupdate   |   6 +
 4 files changed, 222 insertions(+), 71 deletions(-)
 copy python/samba/{gp_scripts_ext.py => gp_centrify_crontab_ext.py} (69%)
 copy python/samba/{gp_sudoers_ext.py => gp_centrify_sudoers_ext.py} (75%)


Changeset truncated at 500 lines:

diff --git a/python/samba/gp_scripts_ext.py 
b/python/samba/gp_centrify_crontab_ext.py
similarity index 69%
copy from python/samba/gp_scripts_ext.py
copy to python/samba/gp_centrify_crontab_ext.py
index 33049ff6dc0..eace6a973cd 100644
--- a/python/samba/gp_scripts_ext.py
+++ b/python/samba/gp_centrify_crontab_ext.py
@@ -1,5 +1,5 @@
-# gp_scripts_ext samba gpo policy
-# Copyright (C) David Mulder  2020
+# gp_centrify_crontab_ext samba gpo policy
+# Copyright (C) David Mulder  2022
 #
 # 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
@@ -17,14 +17,13 @@
 import os, re
 from subprocess import Popen, PIPE
 from samba.gpclass import gp_pol_ext, drop_privileges
-from base64 import b64encode
 from hashlib import blake2b
 from tempfile import NamedTemporaryFile
 
 intro = '''
 ### autogenerated by samba
 #
-# This file is generated by the gp_scripts_ext Group Policy
+# This file is generated by the gp_centrify_crontab_ext Group Policy
 # Client Side Extension. To modify the contents of this file,
 # modify the appropriate Group Policy objects which apply
 # to this machine. DO NOT MODIFY THIS FILE DIRECTLY.
@@ -35,11 +34,12 @@ end = '''
 ### autogenerated by samba ###
 '''
 
-class gp_scripts_ext(gp_pol_ext):
+class gp_centrify_crontab_ext(gp_pol_ext):
 def __str__(self):
-return 'Unix Settings/Scripts'
+return 'Centrify/CrontabEntries'
 
-def process_group_policy(self, deleted_gpo_list, changed_gpo_list, 
cdir=None):
+def process_group_policy(self, deleted_gpo_list, changed_gpo_list,
+ cdir=None):
 for guid, settings in deleted_gpo_list:
 self.gp_db.set_guid(guid)
 if str(self) in settings:
@@ -51,11 +51,8 @@ class gp_scripts_ext(gp_pol_ext):
 
 for gpo in changed_gpo_list:
 if gpo.file_sys_path:
-reg_key = 'Software\\Policies\\Samba\\Unix Settings'
-sections = { '%s\\Daily Scripts' % reg_key : '/etc/cron.daily',
- '%s\\Monthly Scripts' % reg_key : 
'/etc/cron.monthly',
- '%s\\Weekly Scripts' % reg_key : 
'/etc/cron.weekly',
- '%s\\Hourly Scripts' % reg_key : 
'/etc/cron.hourly' }
+section = \
+
'Software\\Policies\\Centrify\\UnixSettings\\CrontabEntries'
 self.gp_db.set_guid(gpo.name)
 pol_file = 'MACHINE/Registry.pol'
 path = os.path.join(gpo.file_sys_path, pol_file)
@@ -63,23 +60,21 @@ class gp_scripts_ext(gp_pol_ext):
 if not pol_conf:
 continue
 for e in pol_conf.entries:
-if 

[SCM] Samba Shared Repository - branch master updated

2022-05-10 Thread Jeremy Allison
The branch, master has been updated
   via  4580fd10468 winbind: send "debug traceid" from winbindd parent to 
child
   via  8da5ec60a8e winbind: enable "debug traceid" in main winbindd
   via  7c2d7930a36 docs-xml: document "winbind debug traceid" in smb.conf
   via  f2fa3706ad9 s3:winbindd add "'winbind debug traceid" support via 
tevent tracing
   via  e48fc192d24 debug: add debug_traceid_set/get() interface
   via  7dbb527751a debug: fix trailing whitespace
   via  463f694d5c6 s3:lib: reset all tevent trace callbacks in 
reinit_after_fork()
   via  fa0430b21e4 s3:lib: fix trailing whitespaces
  from  29365195176 python: Use 'is' for identity when comparing against 
None

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


- Log -
commit 4580fd10468e22ea39cc38921fb0d8ad6be46339
Author: Pavel Filipenský 
Date:   Sun Sep 5 20:37:55 2021 +0200

winbind: send "debug traceid" from winbindd parent to child

Bumping WINBIND_INTERFACE_VERSION to 32

Pair-Programmed-With: Andreas Schneider 

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Tue May 10 18:25:01 UTC 2022 on sn-devel-184

commit 8da5ec60a8ef4c99b33a6df204493ff82da864fc
Author: Pavel Filipenský 
Date:   Sun Sep 5 20:36:15 2021 +0200

winbind: enable "debug traceid" in main winbindd

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

commit 7c2d7930a36828b1564af9108e397a137324a458
Author: Pavel Filipenský 
Date:   Sun Sep 5 22:18:11 2021 +0200

docs-xml: document "winbind debug traceid" in smb.conf

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

commit f2fa3706ad9f9de112607b20813053b98c5bbfe6
Author: Pavel Březina 
Date:   Wed Sep 1 16:05:37 2021 +0200

s3:winbindd add "'winbind debug traceid" support via tevent tracing

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

commit e48fc192d24a53db4209de262caec4d5b491952e
Author: Pavel Filipenský 
Date:   Sun May 8 21:06:13 2022 +0200

debug: add debug_traceid_set/get() interface

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

commit 7dbb527751a1c8a7e5dbde95959220fbcb0a28e3
Author: Pavel Filipenský 
Date:   Sun May 8 21:09:04 2022 +0200

debug: fix trailing whitespace

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

commit 463f694d5c68141b161128944e46161d63e4569a
Author: Pavel Filipenský 
Date:   Tue May 10 13:06:53 2022 +0200

s3:lib: reset all tevent trace callbacks in reinit_after_fork()

Signed-off-by: Pavel Filipenský 

With "tevent: add event trace api" we have now more callbacks to reset.
Reviewed-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

commit fa0430b21e4941bcea481320dcddc4c94c30ce88
Author: Pavel Filipenský 
Date:   Tue May 10 13:06:05 2022 +0200

s3:lib: fix trailing whitespaces

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andreas Schneider 
Reviewed-by: Jeremy Allison 

---

Summary of changes:
 .../ldapdeletedn.xml => logging/debugtraceid.xml}  |  12 +-
 lib/util/debug.c   |  28 +++-
 lib/util/debug.h   |   9 +-
 nsswitch/winbind_struct_protocol.h |   4 +-
 source3/lib/util.c |  39 +++---
 source3/winbindd/winbindd.c|  15 +++
 source3/winbindd/winbindd_dual.c   |  13 ++
 source3/winbindd/winbindd_traceid.c| 147 +
 source3/winbindd/winbindd_traceid.h|  29 
 source3/winbindd/wscript_build |   1 +
 10 files changed, 272 insertions(+), 25 deletions(-)
 copy docs-xml/smbdotconf/{ldap/ldapdeletedn.xml => logging/debugtraceid.xml} 
(51%)
 create mode 100644 source3/winbindd/winbindd_traceid.c
 create mode 100644 source3/winbindd/winbindd_traceid.h


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/ldap/ldapdeletedn.xml 
b/docs-xml/smbdotconf/logging/debugtraceid.xml
similarity index 51%
copy from docs-xml/smbdotconf/ldap/ldapdeletedn.xml
copy to docs-xml/smbdotconf/logging/debugtraceid.xml
index 47ffad80cbf..61a451da3e7 100644
--- a/docs-xml/smbdotconf/ldap/ldapdeletedn.xml
+++ b/docs-xml/smbdotconf/logging/debugtraceid.xml
@@ -1,13 +1,13 @@
-http://www.samba.org/samba/DTD/samba-doc;>
 
-This parameter specifies whether a delete
-   operation in the ldapsam deletes the complete entry or only the 
attributes
-   specific to Samba.
- 

[SCM] Samba Shared Repository - branch master updated

2022-05-10 Thread Andreas Schneider
The branch, master has been updated
   via  29365195176 python: Use 'is' for identity when comparing against 
None
   via  6586ac03a55 kcc: Don't reuse outer loop variable for inner loop
   via  455c083ec37 python: Remove redundant assignments
   via  139f00c3941 source4/scripting/bin: Remove unnecessary global 
declarations
   via  79f591edc6c python/wscript: Remove unused format() argument
   via  6893e2c1d11 wintest: Remove unreachable return statement
   via  6c1142da642 selftest: Remove unreachable return statement
   via  b481ceaa0db samba-tool: Don't try to delete local_tdo_handle twice.
   via  ed9d415c08d wafsamba: Fix previously unreachable exception path
   via  ba54c9cc067 python: Remove unnecessary 'pass' statements
   via  0eb3041bfa6 samba-tool gpo: Fix unintended string concatenations
   via  5104a791249 samba-tool gpo tests: Fix unintended string 
concatenations
   via  b2c94d3e514 examples: Make samr.py work with Python 3
   via  74c86aa587d examples: Make netbios.py work with Python 3
   via  b9d12c703ae examples: Remove unused imports
   via  d303a0bee46 python/xattr: Properly process system.posix_acl_access
   via  2fb3658eda2 samba-tool processes: Remove unused loop
  from  f9df57043e4 lib/smbconf: add python wrapper functions for 
transaction management

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


- Log -
commit 29365195176630952c65b461d25096f92fffa746
Author: Joseph Sutton 
Date:   Thu May 5 21:42:47 2022 +1200

python: Use 'is' for identity when comparing against None

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Tue May 10 06:12:10 UTC 2022 on sn-devel-184

commit 6586ac03a5518f1d86786506de87c4e90abe29c3
Author: Joseph Sutton 
Date:   Thu May 5 21:40:34 2022 +1200

kcc: Don't reuse outer loop variable for inner loop

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

commit 455c083ec375a58a648021543ac51faca02bc0b6
Author: Joseph Sutton 
Date:   Thu May 5 21:32:13 2022 +1200

python: Remove redundant assignments

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

commit 139f00c3941f7dbbd646f878157e75aceeb445e0
Author: Joseph Sutton 
Date:   Thu May 5 21:23:10 2022 +1200

source4/scripting/bin: Remove unnecessary global declarations

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

commit 79f591edc6cb7f9499914cd83e4c847942d86ee3
Author: Joseph Sutton 
Date:   Thu May 5 21:21:28 2022 +1200

python/wscript: Remove unused format() argument

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

commit 6893e2c1d116d7bb23f08be341d5a0971dbc03e8
Author: Joseph Sutton 
Date:   Thu May 5 21:19:34 2022 +1200

wintest: Remove unreachable return statement

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

commit 6c1142da64208dae37576f4cde6fb47ad14a18e2
Author: Joseph Sutton 
Date:   Thu May 5 21:18:49 2022 +1200

selftest: Remove unreachable return statement

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

commit b481ceaa0db83d9662bc5b7e737838d02f0941f1
Author: Joseph Sutton 
Date:   Thu May 5 21:16:17 2022 +1200

samba-tool: Don't try to delete local_tdo_handle twice.

This code is unreachable, as local_tdo_handle has already been deleted
and set to None earlier.

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

commit ed9d415c08d91d3c16ec7bd35fd8387fbe40df43
Author: Joseph Sutton 
Date:   Thu May 5 21:12:05 2022 +1200

wafsamba: Fix previously unreachable exception path

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

commit ba54c9cc067993aed21e97618cc0f1f58a5034e8
Author: Joseph Sutton 
Date:   Thu May 5 21:11:07 2022 +1200

python: Remove unnecessary 'pass' statements

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

commit 0eb3041bfa6a8ba345796511e6acaf8ac40c486f
Author: Joseph Sutton 
Date:   Thu May 5 21:08:06 2022 +1200

samba-tool gpo: Fix unintended string concatenations

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

commit 5104a791249ee2311828e4483e3e9ddabb05d45a
Author: Joseph Sutton 
Date:   Fri May 6 11:59:28 2022 +1200

samba-tool gpo tests: Fix unintended string concatenations

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

commit b2c94d3e514779bd40e848612fead89ac189691f
Author: Joseph Sutton 
Date:   Thu May 5 21:07:36 2022 +1200

examples: Make samr.py work with Python 3

Signed-off-by: Joseph Sutton 
Reviewed-by: Andreas Schneider 

commit 74c86aa587d67146cee17a938064ebd5916f3447
Author: Joseph Sutton 
Date:   Thu May 5 21:06:46 2022 +1200

examples: Make netbios.py