[SCM] Samba Shared Repository - branch master updated

2023-09-14 Thread Andrew Bartlett
The branch, master has been updated
   via  96e18e17748 s3:param: Remove unused lp_set_cmdline()
   via  c839a25d2cf s3:client: Use lpcfg_set_cmdline()
   via  f7a06f3a5db s3:libsmb: Use lpcfg_set_cmdline()
   via  04d20c3aebd s3:netapi: Fix a leak in libnetapi_net_init()
   via  9b6246737b9 libnetapi: Use lpcfg_set_cmdline()
   via  ea59632b3a7 s3:utils: Use lpcfg_set_cmdline() in smbpasswd
   via  6f00a088266 s3:torture: Use lpcfg_set_cmdline()
   via  b6e4643274d s3:notifyd: Use lpcfg_set_cmdline()
   via  58e45b35a3e build: Reduce heimdal_no_error_flags to a more minimal 
set
   via  0e659702b09 build: Remove -Wno-error=missing-field-initializers 
from Heimdal build
   via  df3816eb711 s4:dsdb: Fix comment
   via  41df712d18e s3:winbindd: Add zero digit to literal
   via  9a9861b5f7d dsgetdcname: Remove excess zero digits from literals
   via  9ef494c1558 fsrvp.idl: Remove excess zero digit from literal
   via  e4a81f268de tests/krb5: Rename ‘client_claims’ to ‘claims_metadata’
   via  253ca78614b s3:net: Check return value of data_blob_talloc()
   via  fb17b170005 s4:kdc: Don’t prepend useless colon to MIT KDC logging 
messages
   via  d16337bd835 s4:wrepl_server: Correctly read ‘type’ element
   via  477dc8f2467 ldb: Prefer explicit initialization to ZERO_STRUCT()
   via  238b5a8ad09 s4:kdc: Remove ks_is_tgs_principal()
   via  208f452e800 testprogs: Fix script usage lines
   via  2ff2d9bfa15 s4:setup: Fix script usage line
   via  31212b0c146 s4:selftest: Fix script usage lines
   via  74624bd98de s3:script: Fix script usage lines
   via  716c3a25368 nsswitch: Fix script usage
   via  187d74d9c08 lib:krb5_wrap: Remove Heimdal‐only 
krb5_princ_component() implementation
   via  7e62f3921f2 s4:rpc_server: Switch to using 
smb_krb5_princ_component()
   via  cec4ebbec8b s4:kdc: Switch to using smb_krb5_princ_component()
   via  9bb80c27385 s4:dsdb: Switch to using smb_krb5_princ_component()
   via  229d26e25eb lib:krb5_wrap: Add Heimdal‐specific 
smb_krb5_princ_component() implementation
   via  eec9e545923 lib:krb5_wrap: Add smb_krb5_princ_component()
   via  d901fe9c671 lib:krb5_wrap: Have smb_krb5_principal_get_realm() 
check the return values of intermediate functions
   via  b8ca4dead24 lib:krb5_wrap: Eliminate redundant code from 
smb_krb5_sockaddr_to_kaddr()
   via  aa56750f97b s4:kdc: Fix leaks
   via  d902c134d72 s4:kdc: Be sure not to pass a NULL pointer into strcmp()
   via  41d974389e9 s4:kdc: Prefer explicit initialization to ZERO_STRUCTP()
   via  617f87a97e1 s4:kdc: Make RODC ID checks easier to understand with 
more clearly‐named variables
   via  ed8d7497cf0 s4:kdc: Rename ‘status’ variables to ‘reply_status’
   via  b8368ed358b s4:kdc: Have samba_krbtgt_is_in_db() take a const KDC 
entry
   via  c72d784a4f3 s4:kdc: Have samba_krbtgt_is_in_db() return a 
krb5_error_code
   via  a5308a2d904 s4:kdc: Make pac_blobs_remove_blob() never fail
   via  ed8436092b1 s4:kdc: Make ‘struct pac_blobs’ memory handling safer 
and more consistent
   via  cb400950791 s4:kdc: Don’t corrupt pac_blobs structure if 
talloc_realloc() fails
   via  e9590ac7bb5 s4:kdc: Add common out path to pac_blobs_from_krb5_pac()
   via  cbf1e0c8384 s4:kdc: Introduce a temporary talloc context in 
samba_kdc_update_pac()
   via  8b49e05831d s4:kdc: Use temporary memory context in 
samba_kdc_verify_pac()
   via  0d2d3a90985 s4:kdc: Fix leak
   via  cf2bde738d6 s4:kdc: Allocate variables on to more suitable memory 
context
   via  953af6c3a3d s4:kdc: Increment PAC_DEVICE_INFO::domain_group_count 
only after SID has been successfully added
   via  446e45be450 s4:kdc: Directly zero‐initialize 
PAC_DOMAIN_GROUP_MEMBERSHIP structure
   via  d4ceac448b6 s4:kdc: Assign RID and attribute together
   via  6dae90bdd95 s4:kdc: Don’t corrupt domain groups structure if 
talloc_realloc() fails
   via  d045809c0c2 s4:kdc: Check for overflow when adding a domain group 
SID
   via  19b616d1699 s4:kdc: Avoid potential use‐after‐free
   via  bf9b16884b4 s4:kdc: Fix leak
   via  7718a9d61b1 s4:kdc: Use common exit point for functions
   via  e48df09175a s4:kdc: Fix leaks
   via  5c580dbdb3e s4:kdc: Add correct Asserted Identity SID in response 
to an S4U2Self request
   via  c4933dd4b77 s4:auth: Fix leaks
   via  8b2e14052c7 s4:auth: Check return values of talloc functions
   via  bd05237de4d s4:dsdb: Prefer explicit initialization to ZERO_STRUCT()
   via  2e8bbaea70f s4:dsdb: Parenthesize macro expression
   via  b96c55c28a2 s4:scripting: Prefer ‘x not in y’ to ‘not x in y’
   via  4954443e565 s4:scripting: Fix comments
   via  2d736bd9e92 s4:kdc: Inline samba_get_pac_attrs_blob()
   via  0669af30992 s3:rpc_server: Fix inverted error messages
   via  bd8c3afe106 python:tests: Fix 

[SCM] Samba Shared Repository - branch master updated

2023-09-14 Thread Stefan Metzmacher
The branch, master has been updated
   via  4af3faace48 nsswitch/wb_common.c: fix socket fd and memory leaks of 
global state
   via  91b30a7261e nsswitch/wb_common.c: don't operate on a stale 
wb_global_ctx.key
   via  836823e5047 nsswitch/wb_common.c: winbind_destructor can always use 
get_wb_global_ctx()
   via  4faf806412c nsswitch/wb_common.c: fix build without HAVE_PTHREAD
   via  62af25d44e5 nsswitch: add test for pthread_key_delete missuse (bug 
15464)
   via  19fb9a97dff .gitlab-ci: Allow ext4 jobs to run on shared runners
   via  b1e83b6cede .gitlab-ci: make it explicit that some tests require 
ext4/5.15 kernel
   via  416ff2c651f .gitlab-ci: restore starting ubuntu2204-samba-o3 for 
the default pipeline
  from  0f1443d968c smbd: make vfs_stat_fsp() a no-op on fake file-handles

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


- Log -
commit 4af3faace481d23869b64485b791bdd43d8972c5
Author: Stefan Metzmacher 
Date:   Thu Sep 7 15:59:59 2023 +0200

nsswitch/wb_common.c: fix socket fd and memory leaks of global state

When we are called in wb_atfork_child() or winbind_destructor(),
wb_thread_ctx_destructor() is not called for the global state
of the current nor any other thread, which means we would
leak the related memory and socket fds.

Now we maintain a global list protected by a global mutex.
We traverse the list and close all socket fds, which are no
longer used (winbind_destructor) or no longer valid in the
current process (wb_atfork_child), in addition we 'autofree'
the ones, which are only visible internally as global (per thread)
context.

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

Tested-by: Krzysztof Piotr Oledzki 
Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Stefan Metzmacher 
Autobuild-Date(master): Thu Sep 14 18:53:07 UTC 2023 on atb-devel-224

commit 91b30a7261e6455d3a4f31728c23e4849e3945b9
Author: Stefan Metzmacher 
Date:   Fri Sep 8 09:56:47 2023 +0200

nsswitch/wb_common.c: don't operate on a stale wb_global_ctx.key

If nss_winbind is loaded into a process that uses fork multiple times
without any further calls into nss_winbind, wb_atfork_child handler
was using a wb_global_ctx.key that was no longer registered in the
pthread library, so we operated on a slot that was potentially
reused by other libraries or the main application. Which is likely
to cause memory corruption.

So we better don't call pthread_key_delete() in wb_atfork_child().

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

Reported-by: Krzysztof Piotr Oledzki 
Tested-by: Krzysztof Piotr Oledzki 
Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 

commit 836823e5047d0eb18e66707386ba03b812adfaf8
Author: Stefan Metzmacher 
Date:   Fri Sep 8 09:53:42 2023 +0200

nsswitch/wb_common.c: winbind_destructor can always use get_wb_global_ctx()

The HAVE_PTHREAD logic inside of get_wb_global_ctx() will do all
required magic.

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 

commit 4faf806412c4408db25448b1f67c09359ec2f81f
Author: Stefan Metzmacher 
Date:   Thu Sep 7 16:02:32 2023 +0200

nsswitch/wb_common.c: fix build without HAVE_PTHREAD

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 

commit 62af25d44e542548d8cdecb061a6001e0071ee76
Author: Stefan Metzmacher 
Date:   Fri Sep 8 13:57:26 2023 +0200

nsswitch: add test for pthread_key_delete missuse (bug 15464)

This is based on https://bugzilla.samba.org/attachment.cgi?id=18081
written by Krzysztof Piotr Oledzki 

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

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Jeremy Allison 

commit 19fb9a97dff2c0222d89a19bc9b0cd27f0306408
Author: Andrew Bartlett 
Date:   Wed Sep 6 09:37:19 2023 +1200

.gitlab-ci: Allow ext4 jobs to run on shared runners

At the time of this commit, GitLab shared runners
tagged "gce" were 2x AMD EPYC 7B12 with 8GB ram.

Pair-Programmed-With: Stefan Metzmacher 

Signed-off-by: Andrew Bartlett 
Signed-off-by: Stefan Metzmacher 

commit b1e83b6cede6ad50e417a6cff583a9ab25f8c980
Author: Stefan Metzmacher 
Date:   Thu Sep 14 10:42:55 2023 +0200

.gitlab-ci: make it explicit that some tests require ext4/5.15 kernel

This is better then requiring private runners,
as we'll be able to use shared runners for ext4 soon.

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Andrew Bartlett 

commit 416ff2c651fcbfae83cdf3b6f3c3317d1c146d3f
Author: Stefan Metzmacher 
Date:   Wed Sep 13 17:07:34 2023