[SCM] Samba Shared Repository - branch master updated

2024-05-14 Thread Pavel Filipensky
The branch, master has been updated
   via  833c3f26b47 python/tests: Fix nlink test in smb3unix on btrfs 
filesystem
  from  1ca6fb563b0 lib/replace: make sure krb5_cc_default[_name]() is no 
longer used directly

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


- Log -
commit 833c3f26b476c5f27d8dd000cfa423f0726cef1a
Author: Pavel Filipenský 
Date:   Mon May 13 12:13:38 2024 +0200

python/tests: Fix nlink test in smb3unix on btrfs filesystem

Signed-off-by: Pavel Filipenský 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Tue May 14 13:37:53 UTC 2024 on atb-devel-224

---

Summary of changes:
 python/samba/tests/smb3unix.py | 18 ++
 1 file changed, 14 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/tests/smb3unix.py b/python/samba/tests/smb3unix.py
index d88bd432239..1962852349c 100644
--- a/python/samba/tests/smb3unix.py
+++ b/python/samba/tests/smb3unix.py
@@ -24,6 +24,7 @@ from samba.dcerpc import smb3posix
 from samba.ndr import ndr_unpack
 from samba.dcerpc.security import dom_sid
 import os
+import subprocess
 
 def posix_context(mode):
 return (libsmb.SMB2_CREATE_TAG_POSIX, mode.to_bytes(4, 'little'))
@@ -34,6 +35,9 @@ class Smb3UnixTests(samba.tests.libsmb.LibsmbTests):
 super().setUp()
 
 self.samsid = os.environ["SAMSID"]
+prefix_abs = os.environ["PREFIX_ABS"]
+p = subprocess.run(['stat', '-f', '-c', '%T', prefix_abs], 
capture_output=True, text=True)
+self.fstype = p.stdout.strip().lower()
 
 def connections(self, share1=None, posix1=False, share2=None, posix2=True):
 if not share1:
@@ -303,7 +307,11 @@ class Smb3UnixTests(samba.tests.libsmb.LibsmbTests):
 self.assertEqual(found_files[fname]['attrib'],
  libsmb.FILE_ATTRIBUTE_ARCHIVE)
 else:
-self.assertEqual(found_files[fname]['nlink'], 2)
+# Note: btrfs always reports the link count of directories 
as one.
+if self.fstype == "btrfs":
+self.assertEqual(found_files[fname]['nlink'], 1)
+else:
+self.assertEqual(found_files[fname]['nlink'], 2)
 self.assertEqual(found_files[fname]['attrib'],
  libsmb.FILE_ATTRIBUTE_DIRECTORY)
 
@@ -368,9 +376,11 @@ class Smb3UnixTests(samba.tests.libsmb.LibsmbTests):
 
 cc = ndr_unpack(smb3posix.smb3_posix_cc_info, cc_out[0][1])
 
-# Note: this fails on btrfs which always reports the link
-# count of directories as one.
-self.assertEqual(cc.nlinks, 2)
+# Note: btrfs always reports the link count of directories as one.
+if self.fstype == "btrfs":
+self.assertEqual(cc.nlinks, 1)
+else:
+self.assertEqual(cc.nlinks, 2)
 
 self.assertEqual(cc.reparse_tag, 
libsmb.IO_REPARSE_TAG_RESERVED_ZERO)
 self.assertEqual(cc.posix_perms, 0o700)


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2024-04-15 Thread Pavel Filipensky
The branch, master has been updated
   via  75a4fbbf6a3 smbdotconf: Enable "winbind debug traceid" by default
  from  eb59d7c9b04 s3:libsmb: Fix panic in cliconnect.c

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


- Log -
commit 75a4fbbf6a340defc884861bc71c5103f16e8d9e
Author: Pavel Filipenský 
Date:   Thu Apr 11 13:01:28 2024 +0200

smbdotconf: Enable "winbind debug traceid" by default

The traceid debug header field is a useful feature, let's make it
default.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15631

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Mon Apr 15 18:47:41 UTC 2024 on atb-devel-224

---

Summary of changes:
 docs-xml/smbdotconf/logging/debugtraceid.xml | 2 +-
 lib/param/loadparm.c | 1 +
 source3/param/loadparm.c | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/logging/debugtraceid.xml 
b/docs-xml/smbdotconf/logging/debugtraceid.xml
index 61a451da3e7..7646208af48 100644
--- a/docs-xml/smbdotconf/logging/debugtraceid.xml
+++ b/docs-xml/smbdotconf/logging/debugtraceid.xml
@@ -9,5 +9,5 @@
 
 
 
-no
+yes
 
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index 6ef29ed9656..0984ca7195b 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -2707,6 +2707,7 @@ struct loadparm_context *loadparm_init(TALLOC_CTX 
*mem_ctx)
lpcfg_do_global_parameter(lp_ctx, "debug pid", "No");
lpcfg_do_global_parameter(lp_ctx, "debug uid", "No");
lpcfg_do_global_parameter(lp_ctx, "debug class", "No");
+   lpcfg_do_global_parameter(lp_ctx, "winbind debug traceid", "Yes");
 
lpcfg_do_global_parameter(lp_ctx, "server role", "auto");
lpcfg_do_global_parameter(lp_ctx, "domain logons", "No");
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 797baa66309..a67fc8cf51e 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -952,6 +952,8 @@ void loadparm_s3_init_globals(struct loadparm_context 
*lp_ctx,
 
Globals.kdc_enable_fast = true;
 
+   Globals.winbind_debug_traceid = true;
+
Globals.aio_max_threads = 100;
 
lpcfg_string_set(Globals.ctx,


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2024-04-15 Thread Pavel Filipensky
The branch, master has been updated
   via  eb59d7c9b04 s3:libsmb: Fix panic in cliconnect.c
  from  dde973d170e s4:dns_server: less noisy, more informative debug 
messages

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


- Log -
commit eb59d7c9b04275574deab3e5489dc2e5d05e4bbb
Author: Pavel Filipenský 
Date:   Fri Apr 12 14:57:11 2024 +0200

s3:libsmb: Fix panic in cliconnect.c

This command line panics:

$ bin/rpcclient ncacn_np: -c epmlookup

0  __pthread_kill_implementation (threadid=, 
signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
1  0x764ae8a3 in __pthread_kill_internal (signo=6, 
threadid=) at pthread_kill.c:78
2  0x7645c8ee in __GI_raise (sig=sig@entry=6) at 
../sysdeps/posix/raise.c:26
3  0x764448ff in __GI_abort () at abort.c:79
4  0x77b01524 in tevent_req_is_nterror (req=0x55728610, 
status=0x7fff9bb4) at ../../lib/util/tevent_ntstatus.c:66
5  0x77b9fd91 in cli_connect_nb_recv (req=0x55728610, 
pcli=0x556fcb18) at ../../source3/libsmb/cliconnect.c:2731
6  0x77ba02a8 in cli_start_connection_connected 
(subreq=0x55728610) at ../../source3/libsmb/cliconnect.c:2882
7  0x77aecb1a in _tevent_req_notify_callback (req=0x55728610, 
location=0x77bde0e0 "../../source3/libsmb/cliconnect.c:2686") at 
../../lib/tevent/tevent_req.c:177
8  0x77aeccab in tevent_req_finish (req=0x55728610, 
state=TEVENT_REQ_USER_ERROR, location=0x77bde0e0 
"../../source3/libsmb/cliconnect.c:2686") at ../../lib/tevent/tevent_req.c:234
9  0x77aecdda in tevent_req_trigger (ev=0x557182e0, 
im=0x55728720, private_data=0x55728610) at 
../../lib/tevent/tevent_req.c:291
10 0x77aeb513 in tevent_common_invoke_immediate_handler 
(im=0x55728720, removed=0x0) at ../../lib/tevent/tevent_immediate.c:190
11 0x77aeb685 in tevent_common_loop_immediate (ev=0x557182e0) 
at ../../lib/tevent/tevent_immediate.c:236
12 0x77af7502 in epoll_event_loop_once (ev=0x557182e0, 
location=0x77af8ac0 "../../lib/tevent/tevent_req.c:342") at 
../../lib/tevent/tevent_epoll.c:905
13 0x77af2d22 in std_event_loop_once (ev=0x557182e0, 
location=0x77af8ac0 "../../lib/tevent/tevent_req.c:342") at 
../../lib/tevent/tevent_standard.c:110
14 0x77ae93ab in _tevent_loop_once (ev=0x557182e0, 
location=0x77af8ac0 "../../lib/tevent/tevent_req.c:342") at 
../../lib/tevent/tevent.c:820
15 0x77aecf9e in tevent_req_poll (req=0x55728290, 
ev=0x557182e0) at ../../lib/tevent/tevent_req.c:342
16 0x77b01647 in tevent_req_poll_ntstatus (req=0x55728290, 
ev=0x557182e0, status=0x7fff9f4c) at 
../../lib/util/tevent_ntstatus.c:109
17 0x77ba246a in cli_full_connection_creds 
(output_cli=0x7fffa220, my_name=0x55701990 "CLUSTEREDMEMBER", 
dest_host=0x0, dest_ss=0x0, port=0, service=0x556981d1 "IPC$", 
service_type=0x556981d6 "IPC", creds=0x556fa410, flags=4096) at 
../../source3/libsmb/cliconnect.c:3807
18 0x55619ae9 in main (argc=4, argv=0x7fffa3e8) at 
../../source3/rpcclient/rpcclient.c:1308

tevent_req_is_nterror() expects error set by tevent_req_nterror()
- to have TEVENT_NTERROR_MAGIC, otherwise it calls abort().

Signed-off-by: Pavel Filipenský 
    Reviewed-by: Volker Lendecke 

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Mon Apr 15 14:55:21 UTC 2024 on atb-devel-224

---

Summary of changes:
 source3/libsmb/cliconnect.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 61e35042586..d42f08fbb1a 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -2683,7 +2683,7 @@ static struct tevent_req *cli_connect_nb_send(
}
} else {
/* No host or dest_ss given. Error out. */
-   tevent_req_error(req, EINVAL);
+   tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER_MIX);
return tevent_req_post(req, ev);
}
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2024-04-02 Thread Pavel Filipensky
The branch, master has been updated
   via  f8b72aa1f72 tests: Add a test for "all_groups=no" to 
test_idmap_ad.sh
   via  2dab3a331b5 selftest: Add "winbind expand groups = 1" to 
setup_ad_member_idmap_ad
   via  5d475d26a3d s3:winbindd: Improve performance of lookup_groupmem() 
in idmap_ad
   via  a485d9de2f2 docs-xml: Add parameter all_groupmem to idmap_ad
  from  dd2289eb3ae vfs_ceph: Implement SMB_VFS_FGET_DOS_ATTRIBUTES to 
preserve create_time

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


- Log -
commit f8b72aa1f72881989990fabc9f4888968bb81967
Author: Pavel Filipenský 
Date:   Thu Mar 14 15:24:21 2024 +0100

tests: Add a test for "all_groups=no" to test_idmap_ad.sh

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15605

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andreas Schneider 
    
    Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Tue Apr  2 13:25:39 UTC 2024 on atb-devel-224

commit 2dab3a331b5511b4f2253f2b3b4513db7e52ea9a
Author: Pavel Filipenský 
Date:   Mon Mar 25 22:38:18 2024 +0100

selftest: Add "winbind expand groups = 1" to setup_ad_member_idmap_ad

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15605

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

commit 5d475d26a3d545f04791a04e85a06b8b192e3fcf
Author: Pavel Filipenský 
Date:   Tue Mar 12 13:20:24 2024 +0100

s3:winbindd: Improve performance of lookup_groupmem() in idmap_ad

The LDAP query of lookup_groupmem() returns all group members from AD
even those with missing uidNumber.  Such group members are useless in
UNIX environment for idmap_ad backend since there is no uid mapping.

'test_user' is member of group "Domanin Users" with 200K members,
only 20K members have set uidNumber.

Without this fix:

$ time id test_user

real1m5.946s
user0m0.019s
sys 0m0.012s

With this fix:

$ time id test_user

real0m3.544s
user0m0.004s
sys 0m0.007s

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15605

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

commit a485d9de2f2d6a9815dcac6addb988a8987e111c
Author: Pavel Filipenský 
Date:   Wed Mar 13 13:55:41 2024 +0100

docs-xml: Add parameter all_groupmem to idmap_ad

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15605

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

---

Summary of changes:
 docs-xml/manpages/idmap_ad.8.xml | 10 ++
 nsswitch/tests/test_idmap_ad.sh  | 22 ++
 selftest/target/Samba3.pm|  1 +
 source3/winbindd/winbindd_ads.c  | 11 +++
 4 files changed, 40 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/idmap_ad.8.xml b/docs-xml/manpages/idmap_ad.8.xml
index 32df8d066c2..c7fcc65d763 100644
--- a/docs-xml/manpages/idmap_ad.8.xml
+++ b/docs-xml/manpages/idmap_ad.8.xml
@@ -105,6 +105,16 @@



+   all_groupmem = yes/no
+   
+ If set to yes winbind will retrieve all
+ group members for getgrnam(3), getgrgid(3) and getgrent(3) 
calls,
+ including those with missing uidNumber.
+   
+   Default: no
+   
+   
+   
deny ous
This parameter is a list of OUs from
which objects will not be mapped via the ad idmap
diff --git a/nsswitch/tests/test_idmap_ad.sh b/nsswitch/tests/test_idmap_ad.sh
index 7ae112ada71..1d4bd395ba9 100755
--- a/nsswitch/tests/test_idmap_ad.sh
+++ b/nsswitch/tests/test_idmap_ad.sh
@@ -94,6 +94,14 @@ gidNumber: 201
 unixHomeDirectory: /home/forbidden
 loginShell: /bin/tcsh
 gecos: User in forbidden OU
+
+dn: CN=no_posix_id,CN=Users,$BASE_DN
+changetype: add
+objectClass: user
+samaccountName: no_posix_id
+unixHomeDirectory: /home/no_posix_id
+loginShell: /bin/sh
+gecos: User without uidNumber and gidNumber
 EOF
 
 #
@@ -171,6 +179,17 @@ then
failed=$(($failed + 1))
 fi
 
+#
+# Test 6: Make sure that with the default "all_groups=no"
+# the group "domain users" will not show user "no_posix_id"
+# but will show "SAMBA2008R2/administrator"
+#
+
+dom_users="$DOMAIN/domain users"  # Extra step to make sure that all is one 
word
+out="$($wbinfo --group-info "$dom_users")"
+testit_grep_count "no_posix_id1" "no_posix_id" 0 echo "$out" || failed=$(expr 
$failed + 1)
+testit_grep "no_posix_id2" "SAMBA2008R2/administrator" echo "$out" ||

[SCM] Samba Shared Repository - branch master updated

2024-01-22 Thread Pavel Filipensky
The branch, master has been updated
   via  fdf3656d30c autobuild: Run ad_member_idmap_nss tests as part of 
samba-admem
  from  45962d416f4 source3/lib: Properly log the change in capability

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


- Log -
commit fdf3656d30cedf95f4d4585f98db9ba03b28
Author: Pavel Filipenský 
Date:   Mon Jan 15 10:33:05 2024 +0100

autobuild: Run ad_member_idmap_nss tests as part of samba-admem

Those are currently running as part of the normal 'samba' target. It
makes more sense to run them togehter with the other ad_member tests.

Signed-off-by: Pavel Filipenský 
Pair-Programmed-With: Andreas Schneider 

Reviewed-by: Andreas Schneider 

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Mon Jan 22 08:17:32 UTC 2024 on atb-devel-224

---

Summary of changes:
 script/autobuild.py | 4 
 1 file changed, 4 insertions(+)


Changeset truncated at 500 lines:

diff --git a/script/autobuild.py b/script/autobuild.py
index a10b9aebdef..7eea3653e0b 100755
--- a/script/autobuild.py
+++ b/script/autobuild.py
@@ -334,6 +334,7 @@ tasks = {
 "admem_idmap_autorid",
 "ad_member_idmap_ad",
 "ad_member_rfc2307",
+"ad_member_idmap_nss",
 "ad_member_oneway",
 "chgdcpass",
 "vampire_2000_dc",
@@ -403,6 +404,7 @@ tasks = {
 "admem_idmap_autorid",
 "ad_member_idmap_ad",
 "ad_member_rfc2307",
+"ad_member_idmap_nss",
 "ad_member_oneway",
 "chgdcpass",
 "vampire_2000_dc",
@@ -514,6 +516,7 @@ tasks = {
 "admem_idmap_autorid",
 "ad_member_idmap_ad",
 "ad_member_rfc2307",
+"ad_member_idmap_nss",
 "ad_member_offlogon",
 ])),
 ("lcov", LCOV_CMD),
@@ -720,6 +723,7 @@ tasks = {
 "admem_idmap_autorid",
 "ad_member_idmap_ad",
 "ad_member_rfc2307",
+"ad_member_idmap_nss",
 "ad_member_offlogon",
 ])),
 ("lcov", LCOV_CMD),


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2023-10-18 Thread Pavel Filipensky
The branch, master has been updated
   via  14600a3128c s3:libads: Improve logging for failover scenarios
   via  5f7a834effe s3:libsmb: Improve logging for failover scenarios
   via  6063f3ee733 s3:winbindd: Improve logging for failover scenarios in 
winbindd_pam.c
   via  21bb84ed1c3 s3:winbindd: Improve logging for failover scenarios in 
winbindd_cm.c
  from  f392fdfd47f shadow_copy2: Add missing TALLOC_FREE

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


- Log -
commit 14600a3128c6b66de4f9291eeec52e34725030c5
Author: Pavel Filipenský 
Date:   Wed Oct 18 11:32:57 2023 +0200

s3:libads: Improve logging for failover scenarios

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Wed Oct 18 15:47:09 UTC 2023 on atb-devel-224

commit 5f7a834effea56d683f76a801924c7125385e534
Author: Pavel Filipenský 
Date:   Wed Oct 18 11:32:57 2023 +0200

s3:libsmb: Improve logging for failover scenarios

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

commit 6063f3ee733348855d6b144091bbdbbe6862494c
Author: Pavel Filipenský 
Date:   Wed Oct 18 11:32:57 2023 +0200

s3:winbindd: Improve logging for failover scenarios in winbindd_pam.c

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

commit 21bb84ed1c30b863b4ef17fcebdd79f147142b9f
Author: Pavel Filipenský 
Date:   Wed Oct 18 11:32:57 2023 +0200

s3:winbindd: Improve logging for failover scenarios in winbindd_cm.c

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

---

Summary of changes:
 source3/libads/ldap.c   | 10 ++
 source3/libsmb/clientgen.c  |  5 +
 source3/winbindd/winbindd_cm.c  | 31 +--
 source3/winbindd/winbindd_pam.c |  4 
 4 files changed, 48 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 509196834ae..acf558a7ab3 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -478,6 +478,12 @@ again:
num_requests += 1;
}
 
+   DBG_DEBUG("Try to create %zu netlogon connections for domain '%s' "
+ "(provided count of addresses was %zu).\n",
+ num_requests,
+ domain,
+ count);
+
if (num_requests == 0) {
status = NT_STATUS_NO_LOGON_SERVERS;
DBG_WARNING("domain[%s] num_requests[%zu] for count[%zu] - 
%s\n",
@@ -855,6 +861,8 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads)
bool ok = false;
struct sockaddr_storage ss;
 
+   DBG_DEBUG("Resolving name of LDAP server '%s'.\n",
+ ads->server.ldap_server);
ok = resolve_name(ads->server.ldap_server, , 0x20, true);
if (!ok) {
DEBUG(5,("ads_connect: unable to resolve name %s\n",
@@ -900,6 +908,8 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads)
 * Keep trying to find a server and fall through
 * into ads_find_dc() again.
 */
+   DBG_DEBUG("Failed to connect to DC via LDAP server IP address, "
+ "trying to find another DC.\n");
}
 
ntstatus = ads_find_dc(ads);
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index e52e6c2256d..bec1184d53f 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -36,6 +36,11 @@
 unsigned int cli_set_timeout(struct cli_state *cli, unsigned int timeout)
 {
unsigned int old_timeout = cli->timeout;
+   DBG_DEBUG("Changing connection timeout for server '%s' from %d (ms) to "
+ "%d (ms).\n",
+ smbXcli_conn_remote_name(cli->conn),
+ cli->timeout,
+ timeout);
cli->timeout = timeout;
return old_timeout;
 }
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 014392fdb5d..ee6b1b91bd1 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1105,6 +1105,9 @@ static bool dcip_check_name_ads(const struct 
winbindd_domain *domain,
char addr[INET6_ADDRSTRLEN];
 
print_sockaddr(addr, sizeof(addr), >u.ss);
+   D_DEBUG("Trying to figure out the DC name for domain '%s' at IP 
'%s'.\n",
+   domain->name,
+   addr);
 
ads = ads_init(tmp_ctx,
   domain->alt_name,
@@ -1163,6 +1166,10 @@ static bool dcip_check_name_ads(const struct 
winbindd_domain *domain,
saf_store(do

[SCM] Samba Shared Repository - branch master updated

2023-10-17 Thread Pavel Filipensky
The branch, master has been updated
   via  237b6fc3ad6 s3:tests: Plan test_smbspool_krb.sh for environment 
ad_member_fips
   via  0f107f2f4ca s3:tests: Add smbspool test using kerberos 
authentication: test_smbspool_krb.sh
   via  8a97538c19c s3:tests: The correct name of shell variable is 
'samba_smbspool_krb5'
  from  310629508bf gitignore: add WAF lockfile

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


- Log -
commit 237b6fc3ad64d90d49ee67e1bf05a38e346f4936
Author: Pavel Filipenský 
Date:   Sun Sep 24 15:03:24 2023 +0200

s3:tests: Plan test_smbspool_krb.sh for environment ad_member_fips

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Tue Oct 17 19:19:32 UTC 2023 on atb-devel-224

commit 0f107f2f4ca4d532e3a4ff1c99cd028f403123ef
Author: Pavel Filipenský 
Date:   Sun Sep 24 15:03:35 2023 +0200

s3:tests: Add smbspool test using kerberos authentication: 
test_smbspool_krb.sh

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

commit 8a97538c19c4479407a2908025afa0f21cf2ea57
Author: Pavel Filipenský 
Date:   Mon Sep 25 09:11:52 2023 +0200

s3:tests: The correct name of shell variable is 'samba_smbspool_krb5'

There is no shell variable named 'smbspool_krb5'.

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

---

Summary of changes:
 source3/script/tests/test_smbspool.sh |  4 +-
 source3/script/tests/test_smbspool_krb.sh | 90 +++
 source3/selftest/tests.py |  3 ++
 3 files changed, 95 insertions(+), 2 deletions(-)
 create mode 100755 source3/script/tests/test_smbspool_krb.sh


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_smbspool.sh 
b/source3/script/tests/test_smbspool.sh
index acec0f2dbef..2036d57566c 100755
--- a/source3/script/tests/test_smbspool.sh
+++ b/source3/script/tests/test_smbspool.sh
@@ -59,7 +59,7 @@ test_smbspool_authinforequired_none()
 
if [ $ret != 0 ]; then
echo "$out"
-   echo "failed to execute $smbspool_krb5"
+   echo "failed to execute $samba_smbspool_krb5"
return 1
fi
 
@@ -85,7 +85,7 @@ test_smbspool_authinforequired_unknown()
*)
echo "ret=$ret"
echo "$out"
-   echo "failed to test $smbspool_krb5 against unknown value of 
AUTH_INFO_REQUIRED"
+   echo "failed to test $samba_smbspool_krb5 against unknown value 
of AUTH_INFO_REQUIRED"
return 1
;;
esac
diff --git a/source3/script/tests/test_smbspool_krb.sh 
b/source3/script/tests/test_smbspool_krb.sh
new file mode 100755
index 000..a4aeeab4110
--- /dev/null
+++ b/source3/script/tests/test_smbspool_krb.sh
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+if [ $# -lt 3 ]; then
+   cat <

[SCM] Samba Shared Repository - branch master updated

2023-10-11 Thread Pavel Filipensky
The branch, master has been updated
   via  027332cee56 s3:winbindd: Call winbind_add_failed_connection_entry() 
for the correct dc name
   via  928ce91eb7b s3:winbindd: Skip check_negative_conn_cache() if 
saf_servername == NULL
  from  10a4a977baf gitlab-ci: run samba-codecheck on ubuntu22.04

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


- Log -
commit 027332cee56472aae4b349ede554fc8a76e6e2c4
Author: Pavel Filipenský 
Date:   Mon Sep 18 11:16:39 2023 +0200

s3:winbindd: Call winbind_add_failed_connection_entry() for the correct dc 
name

We were calling winbind_add_failed_connection_entry() for saf_servername
which is NULL.  domain->dcname should be used instead.

Signed-off-by: Pavel Filipenský 
Reviewed-by: Ralph Boehme 

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Wed Oct 11 16:42:15 UTC 2023 on atb-devel-224

commit 928ce91eb7baf96fff1c35f60d02600302f69566
Author: Pavel Filipenský 
Date:   Mon Sep 18 11:15:21 2023 +0200

s3:winbindd: Skip check_negative_conn_cache() if saf_servername == NULL

saf_servername can be NULL even after calling saf_fetch().  Avoid
calling check_negative_conn_cache() like it was before commit 0fcf0012

Signed-off-by: Pavel Filipenský 
Reviewed-by: Ralph Boehme 

---

Summary of changes:
 source3/winbindd/winbindd_cm.c | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 13ab6754fd3..014392fdb5d 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1426,9 +1426,12 @@ static bool connect_preferred_dc(TALLOC_CTX *mem_ctx,
 * Check the negative connection cache before talking to it. It going
 * down may have triggered the reconnection.
 */
-   status = check_negative_conn_cache(domain->name, saf_servername);
-   if (!NT_STATUS_IS_OK(status)) {
-   saf_servername = NULL;
+   if (saf_servername != NULL) {
+   status = check_negative_conn_cache(domain->name,
+  saf_servername);
+   if (!NT_STATUS_IS_OK(status)) {
+   saf_servername = NULL;
+   }
}
 
if (saf_servername != NULL) {
@@ -1477,7 +1480,10 @@ static bool connect_preferred_dc(TALLOC_CTX *mem_ctx,
 NULL, -1, NULL, -1,
 fd, NULL, 10);
if (!NT_STATUS_IS_OK(status)) {
-   goto fail;
+   winbind_add_failed_connection_entry(domain,
+   domain->dcname,
+   NT_STATUS_UNSUCCESSFUL);
+   return false;
}
return true;
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2023-09-24 Thread Pavel Filipensky
The branch, master has been updated
   via  e58805fe7f7 s3:tests: Check if test_smbclient_kerberos.sh was 
successful
   via  3d7d37ad76c s3:tests: Fix syntax error in test_smbclient_kerberos.sh
   via  efa7f6a1072 s3:tests: Fix init of samba_kdestroy in 
test_smbclient_kerberos.sh
  from  d8f1298a9cb s3:tests: test_smbspool.sh should be calling 
smbspool_argv_wrapper

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


- Log -
commit e58805fe7f7f7987a5eb45f9b3695d00fdeae059
Author: Pavel Filipenský 
Date:   Sat Sep 23 17:13:27 2023 +0200

s3:tests: Check if test_smbclient_kerberos.sh was successful

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Mon Sep 25 00:14:47 UTC 2023 on atb-devel-224

commit 3d7d37ad76cba7b58465530625d5f68776ab09f9
Author: Pavel Filipenský 
Date:   Sat Sep 23 17:12:11 2023 +0200

s3:tests: Fix syntax error in test_smbclient_kerberos.sh

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andrew Bartlett 

commit efa7f6a1072448121f4d9614879573addb6d30cb
Author: Pavel Filipenský 
Date:   Sat Sep 23 17:10:54 2023 +0200

s3:tests: Fix init of samba_kdestroy in test_smbclient_kerberos.sh

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andrew Bartlett 

---

Summary of changes:
 source3/script/tests/test_smbclient_kerberos.sh | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_smbclient_kerberos.sh 
b/source3/script/tests/test_smbclient_kerberos.sh
index e83624ea424..31678d17e28 100755
--- a/source3/script/tests/test_smbclient_kerberos.sh
+++ b/source3/script/tests/test_smbclient_kerberos.sh
@@ -28,7 +28,7 @@ fi
 
 samba_kdestroy=kdestroy
 if test -x ${BINDIR}/samba4kdestroy; then
-   samba_kinit=${BINDIR}/samba4kdestroy
+   samba_kdestroy=${BINDIR}/samba4kdestroy
 fi
 
 KRB5CCNAME_PATH="${PREFIX}/ccache_smbclient_kerberos"
@@ -68,9 +68,6 @@ test_smbclient 
"smbclient.smb3.kerberos.ccache[//${SERVER}/tmp]" \
"ls; quit" //${SERVER}/tmp \
--use-krb5-ccache=${KRB5CCNAME} -mSMB3 ||
failed=$(expr $failed + 1)
-"ls; quit" //${SERVER}/tmp \
-   --use-kerberos=desired -U${USERNAME}%${PASSWORD} -mSMB3 ||
-   failed=$(expr $failed + 1)
 test_smbclient "smbclient.smb3.kerberos.desired[//${SERVER}/tmp]" \
"ls; quit" //${SERVER}/tmp \
--use-kerberos=desired -U${USERNAME}%${PASSWORD} -mSMB3 ||
@@ -79,3 +76,5 @@ test_smbclient 
"smbclient.smb3.kerberos.desired[//${SERVER}/tmp]" \
 $samba_kdestroy
 
 rm -rf $KRB5CCNAME_PATH
+
+testok "$0" "$failed"


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2023-09-24 Thread Pavel Filipensky
The branch, master has been updated
   via  d8f1298a9cb s3:tests: test_smbspool.sh should be calling 
smbspool_argv_wrapper
   via  6a7d404def0 s3:tests: Fix smbspool_argv_wrapper.c
  from  b3cae8dcf19 conf: Remove "smb3 unix extensions" parameter

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


- Log -
commit d8f1298a9cbadd0021041ab6276573cc4f07d11f
Author: Pavel Filipenský 
Date:   Sun Sep 24 21:07:04 2023 +0200

s3:tests: test_smbspool.sh should be calling smbspool_argv_wrapper

There is no variable named 'smbspool_argv_wrapper', the correct name is
'samba_argv_wrapper'. The smbspool_argv_wrapper was not called from this
test till now.

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Sun Sep 24 22:33:07 UTC 2023 on atb-devel-224

commit 6a7d404def018213e823abbfc37de1f05ca65e2b
Author: Pavel Filipenský 
Date:   Sun Sep 24 22:17:29 2023 +0200

s3:tests: Fix smbspool_argv_wrapper.c

smbspool_argv_wrapper must copy also the last argument

Signed-off-by: Pavel Filipenský 
Reviewed-by: Andrew Bartlett 

---

Summary of changes:
 source3/script/tests/smbspool_argv_wrapper.c | 2 +-
 source3/script/tests/test_smbspool.sh| 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/smbspool_argv_wrapper.c 
b/source3/script/tests/smbspool_argv_wrapper.c
index f3024d9490d..6f84f3bbe47 100644
--- a/source3/script/tests/smbspool_argv_wrapper.c
+++ b/source3/script/tests/smbspool_argv_wrapper.c
@@ -57,7 +57,7 @@ int main(int argc, char *argv[], char *envp[])
 * argv[0] 1   23 4  56
 */
 
-   for (a = 2; a < argc-1; a++) {
+   for (a = 2; a < argc; a++) {
new_argv[a-2] = argv[a];
}
 
diff --git a/source3/script/tests/test_smbspool.sh 
b/source3/script/tests/test_smbspool.sh
index 062d81cb9b8..acec0f2dbef 100755
--- a/source3/script/tests/test_smbspool.sh
+++ b/source3/script/tests/test_smbspool.sh
@@ -257,7 +257,7 @@ testit "vlp verify example.ps" \
 DEVICE_URI="smb://$USERNAME:$PASSWORD@$SERVER_IP/print1"
 export DEVICE_URI
 testit "smbspool print sanitized Device URI in argv0 example.ps" \
-   $smbspool_argv_wrapper $samba_smbspool smb://$SERVER_IP/print1 200 
$USERNAME "Testprint" 1 "options" $SRCDIR/testdata/printing/example.ps ||
+   $samba_argv_wrapper $samba_smbspool smb://$SERVER_IP/print1 200 
$USERNAME "Testprint" 1 "options" $SRCDIR/testdata/printing/example.ps ||
failed=$(expr $failed + 1)
 unset DEVICE_URI
 
@@ -268,7 +268,7 @@ testit "vlp verify example.ps" \
 DEVICE_URI="smb://$USERNAME:$PASSWORD@$SERVER_IP/print1"
 export DEVICE_URI
 testit "smbspool print sanitized Device URI in argv0 example.ps via stdin" \
-   $smbspool_argv_wrapper $samba_smbspool smb://$SERVER_IP/print1 200 
$USERNAME "Testprint" 1 "options" <$SRCDIR/testdata/printing/example.ps ||
+   $samba_argv_wrapper $samba_smbspool smb://$SERVER_IP/print1 200 
$USERNAME "Testprint" 1 "options" <$SRCDIR/testdata/printing/example.ps ||
failed=$(expr $failed + 1)
 unset DEVICE_URI
 


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2023-08-30 Thread Pavel Filipensky
The branch, master has been updated
   via  3fbc514a2c3 docs:smbdotconf: Inform that changing 'winbind max 
domain connections' needs a restart
   via  8abac09763a s3:winbindd: Use a correct value for the length of 
domain children
   via  b13d4370d2b s3:winbindd: Avoid doing the same assignment twice
  from  3afa27a01ca mdssvc: better support for search with mdfind from Macs

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


- Log -
commit 3fbc514a2c350daa358a3a172df63b6ca9056c2e
Author: Pavel Filipenský 
Date:   Mon Aug 28 09:44:39 2023 +0200

docs:smbdotconf: Inform that changing 'winbind max domain connections' 
needs a restart

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Wed Aug 30 13:37:37 UTC 2023 on atb-devel-224

commit 8abac09763aa06ad7137b9de35d18b5528e4033b
Author: Pavel Filipenský 
Date:   Fri Aug 25 09:50:56 2023 +0200

s3:winbindd: Use a correct value for the length of domain children

We often loop over the array of domain children. However, the size of
the array is calculated as lp_winbind_max_domain_connections() which can
change (it is based on smb.conf). The fix is the talloc_array_length().

Reproducer:

winbind max domain connections = 100

smbcontrol all reload-config
smbcontrol all debug 10

/var/log/samba/log.winbindd shows many lines with random garbage pid:

[2023/08/25 10:03:49.898994, 10, pid=158296, effective(0, 0), real(0, 0), 
class=winbind] ../../source3/winbindd/winbindd_dual.c:885(winbind_msg_relay_fn)
  winbind_msg_relay_fn: sending message to pid 1037686087.
[2023/08/25 10:03:49.899010,  3, pid=158296, effective(0, 0), real(0, 0)] 
../../source3/lib/util_procid.c:53(pid_to_procid)
  pid_to_procid: messaging_dgm_get_unique failed: No such file or directory

In this scenario we dereference only a garbage PID, but if we would
dereference some garbage pointer we would segfault.

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

commit b13d4370d2bbf6efc92ee6bb97efaa74eb9536d1
Author: Pavel Filipenský 
Date:   Thu Aug 24 15:42:12 2023 +0200

s3:winbindd: Avoid doing the same assignment twice

Done already in setup_child(): child->domain = domain

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

---

Summary of changes:
 docs-xml/smbdotconf/winbind/winbindmaxdomainconnections.xml | 1 +
 source3/winbindd/winbindd_domain.c  | 3 +--
 source3/winbindd/winbindd_dual.c| 4 ++--
 source3/winbindd/winbindd_ndr.c | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/winbind/winbindmaxdomainconnections.xml 
b/docs-xml/smbdotconf/winbind/winbindmaxdomainconnections.xml
index be39143eb08..5cd846e0a31 100644
--- a/docs-xml/smbdotconf/winbind/winbindmaxdomainconnections.xml
+++ b/docs-xml/smbdotconf/winbind/winbindmaxdomainconnections.xml
@@ -11,6 +11,7 @@
Setting this parameter to a value greater than 1 can improve
scalability with many simultaneous winbind requests,
some of which might be slow.
+   Changing this value requires a restart of winbindd.


Note that if  is set to
diff --git a/source3/winbindd/winbindd_domain.c 
b/source3/winbindd/winbindd_domain.c
index b1027735c8a..4c8aa9a278f 100644
--- a/source3/winbindd/winbindd_domain.c
+++ b/source3/winbindd/winbindd_domain.c
@@ -29,9 +29,8 @@ void setup_domain_child(struct winbindd_domain *domain)
 {
int i;
 
-for (i=0; ichildren); i++) {
 setup_child(domain, >children[i],
 "log.wb", domain->name);
-   domain->children[i].domain = domain;
}
 }
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index dadae1d3eda..313e11f149c 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -62,7 +62,7 @@ static void forall_domain_children(bool (*fn)(struct 
winbindd_child *c,
for (d = domain_list(); d != NULL; d = d->next) {
int i;
 
-   for (i = 0; i < lp_winbind_max_domain_connections(); i++) {
+   for (i = 0; i < talloc_array_length(d->children); i++) {
struct winbindd_child *c = >children[i];
bool ok;
 
@@ -434,7 +434,7 @@ static struct winbindd_child *choose_domain_child(struct 
winbindd_domain *domain
struct winbindd_child *current;
int i;
 
-   for (i=0; ichildren); i++) {
size_t shortest_len, current_len;
 

[SCM] Samba Shared Repository - branch master updated

2023-07-25 Thread Pavel Filipensky
The branch, master has been updated
   via  dd998cc1633 s3:winbindd: Fix double close(fd)
  from  61c951e063e mdscli: correct handling of in-progress searches

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


- Log -
commit dd998cc163358edd6c748e40900247877f91eb1f
Author: Pavel Filipenský 
Date:   Tue Jul 25 11:16:56 2023 +0200

s3:winbindd: Fix double close(fd)

Reported by Red Hat internal coverity

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15433

Signed-off-by: Pavel Filipenský 
Reviewed-by: Ralph Boehme 

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Tue Jul 25 12:08:49 UTC 2023 on atb-devel-224

---

Summary of changes:
 source3/winbindd/winbindd_cm.c | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 23dbb9c0cb7..9f56596669b 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -708,6 +708,7 @@ static NTSTATUS cm_prepare_connection(struct 
winbindd_domain *domain,
 * connect to a foreign domain
 * without a direct outbound trust.
 */
+   close(sockfd);
return NT_STATUS_NO_TRUST_LSA_SECRET;
}
 
@@ -761,6 +762,13 @@ static NTSTATUS cm_prepare_connection(struct 
winbindd_domain *domain,
goto done;
}
 
+   /*
+* cm_prepare_connection() is responsible that sockfd does not leak.
+* Once cli_state_create() returns with success, the
+* smbXcli_conn_destructor() makes sure that close(sockfd) is finally
+* called. Till that, close(sockfd) must be called on every unsuccessful
+* return.
+*/
*cli = cli_state_create(NULL, sockfd, controller,
smb_sign_client_connections, flags);
if (*cli == NULL) {
@@ -1749,8 +1757,6 @@ static NTSTATUS cm_open_connection(struct winbindd_domain 
*domain,
if (NT_STATUS_IS_OK(result)) {
break;
}
-   close(fd);
-   fd = -1;
if (!retry) {
break;
}


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2023-07-20 Thread Pavel Filipensky
The branch, master has been updated
   via  ca5cc05b22b s3:script: Replace --merge by --merge-by-timestamp in 
samba-log-parser
   via  16386bfd4cd docs-xml:manpages: Fix tabs in samba-log-parser.1.xml
  from  6539f1e4cd6 s3:winbindd: Change the TALLOC_CTX to fix the tevent 
call depth tracking

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


- Log -
commit ca5cc05b22bf92dd7236d2c0d4a424340a0048f3
Author: Pavel Filipenský 
Date:   Wed Jun 28 14:59:29 2023 +0200

s3:script: Replace --merge by --merge-by-timestamp in samba-log-parser

For --merge-by-timestamp the traces do not need to contain the traceid
header field.

Signed-off-by: Pavel Filipenský 
Reviewed-by: Douglas Bagnall 

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Thu Jul 20 19:14:05 UTC 2023 on atb-devel-224

commit 16386bfd4cd10bbb4a5588973220212287a2f868
Author: Pavel Filipenský 
Date:   Wed Jun 28 16:51:35 2023 +0200

docs-xml:manpages: Fix tabs in samba-log-parser.1.xml

Signed-off-by: Pavel Filipenský 
Reviewed-by: Douglas Bagnall 

---

Summary of changes:
 docs-xml/manpages/samba-log-parser.1.xml |  43 -
 source3/script/samba-log-parser  | 103 ---
 2 files changed, 106 insertions(+), 40 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/samba-log-parser.1.xml 
b/docs-xml/manpages/samba-log-parser.1.xml
index ea6fd9150df..7a62cd10a47 100644
--- a/docs-xml/manpages/samba-log-parser.1.xml
+++ b/docs-xml/manpages/samba-log-parser.1.xml
@@ -20,7 +20,7 @@ options:
   --traceid ID   specify the traceid of the trace records
   --pid PID  specify the pid of winbind client
   --breakdownbreakdown the traces into per traceid files
-  --mergemerge logs by timestamp
+  --merge-by-timestamp   merge logs by timestamp
   --flow show the request/sub-request flow traces
   --flow-compact show the request/sub-request flow traces without dcerpc 
details
 
@@ -29,9 +29,9 @@ options:
samba-log-parser
path
--pid=PID
-   --traceid=ID
-   --breakdown
-   --merge
+   --traceid=ID
+   --breakdown
+   --merge-by-timestamp
--flow
--flow-compact
-h|--help
@@ -70,31 +70,32 @@ options:
 

--breakdown
-   Break down all traces to separate files in the current
-   working directory. For each traceid, three files are created:
-   traceid.full
-   traceid.flow
-   traceid.flowcompact
+   Break down all traces to separate files in the 
current
+   working directory. For each traceid, three files are created:
+   traceid.full
+   traceid.flow
+   traceid.flowcompact


 

-   --merge
-   Sort the trace lines according to the timestamp.
-   
+   --merge-by-timestamp
+   Sort the trace lines according to the timestamp.
+   Works with log files without traceid header field as well.
+   

 
 

--flow
-   Display the request/sub-request flow.
+   Display the request/sub-request flow.


 

--flow-compact
-   Display the request/sub-request flow without dcerpc
-   call details.
+   Display the request/sub-request flow without 
dcerpc
+   call details.


 
@@ -118,7 +119,7 @@ options:

 

-   # samba-log-parser --pid 99 --merge /var/log/samba
+   # samba-log-parser --pid 99 --merge-by-timestamp /var/log/samba

 
Break down the traces into separate files according to traceid 
sorted
@@ -126,7 +127,15 @@ options:

 

-   # samba-log-parser --breakdown --merge /var/log/samba
+   # samba-log-parser --breakdown --merge-by-timestamp /var/log/samba
+   
+
+   Sort traces using the timestamp for log files found in the samba 
log
+   directory. Traces do not need to contain the traceid header field.
+   
+
+   
+   # samba-log-parser --merge-by-timestamp /var/log/samba

 
 
diff --git a/source3/script/samba-log-parser b/source3/script/samba-log-parser
index 1c1d2ced33d..a07dfdb4a6c 100755
--- a/source3/script/samba-log-parser
+++ b/source3/script/samba-log-parser
@@ -5,11 +5,12 @@
 # A script to parse samba (especially winbind) logfiles.
 # Trace files should be in a non-syslog format (debug syslog format = no).
 #
-#--traceid  ...  Specify the traceid of the request to parse
-#--pid

[SCM] Samba Shared Repository - branch master updated

2023-07-20 Thread Pavel Filipensky
The branch, master has been updated
   via  6539f1e4cd6 s3:winbindd: Change the TALLOC_CTX to fix the tevent 
call depth tracking
  from  801772012eb Revert "s3:winbindd: set TEVENT_DEPRECATED as 
tevent_thread_call_depth_*() api will change soon"

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


- Log -
commit 6539f1e4cd6dfb309ff19f403994d9ec52b6bb03
Author: Pavel Filipenský 
Date:   Wed Jul 19 11:33:56 2023 +0200

s3:winbindd: Change the TALLOC_CTX to fix the tevent call depth tracking

Call depth is not working for winbindd_list_users_send as expected,
it is visible in the flow traces:

  -> process_request_send
  -> winbindd_list_users_send
  -> wb_query_user_list_send

It should look like:

  -> process_request_send
  -> winbindd_list_users_send
  -> wb_query_user_list_send

Tevent call depth tracking internal implementation relies on the fact
that the talloc memory context has type  "struct tevent_req".
Then it can obtain the depth from the parent and increment it by one.

The implementation of winbindd_list_users_send() is passing to
wb_query_user_list_send() context of type
"struct winbindd_list_users_state", and from there the parent
"struct tevent_req" cannot be identified.

So we will pass as TALLOC_CTX 'state' instead of 'state->domains'.
After the call, we can reparent back.

Signed-off-by: Pavel Filipenský 
Reviewed-by: Stefan Metzmacher 

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Thu Jul 20 10:38:19 UTC 2023 on atb-devel-224

---

Summary of changes:
 source3/winbindd/winbindd_list_users.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_list_users.c 
b/source3/winbindd/winbindd_list_users.c
index 7acc3f7d761..8630672c323 100644
--- a/source3/winbindd/winbindd_list_users.c
+++ b/source3/winbindd/winbindd_list_users.c
@@ -100,9 +100,15 @@ struct tevent_req *winbindd_list_users_send(TALLOC_CTX 
*mem_ctx,
 
for (i=0; inum_domains; i++) {
struct winbindd_list_users_domstate *d = >domains[i];
-
-   d->subreq = wb_query_user_list_send(
-   state->domains, ev, d->domain);
+   /*
+* Use "state" as a talloc memory context since it has type
+* "struct tevent_req". This is needed to make tevent call depth
+* tracking working as expected.
+* After calling wb_query_user_list_send(), re-parent back to
+* "state->domains" to make TALLOC_FREE(state->domains) working.
+*/
+   d->subreq = wb_query_user_list_send(state, ev, d->domain);
+   d->subreq = talloc_reparent(state, state->domains, d->subreq);
if (tevent_req_nomem(d->subreq, req)) {
TALLOC_FREE(state->domains);
return tevent_req_post(req, ev);


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2023-03-28 Thread Pavel Filipensky
The branch, master has been updated
   via  a11d6fe5907 s3:winbind: Fix wrong string zero termination for empty 
groups
  from  d964700a19b ctdb:utils: Fix code spelling

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


- Log -
commit a11d6fe5907c9d5aab9365be66d0c1176e2b9ec9
Author: Pavel Filipenský 
Date:   Sat Mar 25 21:37:38 2023 +0100

s3:winbind: Fix wrong string zero termination for empty groups

Signed-off-by: Pavel Filipenský 
Reviewed-by: Volker Lendecke 

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Tue Mar 28 08:36:50 UTC 2023 on atb-devel-224

---

Summary of changes:
 source3/winbindd/winbindd_group.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_group.c 
b/source3/winbindd/winbindd_group.c
index a90889ec36f..b5bb60fca6c 100644
--- a/source3/winbindd/winbindd_group.c
+++ b/source3/winbindd/winbindd_group.c
@@ -145,7 +145,9 @@ NTSTATUS winbindd_print_groupmembers(struct db_context 
*members,
DBG_NOTICE("dbwrap_traverse failed: %s\n", nt_errstr(status));
return status;
}
-   m.buf[c.len-1] = '\0';
+   if (c.len > 0) {
+   m.buf[c.len - 1] = '\0';
+   }
 
*num_members = c.num;
*result = m.buf;


-- 
Samba Shared Repository



[SCM] Samba Website Repository - branch master updated

2023-03-28 Thread Pavel Filipensky
The branch, master has been updated
   via  11d888d team: add Pavel Filipenský
  from  29a5b7a NEWS[4.17.6]: Samba 4.17.6 Available for Download

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


- Log -
commit 11d888df0c7641d759cd961fcaff10579afb9d70
Author: Pavel Filipenský 
Date:   Tue Mar 28 09:59:31 2023 +0200

team: add Pavel Filipenský

---

Summary of changes:
 team/index.html | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/team/index.html b/team/index.html
index 5154a94..2ab7830 100755
--- a/team/index.html
+++ b/team/index.html
@@ -64,6 +64,7 @@ mailing list and start contributing to the development of 
Samba.
 Samuel Cabrero(https://www.suse.com/;>SUSE)
 https://www.samba.org/~gd;>Gnther Deschner(https://www.redhat.com/;>Red Hat)
 mailto:dd...@samba.org;>David Disseldorp(https://www.suse.com/;>SUSE)
+mailto:pfilipen...@samba.org;>Pavel 
Filipensk(https://www.redhat.com/;>Red Hat)
 mailto:sfre...@samba.org;>Steve French
 http://ubiqx.org/;>Chris Hertel
 mailto:ami...@samba.org;>Amitay Isaacs
@@ -71,11 +72,11 @@ mailing list and start contributing to the development 
of Samba.
 https://www.j3e.de/;>Bjrn Jacke(https://www.sernet.de/en/;>SerNet)
 https://www.samba.org/~jlayton/jlayton_resume.html;>Jeff 
Layton
 mailto:v...@samba.org;>Volker Lendecke(http://www.sernet.de/en/;>SerNet)
-mailto:h...@samba.org;>Herb Lewis
 
 
 
 
+mailto:h...@samba.org;>Herb Lewis
 mailto:derr...@samba.org;>Derrell Lipman
 mailto:g...@samba.org;>Gary Lockyer(http://catalyst.net.nz/what-we-offer/enterprise-solutions/samba;>Catalyst)
 mailto:j...@samba.org;>Jim McDonough(https://www.suse.com/;>SUSE)


-- 
Samba Website Repository



[SCM] Samba Shared Repository - branch master updated

2023-02-13 Thread Pavel Filipensky
The branch, master has been updated
   via  58cdcce582d Add gitleaks configuration file to avoid false positives
  from  cc4e11d0282 smbd: Remove smbXsrv_open_global0->db_rec

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


- Log -
commit 58cdcce582d3d70bf946075ffa85e77ee190d2d2
Author: Pavel Filipenský 
Date:   Fri Feb 3 11:29:37 2023 +0100

Add gitleaks configuration file to avoid false positives

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Mon Feb 13 18:45:21 UTC 2023 on atb-devel-224

---

Summary of changes:
 .gitleaks.toml | 16 
 1 file changed, 16 insertions(+)
 create mode 100644 .gitleaks.toml


Changeset truncated at 500 lines:

diff --git a/.gitleaks.toml b/.gitleaks.toml
new file mode 100644
index 000..721d0d982e0
--- /dev/null
+++ b/.gitleaks.toml
@@ -0,0 +1,16 @@
+#
+# GitLeaks Repo Specific Configuration
+#
+# This allowlist is used to help Red Hat ignore false positives during its code
+# scans.
+
+[allowlist]
+  paths = [
+'''docs-xml/manpages/smbstatus.1.xml''',
+'''selftests/*''',
+'''source3/script/tests/*''',
+'''source4/dsdb/tests/*''',
+'''source4/torture/*''',
+'''testprogs/blackbox/*''',
+'''tests/*''',
+  ]


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2022-08-22 Thread Pavel Filipensky
The branch, master has been updated
   via  339e78f2075 gitlab-ci: Add a shellcheck runner
   via  f12aa54ba0d testprogs: Fix shellcheck errors in 
upgradeprovision-oldrelease.sh
   via  c4ba21bc770 testprogs: Fix shellcheck errors in test_wintest.sh
   via  355f620653f testprogs: Fix shellcheck errors in 
test_weak_crypto_server.sh
   via  cd24e2dfb79 testprogs: Fix shellchecks errors in test_pdbtest.sh
   via  150cbc0f3a9 testprogs: Fix shellcheck errors in 
test_password_settings.sh
   via  d9ebb77c11e testprogs: Fix shellcheck errors in 
test_kpasswd_heimdal.sh
   via  1e4ea99e5ff testprogs: Fix shellcheck errors in 
test_kinit_trusts_mit.sh
   via  391d0cf667d testprogs: Fix shellcheck errors in 
test_kinit_heimdal.sh
   via  4aa50e72b04 testprogs: Fix shellcheck errors in 
test_kinit_trusts_heimdal.sh
   via  4ce5d8df254 testprogs: Fix shellcheck errors in test_kinit_mit.sh
   via  e4a4ce9cc8e testprogs: Fix shellcheck errors in 
test_export_keytab_mit.sh
   via  edf0433204e testprogs: Fix shellcheck errors in 
test_export_keytab_heimdal.sh
   via  5dd28adeea9 testprogs: Fix shellcheck errors in test_chgdcpass.sh
   via  447e6b92910 testprogs: Fix shellcheck errors in 
dbcheck-oldrelease.sh
   via  4b19bbaa93a s4:utils: Fix shellcheck errors in test_samba_tool.sh
   via  cbf1f8904bc s4:torture: Fix shellcheck errors in test_masktest.sh
   via  0618bd8a6c9 s4:tortue: Fix shellcheck errors in test_locktest.sh
   via  7a89d22bed3 s4:torture: Fix shellcheck errors in test_gentest.sh
   via  8c1c63aab82 s4:selftest: Fix shellcheck errors in wintest_rpc.sh
  from  b7a024e4ef8 s4:selftest: Fix shellcheck errors in wintest_net.sh

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


- Log -
commit 339e78f2075a7c0bbf780063597892ba56dac390
Author: Andreas Schneider 
Date:   Mon Feb 21 11:36:39 2022 +0100

gitlab-ci: Add a shellcheck runner

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Mon Aug 22 21:30:09 UTC 2022 on sn-devel-184

commit f12aa54ba0d38fc5c6412a3cfb9152af969258ac
Author: Andreas Schneider 
Date:   Mon Jun 13 16:11:31 2022 +0200

testprogs: Fix shellcheck errors in upgradeprovision-oldrelease.sh

testprogs/blackbox/upgradeprovision-oldrelease.sh:134:103: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/upgradeprovision-oldrelease.sh:140:117: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/upgradeprovision-oldrelease.sh:145:105: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/upgradeprovision-oldrelease.sh:151:122: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/upgradeprovision-oldrelease.sh:156:110: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/upgradeprovision-oldrelease.sh:162:134: error: Double
quote array expansions to avoid re-splitting elements. [SC2068]

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

commit c4ba21bc770e17139edf052dc55fd9dd9485b134
Author: Andreas Schneider 
Date:   Mon Jun 13 16:08:40 2022 +0200

testprogs: Fix shellcheck errors in test_wintest.sh

testprogs/blackbox/test_wintest.sh:15:97: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_wintest.sh:40:31: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

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

commit 355f620653fdc377673fde146e369c243bc9098f
Author: Andreas Schneider 
Date:   Mon Jun 13 16:07:21 2022 +0200

testprogs: Fix shellcheck errors in test_weak_crypto_server.sh

testprogs/blackbox/test_weak_crypto_server.sh:59:65: error: Use braces
when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
[SC1087]

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

commit cd24e2dfb792d261814d88517eb893cb8d50ab75
Author: Andreas Schneider 
Date:   Mon Jun 13 16:03:39 2022 +0200

testprogs: Fix shellchecks errors in test_pdbtest.sh

testprogs/blackbox/test_pdbtest.sh:61:53: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:73:157: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:76:79: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

testprogs/blackbox/test_pdbtest.sh:78:92: error: Double quote array
expansions

[SCM] Samba Shared Repository - branch master updated

2022-08-22 Thread Pavel Filipensky
The branch, master has been updated
   via  b7a024e4ef8 s4:selftest: Fix shellcheck errors in wintest_net.sh
   via  b1e80d02c76 s4:setup: Fix shellcheck errors in 
provision_fileperms.sh
   via  6c2871429f8 s4:selftest: Fix shellcheck errors in wintest_2k3_dc.sh
   via  4b2f4189491 s4:selftest: Fix shellcheck errors in test_w2k3.sh
   via  d85a2dbfd78 s4:script: Fix shellcheck errors in 
find_unused_options.sh
   via  866b8dcb547 s4:client: Fix shellcheck errors in test_smbclient.sh
   via  a82301d5f2c testprogs: Fix shellcheck errors in common_test_fns.inc
   via  25e9a74e2eb s3:script: Fix shellcheck errors in test_smbstatus.sh
   via  a8b19ebfc81 s3:script: Fix shellcheck errors in test_smbspool.sh
   via  47eacce86be s3:script: Fix shellcheck errors in test_smbclient_s3.sh
   via  ae67e068be9 s3:script: Fix shellcheck errors in 
test_rpcclient_samlogon.sh
   via  4abfa262b23 s3:script: Fix shellcheck errors in 
test_preserve_case.sh
   via  4edb4d979bf s3:script: Fix shellcheck errors in 
test_net_registry_roundtrip.sh
   via  6f65ecfe5a3 s3:script: Fix shellcheck errors in 
test_net_registry_check.sh
   via  4c02eb4df34 s3:script: Fix shellcheck errors in test_net_lookup.sh
   via  8b359fa4df8 s3:script: Fix shellcheck errors in 
test_net_cred_change.sh
   via  249b8e8af8c s3:script: Fix shellcheck errors in test_dfree_quota.sh
   via  8c23b829a12 s3:script: Fix shellcheck errors in 
test_dfree_command.sh
   via  3f080f7db6f s3:script: Fix shellcheck errors in dlopen.sh
   via  4b87e58fe43 s3:script: Fix shellcheck errors in mksyms.sh
  from  75e03ea021a libcli/smb: Set error status if 'iov' pointer is NULL

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


- Log -
commit b7a024e4ef8f0cbc40a125f91d03e5ce526f1052
Author: Andreas Schneider 
Date:   Mon Jun 13 11:26:38 2022 +0200

s4:selftest: Fix shellcheck errors in wintest_net.sh

source4/selftest/win/wintest_net.sh:57:27: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Mon Aug 22 15:15:11 UTC 2022 on sn-devel-184

commit b1e80d02c761879ef526d7d80195e3a812b6bffc
Author: Andreas Schneider 
Date:   Fri Jun 10 13:29:19 2022 +0200

s4:setup: Fix shellcheck errors in provision_fileperms.sh

source4/setup/tests/provision_fileperms.sh:27:14: error: Iterating over
ls output is fragile. Use globs. [SC2045]

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

commit 6c2871429f8cfc7b480fcae9e944d75709ff74ee
Author: Andreas Schneider 
Date:   Fri Jun 10 13:22:00 2022 +0200

s4:selftest: Fix shellcheck errors in wintest_2k3_dc.sh

source4/selftest/win/wintest_2k3_dc.sh:57:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

source4/selftest/win/wintest_2k3_dc.sh:62:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

source4/selftest/win/wintest_2k3_dc.sh:85:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

source4/selftest/win/wintest_2k3_dc.sh:101:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

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

commit 4b2f4189491dfe5fc5d31689a87694730986b71d
Author: Andreas Schneider 
Date:   Fri Jun 10 13:10:07 2022 +0200

s4:selftest: Fix shellcheck errors in test_w2k3.sh

source4/selftest/test_w2k3.sh:40:67: error: Use braces when expanding
arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

source4/selftest/test_w2k3.sh:46:66: error: Use braces when expanding
arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

source4/selftest/test_w2k3.sh:48:66: error: Use braces when expanding
arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

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

commit d85a2dbfd78ed58219f6572b7a5ae08d2422464d
Author: Andreas Schneider 
Date:   Fri Jun 10 13:07:49 2022 +0200

s4:script: Fix shellcheck errors in find_unused_options.sh

source4/script/find_unused_options.sh:20:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

source4/script/find_unused_options.sh:30:16: error: Use braces when
expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet). [SC1087]

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

commit 866b8dcb54750304371fa2457c1b1f859328049e
Author: Andreas Schneider 
Date:   Fri Jun 10 13:05:37 2022 +0200

s4

[SCM] Samba Shared Repository - branch master updated

2022-08-17 Thread Pavel Filipensky
The branch, master has been updated
   via  e4371a4c3b8 release-script: Fix shellcheck errors
   via  233a0cd6de9 lib:fuzzing: Fix shellcheck errors in build_samba.sh
   via  72f16b63544 nsswitch: Fix shellcheck errors in 
test_rfc2307_mapping.sh
   via  c3823ff371f examples: Fix shellcheck error in 
VampireDriversFunctions
   via  fe33eaba026 examples: Remove trailing spaces in 
VampireDriversFunctions
   via  0461fa13d4a examples: Fix shellcheck error in get_next_oid
   via  9594778895e testprogs: Fix variable asignment in test_wintest.sh
   via  665db976626 s3:script: Fix variable asignment in 
test_dfree_command.sh
   via  b696ae1b02b script: Add script to run shellcheck on shell scripts
   via  5ae4a6249f6 bootstrap: Install ShellCheck and shfmt
  from  f92bacbe216 s3/smbd: Use after free when iterating 
smbd_server_connection->connections

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


- Log -
commit e4371a4c3b891ae4e88bd91cda8eb84eb7304e04
Author: Andreas Schneider 
Date:   Wed Feb 23 12:19:19 2022 +0100

release-script: Fix shellcheck errors

./release-scripts/build-docs:4:7: error: Double quote array expansions
to avoid re-splitting elements. [SC2068]

Same error for the other scripts.

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Wed Aug 17 11:03:54 UTC 2022 on sn-devel-184

commit 233a0cd6de9d0d0aac07f1f8d753780e53dbe2b0
Author: Andreas Schneider 
Date:   Tue Feb 22 18:01:31 2022 +0100

lib:fuzzing: Fix shellcheck errors in build_samba.sh

lib/fuzzing/oss-fuzz/build_samba.sh:24:27: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

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

commit 72f16b635445025a9b523974ba08c753ea78ed58
Author: Andreas Schneider 
Date:   Tue Feb 22 17:58:47 2022 +0100

nsswitch: Fix shellcheck errors in test_rfc2307_mapping.sh

nsswitch/tests/test_rfc2307_mapping.sh:65:139: error: Double quote array
expansions to avoid re-splitting elements. [SC2068]

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

commit c3823ff371fe5c605ddaa61a3c76bc233d5f1501
Author: Andreas Schneider 
Date:   Tue Feb 22 17:50:34 2022 +0100

examples: Fix shellcheck error in VampireDriversFunctions

examples/printing/VampireDriversFunctions:183:24: error: Double quote
array expansions to avoid re-splitting elements. [SC2068]

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

commit fe33eaba026cab7881ab07e424e4dde94d896a1e
Author: Andreas Schneider 
Date:   Tue Feb 22 17:51:16 2022 +0100

examples: Remove trailing spaces in VampireDriversFunctions

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

commit 0461fa13d4af0565ed885873cfdad18bb07ba9fd
Author: Andreas Schneider 
Date:   Tue Feb 22 17:42:55 2022 +0100

examples: Fix shellcheck error in get_next_oid

examples/LDAP/get_next_oid:6:4: error: Remove spaces around += to assign
(or quote '+=' if literal). [SC2285]

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

commit 9594778895ee1be90c491c9b1d13c97cce16cc53
Author: Andreas Schneider 
Date:   Mon Feb 21 11:24:07 2022 +0100

testprogs: Fix variable asignment in test_wintest.sh

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

commit 665db97662664cc8f657a9d3b1af286748356e76
Author: Andreas Schneider 
Date:   Mon Feb 21 11:23:27 2022 +0100

s3:script: Fix variable asignment in test_dfree_command.sh

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

commit b696ae1b02bdcbaa58d863ba23ecb945f904d81f
Author: Andreas Schneider 
Date:   Mon Feb 21 11:25:37 2022 +0100

script: Add script to run shellcheck on shell scripts

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

commit 5ae4a6249f6228c6c231ca79138790943673efe6
Author: Andreas Schneider 
Date:   Mon Feb 21 11:29:29 2022 +0100

bootstrap: Install ShellCheck and shfmt

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

---

Summary of changes:
 .gitlab-ci-main.yml  |   2 +-
 bootstrap/config.py  |   8 +
 bootstrap/generated-dists/f36mit120/bootstrap.sh |   2 +
 bootstrap/generated-dists/f36mit120/packages.yml |   2 +
 bootstrap/generated-dists/fedora36/bootstrap.sh  |   2 +
 bootstrap/generated-dists/fedora36/packages.yml  |   2 +
 bootstrap/sha1sum.txt|   2 +-
 examples/LDAP/get_next_oid   |   4 +-
 examples/printing/VampireDriversFunctions| 

[SCM] Samba Shared Repository - branch master updated

2022-08-10 Thread Pavel Filipensky
The branch, master has been updated
   via  042141efdb5 third_party: Reformat shell scripts
   via  bb2e0622f04 testsuite: Reformat shell scripts
   via  db8849ea05e testprogs: Reformat upgradeprovision-oldrelease.sh
   via  c1325fc1fdc testprogs: Reformat tombstones-expunge.sh
   via  022f5aa77b8 testprogs: Reformat test_wintest.sh
   via  1c89bdb6a90 testprogs: Reformat test_weak_disable_ntlmssp_ldap.sh
   via  4973baf665f testprogs: Reformat test_weak_crypto_server.sh
   via  34322c499ee testprogs: Reformat test_weak_crypto.sh
   via  138e7f0505b testprogs: Reformat test_trust_utils.sh
   via  8c65813c4a5 testprogs: Reformat test_trust_user_account.sh
   via  eced0939154 testprogs: Reformat test_trust_token.sh
   via  12d67003cee testprogs: Reformat test_trust_ntlm.sh
  from  854a45ca24a testprogs: Reformat test_special_group.sh

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


- Log -
commit 042141efdb56d1e8d9f0246c9dff3a6c4329b8d4
Author: Andreas Schneider 
Date:   Wed Feb 23 12:11:07 2022 +0100

third_party: Reformat shell scripts

shfmt -w -p -i 0 -fn third_party/update.sh
shfmt -w -p -i 0 -fn third_party/waf/update.sh

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Wed Aug 10 14:14:04 UTC 2022 on sn-devel-184

commit bb2e0622f04355bc3c8ac7dc8d0d6dcf7a66b107
Author: Andreas Schneider 
Date:   Wed Feb 23 12:12:09 2022 +0100

testsuite: Reformat shell scripts

shfmt -f testsuite/ | xargs shfmt -w -p -i 0 -fn

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

commit db8849ea05ec9b5e7a6873d576b3469ddf77f8af
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:06 2022 +0200

testprogs: Reformat upgradeprovision-oldrelease.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/upgradeprovision-oldrelease.sh

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

commit c1325fc1fdc2e4684c934d14f0d395ed8cfab66a
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:06 2022 +0200

testprogs: Reformat tombstones-expunge.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/tombstones-expunge.sh

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

commit 022f5aa77b828c460530ae03e18fdc92ae525257
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:06 2022 +0200

testprogs: Reformat test_wintest.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_wintest.sh

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

commit 1c89bdb6a900b6184f53a27d5d5ea01221969418
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:06 2022 +0200

testprogs: Reformat test_weak_disable_ntlmssp_ldap.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_weak_disable_ntlmssp_ldap.sh

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

commit 4973baf665fda140fb861adc9127e7a3a0799c9b
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:06 2022 +0200

testprogs: Reformat test_weak_crypto_server.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_weak_crypto_server.sh

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

commit 34322c499ee996b75e82da6a18fe6c59f2fb66b1
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:06 2022 +0200

testprogs: Reformat test_weak_crypto.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_weak_crypto.sh

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

commit 138e7f0505bd6e54b26ac673356318f2dafc0f37
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:06 2022 +0200

testprogs: Reformat test_trust_utils.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_trust_utils.sh

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

commit 8c65813c4a5ce2ffd1105ae93b9f339e3d570d65
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_trust_user_account.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_trust_user_account.sh

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

commit eced0939154837d4bef7ff0d9e6c1b41dabe1948
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_trust_token.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_trust_token.sh

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

commit 12d67003cee004b1b25ef187e89c76ec8335d255
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_trust_ntlm.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_trust_ntlm.sh

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

[SCM] Samba Shared Repository - branch master updated

2022-08-10 Thread Pavel Filipensky
The branch, master has been updated
   via  854a45ca24a testprogs: Reformat test_special_group.sh
   via  2d64eafa8be testprogs: Reformat test_smbtorture_test_names.sh
   via  dae369f483c testprogs: Reformat test_samba_upgradedns.sh
   via  eff28db8d6a testprogs: Reformat test_samba-tool_ntacl.sh
   via  f1ebc2d78f7 testprogs: Reformat test_s4u_heimdal.sh
   via  4627320e940 testprogs: Reformat test_rpcclient_schannel.sh
   via  ef9dc7277e4 testprogs: Reformat test_primary_group.sh
   via  6e300ccd192 testprogs: Reformat test_pkinit_simple.sh
   via  c253c99d529 testprogs: Reformat test_pkinit_pac.sh
   via  9d1a255232d testprogs: Reformat test_pdbtest.sh
   via  8490449f60f testprogs: Reformat test_password_settings.sh
   via  c7d01342047 testprogs: Reformat test_old_enctypes.sh
   via  0a4eb5d8922 testprogs: Reformat test_offline_logon.sh
   via  7403de7eaf7 testprogs: Reformat test_net_rpc_user.sh
   via  a43a7e78f9b testprogs: Reformat test_net_offline.sh
   via  8a4a8b7a3a3 testprogs: Reformat test_net_ads_fips.sh
   via  865531f9c68 testprogs: Reformat test_net_ads_dns.sh
   via  81f1694995d testprogs: Reformat test_net_ads.sh
   via  c44289ce1c8 testprogs: Reformat test_ldb_simple.sh
   via  19f73f19f4d testprogs: Reformat test_ldb.sh
  from  4d015b4b6db smbstatus: Fix the 32-bit build on FreeBSD

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


- Log -
commit 854a45ca24a8841a53fc5bcb46663f1204d6c24c
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_special_group.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_special_group.sh

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Wed Aug 10 10:21:48 UTC 2022 on sn-devel-184

commit 2d64eafa8be952e4a6b25359ced51422ed00060b
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_smbtorture_test_names.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_smbtorture_test_names.sh

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

commit dae369f483c1076de1edc209fde93a41d6091d16
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_samba_upgradedns.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_samba_upgradedns.sh

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

commit eff28db8d6ae68f93a2a1ea0522ec4ac466b06a8
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_samba-tool_ntacl.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_samba-tool_ntacl.sh

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

commit f1ebc2d78f7f9c54556931f0ed2aeb30103c2b81
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_s4u_heimdal.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_s4u_heimdal.sh

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

commit 4627320e94037972cd6f4a8f763ac0aa12146620
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_rpcclient_schannel.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_rpcclient_schannel.sh

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

commit ef9dc7277e4c5937711de61f7efc945b33eca124
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_primary_group.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_primary_group.sh

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

commit 6e300ccd19253b507d19d408f177db163fb6105f
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_pkinit_simple.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_pkinit_simple.sh

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

commit c253c99d5299a0787fc0de64c489f5394c2b4167
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_pkinit_pac.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_pkinit_pac.sh

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

commit 9d1a255232deba5ae352853e0d66afe6ecdbab09
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_pdbtest.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/test_pdbtest.sh

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

commit 8490449f60feeaf1686640bfeefe2083d40cdc4c
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:05 2022 +0200

testprogs: Reformat test_password_settings.sh

shfmt -w -p -i 0 -fn testprogs

[SCM] Samba Shared Repository - branch master updated

2022-08-04 Thread Pavel Filipensky
The branch, master has been updated
   via  0cdd204693b testprogs: Reformat dbcheck.sh
   via  ae3452244de testprogs: Reformat dbcheck-oldrelease.sh
   via  9757229b2b0 testprogs: Reformat dbcheck-links.sh
  from  61c6a00f550 mdssvc: check if the user closed the query before 
trying to read the HTTP response from Elasticsearch

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


- Log -
commit 0cdd204693bbf2f7dd102791a9614672fc6c2e8c
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:04 2022 +0200

testprogs: Reformat dbcheck.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/dbcheck.sh

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Thu Aug  4 10:11:30 UTC 2022 on sn-devel-184

commit ae3452244de69b8b2f31d41e3c9405d9d4e01bb1
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:04 2022 +0200

testprogs: Reformat dbcheck-oldrelease.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/dbcheck-oldrelease.sh

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

commit 9757229b2b0d80a61c86c3ac2966642b4074a30c
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:04 2022 +0200

testprogs: Reformat dbcheck-links.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/dbcheck-links.sh

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

---

Summary of changes:
 testprogs/blackbox/dbcheck-links.sh  | 1224 +++---
 testprogs/blackbox/dbcheck-oldrelease.sh |  624 +++
 testprogs/blackbox/dbcheck.sh|   30 +-
 3 files changed, 973 insertions(+), 905 deletions(-)


Changeset truncated at 500 lines:

diff --git a/testprogs/blackbox/dbcheck-links.sh 
b/testprogs/blackbox/dbcheck-links.sh
index 8f73fb86124..29fb5b85abc 100755
--- a/testprogs/blackbox/dbcheck-links.sh
+++ b/testprogs/blackbox/dbcheck-links.sh
@@ -1,158 +1,169 @@
 #!/bin/sh
 
 if [ $# -lt 1 ]; then
-cat < $tmpldif1
-
-$PYTHON $BINDIR/samba-tool dbcheck -H 
tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $3 --fix --yes > $tmpfile
-if [ "$?" != "$2" ]; then
-   return 1
-fi
-sort $tmpfile | grep -v "^INFO:" > $tmpfile.sorted
-sort $release_dir/expected-dbcheck-link-output${1}.txt > $tmpfile.expected
-diff -u $tmpfile.sorted $tmpfile.expected
-if [ "$?" != "0" ]; then
-   return 1
-fi
-
-tmpldif2=$PREFIX_ABS/$RELEASE/expected-dbcheck-output${1}2.txt.tmp2
-TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb 
--scope=base -b '' | grep highestCommittedUSN > $tmpldif2
-
-diff -u $tmpldif1 $tmpldif2
-if [ "$?" != "0" ]; then
-   return 1
-fi
-}
-
-dbcheck_dangling() {
-dbcheck "" "1" "--selftest-check-expired-tombstones"
-return $?
-}
-
-dbcheck_one_way() {
-dbcheck "_one_way" "0" 
"CN=Configuration,DC=release-4-5-0-pre1,DC=samba,DC=corp 
--selftest-check-expired-tombstones"
-return $?
-}
-
-dbcheck_clean() {
-tmpldif1=$PREFIX_ABS/$RELEASE/expected-dbcheck-output2.txt.tmp1
-
-TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb 
--scope=base -b '' | grep highestCommittedUSN > $tmpldif1
-
-$PYTHON $BINDIR/samba-tool dbcheck -H 
tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb
-if [ "$?" != "0" ]; then
-   return 1
-fi
-tmpldif2=$PREFIX_ABS/$RELEASE/expected-dbcheck-output2.txt.tmp2
-TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb 
--scope=base -b '' | grep highestCommittedUSN > $tmpldif2
-
-diff -u $tmpldif1 $tmpldif2
-if [ "$?" != "0" ]; then
-   return 1
-fi
-}
-
-check_expected_after_links() {
-tmpldif=$PREFIX_ABS/$RELEASE/expected-links-after-link-dbcheck.ldif.tmp
-TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb 
'(|(cn=swimmers)(cn=leaders)(cn=helpers))' --scope=sub -b 
DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --sorted member > $tmpldif
-diff -u $tmpldif $release_dir/expected-links-after-link-dbcheck.ldif
-if [ "$?" != "0" ]; then
-   return 1
-fi
-}
-
-check_expected_after_deleted_links() {
-
tmpldif=$PREFIX_ABS/$RELEASE/expected-deleted-links-after-link-dbcheck.ldif.tmp
-TZ=UTC $ldbsearch -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb 
'(|(cn=swimmers)(cn=leaders)(cn=helpers))' --scope=sub -b 
DC=release-4-5-0-pre1,DC=samba,DC=corp --show-deleted --reveal --sorted member 
> $tmpldif
-diff -u $tmpldif 
$release_dir/expected-deleted-links-after-link-dbcheck.ldif
-if [ "$?" != "0" ]; then
-   return 1
-fi
-}
-
-check_expe

[SCM] Samba Shared Repository - branch master updated

2022-07-20 Thread Pavel Filipensky
The branch, master has been updated
   via  4c12840e42b testprogs: Reformat common_test_fns.inc
   via  88c1173655f testprogs: Reformat common-links.sh
  from  f340b884724 waf: Check for -Wno-error=array-bounds flags

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


- Log -
commit 4c12840e42bde55c756851d38baea84b6a64823c
Author: Andreas Schneider 
Date:   Wed Jun 8 14:49:51 2022 +0200

testprogs: Reformat common_test_fns.inc

shfmt -w -p -i 0 -fn testprogs/blackbox/common_test_fns.inc

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Wed Jul 20 11:59:26 UTC 2022 on sn-devel-184

commit 88c1173655f7321a7c594cdfed505fd8b6b0d81f
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:04 2022 +0200

testprogs: Reformat common-links.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/common-links.sh

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

---

Summary of changes:
 testprogs/blackbox/common-links.sh | 393 +
 testprogs/blackbox/common_test_fns.inc |  28 ++-
 2 files changed, 222 insertions(+), 199 deletions(-)


Changeset truncated at 500 lines:

diff --git a/testprogs/blackbox/common-links.sh 
b/testprogs/blackbox/common-links.sh
index 363234ae11c..92cf730ffc0 100644
--- a/testprogs/blackbox/common-links.sh
+++ b/testprogs/blackbox/common-links.sh
@@ -2,216 +2,233 @@ release_dir=$SRCDIR_ABS/source4/selftest/provisions/$RELEASE
 
 ldbadd="ldbadd"
 if [ -x "$BINDIR/ldbadd" ]; then
-ldbadd="$BINDIR/ldbadd"
+   ldbadd="$BINDIR/ldbadd"
 fi
 
 ldbmodify="ldbmodify"
 if [ -x "$BINDIR/ldbmodify" ]; then
-ldbmodify="$BINDIR/ldbmodify"
+   ldbmodify="$BINDIR/ldbmodify"
 fi
 
 ldbdel="ldbdel"
 if [ -x "$BINDIR/ldbdel" ]; then
-ldbdel="$BINDIR/ldbdel"
+   ldbdel="$BINDIR/ldbdel"
 fi
 
 ldbsearch="ldbsearch"
 if [ -x "$BINDIR/ldbsearch" ]; then
-ldbsearch="$BINDIR/ldbsearch"
+   ldbsearch="$BINDIR/ldbsearch"
 fi
 
 ldbrename="ldbrename"
 if [ -x "$BINDIR/ldbrename" ]; then
-ldbrename="$BINDIR/ldbrename"
+   ldbrename="$BINDIR/ldbrename"
 fi
 
 samba_tdbrestore="tdbrestore"
 if [ -x "$BINDIR/tdbrestore" ]; then
-samba_tdbrestore="$BINDIR/tdbrestore"
+   samba_tdbrestore="$BINDIR/tdbrestore"
 fi
 
 samba_undump="$SRCDIR_ABS/source4/selftest/provisions/undump.sh"
 
-undump() {
-$samba_undump $release_dir $PREFIX_ABS/$RELEASE $samba_tdbrestore
-}
-
-add_dangling_link() {
-ldif=$release_dir/add-dangling-forwardlink-user.ldif
-TZ=UTC $ldbadd -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $ldif
-if [ "$?" != "0" ]; then
-   return 1
-fi
-
-ldif=$release_dir/add-initially-normal-link.ldif
-TZ=UTC $ldbmodify -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $ldif
-if [ "$?" != "0" ]; then
-   return 1
-fi
-
-ldif=$release_dir/delete-only-backlink.ldif
-TZ=UTC $ldbmodify -H 
tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb
 $ldif
-if [ "$?" != "0" ]; then
-   return 1
-fi
-}
-
-add_dangling_backlink() {
-ldif=$release_dir/add-dangling-backlink-user.ldif
-TZ=UTC $ldbadd -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $ldif
-if [ "$?" != "0" ]; then
-   return 1
-fi
-
-ldif=$release_dir/add-dangling-backlink.ldif
-TZ=UTC $ldbmodify -H 
tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb
 $ldif
-if [ "$?" != "0" ]; then
-   return 1
-fi
-}
-
-add_deleted_dangling_backlink() {
-ldif=$release_dir/add-deleted-backlink-user.ldif
-TZ=UTC $ldbadd -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $ldif
-if [ "$?" != "0" ]; then
-   return 1
-fi
-
-ldif=$release_dir/add-deleted-backlink.ldif
-TZ=UTC $ldbmodify -H 
tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb.d/DC%3DRELEASE-4-5-0-PRE1,DC%3DSAMBA,DC%3DCORP.ldb
 $ldif
-if [ "$?" != "0" ]; then
-   return 1
-fi
-}
-
-add_deleted_target_backlink() {
-ldif=$release_dir/add-deleted-target-backlink-user.ldif
-TZ=UTC $ldbadd -H tdb://$PREFIX_ABS/${RELEASE}/private/sam.ldb $ldif
-if [ "$?" != "0" ]; then
-   return 1
-fi
-
-ldif=$release_dir/add-deleted-target-backlink.ldif
-TZ=UTC $ldbmodify -H 
tdb://$PREFIX_ABS/${RELEASE}/p

[SCM] Samba Shared Repository - branch master updated

2022-07-15 Thread Pavel Filipensky
The branch, master has been updated
   via  bbc5abfa6d2 selftest: Do not skip working tests
   via  9923d50574c s4:torture: Rename rpc.samr.passwords tests
   via  3f63393e513 s4:selftest: Reformat rpc.samr.passwords 
plansmbtorture4testsuite
   via  c7925747dd6 s4:selftest: Reformat slow_ncacn_np_tests list
   via  d692c5a6a3b s3:selftest: Reformat rpc array
  from  30215a8a211 testprogs: Reformat bogus.sh

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


- Log -
commit bbc5abfa6d284ee46eb9e368950714467a2bd3ee
Author: Andreas Schneider 
Date:   Fri Jul 15 10:33:55 2022 +0200

selftest: Do not skip working tests

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Fri Jul 15 14:24:49 UTC 2022 on sn-devel-184

commit 9923d50574c07764318234ace91ee3bab4a0a7dc
Author: Andreas Schneider 
Date:   Fri Jul 15 10:09:02 2022 +0200

s4:torture: Rename rpc.samr.passwords tests

This way it is easier to select them with 'make test'.

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

commit 3f63393e5135f35967e5310d2d2e3dd129dd279c
Author: Andreas Schneider 
Date:   Fri Jul 15 10:08:09 2022 +0200

s4:selftest: Reformat rpc.samr.passwords plansmbtorture4testsuite

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

commit c7925747dd6d33235b050c0a476a24ccf611a990
Author: Andreas Schneider 
Date:   Fri Jul 15 10:06:36 2022 +0200

s4:selftest: Reformat slow_ncacn_np_tests list

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

commit d692c5a6a3b96b82ac24476c1b033e9c79197b92
Author: Andreas Schneider 
Date:   Fri Jul 15 10:05:44 2022 +0200

s3:selftest: Reformat rpc array

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

---

Summary of changes:
 selftest/skip |  3 ---
 source3/selftest/tests.py | 66 ---
 source4/selftest/tests.py | 16 ++--
 source4/torture/rpc/rpc.c |  2 +-
 4 files changed, 66 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/skip b/selftest/skip
index 0913f20d449..d5cc786f8a5 100644
--- a/selftest/skip
+++ b/selftest/skip
@@ -82,9 +82,6 @@
 ^samba4.smb2.zero-data-ioctl# For manual testing, needs additional 
parameters.
 ^samba4.raw.ping.pong  # Needs second server to test
 ^samba4.rpc.samr.accessmask
-^samba4.rpc.samr.passwords.*ncacn_np\(ad_dc_ntvfs\) # currently fails, 
possibly config issue
-^samba4.rpc.samr.passwords.*ncacn_np\(ad_dc_slowtests\) # currently fails, 
possibly config issue
-^samba4.rpc.samr.passwords.*s4member   # currently fails, possibly config 
issue
 ^samba4.raw.scan.eamax
 ^samba4.smb2.samba3misc
 ^samba4.smb2.notify
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 5acf89b0be4..a8f833d52a3 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -786,26 +786,62 @@ raw = ["raw.acls", "raw.chkpath", "raw.close", 
"raw.composite", "raw.context", "
 
 smb2 = smbtorture4_testsuites("smb2.")
 
-rpc = ["rpc.authcontext", "rpc.samba3.bind", "rpc.samba3.srvsvc", 
"rpc.samba3.sharesec",
-   "rpc.samba3.spoolss", "rpc.samba3.wkssvc", "rpc.samba3.winreg",
+rpc = ["rpc.authcontext",
+   "rpc.samba3.bind",
+   "rpc.samba3.srvsvc",
+   "rpc.samba3.sharesec",
+   "rpc.samba3.spoolss",
+   "rpc.samba3.wkssvc",
+   "rpc.samba3.winreg",
"rpc.samba3.getaliasmembership-0",
-   "rpc.samba3.netlogon", "rpc.samba3.sessionkey", 
"rpc.samba3.getusername",
-   "rpc.samba3.smb1-pipe-name", "rpc.samba3.smb2-pipe-name",
-   "rpc.samba3.smb-reauth1", "rpc.samba3.smb-reauth2",
-   "rpc.samba3.lsa_over_netlogon", "rpc.samba3.pipes_supported_interfaces",
-   "rpc.svcctl", "rpc.ntsvcs", "rpc.winreg", "rpc.eventlog",
-   "rpc.spoolss.printserver", "rpc.spoolss.win", "rpc.spoolss.notify", 
"rpc.spoolss.printer",
+   "rpc.samba3.netlogon",
+   "rpc.samba3.sessionkey",
+   "rpc.samba3.getusername",
+   "rpc.samba3.smb1-pipe-name",
+   "rpc.samba3.smb2-pipe-name",
+   "rpc.samba3.smb-reauth1",
+   "rpc.samba3.smb-reauth2",
+   "rpc.samba3.lsa_over_netlogon",
+   "rpc.samba3.pipes_su

[SCM] Samba Shared Repository - branch master updated

2022-07-15 Thread Pavel Filipensky
The branch, master has been updated
   via  30215a8a211 testprogs: Reformat bogus.sh
   via  bcd9794d64b s4:setup: Reformat shell scripts
   via  df29b9ab165 s4:selftest: Reformat shell scripts
  from  a6ccceb97eb nfs4_acls: Correctly skip chown when gid did not change

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


- Log -
commit 30215a8a21151686a6e5dde39db1aa47030c2d00
Author: Andreas Schneider 
Date:   Fri Apr 22 15:46:04 2022 +0200

testprogs: Reformat bogus.sh

shfmt -w -p -i 0 -fn testprogs/blackbox/bogus.sh

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Fri Jul 15 13:00:30 UTC 2022 on sn-devel-184

commit bcd9794d64bbd0639ee6b44fbe62256301e171cf
Author: Andreas Schneider 
Date:   Wed Feb 23 12:03:50 2022 +0100

s4:setup: Reformat shell scripts

shfmt -f source4/setup/ | xargs shfmt -w -p -i 0 -fn

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

commit df29b9ab16564ab94d451ae00ae6cd4def747b58
Author: Andreas Schneider 
Date:   Wed Feb 23 12:02:44 2022 +0100

s4:selftest: Reformat shell scripts

shfmt -f source4/selftest/ | xargs shfmt -w -p -i 0 -fn

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

---

Summary of changes:
 source4/selftest/provisions/dump.sh| 47 ---
 .../release-4-5-0-pre1/add-deleted-user.sh | 10 ++--
 .../release-4-5-0-pre1/simple-dc-steps.sh  | 24 
 source4/selftest/provisions/undump.sh  | 31 +-
 source4/selftest/test_samba3dump.sh|  2 +-
 source4/selftest/test_w2k3.sh  | 26 -
 source4/selftest/test_w2k3_file.sh |  8 +--
 source4/selftest/test_win.sh   |  2 +-
 source4/selftest/tests_win.sh  | 38 ++---
 source4/selftest/win/wintest_2k3_dc.sh | 44 ---
 source4/selftest/win/wintest_base.sh   |  9 +--
 source4/selftest/win/wintest_client.sh |  8 +--
 source4/selftest/win/wintest_functions.sh  |  8 +--
 source4/selftest/win/wintest_net.sh| 15 ++---
 source4/selftest/win/wintest_raw.sh|  9 +--
 source4/selftest/win/wintest_rpc.sh| 15 ++---
 source4/setup/tests/blackbox_group.sh  | 23 
 source4/setup/tests/blackbox_newuser.sh|  7 +--
 source4/setup/tests/blackbox_provision.sh  | 30 +-
 source4/setup/tests/blackbox_s3upgrade.sh  | 14 ++---
 source4/setup/tests/blackbox_setpassword.sh|  6 +-
 source4/setup/tests/blackbox_spn.sh|  7 +--
 source4/setup/tests/blackbox_start_backup.sh   | 66 +++---
 source4/setup/tests/blackbox_supported_features.sh | 42 +++---
 source4/setup/tests/blackbox_upgradeprovision.sh   | 59 ++-
 source4/setup/tests/provision_fileperms.sh | 63 ++---
 testprogs/blackbox/bogus.sh| 10 ++--
 27 files changed, 319 insertions(+), 304 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/selftest/provisions/dump.sh 
b/source4/selftest/provisions/dump.sh
index 1b3ec1ee497..e9467e4af06 100755
--- a/source4/selftest/provisions/dump.sh
+++ b/source4/selftest/provisions/dump.sh
@@ -2,47 +2,46 @@
 # dump a provision directory
 
 [ "$#" -gt 0 ] || {
-echo "Usage: dump.sh  [TARGETDIR] [TDBDUMP]"
-exit 1
+   echo "Usage: dump.sh  [TARGETDIR] [TDBDUMP]"
+   exit 1
 }
 
 TDBDUMP=tdbdump
 [ "$#" -lt 3 ] || {
-TDBDUMP=$3
+   TDBDUMP=$3
 }
 
-
 dirbase="$1"
 
-TARGETDIR=`pwd`/$dirbase
+TARGETDIR=$(pwd)/$dirbase
 
 cd $dirbase
 
 [ "$#" -lt 2 ] || {
-TARGETDIR=$2
+   TARGETDIR=$2
 }
 
 for f in $(find . -name '*.tdb'); do
-dname=$TARGETDIR/$(dirname $f)
-mkdir -p $dname
-outname=$dname/$(basename $f).dump
-echo "Dumping $f to $outname"
-$TDBDUMP $f > $outname || {
-   echo "Failed to dump to $outname"
-   exit 1
-}
-rm -f $f
+   dname=$TARGETDIR/$(dirname $f)
+   mkdir -p $dname
+   outname=$dname/$(basename $f).dump
+   echo "Dumping $f to $outname"
+   $TDBDUMP $f >$outname || {
+   echo "Failed to dump to $outname"
+   exit 1
+   }
+   rm -f $f
 done
 
 for f in $(find . -name '*.ldb'); do
-dname=$TARGETDIR/$(dirname $f)
-mkdir -p $dname
-outname=$dname/$(basename $f).dump
-echo "Dumping $f to $outname"
-$TDBDUMP $f > $outname || {
-   echo "Failed to dump to $outname"
-   exit 1
-}
-  

[SCM] Samba Shared Repository - branch master updated

2022-07-12 Thread Pavel Filipensky
The branch, master has been updated
   via  11d3d2aeac5 rpc_server3: Initialize mangle_fns in classic and 
spoolss
  from  116af0df4f7 s3:winbind: Use the canonical realm name to renew the 
credentials

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


- Log -
commit 11d3d2aeac599ebbedd5332c5520465970319448
Author: Volker Lendecke 
Date:   Fri Jul 8 14:14:22 2022 +0200

rpc_server3: Initialize mangle_fns in classic and spoolss

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15118
Signed-off-by: Volker Lendecke 
Reviewed-by: Pavel Filipenský 

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Tue Jul 12 13:33:14 UTC 2022 on sn-devel-184

---

Summary of changes:
 source3/rpc_server/rpcd_classic.c | 3 +++
 source3/rpc_server/rpcd_spoolss.c | 3 +++
 2 files changed, 6 insertions(+)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/rpcd_classic.c 
b/source3/rpc_server/rpcd_classic.c
index d3607d2e19c..4f6164c814c 100644
--- a/source3/rpc_server/rpcd_classic.c
+++ b/source3/rpc_server/rpcd_classic.c
@@ -33,6 +33,7 @@
 #include "librpc/gen_ndr/ndr_initshutdown_scompat.h"
 #include "source3/include/secrets.h"
 #include "locking/share_mode_lock.h"
+#include "source3/smbd/proto.h"
 
 static size_t classic_interfaces(
const struct ndr_interface_table ***pifaces,
@@ -81,6 +82,8 @@ static size_t classic_servers(
 
lp_load_with_shares(get_dyn_CONFIGFILE());
 
+   mangle_reset_cache();
+
*_ep_servers = ep_servers;
return ARRAY_SIZE(ep_servers);
 }
diff --git a/source3/rpc_server/rpcd_spoolss.c 
b/source3/rpc_server/rpcd_spoolss.c
index 733e70764a5..16b4667cd02 100644
--- a/source3/rpc_server/rpcd_spoolss.c
+++ b/source3/rpc_server/rpcd_spoolss.c
@@ -24,6 +24,7 @@
 #include "source3/printing/queue_process.h"
 #include "source3/include/messages.h"
 #include "source3/include/secrets.h"
+#include "source3/smbd/proto.h"
 
 static size_t spoolss_interfaces(
const struct ndr_interface_table ***pifaces,
@@ -68,6 +69,8 @@ static size_t spoolss_servers(
exit(1);
}
 
+   mangle_reset_cache();
+
*_ep_servers = ep_servers;
return ARRAY_SIZE(ep_servers);
 }


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2022-07-08 Thread Pavel Filipensky
The branch, master has been updated
   via  c4c086ecc00 s4:utils: Reformat shell scripts
   via  beaac6bb2bf s4:torture: Reformat shell scripts
   via  8e2f5020cdd s4:scripting: Reformat shell scripts
   via  d82c0991b92 s4:script: Reformat shell scripts
   via  bf9b2d7ae1c s4:librpc: Reformat shell scripts
   via  20f63b79665 s4:client: Reformat shell scripts
  from  b8f3d8d052c smbd: if close fails just log it, don't crash

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


- Log -
commit c4c086ecc00899741d114e6dc51b5cfcfd1d0707
Author: Andreas Schneider 
Date:   Wed Feb 23 12:04:57 2022 +0100

s4:utils: Reformat shell scripts

shfmt -f source4/utils/ | xargs shfmt -w -p -i 0 -fn

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

Autobuild-User(master): Pavel Filipensky 
Autobuild-Date(master): Fri Jul  8 09:59:19 UTC 2022 on sn-devel-184

commit beaac6bb2bf8a45b7b9ef951f54710be948318f4
Author: Andreas Schneider 
Date:   Wed Feb 23 12:04:28 2022 +0100

s4:torture: Reformat shell scripts

shfmt -f source4/torture/ | xargs shfmt -w -p -i 0 -fn

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

commit 8e2f5020cdd3d84b60f0362f57f2bd30ad21a865
Author: Andreas Schneider 
Date:   Wed Feb 23 12:01:51 2022 +0100

s4:scripting: Reformat shell scripts

shfmt -f source4/scripting/ | xargs shfmt -w -p -i 0 -fn

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

commit d82c0991b9272f95c3e0a94995e77654e96ab612
Author: Andreas Schneider 
Date:   Wed Feb 23 12:01:32 2022 +0100

s4:script: Reformat shell scripts

shfmt -f source4/script/ | xargs shfmt -w -p -i 0 -fn

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

commit bf9b2d7ae1c3fd1d56c52c776d1bc0002e325e7e
Author: Andreas Schneider 
Date:   Wed Feb 23 12:01:11 2022 +0100

s4:librpc: Reformat shell scripts

shfmt -f source4/librpc/ | xargs shfmt -w -p -i 0 -fn

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

commit 20f63b7966538694263c74e8e1184f8347b66979
Author: Andreas Schneider 
Date:   Wed Feb 23 11:59:24 2022 +0100

s4:client: Reformat shell scripts

shfmt -f source4/client/ | xargs shfmt -w -p -i 0 -fn

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

---

Summary of changes:
 source4/client/tests/test_cifsdd.sh |  66 
 source4/client/tests/test_smbclient.sh  | 113 ++-
 source4/librpc/scripts/build_idl.sh |  28 +++
 source4/script/find_unused_options.sh   |  26 +++
 source4/scripting/bin/ktpass.sh | 117 +---
 source4/scripting/bin/setup_dns.sh  |  16 ++--
 source4/scripting/devel/drs/revampire_ad.sh |  10 +--
 source4/scripting/devel/drs/unvampire_ad.sh |   4 +-
 source4/scripting/devel/drs/vampire_ad.sh   |  10 +--
 source4/scripting/devel/nmfind  |  10 +--
 source4/scripting/devel/rebuild_zone.sh |  66 
 source4/scripting/devel/tmpfs.sh|   6 +-
 source4/scripting/devel/watch_servers.sh|   4 +-
 source4/torture/tests/test_gentest.sh   |  10 +--
 source4/torture/tests/test_locktest.sh  |   8 +-
 source4/torture/tests/test_masktest.sh  |   8 +-
 source4/utils/tests/test_nmblookup.sh   |   5 +-
 source4/utils/tests/test_samba_tool.sh  |   7 +-
 source4/utils/tests/test_smbclient.sh   |   5 +-
 19 files changed, 276 insertions(+), 243 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/client/tests/test_cifsdd.sh 
b/source4/client/tests/test_cifsdd.sh
index 404cb4688fa..21a884061bf 100755
--- a/source4/client/tests/test_cifsdd.sh
+++ b/source4/client/tests/test_cifsdd.sh
@@ -3,10 +3,10 @@
 # Basic script to make sure that cifsdd can do both local and remote I/O.
 
 if [ $# -lt 4 ]; then
-cat < /dev/null
+dd if=$DD of=$sourcepath bs=1024 count=50 >/dev/null
 
 ls -l $sourcepath
 
-for bs in 512 4k 48k ; do
-
-echo "Testing $bs block size ..."
-
-# Check whether we can do local IO
-runcopy "Testing local -> local copy" if=$sourcepath of=$destpath bs=$bs
-compare "Checking local differences" $sourcepath $destpath
-
-# Check whether we can do a round trip
-runcopy "Testing local -> remote copy" \
-   if=$sourcepath of=//$SERVER/$SHARE/$sourcefile bs=$bs
-runcopy "Testing remote -> local copy" \
-   if=//$SERVER/$SHARE/$sourcefile of=$destpath bs=$bs
-compare "Checking differences" $sourcepath $destpath 
-
-# Check that copying within the remote server works
-runcopy "Testing local -> remote copy" \
-   if=//$SERVER/$SHARE/$so