[SCM] pam wrapper repository - annotated tag pam_wrapper-1.1.7 created
The annotated tag, pam_wrapper-1.1.7 has been created at fee755401f6128a682c9270bc1a7cd9de234f79d (tag) tagging f140952e99bb0682bc6da7858f6ca25b70fab86c (commit) replaces pam_wrapper-1.1.6 tagged by Andreas Schneider on Tue Jul 23 10:36:48 2024 +0200 - Log - pam_wrapper-1.1.7 * Fix installation of python module -BEGIN PGP SIGNATURE- iQIzBAABCgAdFiEEjf9T4Y8qvI2PPJIjfuD8TcwBTj0FAmafa7AACgkQfuD8TcwB Tj3Hng/+InNhpBYk0hrWVgsSFCuCfdb0XvlNXqjYMVUV+3iSsZICNpiiLS6171Yf z2kPsjwFq/JK/ptfflUaUFY6uyXmdXyaVYiV1LFxuqLNZU/r/tVWTT7DVtHqoBs0 +mki+4dt4yvSU/21NfU8HMKVy+O34qpnAeHjXUpLD3jTQGbC18z6+zRVBOvL0ebu aJ3S+Qxgt3kkocTiX+N1Kf6DR0w9M1Vl8wb0ZPPOu4z3tD3/XQzB6jraMt7e+N9J bNCW+JzBZMPi9/NQhP2B2XC7BNLH//JQHOZhDe+xPYOFuXCI+uFSqHw/6Pl7QY63 AmrollLEJ64/mrDs3E3lJtf6MkdB3zmRSE2WslYjcFizC48GXNd4tr71dhujHEZ4 qsX/+q5uY5TV0sAn0P4WFueZNNhe/+aoNrNxI4tkGJ03via3ikQAPk/AJDpPS79n vSB7wEHyeMY6D+UtGbHTbPMb1q09MRhYQRvtCznYViShmcne8hjLxqOnkLpKb14M XVHBegFIEOpD6oCpgznS8B46M+vV+Ztx1JXZ8NN7UD/97RIx8oKAMAp7qO7/mNeg Jd+CFLS54m52fwKSut3gv2Xg0GnQeFld4HzY13oJmab30H3alrqyKQ1IMb+m/8KX KX/tYecMdyF3B9OKf74LQOXwrLelmGHUm4Eng6nis5U9nQiJ8I4= =j8AY -END PGP SIGNATURE- Andreas Schneider (2): cmake: Fix installation of python module Bump version to 1.1.7 --- -- pam wrapper repository
[SCM] pam wrapper repository - annotated tag pam_wrapper-1.1.6 created
The annotated tag, pam_wrapper-1.1.6 has been created at 1f5486231d401f2ddde979c532e1b46ac4bf2b25 (tag) tagging 0d3b5be59a5f6ade0f29ef1a325d32a48ae8726e (commit) replaces pam_wrapper-1.1.5 tagged by Andreas Schneider on Tue Jul 23 09:45:12 2024 +0200 - Log - pam_wrapper-1.1.6 * Improve config dir creation if we have pam_start_confdir() * Fixed PAM_WRAPPER_DISABLE_DEEPBIND * Directly fail if we can't create the config dir -BEGIN PGP SIGNATURE- iQIzBAABCgAdFiEEjf9T4Y8qvI2PPJIjfuD8TcwBTj0FAmafX5UACgkQfuD8TcwB Tj3/uxAAr1cc0ssPlzCrDG8eSuLX0oKWwiIN+MCkI74M8iWwUsJ5RnQhlKsm36+5 ftvcT1NPB0FnPYQd9fAkoc6SqcsO02PGN/G3j47TAj1HAW8JcRUVfZ5iXgvTceAQ 9mQRRpa3L/slIgzhA9C0G11KLpQa9z3uSFXtlqzieHPxrSc7rE5dJ0ZJ1mnajFxp 2E9P7IpQFJuwy1MbpBd4Q1D76AX3JV8GjZO7NIh/6u0LWay59owEjW2sjKb19KHt 5R+uQNKcyfTbRYxDM5qM13gBFoVILz56eolVuf2dID1TEBpMIJykr5rDfeaE7bVw Jbo5Vyg8Pw23EI4HMwt2B0TX3nQdmzXINRhKpe1E3nyKgvFFSOKC6L4qORcDWBn9 InfrUmkHxzBpLtBLF7+7ryL6NIWb5HtzU1ybTBiPJtzIrB6eOjZHsV4k8CHNtGuL CFEOL65KhzFJMkOrM/S11oEOiO0mftS+O/QrApReUYtzMlDzD1S/GLy6CINsg1tt UYRrYfXEe0qMoyMptPEa5eTnDe7jpHcsSXuiccdqH4fPCzAc/VTJngSrVIIxiRpS ER5XkavkYnqkvOpdKKCdtE4h5EozbbwkIlddjMvArxejSVwCci8Kky4G0XKcUZSW Hf2MaG/C24Vl+BvqiNm8u2GjwXPnOMWM8/ziReofcsedL1YDjrI= =Y9TU -END PGP SIGNATURE- Andreas Schneider (7): pwrap: Fix PAM_WRAPPER_DISABLE_DEEPBIND environment variable Add editorconfig Add clang-format gitlab-ci: Adapt to latest changes cmake: Move to new FindPython module pwrap: Use mkdtemp() for config dir if we have pam_start_confdir() Bump version to 1.1.6 Jan Kundrát (1): die quickly upon mkdir failure Simon Josefsson (2): doc/pam_matrix.8: Fix typo 'allows to'. tests: Define PATH_MAX for Hurd. --- -- pam wrapper repository
[SCM] pam wrapper repository - branch master updated
The branch, master has been updated via f140952 Bump version to 1.1.7 via 633aa0c cmake: Fix installation of python module from 0d3b5be Bump version to 1.1.6 https://git.samba.org/?p=pam_wrapper.git;a=shortlog;h=master - Log - commit f140952e99bb0682bc6da7858f6ca25b70fab86c Author: Andreas Schneider Date: Tue Jul 23 10:23:24 2024 +0200 Bump version to 1.1.7 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 633aa0cedd09458507c38a997814ce79aaeebae9 Author: Andreas Schneider Date: Tue Jul 23 10:07:54 2024 +0200 cmake: Fix installation of python module Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: CHANGELOG | 3 +++ CMakeLists.txt| 4 ++-- src/python/python3/CMakeLists.txt | 8 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/CHANGELOG b/CHANGELOG index 1b1e48e..eb0803a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ ChangeLog == +version 1.1.7 (released 2023-07-23) + * Fix installation of python module + version 1.1.6 (released 2023-07-23) * Improve config dir creation if we have pam_start_confdir() * Fixed PAM_WRAPPER_DISABLE_DEEPBIND diff --git a/CMakeLists.txt b/CMakeLists.txt index e2f548b..38df203 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") include(DefineCMakeDefaults) include(DefineCompilerFlags) -project(pam_wrapper VERSION 1.1.6 LANGUAGES C) +project(pam_wrapper VERSION 1.1.7 LANGUAGES C) # global needed variables set(APPLICATION_NAME ${PROJECT_NAME}) @@ -25,7 +25,7 @@ set(APPLICATION_NAME ${PROJECT_NAME}) # Increment PATCH. set(LIBRARY_VERSION_MAJOR 0) set(LIBRARY_VERSION_MINOR 0) -set(LIBRARY_VERSION_PATCH 9) +set(LIBRARY_VERSION_PATCH 10) set(LIBRARY_VERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY_VERSION_PATCH}") set(LIBRARY_SOVERSION ${LIBRARY_VERSION_MAJOR}) diff --git a/src/python/python3/CMakeLists.txt b/src/python/python3/CMakeLists.txt index 4e8b967..cd96ab4 100644 --- a/src/python/python3/CMakeLists.txt +++ b/src/python/python3/CMakeLists.txt @@ -1,6 +1,10 @@ project(python3-pamtest C) -find_package(Python 3.6 COMPONENTS Development) +find_package(Python 3.6 COMPONENTS Development Interpreter) +# Allow to specify sitearch dir on the commandline +if (NOT PYTHON_INSTALL_SITEARCH) +set(PYTHON_INSTALL_SITEARCH ${Python_SITEARCH}) +endif() if (Python_Development_FOUND) add_library(python3-pamtest @@ -18,5 +22,5 @@ if (Python_Development_FOUND) install(TARGETS python3-pamtest DESTINATION -${CMAKE_INSTALL_PREFIX}/${Python_SITELIB}) +${PYTHON_INSTALL_SITEARCH}) endif() -- pam wrapper repository
[SCM] pam wrapper repository - branch master updated
The branch, master has been updated via 0d3b5be Bump version to 1.1.6 via ce61f64 pwrap: Use mkdtemp() for config dir if we have pam_start_confdir() via c40e906 cmake: Move to new FindPython module via 5098caa gitlab-ci: Adapt to latest changes via 43330b5 Add clang-format via 2e96ed9 Add editorconfig from 9f0cccf pwrap: Fix PAM_WRAPPER_DISABLE_DEEPBIND environment variable https://git.samba.org/?p=pam_wrapper.git;a=shortlog;h=master - Log - commit 0d3b5be59a5f6ade0f29ef1a325d32a48ae8726e Author: Andreas Schneider Date: Tue Jul 23 09:41:30 2024 +0200 Bump version to 1.1.6 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit ce61f64d899249adac520e9048cb8690f2af97e5 Author: Andreas Schneider Date: Tue Jul 23 07:49:50 2024 +0200 pwrap: Use mkdtemp() for config dir if we have pam_start_confdir() Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit c40e906bb68de9258b78fe07502e17d4a9e8b8ba Author: Andreas Schneider Date: Tue Jul 23 09:03:07 2024 +0200 cmake: Move to new FindPython module The old one is deprecated. Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 5098caa591bcf53ecf6e12f93aaef63bc3cf1638 Author: Andreas Schneider Date: Tue Jul 23 07:52:50 2024 +0200 gitlab-ci: Adapt to latest changes Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 43330b55acf98c80033d7b7715cf51e5f8706af3 Author: Andreas Schneider Date: Tue Jul 23 07:45:13 2024 +0200 Add clang-format Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 2e96ed91cc4e4ec863bd0193278fe28ad8c3cefe Author: Andreas Schneider Date: Tue Jul 23 07:42:55 2024 +0200 Add editorconfig Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: .clang-format | 33 +++ .editorconfig | 23 ++ .gitlab-ci.yml| 20 CHANGELOG | 5 +++ CMakeLists.txt| 4 +-- src/pam_wrapper.c | 67 +++ src/python/python3/CMakeLists.txt | 47 +++ tests/CMakeLists.txt | 5 +-- 8 files changed, 96 insertions(+), 108 deletions(-) create mode 100644 .clang-format create mode 100644 .editorconfig Changeset truncated at 500 lines: diff --git a/.clang-format b/.clang-format new file mode 100644 index 000..c4c12b9 --- /dev/null +++ b/.clang-format @@ -0,0 +1,33 @@ +# https://clang.llvm.org/docs/ClangFormatStyleOptions.html +AlignAfterOpenBracket: Align +AlignEscapedNewlines: Left +AllowAllArgumentsOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: false +AlwaysBreakAfterReturnType: None +BasedOnStyle: LLVM +BinPackArguments: false +BinPackParameters: false +BraceWrapping: +AfterEnum: false +AfterFunction: true +AfterStruct: false +AfterUnion: false +AfterExternBlock: true +BeforeElse: false +BeforeWhile: false +AfterControlStatement: MultiLine +BreakBeforeBinaryOperators: None +BreakBeforeBraces: Custom +ColumnLimit: 80 +ContinuationIndentWidth: 8 +IndentCaseLabels: false +IndentGotoLabels: false +IndentWidth: 8 +PenaltyBreakAssignment: 200 +PenaltyBreakBeforeFirstCallParameter: 100 +PenaltyReturnTypeOnItsOwnLine: 1000 +SortIncludes: false +UseTab: true +WhitespaceSensitiveMacros: ['DEBUG'] diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000..bbe1bd5 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +root = true + +[*] +charset = utf-8 +max_line_length = 80 +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{c,h}] +indent_style = tab +indent_size = 8 +tab_width = 8 + +[*.cmake] +indent_style = space +indent_size = 4 +tab_width = 4 + +[CMake*] +indent_style = space +indent_size = 4 +tab_width = 4 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c205528..6b13e8a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,8 +21,6 @@ centos7/x86_64: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -41,8 +39,6 @@ fedora/x86_64: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure && make install - tags: -- shared except: - tags artifacts: @@ -60,8 +56,6 @@ fedora/address-sanitizer: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) &am
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0a532378322 s3:printing: Allow to run samba-bgqd as a standalone systemd service from 7bb59168e9d s4:torture: Initialize struct cldap_netlogon https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0a532378322661b23b3393eb2ebde29402a16e62 Author: Andreas Schneider Date: Fri Jul 12 14:18:26 2024 +0200 s3:printing: Allow to run samba-bgqd as a standalone systemd service BUG: https://bugzilla.samba.org/show_bug.cgi?id=15683 Signed-off-by: Andreas Schneider Reviewed-by: Alexander Bokovoy Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Jul 19 11:13:28 UTC 2024 on atb-devel-224 --- Summary of changes: source3/printing/samba-bgqd.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/printing/samba-bgqd.c b/source3/printing/samba-bgqd.c index 59ed0cc40db..9560fcf9e35 100644 --- a/source3/printing/samba-bgqd.c +++ b/source3/printing/samba-bgqd.c @@ -253,7 +253,9 @@ int main(int argc, const char *argv[]) log_stdout = (debug_get_log_type() == DEBUG_STDOUT); /* main process will notify systemd */ - daemon_sd_notifications(false); + if (ready_signal_fd != -1 || watch_fd != -1) { + daemon_sd_notifications(false); + } if (!cmdline_daemon_cfg->fork) { daemon_status(progname, "Starting process ... "); @@ -325,6 +327,10 @@ int main(int argc, const char *argv[]) goto done; } + if (!cmdline_daemon_cfg->fork) { + daemon_ready(progname); + } + if (ready_signal_fd != -1) { pid_t pid = getpid(); ssize_t written; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7bb59168e9d s4:torture: Initialize struct cldap_netlogon via bd298f2612a s4:torture: Remove trailing spaces from cldapbench.c via 125c5a93bbb s4:torture: Initialize struct netr_LogonSamLogonEx via 5fe20309966 nsswitch: Fix integer size types in winbind_write_sock() via 3c91ad94639 examples:winexe: Initialize integer via 8d637d667d0 auth:gensec: Fully initialize struct spnego_data via d64242f676d s4:torture: Initialize union spoolss_KeyNames via a39cb60c3fb examples:winexe: Fully initialize EXPLICIT_ACCESS via 2e1ac4bbf5b s4:torture: Initialize pointer with NULL via f124c2df928 s3:smbd: Initialize struct security_ace array from f7229d61ede s4:torture: Add new LSA test_query_forest_trust_info() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7bb59168e9dea9c7a85010cdc8b70e9889f5a866 Author: Andreas Schneider Date: Wed Jul 17 10:58:09 2024 +0200 s4:torture: Initialize struct cldap_netlogon "Error: UNINIT (CWE-457): samba-4.20.0rc2/source4/torture/ldap/cldapbench.c:40: var_decl: Declaring variable ""io"" without initializer. samba-4.20.0rc2/source4/torture/ldap/cldapbench.c:45: uninit_use_in_call: Using uninitialized value ""io.in.map_response"" when calling ""cldap_netlogon_recv"". 43| TALLOC_CTX *tmp_ctx = talloc_new(NULL); 44| io.in.version = 6; 45|->status = cldap_netlogon_recv(req, tmp_ctx, ); 46| talloc_free(req); 47| if (NT_STATUS_IS_OK(status)) {" Signed-off-by: Andreas Schneider Reviewed-by: Alexander Bokovoy Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Jul 18 13:48:03 UTC 2024 on atb-devel-224 commit bd298f2612a7233693e8a7cf71970cc4ae1789e6 Author: Andreas Schneider Date: Wed Jul 17 10:57:43 2024 +0200 s4:torture: Remove trailing spaces from cldapbench.c Signed-off-by: Andreas Schneider Reviewed-by: Alexander Bokovoy commit 125c5a93bbb60b68d054db59aef37ebb77bdb4da Author: Andreas Schneider Date: Wed Jul 17 10:55:28 2024 +0200 s4:torture: Initialize struct netr_LogonSamLogonEx "Error: UNINIT (CWE-457): samba-4.20.0rc2/source4/torture/rpc/schannel.c:49: var_decl: Declaring variable ""r"" without initializer. samba-4.20.0rc2/source4/torture/rpc/schannel.c:152: uninit_use_in_call: Using uninitialized value ""r.in.validation_level"" when calling ""torture_comment"". 150| ""LogonSamLogonEx failed""); 151| } else { 152|->torture_comment(tctx, 153| ""Skip auth_level[%u] Testing LogonSamLogonEx with name %s using %s and validation_level: %d\n"", 154| auth_level, ninfo.identity_info.account_name.string, crypto_alg," Signed-off-by: Andreas Schneider Reviewed-by: Alexander Bokovoy commit 5fe203099665cce636c6fa70a692d044bbfbe322 Author: Andreas Schneider Date: Wed Jul 17 10:50:30 2024 +0200 nsswitch: Fix integer size types in winbind_write_sock() Signed-off-by: Andreas Schneider Reviewed-by: Alexander Bokovoy commit 3c91ad94639ee009a6f03bb916cc99162286d005 Author: Andreas Schneider Date: Tue Jul 16 17:03:19 2024 +0200 examples:winexe: Initialize integer "Error: UNINIT (CWE-457): samba-4.20.0rc2/examples/winexe/winexesvc.c:147: var_decl: Declaring variable ""res"" without initializer. samba-4.20.0rc2/examples/winexe/winexesvc.c:156: uninit_use: Using uninitialized value ""res"". 154| GetOverlappedResult(pipe->h, >o, (LPDWORD), TRUE); 155| FlushFileBuffers(pipe->h); 156|->return res; 157| } 158|" Signed-off-by: Andreas Schneider Reviewed-by: Alexander Bokovoy commit 8d637d667d0bbc642f2b4220cf78c2b69025ecdb Author: Andreas Schneider Date: Tue Jul 16 17:01:22 2024 +0200 auth:gensec: Fully initialize struct spnego_data "Error: UNINIT (CWE-457): samba-4.20.0rc2/auth/gensec/spnego.c:1129: var_decl: Declaring variable ""spnego_out"" without initializer. samba-4.20.0rc2/auth/gensec/spnego.c:1154: uninit_use_in_call: Using uninitialized value ""spnego_out.negTokenTarg.negResult"" when calling ""spnego_write_data"". 1152| } 1153| 1154|->if (spnego_write_data(out_mem_ctx, out, _out) == -1) { 1155| DEBUG(1, (""Failed to write SPNEGO reply to NEG_TOKEN_TARG\n""))
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f7229d61ede s4:torture: Add new LSA test_query_forest_trust_info() via 14a5d9e626c s4:torture: Split out a new LSA test_set_forest_trust_info() function via 88f49f18611 selftest: Remove samba4.rpc.lsa.forest.trust from knownfail from 818bd2dcb3c python:tests: make test_export_keytab_nochange_update() more reliable https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f7229d61ede14f6fd14b9e5dcb365ec772216e08 Author: Andreas Schneider Date: Tue Mar 19 10:24:44 2024 +0100 s4:torture: Add new LSA test_query_forest_trust_info() Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Jul 18 12:36:25 UTC 2024 on atb-devel-224 commit 14a5d9e626c258bfbcdfed16379e951bb438355c Author: Andreas Schneider Date: Tue Mar 19 09:43:40 2024 +0100 s4:torture: Split out a new LSA test_set_forest_trust_info() function Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 88f49f186113c5dface15286383649961e4dcc8d Author: Andreas Schneider Date: Tue Mar 19 10:30:04 2024 +0100 selftest: Remove samba4.rpc.lsa.forest.trust from knownfail The test needs --option="torture:Forest_Trust_Dom2_Binding=..." in order to be useful, so the skip is correct, but the knownfail entry should have been removed with e5163dfd57694351bf556565e92f74b71221db29. Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: selftest/knownfail | 1 - source4/torture/rpc/forest_trust.c | 156 ++--- 2 files changed, 127 insertions(+), 30 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/knownfail b/selftest/knownfail index 9507b142089..03f8b466994 100644 --- a/selftest/knownfail +++ b/selftest/knownfail @@ -184,7 +184,6 @@ ^samba4.smb2.sharemode.sharemode-access ^samba4.smb2.sharemode.access-sharemode ^samba4.ntvfs.cifs.krb5.base.createx_access.createx_access\(.*\)$ -^samba4.rpc.lsa.forest.trust #Not fully provided by Samba4 ^samba4.blackbox.upgradeprovision.alpha13.ldapcmp_sd\(none\) # Due to something rewriting the NT ACL on DNS objects ^samba4.blackbox.upgradeprovision.alpha13.ldapcmp_full_sd\(none\) # Due to something rewriting the NT ACL on DNS objects ^samba4.blackbox.upgradeprovision.release-4-0-0.ldapcmp_sd\(none\) # Due to something rewriting the NT ACL on DNS objects diff --git a/source4/torture/rpc/forest_trust.c b/source4/torture/rpc/forest_trust.c index 8161853b5a4..284d5e4441c 100644 --- a/source4/torture/rpc/forest_trust.c +++ b/source4/torture/rpc/forest_trust.c @@ -30,6 +30,7 @@ #include "libcli/auth/libcli_auth.h" #include "torture/rpc/torture_rpc.h" #include "param/param.h" +#include "source3/rpc_client/init_lsa.h" #include #include @@ -103,6 +104,122 @@ static bool test_get_policy_handle(struct torture_context *tctx, return true; } +static bool test_set_forest_trust_info(struct dcerpc_pipe *p, + struct torture_context *tctx, + struct policy_handle *handle, + struct dom_sid *domsid, + const char *trust_name, + const char *trust_name_dns) +{ + struct lsa_ForestTrustCollisionInfo *collision_info = NULL; + struct lsa_ForestTrustInformation *fti = NULL; + struct lsa_lsaRSetForestTrustInformation ft_info = { + .in = { + .handle = handle, + .highest_record_type = 2, + }, + .out = { + .collision_info = _info, + } + }; + + torture_comment(tctx, "\nTesting lsaRSetForestTrustInformation\n"); + + ft_info.in.trusted_domain_name = talloc_zero(tctx, struct lsa_StringLarge); + torture_assert_not_null(tctx, ft_info.in.trusted_domain_name, "No memory"); + ft_info.in.trusted_domain_name->string = trust_name_dns; + + fti = talloc_zero(tctx, struct lsa_ForestTrustInformation); + torture_assert_not_null(tctx, fti, "No memory"); + fti->count = 2; + fti->entries = talloc_array(tctx, struct lsa_ForestTrustRecord *, 2); + fti->entries[0] = talloc_zero(tctx, struct lsa_ForestTrustRecord); + fti->entries[0]->flags = 0; + fti->entries[0]->type = LSA_FOREST_TRUST_TOP_LEVEL_NAME; + fti->entries[0]->time = 0; + fti->entries[0]->forest_trust_data.top_level_name.string = trust_name_dns; + fti->entries[
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a3856ee4dc8 python:tests: pass bytes.decode() instead of str(bytes) to assertMultiLineEqual() to get better failure output from 6f3545cecad python:tests: Use assertMultiLineEqual() to get better failure output https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a3856ee4dc8ae1e4ab2f56df50a8a90f7ef33b0a Author: Stefan Metzmacher Date: Mon Jul 15 20:14:46 2024 +0200 python:tests: pass bytes.decode() instead of str(bytes) to assertMultiLineEqual() to get better failure output When not equal a diff of the two strings highlighting the differences will be included this way. This is a flapping test. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jul 16 07:40:41 UTC 2024 on atb-devel-224 --- Summary of changes: python/samba/tests/dckeytab.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/python/samba/tests/dckeytab.py b/python/samba/tests/dckeytab.py index edb8a079da0..9dee64e0cea 100644 --- a/python/samba/tests/dckeytab.py +++ b/python/samba/tests/dckeytab.py @@ -174,7 +174,8 @@ class DCKeytabTests(TestCaseInTempDir): ).communicate()[0] self.maxDiff = None # No maximum length of diffs. -self.assertMultiLineEqual(str(keytab_orig_content), str(keytab_content)) +self.assertMultiLineEqual(keytab_orig_content.decode(), + keytab_content.decode()) # Parse the first entry in the keytab with open(self.ktfile, 'rb') as bytes_kt: -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6f3545cecad python:tests: Use assertMultiLineEqual() to get better failure output from bbe2c82f620 smbd: Show blk and chr devices as nfs reparse points https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6f3545cecad810793d8eabb5a7c9fa41af964fc0 Author: Andreas Schneider Date: Mon Jul 15 10:25:50 2024 +0200 python:tests: Use assertMultiLineEqual() to get better failure output When not equal a diff of the two strings highlighting the differences will be included this way. This is a flapping test. Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Andreas Schneider Signed-off-by: Stefan Metzmacher Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Mon Jul 15 13:51:03 UTC 2024 on atb-devel-224 --- Summary of changes: python/samba/tests/dckeytab.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/python/samba/tests/dckeytab.py b/python/samba/tests/dckeytab.py index 6c8a1795e0f..edb8a079da0 100644 --- a/python/samba/tests/dckeytab.py +++ b/python/samba/tests/dckeytab.py @@ -173,7 +173,8 @@ class DCKeytabTests(TestCaseInTempDir): stderr=subprocess.STDOUT, ).communicate()[0] -self.assertEqual(keytab_orig_content, keytab_content) +self.maxDiff = None # No maximum length of diffs. +self.assertMultiLineEqual(str(keytab_orig_content), str(keytab_content)) # Parse the first entry in the keytab with open(self.ktfile, 'rb') as bytes_kt: -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2c1a4a516ff ldap_server: Add a ldapsrv debug class to log LDAP queries from 26c56ae51ec s3:rpc_server: Initialize array https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2c1a4a516ff425f3b27b52e6b8b63772b589da23 Author: Andréas Leroux Date: Fri Jul 5 14:21:33 2024 +0200 ldap_server: Add a ldapsrv debug class to log LDAP queries Patch updated for recent samba versions in merge request #3295 by kvvloten Initial patch created by Jeremy Allison (https://www.spinics.net/lists/samba/msg161128.html) to log LDAP server queries/functions in a separate file Signed-off-by: Andréas Leroux Reviewed-by: Andreas Schneider Reviewed-by: Jo Sutton Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jul 9 08:37:22 UTC 2024 on atb-devel-224 --- Summary of changes: docs-xml/smbdotconf/logging/loglevel.xml | 1 + lib/util/debug-classes/debug-classname-table.c | 1 + lib/util/debug.h | 1 + python/samba/tests/logfiles.py | 2 +- source4/ldap_server/ldap_backend.c | 3 +++ source4/ldap_server/ldap_bind.c| 3 +++ source4/ldap_server/ldap_extended.c| 3 +++ source4/ldap_server/ldap_server.c | 3 +++ 8 files changed, 16 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/logging/loglevel.xml b/docs-xml/smbdotconf/logging/loglevel.xml index 434c5d06832..19ab2b77571 100644 --- a/docs-xml/smbdotconf/logging/loglevel.xml +++ b/docs-xml/smbdotconf/logging/loglevel.xml @@ -57,6 +57,7 @@ dsdb_transaction_json_audit dsdb_group_audit dsdb_group_json_audit + ldapsrv Various modules register dynamic debug classes at first usage: diff --git a/lib/util/debug-classes/debug-classname-table.c b/lib/util/debug-classes/debug-classname-table.c index 9062078165a..b57bfc216b8 100644 --- a/lib/util/debug-classes/debug-classname-table.c +++ b/lib/util/debug-classes/debug-classname-table.c @@ -59,4 +59,5 @@ static const char *default_classname_table[] = { [DBGC_DSDB_TXN_AUDIT_JSON] ="dsdb_transaction_json_audit", [DBGC_DSDB_GROUP_AUDIT] = "dsdb_group_audit", [DBGC_DSDB_GROUP_AUDIT_JSON] = "dsdb_group_json_audit", + [DBGC_LDAPSRV] ="ldapsrv", }; diff --git a/lib/util/debug.h b/lib/util/debug.h index 4687ac074b1..a4ad56048ff 100644 --- a/lib/util/debug.h +++ b/lib/util/debug.h @@ -98,6 +98,7 @@ bool dbgsetclass(int level, int cls); #define DBGC_DSDB_TXN_AUDIT_JSON 35 #define DBGC_DSDB_GROUP_AUDIT 36 #define DBGC_DSDB_GROUP_AUDIT_JSON 37 +#define DBGC_LDAPSRV 38 /* So you can define DBGC_CLASS before including debug.h */ #ifndef DBGC_CLASS diff --git a/python/samba/tests/logfiles.py b/python/samba/tests/logfiles.py index 38c38045b8d..e8fd4b0c5c4 100644 --- a/python/samba/tests/logfiles.py +++ b/python/samba/tests/logfiles.py @@ -33,7 +33,7 @@ CLASS_LIST = ["all", "tdb", "printdrivers", "lanman", "smb", "smb2", "smb2_credits", "dsdb_audit", "dsdb_json_audit", "dsdb_password_audit", "dsdb_password_json_audit", "dsdb_transaction_audit", "dsdb_transaction_json_audit", - "dsdb_group_audit", "dsdb_group_json_audit"] + "dsdb_group_audit", "dsdb_group_json_audit", "ldapsrv"] CLASS_CODES = {k: i for i, k in enumerate(CLASS_LIST)} diff --git a/source4/ldap_server/ldap_backend.c b/source4/ldap_server/ldap_backend.c index 3aa7ac38212..986bc1db941 100644 --- a/source4/ldap_server/ldap_backend.c +++ b/source4/ldap_server/ldap_backend.c @@ -36,6 +36,9 @@ #include "libcli/ldap/ldap_proto.h" #include "source4/auth/auth.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_LDAPSRV + static int map_ldb_error(TALLOC_CTX *mem_ctx, int ldb_err, const char *add_err_string, const char **errstring) { diff --git a/source4/ldap_server/ldap_bind.c b/source4/ldap_server/ldap_bind.c index 65e252edb70..f9c7dce312f 100644 --- a/source4/ldap_server/ldap_bind.c +++ b/source4/ldap_server/ldap_bind.c @@ -32,6 +32,9 @@ #include "../lib/util/tevent_ntstatus.h" #include "lib/util/time_basic.h" +#undef DBGC_CLASS +#define DBGC_CLASS DBGC_LDAPSRV + static char *ldapsrv_bind_error_msg(TALLOC_CTX *mem_ctx, HRESULT hresult, uint32_t DSID, diff --git a/source4/ldap_server/ldap_extended.c b/source4/ldap_server/ldap_extended.c
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 26c56ae51ec s3:rpc_server: Initialize array via 742e5b48ae1 s4:torture: Initialize pointer with NULL via b7c45f9c4fb examples: Initialize char arrays via 0131e4737c2 s3:smbd: Fix invalid memory free via 94b8fa41346 s3:smbd: Remove trailing spaces in seal.c via 982c6b2bfac s3:smbd: Remove trailing spaces in smb1_process.c via 8abda0a1341 s3:registry: Use correct integer sizes via 6cadb1d695e s3:registry: Check for integer overflow from 2a6805cc823 third_party: Update nss_wrapper to version 1.1.16 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 26c56ae51ec1315846d72f5dfcf65cf3ed44456c Author: Andreas Schneider Date: Tue Jul 2 11:41:41 2024 +0200 s3:rpc_server: Initialize array "Error: UNINIT (CWE-457): samba-4.20.0rc2/source3/rpc_server/svcctl/srv_svcctl_nt.c:163: var_decl: Declaring variable ""ace"" without initializer. samba-4.20.0rc2/source3/rpc_server/svcctl/srv_svcctl_nt.c:182: uninit_use_in_call: Using uninitialized value ""*ace"". Field ""ace->object"" is uninitialized when calling ""make_sec_acl"". 180| /* create the security descriptor */ 181| 182|->if ( !(theacl = make_sec_acl(ctx, NT4_ACL_REVISION, i, ace)) ) 183| return NULL; 184|" Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Mon Jul 8 08:37:46 UTC 2024 on atb-devel-224 commit 742e5b48ae18c84f0a008cfdfa40c1901aef8b05 Author: Andreas Schneider Date: Tue Jul 2 11:37:25 2024 +0200 s4:torture: Initialize pointer with NULL "Error: UNINIT (CWE-457): samba-4.20.0rc2/source4/torture/rpc/samsync.c:342: var_decl: Declaring variable ""dom_sid"" without initializer. samba-4.20.0rc2/source4/torture/rpc/samsync.c:385: uninit_use_in_call: Using uninitialized value ""dom_sid"" when calling ""dom_sid_dup"". 383| } 384| if (samsync_state->domain_handle[database_id]) { 385|->samsync_state->sid[database_id] = dom_sid_dup(samsync_state, dom_sid); 386| } 387|" Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit b7c45f9c4fb080cbd8742551dce94171bf871fb3 Author: Andreas Schneider Date: Fri Jun 28 14:36:59 2024 +0200 examples: Initialize char arrays "Error: UNINIT (CWE-457): samba-4.20.0rc2/examples/libsmbclient/testacl.c:35: var_decl: Declaring variable ""value"" without initializer. samba-4.20.0rc2/examples/libsmbclient/testacl.c:254: uninit_use_in_call: Using uninitialized value ""*value"" as argument to ""%s"" when calling ""printf"". [Note: The source code implementation of the function has been overridden by a builtin model.] 252| } 253| 254|-> printf(""Attributes for [%s] are:\n%s\n"", path, value); 255| 256| if (stat_and_retry)" Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit 0131e4737c2da46a7b1f492c67d851ee9f860ed2 Author: Andreas Schneider Date: Wed Jun 26 16:11:57 2024 +0200 s3:smbd: Fix invalid memory free "Error: BAD_FREE (CWE-590): samba-4.20.0rc2/source3/smbd/smb1_process.c:1485: array_free: ""smb1_srv_send"" frees array ""errbuf"". 1483| char errbuf[smb_size]; 1484| error_packet(errbuf, 0, 0, status, __LINE__, __FILE__); 1485|->if (!smb1_srv_send(req->xconn, 1486| errbuf, 1487| true," Pair-Programmed-With: Ralph Boehme Signed-off-by: Ralph Boehme Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit 94b8fa41346f5aefae21515bb8d1d46e2a71d485 Author: Andreas Schneider Date: Wed Jun 26 16:14:47 2024 +0200 s3:smbd: Remove trailing spaces in seal.c Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit 982c6b2bfac32b3d7a034252bfc8410c96f27992 Author: Andreas Schneider Date: Wed Jun 26 16:13:09 2024 +0200 s3:smbd: Remove trailing spaces in smb1_process.c Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit 8abda0a134168c63f70877f120fc0b02bf557a02 Author: Andreas Schneider Date: Wed Jun 26 14:32:41 2024 +0200 s3:registry: Use correct integer sizes Signed-off-by: Andreas Schneider R
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2a6805cc823 third_party: Update nss_wrapper to version 1.1.16 from 90c9d0d98d3 s3:ntlm_auth: make logs more consistent with length check https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2a6805cc8235ef081f92ad9b6efaab6cbe02bd0d Author: Andreas Schneider Date: Fri Jul 5 13:09:53 2024 +0200 third_party: Update nss_wrapper to version 1.1.16 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Mon Jul 8 06:28:47 UTC 2024 on atb-devel-224 --- Summary of changes: buildtools/wafsamba/samba_third_party.py | 2 +- third_party/nss_wrapper/nss_wrapper.c| 29 ++--- third_party/nss_wrapper/wscript | 3 ++- 3 files changed, 29 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba_third_party.py b/buildtools/wafsamba/samba_third_party.py index a42bb2ddc90..96484893b2f 100644 --- a/buildtools/wafsamba/samba_third_party.py +++ b/buildtools/wafsamba/samba_third_party.py @@ -29,7 +29,7 @@ Build.BuildContext.CHECK_SOCKET_WRAPPER = CHECK_SOCKET_WRAPPER @conf def CHECK_NSS_WRAPPER(conf): -return conf.CHECK_BUNDLED_SYSTEM_PKG('nss_wrapper', minversion='1.1.15') +return conf.CHECK_BUNDLED_SYSTEM_PKG('nss_wrapper', minversion='1.1.16') Build.BuildContext.CHECK_NSS_WRAPPER = CHECK_NSS_WRAPPER @conf diff --git a/third_party/nss_wrapper/nss_wrapper.c b/third_party/nss_wrapper/nss_wrapper.c index 3399f06412a..770d0cf5ddd 100644 --- a/third_party/nss_wrapper/nss_wrapper.c +++ b/third_party/nss_wrapper/nss_wrapper.c @@ -61,6 +61,10 @@ #include #include +#ifdef HAVE_GNU_LIB_NAMES_H +#include +#endif + #include "nss_utils.h" /* * Defining _POSIX_PTHREAD_SEMANTICS before including pwd.h and grp.h gives us @@ -1156,6 +1160,13 @@ static void *nwrap_load_lib_handle(enum nwrap_lib lib) case NWRAP_LIBNSL: #ifdef HAVE_LIBNSL handle = nwrap_main_global->libc->nsl_handle; +#ifdef LIBNSL_SO + if (handle == NULL) { + handle = dlopen(LIBNSL_SO, flags); + + nwrap_main_global->libc->nsl_handle = handle; + } +#endif if (handle == NULL) { for (i = 10; i >= 0; i--) { char soname[256] = {0}; @@ -1193,6 +1204,13 @@ static void *nwrap_load_lib_handle(enum nwrap_lib lib) /* FALL TROUGH */ case NWRAP_LIBC: handle = nwrap_main_global->libc->handle; +#ifdef LIBC_SO + if (handle == NULL) { + handle = dlopen(LIBC_SO, flags); + + nwrap_main_global->libc->handle = handle; + } +#endif if (handle == NULL) { for (i = 10; i >= 0; i--) { char soname[256] = {0}; @@ -2422,6 +2440,13 @@ static bool nwrap_pw_parse_line(struct nwrap_cache *nwrap, char *line) return false; } *p = '\0'; +#ifdef HAVE_STRUCT_PASSWD_PW_CLASS + /* +* We don't support pw_class, so just let it point to +* an '\0' byte (empty string). +*/ + pw->pw_class = p; +#endif /* HAVE_STRUCT_PASSWD_PW_CLASS */ p++; e = NULL; pw->pw_gid = (gid_t)strtoul(c, , 10); @@ -2448,8 +2473,6 @@ static bool nwrap_pw_parse_line(struct nwrap_cache *nwrap, char *line) NWRAP_LOG(NWRAP_LOG_TRACE, "gid[%u]\n", pw->pw_gid); #ifdef HAVE_STRUCT_PASSWD_PW_CLASS - pw->pw_class = discard_const_p(char, ""); - NWRAP_LOG(NWRAP_LOG_TRACE, "class[%s]", pw->pw_class); #endif /* HAVE_STRUCT_PASSWD_PW_CLASS */ @@ -6531,7 +6554,7 @@ void nwrap_destructor(void) } SAFE_FREE(nwrap_gr_global.list); - nwrap_pw_global.num = 0; + nwrap_gr_global.num = 0; } #if defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM) diff --git a/third_party/nss_wrapper/wscript b/third_party/nss_wrapper/wscript index 28aeb510719..a8228a006cc 100644 --- a/third_party/nss_wrapper/wscript +++ b/third_party/nss_wrapper/wscript @@ -2,7 +2,7 @@ import os -VERSION="1.1.15" +VERSION="1.1.16" def configure(conf): if conf.CHECK_NSS_WRAPPER(): @@ -10,6 +10,7 @@ def configure(conf): libnss_wrapper_so_path = 'libnss_wrapper.so' else: conf.CHECK_HEADERS('nss.h') +conf.CHECK_HEADERS('gnu/lib-names.h') if conf.CONFIG_SET("HAVE___THREAD"): conf.DEFINE("HAVE_GCC_THREAD_LOCAL_STORAGE", 1) -- Samba Shared Repository
[SCM] NSS Wrapper Repository - annotated tag nss_wrapper-1.1.16 created
The annotated tag, nss_wrapper-1.1.16 has been created at 0c35864eaabd7ae22e7737f0ff65b81e037222b9 (tag) tagging 2270a7cda76de28c554a7ed1167e49ce19a0fc2f (commit) replaces nss_wrapper-1.1.15 tagged by Andreas Schneider on Fri Jul 5 10:36:36 2024 +0200 - Log - nss_wrapper-1.1.16 * Fixed segfault on FreeBSD * Fixed copy error in the destructor * Fixed thread sanitizer on modern Linux Kernels * Fixed building with newer cmocka versions -BEGIN PGP SIGNATURE- iQIzBAABCgAdFiEEjf9T4Y8qvI2PPJIjfuD8TcwBTj0FAmaHsKoACgkQfuD8TcwB Tj159Q/+O6QdidYLPQzyjc2ap9BYjQj09Hcm963eA+/yOhCNbIe7fK4rv5yTtdJg cvs8XiQ9JG02TsoJYdbMnwF1Nk4OWCZcE0bNlX55gLW2+ntCJ64G2r1FIqXaT++I lZV+1tV7R2d9oXHI69RsSTiWUVZYSO1jC1i+UcK4GQZRbl6Aag/VoOT+hHNgBt84 bEJMIdUA9f6s6wwAbeNHXxIp4bs8oXCicmQIuJmbGkFSSsrXVNUUj80ew9w418T3 y1YVsajtUm0+nJlwQjsVEupqSBEqXqAKEWhMtSzLkVOIDuEkoIawQKLTl/Wtv65T 2hL8ugmABgz0Q86mvYYZbTT5UQdvd3HzCP7Hh4/9bMx19ZQXtohkJCywUSHVR+pN 6koHgnrm/gG/oiqH85E02mVa6W8aTILyP75CqES9S3dJm5XUMpnjg3zhbYnSdIv/ tq4Wwvqos39Ox+1/rSTY1zC/jL/niqmBpLz0P1kaY4+lwFPp/8gT/r9cAZGgxrdU GKt0Qy3cSSpFBpyv1tdlwsJU+4PmKZksdjflQGpt+U4PkdOJxXL061BF7W1oz/ff q2oWQNTCNPOIdggPX2mpmabT9vl8vq0BVcZaGUJADcuwDHxWCpQPu7Dn4G2VfPB9 gvUrlIbbeCGyu+d7ESaD9SiJlha8izunDtixI8iQgAus7Ur8HZY= =OLX/ -END PGP SIGNATURE- Andreas Schneider (8): cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode gitlab-ci: Adopt to gitlab changes gitlab-ci: Disable ASLR for TSAN nswrap: Fix filling pw_class in nwrap_pw_parse_line() doc: Correctly describe the supported format of passwd and group files doc: Rename to nss_wrapper.1.adoc doc: Regenerate nss_wrapper manpage Bump version to 1.1.16 Jo Sutton (1): src: Fix copy‐paste error referring to wrong variable (Samba CID 1609453) Pino Toscano (1): src: use LIBC_SO and LIBNSL_SO from GNU libc, if available Simon Josefsson (1): doc/nss_wrapper.1: Fix typo of 'environment'. --- -- NSS Wrapper Repository
[SCM] NSS Wrapper Repository - branch master updated
The branch, master has been updated via 2270a7c Bump version to 1.1.16 via f60b5ac doc: Regenerate nss_wrapper manpage via 20c5165 doc: Rename to nss_wrapper.1.adoc via 53dc194 doc: Correctly describe the supported format of passwd and group files via e585cca nswrap: Fix filling pw_class in nwrap_pw_parse_line() via fab4302 gitlab-ci: Disable ASLR for TSAN via 312e75a gitlab-ci: Adopt to gitlab changes from 199b6bc src: Fix copy‐paste error referring to wrong variable (Samba CID 1609453) https://git.samba.org/?p=nss_wrapper.git;a=shortlog;h=master - Log - commit 2270a7cda76de28c554a7ed1167e49ce19a0fc2f Author: Andreas Schneider Date: Fri Jul 5 08:03:30 2024 +0200 Bump version to 1.1.16 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit f60b5ac0fda0a789c87297a7e6fb603ad88d687b Author: Andreas Schneider Date: Fri Jul 5 10:16:16 2024 +0200 doc: Regenerate nss_wrapper manpage Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 20c51654f2856bd5fc4412700a379cf7a0256842 Author: Andreas Schneider Date: Fri Jul 5 10:15:14 2024 +0200 doc: Rename to nss_wrapper.1.adoc This will give correct highlighting when opening the file. Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 53dc194fcce75a4c45c62ce0e42a3c8a18cf951f Author: Andreas Schneider Date: Fri Jul 5 10:14:22 2024 +0200 doc: Correctly describe the supported format of passwd and group files Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit e585ccae82ad797655ffbe34f919705ffadef597 Author: Andreas Schneider Date: Fri Jul 5 10:21:44 2024 +0200 nswrap: Fix filling pw_class in nwrap_pw_parse_line() This fixes a segfault on FreeBSD. Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Stefan Metzmacher Signed-off-by: Andreas Schneider commit fab4302d00bcd670102f823864fa5a5c877494d5 Author: Andreas Schneider Date: Fri Jul 5 07:59:47 2024 +0200 gitlab-ci: Disable ASLR for TSAN Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 312e75a5b714e6c6ae0b4a2a886e0399a796a283 Author: Andreas Schneider Date: Fri Jul 5 07:55:45 2024 +0200 gitlab-ci: Adopt to gitlab changes Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: .gitlab-ci.yml| 27 +--- CHANGELOG | 6 + CMakeLists.txt| 4 +- doc/README| 6 +- doc/nss_wrapper.1 | 191 +++--- doc/{nss_wrapper.1.txt => nss_wrapper.1.adoc} | 12 +- src/nss_wrapper.c | 9 +- 7 files changed, 141 insertions(+), 114 deletions(-) rename doc/{nss_wrapper.1.txt => nss_wrapper.1.adoc} (92%) Changeset truncated at 500 lines: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f35b1f3..65b68c2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,8 +21,6 @@ centos7/x86_64: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -40,8 +38,6 @@ fedora/x86_64: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -59,8 +55,6 @@ fedora/address-sanitizer: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -77,8 +71,6 @@ fedora/undefined-sanitizer: -DCMAKE_BUILD_TYPE=UndefinedSanitizer -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -91,14 +83,15 @@ fedora/thread-sanitizer: stage: analysis image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: +# Workaround for TSAN with ASLR on newer kernel +# https://github.com/google/sanitizers/issues/1716 - export TSAN_OPTIONS=second_deadlock_stack=1 - mkdir -p obj && cd obj && cmake -DCMAKE_BUILD_TYPE=ThreadSanitizer -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && - make -j$(nproc) && ctest --output-on-failure - tags: -- shared + make -j$(nproc) && + setarch --addr-no-randomize -- ctest --output-on-failure except: - tags artifacts: @@ -129,8 +122,6 @@ fedora/csbuild: --git-commit-range $CI_COMMIT_RANGE --co
[SCM] NSS Wrapper Repository - branch master updated
The branch, master has been updated via 199b6bc src: Fix copy‐paste error referring to wrong variable (Samba CID 1609453) from 2dd91af src: use LIBC_SO and LIBNSL_SO from GNU libc, if available https://git.samba.org/?p=nss_wrapper.git;a=shortlog;h=master - Log - commit 199b6bc016a48c0ff1ef70c528e9ee0ba08ca626 Author: Jo Sutton Date: Fri Jul 5 12:11:06 2024 +1200 src: Fix copy‐paste error referring to wrong variable (Samba CID 1609453) Signed-off-by: Jo Sutton Reviewed-by: Andreas Schneider --- Summary of changes: src/nss_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c index 78d88dc..4470d1c 100644 --- a/src/nss_wrapper.c +++ b/src/nss_wrapper.c @@ -6549,7 +6549,7 @@ void nwrap_destructor(void) } SAFE_FREE(nwrap_gr_global.list); - nwrap_pw_global.num = 0; + nwrap_gr_global.num = 0; } #if defined(HAVE_SHADOW_H) && defined(HAVE_GETSPNAM) -- NSS Wrapper Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 93a3dd48d66 gitlab-ci: Also add the git directory for pipeline in the main mirror from 2e0c693f78a Revert "pidl: Use non-existent function dissect_ndr_int64()" https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 93a3dd48d66786cb8765d3ce84ca9f3ad419ac88 Author: Andreas Schneider Date: Wed Jul 3 13:05:51 2024 +0200 gitlab-ci: Also add the git directory for pipeline in the main mirror Signed-off-by: Andreas Schneider Reviewed-by: Jo Sutton Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Jul 4 08:08:49 UTC 2024 on atb-devel-224 --- Summary of changes: .gitlab-ci-main.yml | 1 + 1 file changed, 1 insertion(+) Changeset truncated at 500 lines: diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml index ac7e403cd03..c70d9a6af41 100644 --- a/.gitlab-ci-main.yml +++ b/.gitlab-ci-main.yml @@ -148,6 +148,7 @@ include: # We are already running .gitlab-ci directives from this repo, remove additional checks that break our CI - git config --global --add safe.directory `pwd` - git config --global --add safe.directory /builds/samba-team/devel/samba/.git +- git config --global --add safe.directory /builds/samba-team/samba/.git after_script: - mount - df -h -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a77cffaa256 s4:torture: Initialize struct wrepl_wins_name via 909506c91c1 examples: Initialize char arrays via c814681c6b9 examples: Use cp with force option via 54ce370f7d0 s4:torture: Fully initialize struct samr_OpenUser via dd896862d0a s3:rpc_client: Check for array size instead of UINT16_MAX via 7990a2ba08c s4:torture: Initialize struct wrepl_wins_name via ec7dfedccf6 s3:auth: Avoid passing freed pamh pointer to funcitons using it via 990a68fedb9 s3:auth: Remove trailing spaces in pampass.c via 09d731470e1 s4:torture: Initialize struct smb2_handle via 4777464946c s4:torture: Initialize struct nbt_name_query via deced5eaae5 s3:torture: Remove trailing spaces in query.c from f824e985167 doc: Update codeing guidelines for struct initialisation https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a77cffaa256e6c4a6dbca115905c09ddbe9c22da Author: Andreas Schneider Date: Mon Jun 24 15:19:20 2024 +0200 s4:torture: Initialize struct wrepl_wins_name "Error: UNINIT (CWE-457): samba-4.20.0rc2/source4/torture/nbt/winsreplication.c:1244: var_decl: Declaring variable ""wins_name1"" without initializer. samba-4.20.0rc2/source4/torture/nbt/winsreplication.c:4835: assign: Assigning: ""wins_name_r1"" = ""_name1"", which points to uninitialized data. samba-4.20.0rc2/source4/torture/nbt/winsreplication.c:4905: uninit_use_in_call: Using uninitialized value ""*wins_name_r1"". Field ""wins_name_r1->is_group"" is uninitialized when calling ""test_wrepl_update_one"". 4903| 4904| /* now apply R1 */ 4905|->ret &= test_wrepl_update_one(tctx, ctx, records[i].r1.owner, wins_name_r1); 4906| ret &= test_wrepl_is_applied(tctx, ctx, records[i].r1.owner, 4907| wins_name_r1, records[i].r1.apply_expected);" Signed-off-by: Andreas Schneider Reviewed-by: Noel Power Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Jun 28 12:44:31 UTC 2024 on atb-devel-224 commit 909506c91c1660f124d772b5caa0191f10ee320c Author: Andreas Schneider Date: Mon Jun 24 15:17:13 2024 +0200 examples: Initialize char arrays "Error: UNINIT (CWE-457): samba-4.20.0rc2/examples/libsmbclient/testacl3.c:15: var_decl: Declaring variable ""value"" without initializer. samba-4.20.0rc2/examples/libsmbclient/testacl3.c:55: uninit_use_in_call: Using uninitialized value ""*value"" as argument to ""%s"" when calling ""printf"". [Note: The source code implementation of the function has been overridden by a builtin model.] 53| } 54| 55|-> printf(""Attributes for [%s] are:\n%s\n"", path, value); 56| } 57|" Signed-off-by: Andreas Schneider Reviewed-by: Noel Power commit c814681c6b965b15b3d4895cc0d47f01ba2c31d3 Author: Andreas Schneider Date: Mon Jun 24 15:14:43 2024 +0200 examples: Use cp with force option "Error: SHELLCHECK_WARNING: /usr/share/doc/samba/printing/VampireDriversFunctions:951:15: warning[SC2216]: Piping to 'cp', a command that doesn't read stdin. Wrong command or missing xargs? 949| CWD2=""$( pwd )"" ; 950| cd ""${i}""; 951|->echo ""yes"" | cp ../alldriverfiles.txt . 2> /dev/null ; 952| 953| cat alldriverfiles.txt \" Signed-off-by: Andreas Schneider Reviewed-by: Noel Power commit 54ce370f7d0ac0972f9693cef424c4239b15c754 Author: Andreas Schneider Date: Mon Jun 24 15:09:21 2024 +0200 s4:torture: Fully initialize struct samr_OpenUser "Error: UNINIT (CWE-457): samba-4.20.0rc2/source4/torture/rpc/samr.c:7381: var_decl: Declaring variable ""r"" without initializer. samba-4.20.0rc2/source4/torture/rpc/samr.c:7428: uninit_use: Using uninitialized value ""r.out.result.v"". 7426| torture_assert_ntstatus_ok(tctx, dcerpc_samr_QueryUserInfo_r(b, tctx, ), 7427| ""QueryUserInfo failed""); 7428|->if (!NT_STATUS_IS_OK(r.out.result)) { 7429| torture_result(tctx, TORTURE_FAIL, ""QueryUserInfo(%u) failed - %s\n"", r.in.rid, nt_errstr(r.out.result)); 7430| return false;" Signed-off-by: Andreas Schneider Reviewed-
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via cfb81b0c313 packaging: Add missing quotes in smbprint via b57bddacd76 s3:registry: Add missing return value checks via 8c4f807350d s3:registry: Avoid possible double frees via 10b95ff4368 s3:registry: Remove trailing spaces in reg_perfcount.c via 3cb4073cd0e s4:dsdb: Avoid possible underflows with new_len via 44db391ae1c s4:dsdb: Remove trailing spaces in schema_query.c via 94c06dd1890 s4:torture: Initialize struct wrepl_wins_name via 5d568f6e613 s4:torture: Remove trailing spaces in winsreplication.c via 067a30c5273 s3:utils: Fix get_window_height() return value via a0b6d18a254 s3:rpc_server: Make sure struct security_ace is initialized via c709cb8a17c s3:lib: Make sure struct security_ace is fully initialized via d6a7a97bc23 s3:lib: Remove trailing spaces in sharesec.c via 36fb8a3d654 nsswitch:krb5_plugin: Avoid a possible double free from 5b40cdf6e88 auth/credentials: don't ignore "client use kerberos" and --use-kerberos for machine accounts https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit cfb81b0c3138d6cb89cd88ce494c60acd7c2cc7f Author: Andreas Schneider Date: Wed Jun 19 11:50:26 2024 +0200 packaging: Add missing quotes in smbprint Found by Covscan. "Error: SHELLCHECK_WARNING (CWE-569): /usr/bin/smbprint:49:21: warning[SC1083]: This } is literal. Check expression (missing ;/\n?) or quote it. 47| # Concat this with /.config to get the config file. 48| # 49|-> eval acct_file=\${$#} 50| spool_dir=$(dirname $acct_file) 51| config_file=$spool_dir/.config" Signed-off-by: Andreas Schneider Reviewed-by: Signed-off-by: Martin Schwenke Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Mon Jun 24 07:14:54 UTC 2024 on atb-devel-224 commit b57bddacd765c48f3f427095ba4a474dbaf51c23 Author: Andreas Schneider Date: Wed Jun 19 11:47:41 2024 +0200 s3:registry: Add missing return value checks Signed-off-by: Andreas Schneider Reviewed-by: Signed-off-by: Martin Schwenke commit 8c4f807350d6815582019bb0c52358e7db43ea24 Author: Andreas Schneider Date: Wed Jun 19 11:46:15 2024 +0200 s3:registry: Avoid possible double frees Found by Covscan. "Error: USE_AFTER_FREE (CWE-416): samba-4.20.0rc2/source3/registry/reg_perfcount.c:309: freed_arg: ""_reg_perfcount_multi_sz_from_tdb"" frees ""*retbuf"". samba-4.20.0rc2/source3/registry/reg_perfcount.c:313: double_free: Calling ""_reg_perfcount_multi_sz_from_tdb"" frees pointer ""*retbuf"" which has already been freed. 311| for(i = 1; i <= base_index; i++) 312| { 313|->buffer_size = _reg_perfcount_multi_sz_from_tdb(names, i*2, retbuf, buffer_size); 314| } 315| tdb_close(names);" Signed-off-by: Andreas Schneider Reviewed-by: Signed-off-by: Martin Schwenke commit 10b95ff436866e484755fc2c5189263394029a29 Author: Andreas Schneider Date: Wed Jun 19 11:45:01 2024 +0200 s3:registry: Remove trailing spaces in reg_perfcount.c Signed-off-by: Andreas Schneider Reviewed-by: Signed-off-by: Martin Schwenke commit 3cb4073cd0e24c8082d71d569a67a344af0f8cba Author: Andreas Schneider Date: Wed Jun 19 11:33:00 2024 +0200 s4:dsdb: Avoid possible underflows with new_len Found by Covscan. "Error: INTEGER_OVERFLOW (CWE-190): samba-4.20.0rc2/source4/dsdb/schema/schema_query.c:403: tainted_data_argument: The check ""i < new_len"" contains the tainted expression ""i"" which causes ""new_len"" to be considered tainted. samba-4.20.0rc2/source4/dsdb/schema/schema_query.c:407: overflow: The expression ""new_len - i"" is deemed underflowed because at least one of its arguments has underflowed. samba-4.20.0rc2/source4/dsdb/schema/schema_query.c:407: overflow: The expression ""(new_len - i) * 8UL"" is deemed underflowed because at least one of its arguments has underflowed. samba-4.20.0rc2/source4/dsdb/schema/schema_query.c:407: overflow_sink: ""(new_len - i) * 8UL"", which might have underflowed, is passed to ""memmove(val1, val2, (new_len - i) * 8UL)"". [Note: The source code implementation of the function has been overridden by a builtin model.] 405| const char **val2 = _list[i]; 406| if (ldb_attr_cmp(*val1, *val2) == 0) { 407|->memmove(val1, val2, (new_len - i) * sizeof( *attr_list)); 4
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9242f1e0ddb gitlab-ci: Update image to Fedora 40 via 276db59eff2 gitlab-ci: Add CentOS 9 Stream via 11d1c4704a8 gitlab-ci: Remove CentOS7 which is EOL via efa2d0bf82a selftest: Set NSS_WRAPPER_HOSTS for smbclient via 0b19bb12a4c selftest: Create the cmd outside of the loop via 4a48148a7d8 s4:torture: Add missing NULL checks in spoolss.c via 8d5b40296f8 lib:util: Fix size of tmp array via 6aaab84533c lib:util: Remove tailing spaces in util.c from 8ae180e1678 third_party: Update socket_wrapper to version 1.4.3 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9242f1e0ddbe3653f2612c704c0dba455f843ec3 Author: Andreas Schneider Date: Tue Apr 30 11:30:48 2024 +0200 gitlab-ci: Update image to Fedora 40 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Jun 13 13:29:48 UTC 2024 on atb-devel-224 commit 276db59eff2b4f959172c1ce66f21e2bfd79d8fe Author: Andreas Schneider Date: Fri Jun 7 14:16:28 2024 +0200 gitlab-ci: Add CentOS 9 Stream Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 11d1c4704a851e9275551c39d88f1c1cf1bdb96a Author: Andreas Schneider Date: Fri Jun 7 14:09:43 2024 +0200 gitlab-ci: Remove CentOS7 which is EOL See https://blog.centos.org/2023/04/end-dates-are-coming-for-centos-stream-8-and-centos-linux-7/ Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit efa2d0bf82ae2d57e30d83e43116cb678a1004fc Author: Andreas Schneider Date: Thu Jun 6 11:51:53 2024 +0200 selftest: Set NSS_WRAPPER_HOSTS for smbclient This is calling getaddrinfo() Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 0b19bb12a4c6a86cee6fdda1319a173b02934e0a Author: Andreas Schneider Date: Thu Jun 6 11:51:24 2024 +0200 selftest: Create the cmd outside of the loop Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 4a48148a7d830fb0ec6884f39b2ab1e5d41f2181 Author: Andreas Schneider Date: Tue Apr 30 17:31:00 2024 +0200 s4:torture: Add missing NULL checks in spoolss.c source4/torture/rpc/spoolss.c: In function ‘check_printer_driver_file.isra’: source4/torture/rpc/spoolss.c:10850:58: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 10850 | const char *remote_name = talloc_asprintf(tctx, "%s\\%d\\%s", | ^~ Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 8d5b40296f89aee6c9a364017b0cb750cf0b7966 Author: Andreas Schneider Date: Tue Apr 30 13:01:20 2024 +0200 lib:util: Fix size of tmp array lib/util/util.c: In function ‘dump_data_block16’: lib/util/util.c:503:40: error: ‘%04zX’ directive output may be truncated writing between 4 and 16 bytes into a region of size 15 [-Werror=format-truncation=] 503 | snprintf(tmp, sizeof(tmp), "%s[%04zX]", prefix, idx); |^ Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 6aaab84533c5691fefa0108da40a41e74f53c89f Author: Andreas Schneider Date: Tue Apr 30 12:54:48 2024 +0200 lib:util: Remove tailing spaces in util.c Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: .gitlab-ci-main.yml| 30 bootstrap/.gitlab-ci.yml | 9 +-- bootstrap/config.py| 80 +++--- bootstrap/generated-dists/Vagrantfile | 24 +++ .../{centos7 => centos9s}/Dockerfile | 2 +- .../{centos7 => centos9s}/bootstrap.sh | 61 + .../{centos7 => centos9s}/locale.sh| 0 .../{centos7 => centos9s}/packages.yml | 38 +- bootstrap/generated-dists/fedora39/Dockerfile | 29 .../{centos7 => fedora40}/Dockerfile | 2 +- .../{fedora39 => fedora40}/bootstrap.sh| 0 .../{fedora39 => fedora40}/locale.sh | 0 .../{fedora39 => fedora40}/packages.yml| 0 bootstrap/sha1sum.txt | 2 +- lib/util/util.c| 28 selftest/target/Samba3.pm | 12 ++-- source4/torture/rpc/spoolss.c | 17 +++-- 17 files changed, 158 insertions(+), 176 deletions(-) copy bootstrap/generated-dists/{centos7 => centos9s}/Doc
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8ae180e1678 third_party: Update socket_wrapper to version 1.4.3 via f88e60644e7 third_party: Update uid_wrapper to version 1.3.1 via 54fed589cca gitlab-ci: Set git safe.directory for devel repo via f3af6e86080 bootstrap: Fix building CentOS 8 Stream container images via d00e9482a50 bootstrap: Set git safe.directory via 84fb5cc8451 bootstrap: Fix runner tags from aecbfe52183 python/samba/tests/krb5: Add tests for password expiry with krb5 ENC-TS https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8ae180e1678fc8565b8074d4886f7d3676a0f950 Author: Andreas Schneider Date: Thu Jun 13 07:47:26 2024 +0200 third_party: Update socket_wrapper to version 1.4.3 This fixes issues with bind compiled with jemalloc. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15660 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Jun 13 08:41:39 UTC 2024 on atb-devel-224 commit f88e60644e76c6310088934439f9c0da0f63905f Author: Andreas Schneider Date: Thu Jun 13 07:41:41 2024 +0200 third_party: Update uid_wrapper to version 1.3.1 This fixes issues with bind compiled with jemalloc. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15660 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 54fed589cca245c716492bcc78b574c30378b19c Author: Andreas Schneider Date: Fri Jun 7 16:20:10 2024 +0200 gitlab-ci: Set git safe.directory for devel repo BUG: https://bugzilla.samba.org/show_bug.cgi?id=15660 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit f3af6e860800d0f837cdf6c2d16d1cd12feb08df Author: Andreas Schneider Date: Mon Jun 10 15:28:30 2024 +0200 bootstrap: Fix building CentOS 8 Stream container images BUG: https://bugzilla.samba.org/show_bug.cgi?id=15660 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit d00e9482a50b5a756f4847cde977c40c80e179c5 Author: Andreas Schneider Date: Thu Jun 6 16:10:14 2024 +0200 bootstrap: Set git safe.directory BUG: https://bugzilla.samba.org/show_bug.cgi?id=15660 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 84fb5cc8451c0af354850f39ae6debf388849ebb Author: Andreas Schneider Date: Thu Jun 6 14:41:02 2024 +0200 bootstrap: Fix runner tags See https://docs.gitlab.com/ee/ci/runners/hosted_runners/linux.html BUG: https://bugzilla.samba.org/show_bug.cgi?id=15660 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: .gitlab-ci-main.yml | 3 +- bootstrap/.gitlab-ci.yml| 6 +-- bootstrap/config.py | 3 ++ bootstrap/generated-dists/centos8s/bootstrap.sh | 3 ++ bootstrap/sha1sum.txt | 2 +- buildtools/wafsamba/samba_third_party.py| 4 +- third_party/socket_wrapper/socket_wrapper.c | 45 ++- third_party/socket_wrapper/wscript | 3 +- third_party/uid_wrapper/uid_wrapper.c | 58 - third_party/uid_wrapper/wscript | 4 +- 10 files changed, 118 insertions(+), 13 deletions(-) Changeset truncated at 500 lines: diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml index 1e4bdf82e74..c56c84c89d4 100644 --- a/.gitlab-ci-main.yml +++ b/.gitlab-ci-main.yml @@ -47,7 +47,7 @@ variables: # Set this to the contents of bootstrap/sha1sum.txt # which is generated by bootstrap/template.py --render # - SAMBA_CI_CONTAINER_TAG: 9a406973474a7903fe7fd6215226660911ed73c0 + SAMBA_CI_CONTAINER_TAG: b078783e082ead539940faaa644567bf4ed67f67 # # We use the ubuntu2204 image as default as # it matches what we have on atb-devel-224 @@ -147,6 +147,7 @@ include: - ccache -s # We are already running .gitlab-ci directives from this repo, remove additional checks that break our CI - git config --global --add safe.directory `pwd` +- git config --global --add safe.directory /builds/samba-team/devel/samba/.git after_script: - mount - df -h diff --git a/bootstrap/.gitlab-ci.yml b/bootstrap/.gitlab-ci.yml index ba82cdc1251..77b4e4fe290 100644 --- a/bootstrap/.gitlab-ci.yml +++ b/bootstrap/.gitlab-ci.yml @@ -6,9 +6,7 @@ # We need to make sure we only use gitlab.com # runners and not our own runners, as our current runners # don't allow 'docker build ...' to run. -- docker -- gce -- shared +- saas-linux-small-amd64 variables: SAMBA_CI_IS_BROKEN_IMAGE: "no" SAMBA_CI_TEST_JOB:
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via d7c4bb5 Bump version to 1.4.3 from 03cea2e swrap: Fix syscall() with jemalloc to prevent a deadlock https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit d7c4bb54b3d1b5007041f04ef34f47862b736876 Author: Andreas Schneider Date: Wed Jun 12 16:12:42 2024 +0200 Bump version to 1.4.3 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: CHANGELOG | 6 ++ CMakeLists.txt | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/CHANGELOG b/CHANGELOG index 48192d5..2ef0aa6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,12 @@ CHANGELOG = +version 1.4.3 (released 2024-06-12) + * Fixed socket_wrapper running with jemalloc compiled binaries + * Fixed thread sanitizer on modern Linux Kernels + * Fixed swrap_fake_uid_wrapper test + * Fixed building on Hurd + version 1.4.2 (released 2023-06-29) * Fixed LFS issues on 32bit platforms diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b235d7..f66cff9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") include(DefineCMakeDefaults) include(DefineCompilerFlags) -project(socket_wrapper VERSION 1.4.2 LANGUAGES C) +project(socket_wrapper VERSION 1.4.3 LANGUAGES C) # global needed variables set(APPLICATION_NAME ${PROJECT_NAME}) @@ -25,7 +25,7 @@ set(APPLICATION_NAME ${PROJECT_NAME}) # Increment PATCH. set(LIBRARY_VERSION_MAJOR 0) set(LIBRARY_VERSION_MINOR 4) -set(LIBRARY_VERSION_PATCH 1) +set(LIBRARY_VERSION_PATCH 2) set(LIBRARY_VERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY_VERSION_PATCH}") set(LIBRARY_SOVERSION ${LIBRARY_VERSION_MAJOR}) -- Socket Wrapper Repository
[SCM] UID Wrapper Repository - branch master updated
The branch, master has been updated via 184e610 Bump version to 1.3.1 via 4127ba0 src: use LIBC_SO from GNU libc, if available via 16c0212 src/uid_wrapper.c: Fix typo of 'Initialize.' from 3916f98 uwrap: Fix syscall() with jemalloc to prevent a deadlock https://git.samba.org/?p=uid_wrapper.git;a=shortlog;h=master - Log - commit 184e61007f60c644e8841c8fbca1acd6bff7fad8 Author: Andreas Schneider Date: Wed Jun 12 15:51:35 2024 +0200 Bump version to 1.3.1 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 4127ba0298b1ebd220c8555b2a785d6cc8084fca Author: Pino Toscano Date: Fri May 30 19:06:10 2014 +0200 src: use LIBC_SO from GNU libc, if available Look for gnu/lib-names.h and use the LIBC_SO define to dlopen libc, so the right library is loaded without manually searching for libc.so.N. Reviewed-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 16c0212f128ab1aba706422f437c585d714c6a48 Author: Simon Josefsson Date: Fri Aug 4 10:48:45 2023 +0200 src/uid_wrapper.c: Fix typo of 'Initialize.' Signed-off-by: Simon Josefsson Reviewed-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: CHANGELOG | 6 ++ CMakeLists.txt| 4 ++-- ConfigureChecks.cmake | 1 + config.h.cmake| 1 + src/uid_wrapper.c | 13 - 5 files changed, 22 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/CHANGELOG b/CHANGELOG index 92542f5..40a33c6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,12 @@ CHANGELOG = +version 1.3.1 (released 2024-06-12) + * Added support to find libc via LIBC_SO define + * Fixed uid_wrapper running with jemalloc compiled binaries + * Fixed socket_wrapper interaction test + * Fixed thread sanitizer on modern Linux Kernels + version 1.3.0 (released 2023-01-17) * Added support to interact with socket_wrapper syscall() * Fixed deadlocks with threads diff --git a/CMakeLists.txt b/CMakeLists.txt index 1523bd7..14215c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") include(DefineCMakeDefaults) include(DefineCompilerFlags) -project(uid_wrapper VERSION 1.3.0 LANGUAGES C) +project(uid_wrapper VERSION 1.3.1 LANGUAGES C) # global needed variables set(APPLICATION_NAME ${PROJECT_NAME}) @@ -23,7 +23,7 @@ set(APPLICATION_NAME ${PROJECT_NAME}) # Increment AGE. Set REVISION to 0 # If the source code was changed, but there were no interface changes: # Increment REVISION. -set(LIBRARY_VERSION "0.2.0") +set(LIBRARY_VERSION "0.2.1") set(LIBRARY_SOVERSION "0") # add definitions diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 3201131..6294b23 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -48,6 +48,7 @@ check_include_file(sys/syscall.h HAVE_SYS_SYSCALL_H) check_include_file(syscall.h HAVE_SYSCALL_H) check_include_file(grp.h HAVE_GRP_H) check_include_file(unistd.h HAVE_UNISTD_H) +check_include_file(gnu/lib-names.h HAVE_GNU_LIB_NAMES_H) # FUNCTIONS check_function_exists(strncpy HAVE_STRNCPY) diff --git a/config.h.cmake b/config.h.cmake index dde70ec..97521f8 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -14,6 +14,7 @@ #cmakedefine HAVE_SYSCALL_H 1 #cmakedefine HAVE_UNISTD_H 1 #cmakedefine HAVE_GRP_H 1 +#cmakedefine HAVE_GNU_LIB_NAMES_H 1 /*** FUNCTIONS ***/ diff --git a/src/uid_wrapper.c b/src/uid_wrapper.c index 4a174e1..ca578e6 100644 --- a/src/uid_wrapper.c +++ b/src/uid_wrapper.c @@ -38,6 +38,10 @@ #include +#ifdef HAVE_GNU_LIB_NAMES_H +#include +#endif + #ifdef HAVE_GCC_THREAD_LOCAL_STORAGE # define UWRAP_THREAD __thread #else @@ -558,6 +562,13 @@ static void *uwrap_load_lib_handle(enum uwrap_lib lib) switch (lib) { case UWRAP_LIBC: handle = uwrap.libc.handle; +#ifdef LIBC_SO + if (handle == NULL) { + handle = dlopen(LIBC_SO, flags); + + uwrap.libc.handle = handle; + } +#endif if (handle == NULL) { for (i = 10; i >= 0; i--) { char soname[256] = {0}; @@ -1400,7 +1411,7 @@ static void uwrap_init_env(struct uwrap_thread *id) exit(-1); } - UWRAP_LOG(UWRAP_LOG_DEBUG, "Initalize groups with %s", env); + UWRAP_LOG(UWRAP_LOG_DEBUG, "Initialize groups with %s", env); id->ngroups = ngroups; } } -- UID Wrapper Repository
[SCM] UID Wrapper Repository - branch master updated
The branch, master has been updated via 3916f98 uwrap: Fix syscall() with jemalloc to prevent a deadlock via 895197e gitlab-ci: Disable ASLR for TSAN via a9b1ca6 gitlab-ci: Adapt config to gitlab changes from c8bf3ae tests: Fix fake socket_wrapper_syscall_valid() https://git.samba.org/?p=uid_wrapper.git;a=shortlog;h=master - Log - commit 3916f985e716c865269c1f0a437efdc1aa5cdc87 Author: Andreas Schneider Date: Wed Jun 12 11:19:58 2024 +0200 uwrap: Fix syscall() with jemalloc to prevent a deadlock This is a workaround to prevent a deadlock in jemalloc calling malloc_init() twice. The first allocation call will trigger a malloc_init() of jemalloc. The functions calls syscall(SYS_open, ...) so it goes to socket or uid wrapper. In this code path we need to avoid any allocation calls. This will prevent the deadlock. Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Stefan Metzmacher Signed-off-by: Andreas Schneider commit 895197ece51df1b24ee163aaece1ed2f18812f79 Author: Andreas Schneider Date: Wed Jun 12 11:22:41 2024 +0200 gitlab-ci: Disable ASLR for TSAN This works around a TSAN issue with newer Linux Kernels (6.x). See https://github.com/google/sanitizers/issues/1716 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit a9b1ca679a17d9d2d819f8099d7f51a63b2f1dfe Author: Andreas Schneider Date: Wed Jun 12 11:21:12 2024 +0200 gitlab-ci: Adapt config to gitlab changes Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: .gitlab-ci.yml| 27 --- src/uid_wrapper.c | 45 - 2 files changed, 48 insertions(+), 24 deletions(-) Changeset truncated at 500 lines: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1a4a3b0..3a84a8e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,8 +22,6 @@ centos7/x86_64: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -42,8 +40,6 @@ fedora/x86_64: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure && make install - tags: -- shared except: - tags artifacts: @@ -61,8 +57,6 @@ fedora/address-sanitizer: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -79,8 +73,6 @@ fedora/undefined-sanitizer: -DCMAKE_BUILD_TYPE=UndefinedSanitizer -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -93,13 +85,14 @@ fedora/thread-sanitizer: stage: analysis image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD script: +# Workaround for TSAN with ASLR on newer kernel +# https://github.com/google/sanitizers/issues/1716 - mkdir -p obj && cd obj && cmake -DCMAKE_BUILD_TYPE=ThreadSanitizer -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && - make -j$(nproc) && ctest --output-on-failure - tags: -- shared + make -j$(nproc) && + setarch --addr-no-randomize -- ctest --output-on-failure except: - tags artifacts: @@ -132,8 +125,6 @@ fedora/csbuild: --git-commit-range $CI_COMMIT_RANGE --color --print-current --print-fixed - tags: -- shared except: - tags artifacts: @@ -174,8 +165,6 @@ tumbleweed/x86_64/gcc: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -194,8 +183,6 @@ tumbleweed/x86_64/gcc7: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -214,8 +201,6 @@ tumbleweed/x86_64/clang: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -236,8 +221,6 @@ tumbleweed/static-analysis: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && scan-build --status-bugs -o scan make -j$(nproc) - tags: -- shared except: - tags artifacts: @@ -255,8 +238,6 @@ ubuntu/x86_64: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except:
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via 03cea2e swrap: Fix syscall() with jemalloc to prevent a deadlock via 9b141c0 tests: Sleep less so that the test runs only for 60sec via 9658fec tests: Always link to cmocka library via e3c2432 gitlab-ci: Disable ASLR for TSAN via 87f2b5a gitlab-ci: Adapt config to gitlab changes from 7af4f26 tests: Fix fake uid_wrapper_syscall_valid(). https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit 03cea2ed18bc53bd0e658bc24be6913373d5f97e Author: Andreas Schneider Date: Fri Jun 7 09:39:20 2024 +0200 swrap: Fix syscall() with jemalloc to prevent a deadlock This is a workaround to prevent a deadlock in jemalloc calling malloc_init() twice. The first allocation call will trigger a malloc_init() of jemalloc. The functions calls syscall(SYS_open, ...) so it goes to socket or uid wrapper. In this code path we need to avoid any allocation calls. This will prevent the eadlock. Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Stefan Metzmacher Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 9b141c06568bfba2b9fe63e7d43fb7d1cae12b55 Author: Andreas Schneider Date: Tue Jun 11 08:05:09 2024 +0200 tests: Sleep less so that the test runs only for 60sec Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 9658fec68b9d20d280c70714d99bc76f23ec7a9a Author: Andreas Schneider Date: Tue Jun 11 09:41:55 2024 +0200 tests: Always link to cmocka library Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit e3c243237097750bbdf57bc2e4835ab5e89fcb0e Author: Andreas Schneider Date: Wed Jun 12 10:28:45 2024 +0200 gitlab-ci: Disable ASLR for TSAN This works around a TSAN issue with newer Linux Kernels (6.x). See https://github.com/google/sanitizers/issues/1716 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 87f2b5ae1c4b88639f76578c0463efe6ae1b051d Author: Andreas Schneider Date: Fri Jun 7 09:52:48 2024 +0200 gitlab-ci: Adapt config to gitlab changes Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: .gitlab-ci.yml | 33 - src/socket_wrapper.c | 45 - tests/CMakeLists.txt | 6 +++--- tests/test_echo_tcp_poll.c | 2 +- 4 files changed, 52 insertions(+), 34 deletions(-) Changeset truncated at 500 lines: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3643167..fdc11c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,8 +22,6 @@ centos7/x86_64: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -41,8 +39,6 @@ fedora/x86_64: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -60,8 +56,6 @@ fedora/address-sanitizer: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -78,8 +72,6 @@ fedora/undefined-sanitizer: -DCMAKE_BUILD_TYPE=UndefinedSanitizer -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -95,13 +87,14 @@ tumbleweed/thread-sanitizer: stage: analysis image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD script: +# Workaround for TSAN with ASLR on newer kernel +# https://github.com/google/sanitizers/issues/1716 - mkdir -p obj && cd obj && cmake -DCMAKE_BUILD_TYPE=ThreadSanitizer -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && - make -j$(nproc) && ctest --output-on-failure - tags: -- shared + make -j$(nproc) && + setarch --addr-no-randomize -- ctest --output-on-failure except: - tags artifacts: @@ -133,8 +126,6 @@ fedora/csbuild: --git-commit-range $CI_COMMIT_RANGE --color --print-current --print-fixed - tags: -- shared except: - tags artifacts: @@ -175,8 +166,6 @@ tumbleweed/x86_64/gcc: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) && ctest --output-on-failure - tags: -- shared except: - tags artifacts: @@ -195,8 +184,6 @@ tumbleweed/x86_64/gcc7: -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON .. && make -j$(nproc) &
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via 7af4f26 tests: Fix fake uid_wrapper_syscall_valid(). from c666ba4 tests: Define PATH_MAX for Hurd. https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit 7af4f26d9d6ec1d6c4c2ec08d0c52d42d47de881 Author: Simon Josefsson Date: Sat Aug 19 09:34:14 2023 +0200 tests: Fix fake uid_wrapper_syscall_valid(). We want to return errno = ENOSYS in uid_wrapper_syscall_va(). However if we do not handle __FAKE_SOCKET_WRAPPER_SYSCALL_NO+1 then we will call libc_syscall() for __FAKE_SOCKET_WRAPPER_SYSCALL_NO+1. Same problem as resolved for uid_wrapper, see: BUG: https://bugzilla.samba.org/show_bug.cgi?id=15445 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15448 Signed-off-by: Simon Josefsson Reviewed-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: tests/swrap_fake_uid_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/tests/swrap_fake_uid_wrapper.c b/tests/swrap_fake_uid_wrapper.c index 286d7ad..fc9cf46 100644 --- a/tests/swrap_fake_uid_wrapper.c +++ b/tests/swrap_fake_uid_wrapper.c @@ -23,7 +23,7 @@ /* simulate uid_wrapper hooks */ bool uid_wrapper_syscall_valid(long int sysno) { - if (sysno == __FAKE_UID_WRAPPER_SYSCALL_NO) { + if (sysno >= __FAKE_UID_WRAPPER_SYSCALL_NO) { return true; } -- Socket Wrapper Repository
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via c666ba4 tests: Define PATH_MAX for Hurd. from d07136e Bump version to 1.4.2 https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit c666ba444b46d84c0c49f2c70c9b2c3cb1f6f974 Author: Simon Josefsson Date: Sat Aug 19 11:25:56 2023 +0200 tests: Define PATH_MAX for Hurd. Signed-off-by: Simon Josefsson Reviewed-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: tests/test_fcntl_lock.c | 4 tests/test_ioctl.c | 4 2 files changed, 8 insertions(+) Changeset truncated at 500 lines: diff --git a/tests/test_fcntl_lock.c b/tests/test_fcntl_lock.c index 0c172d6..5646f43 100644 --- a/tests/test_fcntl_lock.c +++ b/tests/test_fcntl_lock.c @@ -9,6 +9,10 @@ #include #include +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + static int setup(void **state) { char test_tmpdir[256]; diff --git a/tests/test_ioctl.c b/tests/test_ioctl.c index aebff91..25bec38 100644 --- a/tests/test_ioctl.c +++ b/tests/test_ioctl.c @@ -14,6 +14,10 @@ #include #include +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + static int setup(void **state) { char test_tmpdir[256]; -- Socket Wrapper Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 68a1200f66e Restore empty string default for conf.env['icu-libs'] from 833c3f26b47 python/tests: Fix nlink test in smb3unix on btrfs filesystem https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 68a1200f66e9008ca0a739b37b48c49453ca9d83 Author: Earl Chew Date: Fri May 10 19:46:28 2024 -0700 Restore empty string default for conf.env['icu-libs'] The reworked ICU libraries configuration code used [] as default for conf.env['icu-libs']. This breaks dependency analysis in samba_deps.py because SAMBA_SUBSYSTEM() expects deps to be a string. Signed-off-by: Earl Chew Reviewed-by: Andrew Bartlett Reviewed-by: Douglas Bagnall Reviewed-by: Volker Lendecke Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue May 14 14:44:06 UTC 2024 on atb-devel-224 --- Summary of changes: lib/util/charset/wscript_configure | 2 ++ 1 file changed, 2 insertions(+) Changeset truncated at 500 lines: diff --git a/lib/util/charset/wscript_configure b/lib/util/charset/wscript_configure index c49b55a4fd4..adae44eab5e 100644 --- a/lib/util/charset/wscript_configure +++ b/lib/util/charset/wscript_configure @@ -46,3 +46,5 @@ if conf.CHECK_CFG(package='icu-i18n icu-uc', if not conf.CHECK_HEADERS('unicode/ustring.h', lib='icui18n'): conf.fatal('Found icui18n, but unicode/ustring.h is missing') conf.DEFINE('HAVE_UTF8_NORMALISATION', 1) +else: +conf.env['icu-libs'] = '' -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c5a1c8d45b9 s4:dsdb: Fix stack use after scope in gkdi_create_root_key() from 6bf51860a00 smbd: Remove unused [push_pull]_file_id_24 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c5a1c8d45b9e87ff4ab9785fe50b6efc8ffa396c Author: Andreas Schneider Date: Tue Apr 30 09:16:40 2024 +0200 s4:dsdb: Fix stack use after scope in gkdi_create_root_key() ==20978==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f4f91ff51a0 at pc 0x7f4f94cf93d6 bp 0x7ffdb90fc510 sp 0x7ffdb90fbcd0 READ of size 64 at 0x7f4f91ff51a0 thread T0 #0 0x7f4f94cf93d5 in memcpy ../../../../libsanitizer/sanitizer_common/sanitizer_common_interceptors_memintrinsics.inc:115 #1 0x7f4f933bdb67 in ldb_val_dup ../../lib/ldb/common/ldb_msg.c:325 #2 0x7f4f933c11d1 in ldb_msg_copy ../../lib/ldb/common/ldb_msg.c:1182 #3 0x7f4f933c13d2 in ldb_msg_normalize ../../lib/ldb/common/ldb_msg.c:1235 #4 0x7f4f933ab556 in ldb_request ../../lib/ldb/common/ldb.c:1196 #5 0x7f4f8e82b1d4 in dsdb_autotransaction_request ../../source4/dsdb/common/util.c:1220 #6 0x7f4f8e831c8a in dsdb_add ../../source4/dsdb/common/util.c:5354 #7 0x7f4f8e853a01 in gkdi_create_root_key ../../source4/dsdb/gmsa/gkdi.c:493 #8 0x7f4f8e853a01 in gkdi_new_root_key ../../source4/dsdb/gmsa/gkdi.c:551 #9 0x7f4f8cd4ca52 in py_dsdb_create_gkdi_root_key ../../source4/dsdb/pydsdb.c:1388 #10 0x7f4f947ce01c (/lib64/libpython3.11.so.1.0+0x1ce01c) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #11 0x7f4f947de4c0 in _PyObject_Call (/lib64/libpython3.11.so.1.0+0x1de4c0) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #12 0x7f4f947be6ca in _PyEval_EvalFrameDefault (/lib64/libpython3.11.so.1.0+0x1be6ca) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #13 0x7f4f947b6e79 (/lib64/libpython3.11.so.1.0+0x1b6e79) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #14 0x7f4f947de5d8 (/lib64/libpython3.11.so.1.0+0x1de5d8) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #15 0x7f4f947be6ca in _PyEval_EvalFrameDefault (/lib64/libpython3.11.so.1.0+0x1be6ca) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #16 0x7f4f947b6e79 (/lib64/libpython3.11.so.1.0+0x1b6e79) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #17 0x7f4f947edabb (/lib64/libpython3.11.so.1.0+0x1edabb) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #18 0x7f4f947de5d8 (/lib64/libpython3.11.so.1.0+0x1de5d8) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #19 0x7f4f947be6ca in _PyEval_EvalFrameDefault (/lib64/libpython3.11.so.1.0+0x1be6ca) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #20 0x7f4f947b6e79 (/lib64/libpython3.11.so.1.0+0x1b6e79) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #21 0x7f4f947ed9fb (/lib64/libpython3.11.so.1.0+0x1ed9fb) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #22 0x7f4f947be6ca in _PyEval_EvalFrameDefault (/lib64/libpython3.11.so.1.0+0x1be6ca) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #23 0x7f4f947b6e79 (/lib64/libpython3.11.so.1.0+0x1b6e79) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #24 0x7f4f947be6ca in _PyEval_EvalFrameDefault (/lib64/libpython3.11.so.1.0+0x1be6ca) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #25 0x7f4f947b6e79 (/lib64/libpython3.11.so.1.0+0x1b6e79) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #26 0x7f4f94839997 in PyEval_EvalCode (/lib64/libpython3.11.so.1.0+0x239997) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #27 0x7f4f94856862 (/lib64/libpython3.11.so.1.0+0x256862) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #28 0x7f4f94852e59 (/lib64/libpython3.11.so.1.0+0x252e59) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #29 0x7f4f94868fb1 (/lib64/libpython3.11.so.1.0+0x268fb1) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #30 0x7f4f948687a3 in _PyRun_SimpleFileObject (/lib64/libpython3.11.so.1.0+0x2687a3) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #31 0x7f4f94868453 in _PyRun_AnyFileObject (/lib64/libpython3.11.so.1.0+0x268453) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #32 0x7f4f94861c53 in Py_RunMain (/lib64/libpython3.11.so.1.0+0x261c53) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #33 0x7f4f94829996 in Py_BytesMain (/lib64/libpython3.11.so.1.0+0x229996) (BuildId: 170cbf941d17f6c2ac4f784129b31ebaa10c44a7) #34 0x7f4f9422a1ef in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #35 0x7f4f9422a2b8 in __libc_start_main_impl ../csu/libc-start.c:360 #36 0x5604497e3084 in _start (/usr/bin/python3.11+0x1084) (BuildId
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7a5e7b82125 python: Fix NtVer check for site_dn_for_machine() from cc7c12e5d5c lib: Remove an obsolete comment https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7a5e7b821259890dd2978e6f113f4a3dad110ea4 Author: Andreas Schneider Date: Mon Apr 15 07:32:02 2024 +0200 python: Fix NtVer check for site_dn_for_machine() BUG: https://bugzilla.samba.org/show_bug.cgi?id=15633 Signed-off-by: Andreas Schneider Reviewed-by: David Mulder Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Apr 17 19:32:11 UTC 2024 on atb-devel-224 --- Summary of changes: python/samba/gp/gpclass.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/gp/gpclass.py b/python/samba/gp/gpclass.py index 08be472e707..d86aacec138 100644 --- a/python/samba/gp/gpclass.py +++ b/python/samba/gp/gpclass.py @@ -805,9 +805,7 @@ def site_dn_for_machine(samdb, dc_hostname, lp, creds, hostname): samlogon_response = ndr_unpack(nbt.netlogon_samlogon_response, bytes(res.msgs[0]['Netlogon'][0])) -if samlogon_response.ntver not in [nbt.NETLOGON_NT_VERSION_5EX, - (nbt.NETLOGON_NT_VERSION_1 -| nbt.NETLOGON_NT_VERSION_5EX)]: +if not (samlogon_response.ntver & nbt.NETLOGON_NT_VERSION_5EX): raise RuntimeError('site_dn_for_machine: Invalid NtVer in ' + 'netlogon_samlogon_response') -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 48493735e2d s3: winbindd: winbindd_pam: fix leak in extract_pac_vrfy_sigs from 532789b4f3f s4:dsdb: Implement msDS-ManagedPassword attribute https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 48493735e2d2091740fe784cf07a4258dfc0b512 Author: Shaleen Bathla Date: Wed Apr 10 18:31:39 2024 +0530 s3: winbindd: winbindd_pam: fix leak in extract_pac_vrfy_sigs Add missing free for entry variable and its members : key and principal Found definite memory leaks via valgrind as shown below. Leak 1 : ==1686== 76,800 bytes in 2,400 blocks are definitely lost in loss record 432 of 433 ==1686==at 0x4C38185: malloc (vg_replace_malloc.c:431) ==1686==by 0x79CBFED: krb5int_c_copy_keyblock_contents (keyblocks.c:101) ==1686==by 0x621CFA3: krb5_mkt_get_next (kt_memory.c:500) ==1686==by 0x141186: extract_pac_vrfy_sigs (winbindd_pam.c:3384) ==1686==by 0x141186: winbindd_pam_auth_pac_verify (winbindd_pam.c:3434) ==1686==by 0x17ED21: winbindd_pam_auth_crap_send (winbindd_pam_auth_crap.c:68) ==1686==by 0x127F45: process_request_send (winbindd.c:502) ==1686==by 0x127F45: winbind_client_request_read (winbindd.c:749) ==1686==by 0x124AAF: wb_req_read_done (wb_reqtrans.c:126) ==1686==by 0x66D4706: tevent_common_invoke_fd_handler (tevent_fd.c:142) ==1686==by 0x66DAF4E: epoll_event_loop (tevent_epoll.c:737) ==1686==by 0x66DAF4E: epoll_event_loop_once (tevent_epoll.c:938) ==1686==by 0x66D8F5A: std_event_loop_once (tevent_standard.c:110) ==1686==by 0x66D39B4: _tevent_loop_once (tevent.c:823) ==1686==by 0x1232F3: main (winbindd.c:1718) Leak 2 : ==1686==at 0x4C38185: malloc (vg_replace_malloc.c:431) ==1686==by 0x62255E4: krb5_copy_principal (copy_princ.c:38) ==1686==by 0x621D003: krb5_mkt_get_next (kt_memory.c:503) ==1686==by 0x141186: extract_pac_vrfy_sigs (winbindd_pam.c:3384) ==1686==by 0x141186: winbindd_pam_auth_pac_verify (winbindd_pam.c:3434) ==1686==by 0x17ED21: winbindd_pam_auth_crap_send (winbindd_pam_auth_crap.c:68) ==1686==by 0x127F45: process_request_send (winbindd.c:502) ==1686==by 0x127F45: winbind_client_request_read (winbindd.c:749) ==1686==by 0x124AAF: wb_req_read_done (wb_reqtrans.c:126) ==1686==by 0x66D4706: tevent_common_invoke_fd_handler (tevent_fd.c:142) ==1686==by 0x66DAF4E: epoll_event_loop (tevent_epoll.c:737) ==1686==by 0x66DAF4E: epoll_event_loop_once (tevent_epoll.c:938) ==1686==by 0x66D8F5A: std_event_loop_once (tevent_standard.c:110) ==1686==by 0x66D39B4: _tevent_loop_once (tevent.c:823) ==1686==by 0x1232F3: main (winbindd.c:1718) Signed-off-by: Shaleen Bathla Reviewed-by: Andrew Bartlett Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Apr 16 10:22:51 UTC 2024 on atb-devel-224 --- Summary of changes: source3/winbindd/winbindd_pam.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 6c890c8acd5..e7d64189b7e 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -3433,12 +3433,17 @@ static NTSTATUS extract_pac_vrfy_sigs(TALLOC_CTX *mem_ctx, DATA_BLOB pac_blob, NULL, /* client_principal */ 0, /* tgs_authtime */ p_pac_data); + (void)smb_krb5_kt_free_entry(krbctx, ); if (NT_STATUS_IS_OK(status)) { break; } - k5ret = smb_krb5_kt_free_entry(krbctx, ); k5ret = krb5_kt_next_entry(krbctx, keytab, , ); } + if (k5ret != 0 && k5ret != KRB5_KT_END) { + DEBUG(1, ("Failed to get next entry: %s\n", + error_message(k5ret))); + (void)smb_krb5_kt_free_entry(krbctx, ); + } k5ret = krb5_kt_end_seq_get(krbctx, keytab, ); if (k5ret) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via dde973d170e s4:dns_server: less noisy, more informative debug messages from 81598b42455 s3:libsmb_xattr: ace_compare() uses NUMERIC_CMP() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit dde973d170e479632d1a411279f4f0fad6608539 Author: Douglas Bagnall Date: Thu Apr 11 11:52:14 2024 +1200 s4:dns_server: less noisy, more informative debug messages This shouldn't have been DBG_ERR, and it might as well say something about the tombstone. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15630 Signed-off-by: Douglas Bagnall Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Apr 12 15:18:05 UTC 2024 on atb-devel-224 --- Summary of changes: source4/dns_server/dnsserver_common.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/dns_server/dnsserver_common.c b/source4/dns_server/dnsserver_common.c index d82e309f982..1cbd7d94593 100644 --- a/source4/dns_server/dnsserver_common.c +++ b/source4/dns_server/dnsserver_common.c @@ -1034,10 +1034,11 @@ WERROR dns_common_replace(struct ldb_context *samdb, * record. */ if (records[i].data.EntombedTime != 0) { - if (rec_count != 1) { - DBG_ERR("tombstone record has %u neighbour " - "records.\n", - rec_count - 1); + if (rec_count != 1 && DEBUGLVL(DBGLVL_NOTICE)) { + DBG_NOTICE("tombstone record [%u] has " + "%u neighbour records.\n", + i, rec_count - 1); + NDR_PRINT_DEBUG(dnsp_DnssrvRpcRecord, [i]); } was_tombstoned = true; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a3126ebfe57 lib: Use struct initialization in imessaging_client_init() via 2d4aa599943 lib: Fix whitespace via ff747f691ec lib: Fix dbwrap_tdb.h prerequisites via b1b5d32c540 lib: Give tallocmsg.c its own header via b8e409e755b lib: Fix whitespace via 00141ca4704 smbd: Remove an outdated comment via 18d9b1b17cf smbd: Remove struct open_symlink_err via adca0ffd712 smbd: Remove "unparsed" from struct open_symlink_err via 8ca649025ae smbd: Remove "st" from struct open_symlink_err via 331a49ca394 smbd: Fix returning symlink stat info in the NO_OPATH case via a2a77842a13 smbd: Make read_symlink_reparse() return a reparse_data_buffer via 57e548841f9 smbd: Simplify users of fsp_fullbasepath() from 06c589aaa1a python/samba/tests/krb5: Extend PKINIT tests to cover UF_SMARTCARD_REQUIRED https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a3126ebfe5736f5e8af9bff3a6e8d7db1929e377 Author: Volker Lendecke Date: Tue Feb 27 15:39:30 2024 +0100 lib: Use struct initialization in imessaging_client_init() Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Mar 28 09:13:43 UTC 2024 on atb-devel-224 commit 2d4aa599943a5860ebc0cc54d85012b360453bdc Author: Volker Lendecke Date: Tue Feb 27 15:39:16 2024 +0100 lib: Fix whitespace Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider commit ff747f691ec30c964094550e6a9a0fc1f19fb0ff Author: Volker Lendecke Date: Wed Feb 21 10:55:55 2024 +0100 lib: Fix dbwrap_tdb.h prerequisites It uses enum dbwrap_lock_order, so include dbwrap.h Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider commit b1b5d32c54099e4a1c61d0a81ceaab986b62ce52 Author: Volker Lendecke Date: Tue Feb 20 13:04:28 2024 +0100 lib: Give tallocmsg.c its own header Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider commit b8e409e755baf77184995f72d640f0de7ed6808e Author: Volker Lendecke Date: Wed Feb 28 16:45:57 2024 +0100 lib: Fix whitespace Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider commit 00141ca4704698028fa0137d4eecb37ba2385e8b Author: Volker Lendecke Date: Sat Feb 10 14:27:38 2024 +0100 smbd: Remove an outdated comment Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider commit 18d9b1b17cfee79b8d2b78ac99ca31600b002a6e Author: Volker Lendecke Date: Sun Feb 4 18:07:19 2024 +0100 smbd: Remove struct open_symlink_err This was just a wrapper for a single pointer, remove it Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider commit adca0ffd712ecfa26f2255f86e3882a9c124c429 Author: Volker Lendecke Date: Sun Feb 4 17:42:28 2024 +0100 smbd: Remove "unparsed" from struct open_symlink_err We have the reserved field unparsed_path_length as part of struct symlink_reparse_struct. Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider commit 8ca649025aee31b4a3a0f5f8fb62861d4a41b864 Author: Volker Lendecke Date: Sun Feb 4 17:27:50 2024 +0100 smbd: Remove "st" from struct open_symlink_err Since c96010a2a9f nobody reads it anymore Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider commit 331a49ca394f185473d0b5ba1c566a32ab01b6ff Author: Volker Lendecke Date: Sun Feb 4 18:50:47 2024 +0100 smbd: Fix returning symlink stat info in the NO_OPATH case Our callers don't look at symlink_err's struct stat anymore, they look at the fname's one since we return them properly even for symlinks. So don't bother filling in symlink_err->st, nobody reads it anyways. Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider commit a2a77842a13c3c4a561ec8d5d298bbab60fafd1a Author: Volker Lendecke Date: Sun Feb 4 16:07:22 2024 +0100 smbd: Make read_symlink_reparse() return a reparse_data_buffer Will make generalized handling of reparse point error returns easier once we will also allow creating symlink reparse point files over smb. Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider commit 57e548841f9b560e7caf84965e3ca4d36997bf17 Author: Volker Lendecke Date: Sun Feb 4 11:10:18 2024 +0100 smbd: Simplify users of fsp_fullbasepath() All three users had to strip a trailing "/.". Centralize this. Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider --- Summary of changes: lib/dbwrap/dbwrap_tdb.h| 2 +- source3/include/pr
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b13d4359f2f libgpo: Do not segfault if we don't have a valid security descriptor via 6fb86a0fa62 libgpo: Fix trailing spaces in pygpo.c from 6005de8cb39 ctdb-scripts: Remove usage of releaseip-pre, takeip-pre pseudo-events https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b13d4359f2f16e391763d1dc6a5718def973fabb Author: Andreas Schneider Date: Tue Mar 5 13:17:19 2024 +0100 libgpo: Do not segfault if we don't have a valid security descriptor Program received signal SIGSEGV, Segmentation fault. ndr_push_security_descriptor (ndr=ndr@entry=0x55bf41b0, ndr_flags=ndr_flags@entry=768, r=r@entry=0x0) at librpc/gen_ndr/ndr_security.c:713 713 NDR_CHECK(ndr_push_security_descriptor_revision(ndr, NDR_SCALARS, r->revision)); Thread 1 (Thread 0x77ece740 (LWP 21460) "python3"): #0 ndr_push_security_descriptor (ndr=ndr@entry=0x55bf41b0, ndr_flags=ndr_flags@entry=768, r=r@entry=0x0) at librpc/gen_ndr/ndr_security.c:713 _flags_save_STRUCT = 0 _status = _status = _status = _status = _status = _status = _status = _status = _status = _status = _status = _status = _status = _status = _status = _status = _status = _status = _status = _status = __FUNCTION__ = "ndr_push_security_descriptor" #1 0x7617237f in ndr_push_struct_blob (blob=blob@entry=0x7fffdb20, mem_ctx=0x55aa3bd0, p=0x0, fn=0x76074ad0 , fn@entry=0x760706c8 ) at ../../librpc/ndr/ndr.c:1438 _status = ndr = 0x55bf41b0 #2 0x7607cccf in marshall_sec_desc (mem_ctx=, secdesc=, data=data@entry=0x7fffdb80, len=len@entry=0x7fffdb78) at ../../libcli/security/secdesc.c:241 blob = {data = 0x7fffdb40 "`\333\377\377\377\177", length = 140737352374299} ndr_err = __FUNCTION__ = "marshall_sec_desc" #3 0x729edd94 in GPO_marshall_get_sec_desc_buf (self=, args=, kwds=) at ../../libgpo/pygpo.c:119 gpo_ptr = status = data = 0x0 len = 0 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15599 Signed-off-by: Andreas Schneider Reviewed-by: David Mulder Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Mar 6 15:44:19 UTC 2024 on atb-devel-224 commit 6fb86a0fa62d93c1c84c2000f01c381a9e8217e1 Author: Andreas Schneider Date: Mon Mar 4 16:42:38 2024 +0100 libgpo: Fix trailing spaces in pygpo.c Reviewed-by: David Mulder --- Summary of changes: libgpo/pygpo.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c index adbd5b4688d..0f7116313f2 100644 --- a/libgpo/pygpo.c +++ b/libgpo/pygpo.c @@ -116,6 +116,11 @@ static PyObject *GPO_marshall_get_sec_desc_buf(PyObject *self, PyObject *args, uint8_t *data = NULL; size_t len = 0; + if (gpo_ptr->security_descriptor == NULL) { + PyErr_SetString(PyExc_RuntimeError, "Uninitialized"); + return NULL; + } + status = marshall_sec_desc(gpo_ptr, gpo_ptr->security_descriptor, , ); if (!NT_STATUS_IS_OK(status)) { @@ -371,7 +376,7 @@ static int py_ads_init(ADS *self, PyObject *args, PyObject *kwds) workgroup, ldap_server, ADS_SASL_PLAIN); - + return 0; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e4c3c61302b python:gp: Implement client site lookup in site_dn_for_machine() via e7584258697 librpc:idl: Make netlogon_samlogon_response public from bdd739c1adb s3: winbindd: assign rangenum member after NULL check https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e4c3c61302b12419f041867b58350f11dc800318 Author: Andreas Schneider Date: Wed Feb 21 09:10:47 2024 +0100 python:gp: Implement client site lookup in site_dn_for_machine() This is [MS-GPOL] 3.2.5.1.4 Site Search. The netr_DsRGetSiteName() needs to run over local rpc, however we do not have the call implemented in our rpc_server. What netr_DsRGetSiteName() actually does is an ldap query to get the sitename, we can just do the same. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15588 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Mon Feb 26 08:06:08 UTC 2024 on atb-devel-224 commit e758425869729a43136ae51e6baecb2061d1525b Author: Andreas Schneider Date: Wed Feb 21 08:56:06 2024 +0100 librpc:idl: Make netlogon_samlogon_response public This is required that we can use it with ndrdump or in python to decode a NETLOGON_SAM_LOGON_RESPONSE_EX ldap response. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15588 Signed-off-by: Andreas Schneider Pair-Programmed-With: Guenther Deschner Reviewed-by: Andrew Bartlett --- Summary of changes: librpc/idl/nbt.idl | 2 +- librpc/ndr/ndr_nbt.c | 2 +- librpc/ndr/ndr_nbt.h | 2 +- python/samba/gp/gpclass.py | 68 ++ 4 files changed, 48 insertions(+), 26 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/idl/nbt.idl b/librpc/idl/nbt.idl index 11814e7970e..46be2eae7e2 100644 --- a/librpc/idl/nbt.idl +++ b/librpc/idl/nbt.idl @@ -490,7 +490,7 @@ interface nbt [case(NETLOGON_NT_VERSION_5EX)] NETLOGON_SAM_LOGON_RESPONSE_EX nt5_ex; } netlogon_samlogon_response_union; - typedef [nopush,nopull] struct { + typedef [nopush,nopull,noprint,public] struct { uint32 ntver; [switch_is(ntver)] netlogon_samlogon_response_union data; } netlogon_samlogon_response; diff --git a/librpc/ndr/ndr_nbt.c b/librpc/ndr/ndr_nbt.c index eb186810785..6f54198ffbc 100644 --- a/librpc/ndr/ndr_nbt.c +++ b/librpc/ndr/ndr_nbt.c @@ -392,7 +392,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_netlogon_samlogon_response(struct ndr_pull * return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_netlogon_samlogon_response(struct ndr_print *ndr, const char *name, struct netlogon_samlogon_response *r) +_PUBLIC_ void ndr_print_netlogon_samlogon_response(struct ndr_print *ndr, const char *name, const struct netlogon_samlogon_response *r) { ndr_print_struct(ndr, name, "netlogon_samlogon_response"); if (r == NULL) { ndr_print_null(ndr); return; } diff --git a/librpc/ndr/ndr_nbt.h b/librpc/ndr/ndr_nbt.h index c38422fff6b..00ee8a17364 100644 --- a/librpc/ndr/ndr_nbt.h +++ b/librpc/ndr/ndr_nbt.h @@ -37,6 +37,6 @@ enum ndr_err_code ndr_pull_NETLOGON_SAM_LOGON_RESPONSE_EX_with_flags(struct ndr_ uint32_t nt_version_flags); enum ndr_err_code ndr_push_netlogon_samlogon_response(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct netlogon_samlogon_response *r); enum ndr_err_code ndr_pull_netlogon_samlogon_response(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct netlogon_samlogon_response *r); -void ndr_print_netlogon_samlogon_response(struct ndr_print *ndr, const char *name, struct netlogon_samlogon_response *r); +void ndr_print_netlogon_samlogon_response(struct ndr_print *ndr, const char *name, const struct netlogon_samlogon_response *r); #endif /* _LIBRPC_NDR_NDR_NBT_H */ diff --git a/python/samba/gp/gpclass.py b/python/samba/gp/gpclass.py index 26c2386847e..08be472e707 100644 --- a/python/samba/gp/gpclass.py +++ b/python/samba/gp/gpclass.py @@ -49,7 +49,7 @@ from samba.dsdb import UF_WORKSTATION_TRUST_ACCOUNT, UF_SERVER_TRUST_ACCOUNT, GP from samba.auth import AUTH_SESSION_INFO_DEFAULT_GROUPS, AUTH_SESSION_INFO_AUTHENTICATED, AUTH_SESSION_INFO_SIMPLE_PRIVILEGES from samba.dcerpc import security import samba.security -from samba.dcerpc import netlogon +from samba.dcerpc import nbt from datetime import datetime @@ -611,12 +611,6 @@ def get_dc_hostname(creds, lp): nbt.NBT_SERVER_DS)) return cldap_ret.pdc_dns_name -def get_dc_netbios_hostname(creds, lp): -net = Net(creds=creds, lp=lp) -
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 145194071b1 python:gp: Fix logging with gp from 52a68c37b56 ldb: change the version to 2.10.0 for Samba 4.21 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 145194071b10c4c1857f28fe79c57fd63ffab889 Author: Andreas Schneider Date: Mon Jan 29 17:46:30 2024 +0100 python:gp: Fix logging with gp This allows enable INFO level logging with: `samba-gpupdate -d3` BUG: https://bugzilla.samba.org/show_bug.cgi?id=15558 Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jan 30 07:18:05 UTC 2024 on atb-devel-224 --- Summary of changes: python/samba/gp/util/logging.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/gp/util/logging.py b/python/samba/gp/util/logging.py index 9e70891b62c..da085d8d7e6 100644 --- a/python/samba/gp/util/logging.py +++ b/python/samba/gp/util/logging.py @@ -23,9 +23,10 @@ import gettext import random import sys -logger = logging.getLogger() +logger = logging.getLogger("gp") + + def logger_init(name, log_level): -logger = logging.getLogger(name) logger.addHandler(logging.StreamHandler(sys.stdout)) logger.setLevel(logging.CRITICAL) if log_level == 1: -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1f823424418 python:gp: Improve working of log messages to avoid confusion via 367756b85a9 python:gp: Log an error if update fails via 98dc44286ea python:gp: Do not print an error if template already exists via 728757cd1ff python:gp: Do not print an error, if CA already exists via 6d5507e0505 python:gp: Improve logging for certificate enrollment via 6a9630eff62 python:gp: Avoid path check for cepces-submit from 6e6d8384f36 vfs_ceph: Use ceph_fdopendir() when available for SMB_VFS_FDOPENDIR https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1f823424418e814d9dc0785658e2a7d92643dab2 Author: Andreas Schneider Date: Mon Jan 22 15:46:24 2024 +0100 python:gp: Improve working of log messages to avoid confusion We should not use the word "Failed". We are totally fine if we can't connect to NDES in the meantime. This logs: Try to get root or server certificates. Unable to install root certificates (requires NDES). Installing the server certificate only. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15559 Signed-off-by: Andreas Schneider Reviewed-by: David Mulder Reviewed-by: Pavel Filipenský Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Mon Jan 29 10:37:29 UTC 2024 on atb-devel-224 commit 367756b85a9ac8daaac2326392bcd1373feed3b7 Author: Andreas Schneider Date: Mon Jan 22 15:05:24 2024 +0100 python:gp: Log an error if update fails BUG: https://bugzilla.samba.org/show_bug.cgi?id=15559 Signed-off-by: Andreas Schneider Reviewed-by: David Mulder Reviewed-by: Pavel Filipenský commit 98dc44286ea102ef7701ccdea26bbde32b523a7e Author: Andreas Schneider Date: Mon Jan 22 15:05:02 2024 +0100 python:gp: Do not print an error if template already exists We will get an exit status for duplicate in future: https://www.pagure.io/certmonger/issue/269 We can't really fix that right now, as older version of certmonger don't support the `-v` option. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15559 Signed-off-by: Andreas Schneider Reviewed-by: David Mulder Reviewed-by: Pavel Filipenský commit 728757cd1ff0465967fcbda100254c9312e87c93 Author: Andreas Schneider Date: Mon Jan 22 15:04:36 2024 +0100 python:gp: Do not print an error, if CA already exists We will get an exit status for duplicate in future: https://www.pagure.io/certmonger/issue/269 We can't really fix that right now, as older version of certmonger don't support the `-v` option. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15559 Signed-off-by: Andreas Schneider Reviewed-by: David Mulder Reviewed-by: Pavel Filipenský commit 6d5507e05050690cd4c56f3f97f5fb7de0338b87 Author: Andreas Schneider Date: Mon Jan 22 14:07:47 2024 +0100 python:gp: Improve logging for certificate enrollment BUG: https://bugzilla.samba.org/show_bug.cgi?id=15559 Signed-off-by: Andreas Schneider Reviewed-by: David Mulder Reviewed-by: Pavel Filipenský commit 6a9630eff624643fd725219775784e68d967d04c Author: Andreas Schneider Date: Mon Jan 22 14:14:30 2024 +0100 python:gp: Avoid path check for cepces-submit find_cepces_submit() uses which(), which returns None if not found. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15559 Signed-off-by: Andreas Schneider Reviewed-by: David Mulder Reviewed-by: Pavel Filipenský --- Summary of changes: python/samba/gp/gp_cert_auto_enroll_ext.py | 41 +- 1 file changed, 29 insertions(+), 12 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/gp/gp_cert_auto_enroll_ext.py b/python/samba/gp/gp_cert_auto_enroll_ext.py index 8ba1960efe5..9b743cb7f9b 100644 --- a/python/samba/gp/gp_cert_auto_enroll_ext.py +++ b/python/samba/gp/gp_cert_auto_enroll_ext.py @@ -185,7 +185,7 @@ def find_cepces_submit(): def get_supported_templates(server): cepces_submit = find_cepces_submit() -if not cepces_submit or not os.path.exists(cepces_submit): +if not cepces_submit: log.error('Failed to find cepces-submit') return [] @@ -209,12 +209,10 @@ def getca(ca, url, trust_dir): r = requests.get(url=url, params={'operation': 'GetCACert', 'message': 'CAIdentifier'}) except requests.exceptions.ConnectionError: -log.warn('Failed to establish a new connection') +log.warn('Could not connect to Network Device Enrollment Service.') r = None if r is None or r.content == b'' or r.headers['Content-Type'] == 'text/html': -log.wa
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 13d98c8fa6d s3:passdb: Fix memory leak caused by recursion of get_global_sam_sid() via dc18e2a222a s3:libads: Fix memory leaks in ads_create_machine_acct() via 18913d384ed s3:passdb: Do not leak memory in pdb_tdb from f05b61b4991 gp: Skip site GP list if no site is found https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 13d98c8fa6d1971adc687f2de01586a3c4739f55 Author: Andreas Schneider Date: Tue Jan 23 11:07:19 2024 +0100 s3:passdb: Fix memory leak caused by recursion of get_global_sam_sid() Direct leak of 68 byte(s) in 1 object(s) allocated from: #0 0x7f4f39cdc03f in malloc (/lib64/libasan.so.8+0xdc03f) (BuildId: 3e1694ad218c99a8b1b69231666a27df63cf19d0) #1 0x7f4f36fbe427 in malloc_ ../../source3/lib/util_malloc.c:38 #2 0x7f4f394b5e19 in pdb_generate_sam_sid ../../source3/passdb/machine_sid.c:90 #3 0x7f4f394b5e19 in get_global_sam_sid ../../source3/passdb/machine_sid.c:211 #4 0x7f4f394af366 in secrets_store_domain_sid ../../source3/passdb/machine_account_secrets.c:143 #5 0x7f4f394b5eb5 in pdb_generate_sam_sid ../../source3/passdb/machine_sid.c:110 #6 0x7f4f394b5eb5 in get_global_sam_sid ../../source3/passdb/machine_sid.c:211 #7 0x7f4f394af366 in secrets_store_domain_sid ../../source3/passdb/machine_account_secrets.c:143 #8 0x557a1f11d62c in net_setlocalsid ../../source3/utils/net.c:416 #9 0x557a1f1c9972 in net_run_function ../../source3/utils/net_util.c:464 #10 0x557a1f121129 in main ../../source3/utils/net.c:1372 #11 0x7f4f34c281af in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jan 23 14:30:58 UTC 2024 on atb-devel-224 commit dc18e2a222afaee8cfc9a4becb786d97d1a45d3a Author: Andreas Schneider Date: Tue Oct 31 14:04:31 2023 +0100 s3:libads: Fix memory leaks in ads_create_machine_acct() Indirect leak of 291 byte(s) in 2 object(s) allocated from: #0 0x7fd77b6dc03f in malloc (/lib64/libasan.so.8+0xdc03f) (BuildId: 3e1694ad218c99a8b1b69231666a27df63cf19d0) #1 0x7fd77b094bc2 in __talloc_with_prefix ../../lib/talloc/talloc.c:783 #2 0x7fd77b096034 in __talloc ../../lib/talloc/talloc.c:825 #3 0x7fd77b096034 in __talloc_strlendup ../../lib/talloc/talloc.c:2454 #4 0x7fd77b096034 in talloc_strdup ../../lib/talloc/talloc.c:2470 #5 0x7fd779996633 in add_string_to_array ../../lib/util/util_strlist.c:504 #6 0x7fd77b10c754 in ads_create_machine_acct ../../source3/libads/ldap.c:2662 #7 0x7fd77b46705f in libnet_join_precreate_machine_acct ../../source3/libnet/libnet_join.c:390 #8 0x7fd77b46705f in libnet_DomainJoin ../../source3/libnet/libnet_join.c:2852 #9 0x7fd77b46705f in libnet_Join ../../source3/libnet/libnet_join.c:3036 #10 0x55fb9788d91a in net_ads_join ../../source3/utils/net_ads.c:1853 #11 0x55fb9793ab86 in net_join ../../source3/utils/net_join.c:45 #12 0x55fb9793084f in net_run_function ../../source3/utils/net_util.c:454 #13 0x55fb97889859 in main ../../source3/utils/net.c:1372 #14 0x7fd7768281af in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke commit 18913d384edb8c49c69501fd6db5511312614594 Author: Andreas Schneider Date: Fri Oct 27 12:09:53 2023 +0200 s3:passdb: Do not leak memory in pdb_tdb ==19938==ERROR: LeakSanitizer: detected memory leaks Direct leak of 77 byte(s) in 1 object(s) allocated from: #0 0x7f7d482841f8 in strdup (/lib64/libasan.so.8+0x841f8) (BuildId: 3e1694ad218c99a8b1b69231666a27df63cf19d0) #1 0x7f7d47204846 (bin/shared/libsamba-util.so.0+0x4c846) (BuildId: 43b084eb9013442ac68eb1fc17649f142cbb0f94) #2 0x7f7d40b1d97a in pdb_init_tdbsam ../../source3/passdb/pdb_tdb.c:1361 #3 0x7f7d4715f266 (bin/shared/libsamba-passdb.so.0+0x76266) (BuildId: 13d2858e2217592a22a4ee9203fef759d52df733) #4 0x7f7d4715f57a (bin/shared/libsamba-passdb.so.0+0x7657a) (BuildId: 13d2858e2217592a22a4ee9203fef759d52df733) #5 0x7f7d47163700 (bin/shared/libsamba-passdb.so.0+0x7a700) (BuildId: 13d2858e2217592a22a4ee9203fef759d52df733) #6 0x55a9177d3853 in main ../../source3/smbd/server.c:1928 #7 0x7f7d434281af in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke --- Summary of changes: source3/libads/ldap.c| 4 ++-- source3/passdb/machine_account_secrets.c | 10
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f05b61b4991 gp: Skip site GP list if no site is found from 8579340fc54 gpo: Do not get templates list on first run https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f05b61b4991e7f51bd184d76a79f8b50114a0ff3 Author: David Mulder Date: Fri Jan 5 08:47:07 2024 -0700 gp: Skip site GP list if no site is found [MS-GPOL] 3.2.5.1.4 Site Search says if the site search returns ERROR_NO_SITENAME, the GP site search should be skipped. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15548 Signed-off-by: David Mulder Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jan 23 11:20:35 UTC 2024 on atb-devel-224 --- Summary of changes: python/samba/gp/gpclass.py | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/gp/gpclass.py b/python/samba/gp/gpclass.py index b7a0dcb0ed5..26c2386847e 100644 --- a/python/samba/gp/gpclass.py +++ b/python/samba/gp/gpclass.py @@ -896,19 +896,25 @@ def get_gpo_list(dc_hostname, creds, lp, username): # (S)ite if gpo_list_machine: -site_dn = site_dn_for_machine(samdb, dc_hostname, lp, creds, username) - try: -log.debug("get_gpo_list: query SITE: [%s] for GPOs" % site_dn) -gp_link = get_gpo_link(samdb, site_dn) -except ldb.LdbError as e: -(enum, estr) = e.args -log.debug(estr) -else: -add_gplink_to_gpo_list(samdb, gpo_list, forced_gpo_list, - site_dn, gp_link, - gpo.GP_LINK_SITE, - add_only_forced_gpos, token) +site_dn = site_dn_for_machine(samdb, dc_hostname, lp, creds, username) + +try: +log.debug("get_gpo_list: query SITE: [%s] for GPOs" % site_dn) +gp_link = get_gpo_link(samdb, site_dn) +except ldb.LdbError as e: +(enum, estr) = e.args +log.debug(estr) +else: +add_gplink_to_gpo_list(samdb, gpo_list, forced_gpo_list, + site_dn, gp_link, + gpo.GP_LINK_SITE, + add_only_forced_gpos, token) +except ldb.LdbError: +# [MS-GPOL] 3.2.5.1.4 Site Search: If the method returns +# ERROR_NO_SITENAME, the remainder of this message MUST be skipped +# and the protocol sequence MUST continue at GPO Search +pass # (L)ocal gpo_list.insert(0, gpo.GROUP_POLICY_OBJECT("Local Policy", -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8579340fc54 gpo: Do not get templates list on first run via 3f3ddfa699a gpo: Decode base64 root cert before importing via 0d1ff69936f gpo: Test certificate policy without NDES from 2713023250f smbd: use dirfsp and atname in open_directory() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8579340fc540633c13c017d896034904a8dbd55c Author: Gabriel Nagy Date: Fri Jan 19 11:36:19 2024 +0200 gpo: Do not get templates list on first run This is a visual fix and has no impact on functionality apart from cleaner log messages. The point of this is to get the list of supported templates in order to compute a diff between the current applied templates and the updated list, so we are able to unapply and reapply the policy in case there are differences. However this code path is executed on first applies as well, at which point the root CA is not yet set up. This causes the `get_supported_templates` call to fail, which is not a hard failure but still pollutes the logs. In this case it's safe to avoid executing the command as the policy will be applied regardless. Signed-off-by: Gabriel Nagy Reviewed-by: David Mulder Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Mon Jan 22 16:48:57 UTC 2024 on atb-devel-224 commit 3f3ddfa699a33c2c8a59f7fb9ee044bb2a6e0e06 Author: Gabriel Nagy Date: Thu Jan 18 20:23:24 2024 +0200 gpo: Decode base64 root cert before importing The reasoning behind this is described in the previous commit message, but essentially this should either be wrapped in certificate blocks and imported as PEM, or converted back to binary and imported as DER. I've opted for the latter since it's how it used to work before it regressed in 157335ee93e. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15557 Signed-off-by: Gabriel Nagy Reviewed-by: David Mulder Reviewed-by: Andreas Schneider commit 0d1ff69936f18ea729fc11fbbb1569a833302572 Author: Gabriel Nagy Date: Mon Jan 8 18:05:08 2024 +0200 gpo: Test certificate policy without NDES As of 8231eaf856b, the NDES feature is no longer required on Windows, as cert auto-enroll can use the certificate from the LDAP request. However, 157335ee93e changed the implementation to convert the LDAP certificate to base64 due to it failing to cleanly convert to a string. Because of insufficient test coverage I missed handling the part where NDES is disabled or not reachable and the LDAP certificate was imported. The call to load_der_x509_certificate now fails with an error because it expects binary data, yet it receives a base64 encoded string. This adds a test to confirm the issue. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15557 Signed-off-by: Gabriel Nagy Reviewed-by: David Mulder Reviewed-by: Andreas Schneider --- Summary of changes: python/samba/gp/gp_cert_auto_enroll_ext.py | 8 +- python/samba/tests/gpo.py | 126 +++-- 2 files changed, 125 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/gp/gp_cert_auto_enroll_ext.py b/python/samba/gp/gp_cert_auto_enroll_ext.py index e2f81b3f3f8..8ba1960efe5 100644 --- a/python/samba/gp/gp_cert_auto_enroll_ext.py +++ b/python/samba/gp/gp_cert_auto_enroll_ext.py @@ -217,10 +217,11 @@ def getca(ca, url, trust_dir): ' installed or not configured.') if 'cACertificate' in ca: log.warn('Installing the server certificate only.') +der_certificate = base64.b64decode(ca['cACertificate']) try: -cert = load_der_x509_certificate(ca['cACertificate']) +cert = load_der_x509_certificate(der_certificate) except TypeError: -cert = load_der_x509_certificate(ca['cACertificate'], +cert = load_der_x509_certificate(der_certificate, default_backend()) cert_data = cert.public_bytes(Encoding.PEM) with open(root_cert, 'wb') as w: @@ -358,7 +359,8 @@ class gp_cert_auto_enroll_ext(gp_pol_ext, gp_applier): # If the policy has changed, unapply, then apply new policy old_val = self.cache_get_attribute_value(guid, attribute) old_data = json.loads(old_val) if old_val is not None else {} -templates = ['%s.%s' % (ca['name'], t.decode()) for t in get_supported_templates(ca['hostname'])] +templates = ['%s.%s' % (ca['name'], t.decode()) for t in get_supported_templates(ca['hostname
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9ea124e29e3 docs: Update idmap_ad.8 that rfc2307 is the default from 8eb42425a8e python:gp: Print a nice message if cepces-submit can't be found https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9ea124e29e303ecfa7fdffd9f118f2b55a761965 Author: Andreas Schneider Date: Mon Jan 8 10:51:18 2024 +0100 docs: Update idmap_ad.8 that rfc2307 is the default Signed-off-by: Andreas Schneider Reviewed-by: Björn Jacke Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Jan 12 14:51:56 UTC 2024 on atb-devel-224 --- Summary of changes: docs-xml/manpages/idmap_ad.8.xml | 11 --- 1 file changed, 8 insertions(+), 3 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 b364bbfa231..32df8d066c2 100644 --- a/docs-xml/manpages/idmap_ad.8.xml +++ b/docs-xml/manpages/idmap_ad.8.xml @@ -62,17 +62,22 @@ schema_mode = rfc2307 | sfu | sfu20 - + + Defines the schema that idmap_ad should use when querying Active Directory regarding user and group information. This can be either the RFC2307 schema support included - in Windows 2003 R2 or the Service for Unix (SFU) schema. + in Windows Server 2003 R2 and newer or the Service for + Unix (SFU) schema for versions before Windows Server + 2003 R2. For SFU 3.0 or 3.5 please choose "sfu", for SFU 2.0 please choose "sfu20". Please note that the behavior of primary group membership is controlled by the unix_primary_group option. - + + Default: rfc2307 + unix_primary_group = yes/no -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8eb42425a8e python:gp: Print a nice message if cepces-submit can't be found from e9c9615a2f6 s3:rpc_server: Mark _lsa_CreateTrustedDomainEx as NOT_IMPLMENTED https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8eb42425a8eb1b30ca0e94dfc01d8175ae5cde4b Author: Andreas Schneider Date: Tue Jan 9 08:50:01 2024 +0100 python:gp: Print a nice message if cepces-submit can't be found BUG: https://bugzilla.samba.org/show_bug.cgi?id=15552 Signed-off-by: Andreas Schneider Reviewed-by: David Mulder Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Jan 10 09:54:34 UTC 2024 on atb-devel-224 --- Summary of changes: python/samba/gp/gp_cert_auto_enroll_ext.py | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/gp/gp_cert_auto_enroll_ext.py b/python/samba/gp/gp_cert_auto_enroll_ext.py index 14fef311348..e2f81b3f3f8 100644 --- a/python/samba/gp/gp_cert_auto_enroll_ext.py +++ b/python/samba/gp/gp_cert_auto_enroll_ext.py @@ -185,17 +185,19 @@ def find_cepces_submit(): def get_supported_templates(server): cepces_submit = find_cepces_submit() -if os.path.exists(cepces_submit): -env = os.environ -env['CERTMONGER_OPERATION'] = 'GET-SUPPORTED-TEMPLATES' -p = Popen([cepces_submit, '--server=%s' % server, '--auth=Kerberos'], - env=env, stdout=PIPE, stderr=PIPE) -out, err = p.communicate() -if p.returncode != 0: -data = { 'Error': err.decode() } -log.error('Failed to fetch the list of supported templates.', data) -return out.strip().split() -return [] +if not cepces_submit or not os.path.exists(cepces_submit): +log.error('Failed to find cepces-submit') +return [] + +env = os.environ +env['CERTMONGER_OPERATION'] = 'GET-SUPPORTED-TEMPLATES' +p = Popen([cepces_submit, '--server=%s' % server, '--auth=Kerberos'], + env=env, stdout=PIPE, stderr=PIPE) +out, err = p.communicate() +if p.returncode != 0: +data = {'Error': err.decode()} +log.error('Failed to fetch the list of supported templates.', data) +return out.strip().split() def getca(ca, url, trust_dir): -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e9c9615a2f6 s3:rpc_server: Mark _lsa_CreateTrustedDomainEx as NOT_IMPLMENTED via 179641bfbe1 s3:rpc_server: Mark _lsa_CreateTrustedDomain as NOT_IMPLMENTED from 1b6ef968d83 dcesrv_reply: just drop responses if the connection is already terminating https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e9c9615a2f657b77890e5489e2d8f0f1c3116a16 Author: Andreas Schneider Date: Mon Jan 8 16:15:03 2024 +0100 s3:rpc_server: Mark _lsa_CreateTrustedDomainEx as NOT_IMPLMENTED There is no PDB backend supporting this. Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jan 9 14:17:40 UTC 2024 on atb-devel-224 commit 179641bfbe184ef18896ec9d5dddf8e5c7770e2c Author: Andreas Schneider Date: Mon Jan 8 16:13:52 2024 +0100 s3:rpc_server: Mark _lsa_CreateTrustedDomain as NOT_IMPLMENTED There is no PDB backend which is supporting this. Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: source3/rpc_server/lsa/srv_lsa_nt.c | 36 1 file changed, 4 insertions(+), 32 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c index f125c65069d..e2078c63952 100644 --- a/source3/rpc_server/lsa/srv_lsa_nt.c +++ b/source3/rpc_server/lsa/srv_lsa_nt.c @@ -1981,18 +1981,8 @@ NTSTATUS _lsa_CreateTrustedDomainEx2(struct pipes_struct *p, NTSTATUS _lsa_CreateTrustedDomainEx(struct pipes_struct *p, struct lsa_CreateTrustedDomainEx *r) { - struct lsa_CreateTrustedDomainEx2 q; - struct lsa_TrustDomainInfoAuthInfoInternal auth_info; - - ZERO_STRUCT(auth_info); - - q.in.policy_handle = r->in.policy_handle; - q.in.info = r->in.info; - q.in.auth_info_internal = _info; - q.in.access_mask= r->in.access_mask; - q.out.trustdom_handle = r->out.trustdom_handle; - - return _lsa_CreateTrustedDomainEx2(p, ); + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR; + return NT_STATUS_NOT_IMPLEMENTED; } /*** @@ -2002,26 +1992,8 @@ NTSTATUS _lsa_CreateTrustedDomainEx(struct pipes_struct *p, NTSTATUS _lsa_CreateTrustedDomain(struct pipes_struct *p, struct lsa_CreateTrustedDomain *r) { - struct lsa_CreateTrustedDomainEx2 c; - struct lsa_TrustDomainInfoInfoEx info; - struct lsa_TrustDomainInfoAuthInfoInternal auth_info; - - ZERO_STRUCT(auth_info); - - info.domain_name= r->in.info->name; - info.netbios_name = r->in.info->name; - info.sid= r->in.info->sid; - info.trust_direction= LSA_TRUST_DIRECTION_OUTBOUND; - info.trust_type = LSA_TRUST_TYPE_DOWNLEVEL; - info.trust_attributes = 0; - - c.in.policy_handle = r->in.policy_handle; - c.in.info = - c.in.auth_info_internal = _info; - c.in.access_mask= r->in.access_mask; - c.out.trustdom_handle = r->out.trustdom_handle; - - return _lsa_CreateTrustedDomainEx2(p, ); + p->fault_state = DCERPC_FAULT_OP_RNG_ERROR; + return NT_STATUS_NOT_IMPLEMENTED; } /*** -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 00034d02289 s3:auth: Allow 'Unix Users' and 'Unix Groups' to create a local token via 8f496161463 s3:auth: Remove trailing white spaces from auth_util.c via ad0c0dd0714 selftest: Show that 'allow trusted domains = no' firewalls Unix User|Group from b12a33e2251 third_party/heimdal: import lorikeet-heimdal-202311290849 (commit 84fb4579594a5fd8f8462450777eb24d5832be07) https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 00034d022896f879bf91bb78eb9e2972162c99ce Author: Andreas Schneider Date: Thu Nov 30 10:54:07 2023 +0100 s3:auth: Allow 'Unix Users' and 'Unix Groups' to create a local token BUG: https://bugzilla.samba.org/show_bug.cgi?id=15469 Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Dec 1 08:06:44 UTC 2023 on atb-devel-224 commit 8f496161463f110e494201303b96dd14ab3774cd Author: Andreas Schneider Date: Fri Sep 8 12:50:32 2023 +0200 s3:auth: Remove trailing white spaces from auth_util.c Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme commit ad0c0dd071401d98f0b7f595efbdf5312a165ab4 Author: Andreas Schneider Date: Mon Sep 4 16:29:46 2023 +0200 selftest: Show that 'allow trusted domains = no' firewalls Unix User|Group UNEXPECTED(failure): samba3.blackbox.smbclient_auth.plain.local_creds.smbclient //LOCALSHARE4/forceuser_unixonly as user(simpleserver) REASON: Exception: Exception: tree connect failed: NT_STATUS_AUTHENTICATION_FIREWALL_FAILED BUG: https://bugzilla.samba.org/show_bug.cgi?id=15469 Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme --- Summary of changes: selftest/target/Samba3.pm | 1 + source3/auth/auth_util.c | 81 --- 2 files changed, 49 insertions(+), 33 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 4218a54358b..ba7c5b90a17 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -1692,6 +1692,7 @@ sub setup_simpleserver vfs objects = xattr_tdb streams_depot change notify = no server smb encrypt = off +allow trusted domains = no [vfs_aio_pthread] path = $prefix_abs/share diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 4eb82519d7b..abc5e959aab 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "dom_sid.h" #include "includes.h" #include "auth.h" #include "lib/util_unixsids.h" @@ -144,14 +145,14 @@ NTSTATUS make_user_info_map(TALLOC_CTX *mem_ctx, } / - Create an auth_usersupplied_data, making the DATA_BLOBs here. + Create an auth_usersupplied_data, making the DATA_BLOBs here. Decrypt and encrypt the passwords. / bool make_user_info_netlogon_network(TALLOC_CTX *mem_ctx, struct auth_usersupplied_info **user_info, -const char *smb_name, -const char *client_domain, +const char *smb_name, +const char *client_domain, const char *workstation_name, const struct tsocket_address *remote_address, const struct tsocket_address *local_address, @@ -167,12 +168,12 @@ bool make_user_info_netlogon_network(TALLOC_CTX *mem_ctx, DATA_BLOB nt_blob = data_blob(nt_network_pwd, nt_pwd_len); status = make_user_info_map(mem_ctx, user_info, - smb_name, client_domain, + smb_name, client_domain, workstation_name, remote_address, local_address, "SamLogon", - lm_pwd_len ? _blob : NULL, + lm_pwd_len ? _blob : NULL, nt_pwd_len ? _blob : NULL, NULL, NULL, NULL, AUTH_PASSWORD_RESPONSE); @@ -188,20 +189,20 @@ bool make_user_info_netlogon_network(TALLOC_CTX *mem_ctx, } / -
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c4a5d4eb62f third_party: Update waf to version 2.0.26 from e2651628844 tests: claims blackbox: add device and server silo restrictions test https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c4a5d4eb62f371ac6b5194d446f54b1d592bd6cd Author: Andreas Schneider Date: Wed Nov 22 13:21:38 2023 +0100 third_party: Update waf to version 2.0.26 https://gitlab.com/ita1024/waf/-/blob/waf-2.0.26/ChangeLog Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Nov 29 10:47:00 UTC 2023 on atb-devel-224 --- Summary of changes: buildtools/bin/waf | 2 +- buildtools/wafsamba/wafsamba.py | 2 +- third_party/waf/waflib/Context.py| 6 +- third_party/waf/waflib/Scripting.py | 8 +- third_party/waf/waflib/Tools/qt5.py | 186 +++--- third_party/waf/waflib/extras/distnet.py | 2 + third_party/waf/waflib/extras/haxe.py| 261 +-- third_party/waf/waflib/extras/msvs.py| 4 +- third_party/waf/waflib/extras/sphinx.py | 2 +- 9 files changed, 289 insertions(+), 184 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/bin/waf b/buildtools/bin/waf index f754b52a7bc..0f70fa21de2 100755 --- a/buildtools/bin/waf +++ b/buildtools/bin/waf @@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE. import os, sys, inspect -VERSION="2.0.25" +VERSION="2.0.26" REVISION="x" GIT="x" INSTALL="x" diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py index c14eb58c879..8c0aa23fe21 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -38,7 +38,7 @@ LIB_PATH="shared" os.environ['PYTHONUNBUFFERED'] = '1' -if Context.HEXVERSION not in (0x2001900,): +if Context.HEXVERSION not in (0x2001a00,): Logs.error(''' Please use the version of waf that comes with Samba, not a system installed version. See http://wiki.samba.org/index.php/Waf diff --git a/third_party/waf/waflib/Context.py b/third_party/waf/waflib/Context.py index ee8c5c9c5df..369664819b6 100644 --- a/third_party/waf/waflib/Context.py +++ b/third_party/waf/waflib/Context.py @@ -18,13 +18,13 @@ else: import imp # the following 3 constants are updated on each new release (do not touch) -HEXVERSION=0x2001900 +HEXVERSION=0x2001a00 """Constant updated on new releases""" -WAFVERSION="2.0.25" +WAFVERSION="2.0.26" """Constant updated on new releases""" -WAFREVISION="2db0b41b2805cd5db3b55476c06b23c1e46d319f" +WAFREVISION="0fb985ce1932c6f3e7533f435e4ee209d673776e" """Git revision when the waf version is updated""" WAFNAME="waf" diff --git a/third_party/waf/waflib/Scripting.py b/third_party/waf/waflib/Scripting.py index da83a2166a1..a80cb367867 100644 --- a/third_party/waf/waflib/Scripting.py +++ b/third_party/waf/waflib/Scripting.py @@ -388,7 +388,11 @@ class Dist(Context.Context): for x in files: archive_name = self.get_base_name() + '/' + x.path_from(self.base_path) - zip.write(x.abspath(), archive_name, zipfile.ZIP_DEFLATED) + if os.environ.get('SOURCE_DATE_EPOCH'): + # TODO: parse that timestamp + zip.writestr(zipfile.ZipInfo(archive_name), x.read(), zipfile.ZIP_DEFLATED) + else: + zip.write(x.abspath(), archive_name, zipfile.ZIP_DEFLATED) zip.close() else: self.fatal('Valid algo types are tar.bz2, tar.gz, tar.xz or zip') @@ -425,6 +429,8 @@ class Dist(Context.Context): tinfo.gid = 0 tinfo.uname = 'root' tinfo.gname = 'root' + if os.environ.get('SOURCE_DATE_EPOCH'): + tinfo.mtime = int(os.environ.get('SOURCE_DATE_EPOCH')) if os.path.isfile(p): with open(p, 'rb') as f: diff --git a/third_party/waf/waflib/Tools/qt5.py b/third_party/waf/waflib/Tools/qt5.py index b3e61325e50..0932e943ae6 100644 --- a/third_party/waf/waflib/Tools/qt5.py +++ b/third_party/waf/waflib/Tools/qt5.py @@ -1,10 +1,11 @@ #!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006-2018 (ita) +# Rafaël Kooi, 2023 (RA-Kooi) """ -This tool helps with finding Qt5 tools and libraries, -and also provides syntactic sugar for
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8863d84d537 s3:rpc_client: Remove unused rpccli_lsa_open_policy2() via 417c8180c44 s3:winbind: Always close the policy handle we opened via 05a006fab94 s3:winbind: Use dcerpc_lsa_open_policy_fallback() in winbindd_cm.c via 6b6a88cdddf s3:utils: Use any_nt_status_not_ok() in rpc_rights_grant_internal() via 28e7a754c8d s3:utils: Use goto to close the policy in rpc_rights_grant_internal() via e5abb584b64 s3:utils: Use dcerpc_lsa_open_policy_fallback() in net_rpc_rights.c via 5b3e562006a s3:utils: Use dcerpc_lsa_open_policy_fallback() in net_rpc.c via 48fe294e51d s3:rpcclient: Use dcerpc_lsa_open_policy_fallback() in cmd_lsarpc.c via 367b946a34b s3:rpcclient: Remove trailing white spaces from cmd_lsarpc.c via 4f7c395cd3d s3:libnetapi: Use dcerpc_lsa_open_policy_fallback() in localgroup.c via bea13a02d4b s3:utils: Use dcerpc_lsa_open_policy_fallback() in net_rpc_trust.c via 070cfeae527 s3:rpc_server: Use dcerpc_lsa_open_policy_fallback() for netlogon via 0db702322ce s3:rpc_client: Implement dcerpc_lsa_open_policy_fallback() via aecd73becca s3:rpc_client: Implement dcerpc_lsa_open_policy3() via f5a4dcb0a7c s4:torture: Implement lsa_OpenPolicy3 tests via d18ce289054 s3:rpc_server: Implement _lsa_OpenPolicy3() via 15cecaaf0f1 s4:rpc_server: Implement dcesrv_lsa_OpenPolicy3() via 75e381d4433 s4:torture: Adapt LSA tests for newer Windows versions via f5275ae3dcc lsa.idl: Backport changes from wireshark via 5c72df15a87 lsa.idl: Add new functions and types via 80ba5456d8c s4:rpc_server: Remove trailing white spaces from lsa_init.c from 028c90547e3 python:tests: Add ndrdump test for GMSA Managed Password blobs https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8863d84d537117e073da0a371bc153e16e4ebd9f Author: Andreas Schneider Date: Thu Aug 31 18:09:37 2023 +0200 s3:rpc_client: Remove unused rpccli_lsa_open_policy2() Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Nov 21 12:21:18 UTC 2023 on atb-devel-224 commit 417c8180c4406e9071ce88cfbe18d15e1f403fc1 Author: Andreas Schneider Date: Tue Oct 24 09:39:09 2023 +0200 s3:winbind: Always close the policy handle we opened Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 05a006fab946ec9dad820c2910bb9782c7fcd380 Author: Andreas Schneider Date: Thu Aug 31 18:08:56 2023 +0200 s3:winbind: Use dcerpc_lsa_open_policy_fallback() in winbindd_cm.c Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 6b6a88cdddff8355299793189b1bf7e8f5a273f0 Author: Andreas Schneider Date: Thu Nov 2 08:31:32 2023 +0100 s3:utils: Use any_nt_status_not_ok() in rpc_rights_grant_internal() Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 28e7a754c8d0d49729f6a85bdbfc02b1a7a023f5 Author: Andreas Schneider Date: Thu Nov 2 08:30:36 2023 +0100 s3:utils: Use goto to close the policy in rpc_rights_grant_internal() Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit e5abb584b64c9e82ad73c0303c749688f306c455 Author: Andreas Schneider Date: Thu Aug 31 17:57:09 2023 +0200 s3:utils: Use dcerpc_lsa_open_policy_fallback() in net_rpc_rights.c Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 5b3e562006a1f8f9fc31a74fe2037e83544de7b9 Author: Andreas Schneider Date: Thu Aug 31 16:22:02 2023 +0200 s3:utils: Use dcerpc_lsa_open_policy_fallback() in net_rpc.c Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 48fe294e51de465482b0018e4ce10fe8ecdbd2a0 Author: Andreas Schneider Date: Thu Aug 31 16:08:39 2023 +0200 s3:rpcclient: Use dcerpc_lsa_open_policy_fallback() in cmd_lsarpc.c Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 367b946a34b45036ceacf97e926be87c0b11316d Author: Andreas Schneider Date: Thu Aug 31 15:39:51 2023 +0200 s3:rpcclient: Remove trailing white spaces from cmd_lsarpc.c Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 4f7c395cd3d5cab9969a7778d0a5c3bca30d3db2 Author: Andreas Schneider Date: Thu Aug 31 11:23:03 2023 +0200 s3:libnetapi: Use dcerpc_lsa_open_policy_fallback() in localgroup.c Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit bea13a02d4bc45b6041be435f129557fc1615ce3 Author: Andreas Schneider Date: Thu Aug 31 10:27:12 2023 +0200 s3:utils: Use dcerpc_lsa_open_policy_fallback() in net_rpc_trust.c Signed-off-by: Andreas Schneider Reviewed-by: Stefan
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 34d80fc96fe gitlab-ci: Update Fedora to version 39 via 938afb8b289 python:tests: SHA1 is no longer supported by cryptography module via 362b0d69b16 python:tests: Fix assertEquals which doesn't exist in Python 3.12 via c290052fd28 third_party: Build pypamtest with -Wno-error=declaration-after-statement via 9621a3d7a69 Use python.h from libreplace via f337fd99502 lib:replace: Add python.h from 5119d5540de s4-winreg: fix dcesrv_winreg_EnumValue behavior https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 34d80fc96fe48c74631978b29e712fc826385fca Author: Andreas Schneider Date: Wed Nov 8 13:12:21 2023 +0100 gitlab-ci: Update Fedora to version 39 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Mon Nov 20 16:38:20 UTC 2023 on atb-devel-224 commit 938afb8b28973b0065cc3509b70ebe3f6986de47 Author: Andreas Schneider Date: Thu Nov 9 22:27:03 2023 +0100 python:tests: SHA1 is no longer supported by cryptography module See https://github.com/pyca/cryptography/issues/8213#issuecomment-1419060001 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 362b0d69b16c5bbcd0ff7dd7ba12e1ac037a6b3d Author: Andreas Schneider Date: Thu Nov 9 21:43:54 2023 +0100 python:tests: Fix assertEquals which doesn't exist in Python 3.12 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit c290052fd28bbfa5b885119f322cb0718073e507 Author: Andreas Schneider Date: Thu Nov 9 17:16:17 2023 +0100 third_party: Build pypamtest with -Wno-error=declaration-after-statement BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 9621a3d7a6949aa833425884cd22379387738cfa Author: Andreas Schneider Date: Thu Nov 9 11:35:56 2023 +0100 Use python.h from libreplace BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit f337fd995024283f6e1b3f8ec1cc2b3aeb55a2a6 Author: Andreas Schneider Date: Thu Nov 9 11:32:58 2023 +0100 lib:replace: Add python.h BUG: https://bugzilla.samba.org/show_bug.cgi?id=15513 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- Summary of changes: .gitlab-ci-main.yml| 16 +++ auth/credentials/pycredentials.c | 2 +- bootstrap/.gitlab-ci.yml | 2 +- bootstrap/config.py| 6 +++--- bootstrap/generated-dists/Vagrantfile | 10 - .../{fedora38 => fedora39}/Dockerfile | 2 +- .../{fedora38 => fedora39}/bootstrap.sh| 0 .../{fedora38 => fedora39}/locale.sh | 0 .../{fedora38 => fedora39}/packages.yml| 0 bootstrap/sha1sum.txt | 2 +- buildtools/wafsamba/samba_autoconf.py | 3 +++ lib/compression/pycompression.c| 2 +- lib/crypto/py_crypto.c | 2 +- lib/ldb-samba/pyldb.c | 2 +- lib/ldb/pyldb.c| 2 +- lib/ldb/pyldb_util.c | 2 +- .../hash_inode.h => lib/replace/system/python.h| 19 ++--- lib/smbconf/pysmbconf.c| 2 +- lib/smbconf/pysmbconf.h| 2 +- lib/talloc/pytalloc.c | 2 +- lib/talloc/pytalloc_util.c | 2 +- lib/talloc/test_pytalloc.c | 2 +- lib/tdb/pytdb.c| 2 +- lib/tevent/pytevent.c | 2 +- libcli/nbt/pynbt.c | 2 +- libcli/security/pysecurity.c | 2 +- libcli/smb/py_reparse_symlink.c| 2 +- libgpo/pygpo.c | 2 +- pidl/lib/Parse/Pidl/Samba4/Python.pm | 2 +- python/modules.c | 2 +- python/py3compat.h | 2 +- python/pyglue.c| 2 +- python/samba/tests/gpo.py | 2 +- python/samba/tests/krb5/pkinit_tests.py| 24 +- source3/lib/smbconf/pys3smbconf.c | 2 +- source3/libsmb/pylibsmb.c |
[SCM] pam wrapper repository - branch master updated
The branch, master has been updated via 9f0cccf pwrap: Fix PAM_WRAPPER_DISABLE_DEEPBIND environment variable from 164d598 tests: Define PATH_MAX for Hurd. https://git.samba.org/?p=pam_wrapper.git;a=shortlog;h=master - Log - commit 9f0cccf7432dd9be1de953f9b13a7f9b06c40442 Author: Andreas Schneider Date: Fri Nov 10 15:38:37 2023 +0100 pwrap: Fix PAM_WRAPPER_DISABLE_DEEPBIND environment variable Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- Summary of changes: src/pam_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/src/pam_wrapper.c b/src/pam_wrapper.c index 66673f0..c47b564 100644 --- a/src/pam_wrapper.c +++ b/src/pam_wrapper.c @@ -336,7 +336,7 @@ static void *pwrap_load_lib_handle(enum pwrap_lib lib) #ifdef RTLD_DEEPBIND const char *env_preload = getenv("LD_PRELOAD"); - const char *env_deepbind = getenv("UID_WRAPPER_DISABLE_DEEPBIND"); + const char *env_deepbind = getenv("PAM_WRAPPER_DISABLE_DEEPBIND"); bool enable_deepbind = true; /* Don't do a deepbind if we run with libasan */ -- pam wrapper repository
[SCM] pam wrapper repository - branch asn-fix created
The branch, asn-fix has been created at 558808548c845893159b286dee59147d252333c4 (commit) - Log - commit 558808548c845893159b286dee59147d252333c4 Author: Andreas Schneider Date: Fri Nov 10 15:38:37 2023 +0100 pwrap: Fix PAM_WRAPPER_DISABLE_DEEPBIND environment variable Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- -- pam wrapper repository
[SCM] pam wrapper repository - branch master updated
The branch, master has been updated via 164d598 tests: Define PATH_MAX for Hurd. via 9023c89 doc/pam_matrix.8: Fix typo 'allows to'. via 7bd24b0 die quickly upon mkdir failure from b223df9 Bump version to 1.1.5 https://git.samba.org/?p=pam_wrapper.git;a=shortlog;h=master - Log - commit 164d598f34da901cb9eb4fd164475ed38715341a Author: Simon Josefsson Date: Tue Aug 22 08:53:30 2023 +0200 tests: Define PATH_MAX for Hurd. Signed-off-by: Simon Josefsson Reviewed-by: Andreas Schneider Reviewed-by: Pavel Filipenský commit 9023c89459d3ad1fe28d211a0da6b69e6f3f7d64 Author: Simon Josefsson Date: Fri Aug 18 11:25:54 2023 +0200 doc/pam_matrix.8: Fix typo 'allows to'. Signed-off-by: Simon Josefsson Reviewed-by: Andreas Schneider Reviewed-by: Pavel Filipenský commit 7bd24b0e54995da5f333575f97c9f1fa796fe0f1 Author: Jan Kundrát Date: Mon Nov 6 18:34:58 2023 +0100 die quickly upon mkdir failure We just had this failure in our CI system that's currently running just three PAM-wrapped tests in parallel. Since this is a classic TOCTOU race (albeit in a test code, and therefore with little to no security implications), the `mkdir` can fail, and when that happens it's much better to just die quickly rather than continuing as if nothing happened. Signed-off-by: Jan Kundrát Reviewed-by: Pavel Filipenský Reviewed-by: Andreas Schneider --- Summary of changes: doc/pam_matrix.8 | 2 +- doc/pam_matrix.8.txt | 2 +- src/modules/pam_matrix.c | 4 src/pam_wrapper.c| 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/doc/pam_matrix.8 b/doc/pam_matrix.8 index 80d5190..23ba1fa 100644 --- a/doc/pam_matrix.8 +++ b/doc/pam_matrix.8 @@ -34,7 +34,7 @@ pam_matrix \- A PAM test module to retrieve module\-specific PAM items pam_matrix\&.so [\&...] .SH "DESCRIPTION" .sp -Testing PAM application often requires to set up an authentication backend with as little effort as possible\&. The \fBpam_matrix\fR module allows to authenticate against a key\-value text file, provided by an option or with an environment variable\&. +Testing PAM application often requires to set up an authentication backend with as little effort as possible\&. The \fBpam_matrix\fR module allows one to authenticate against a key\-value text file, provided by an option or with an environment variable\&. .SH "IMPORTANT" .sp pam_matrix is a \fBtest tool\fR\&. It should be considered completely insecure and never used outside test environments! As you\(cqll see when reading description of the options and actions, many of them don\(cqt make any sense in the real world and were added just to make tests possible\&. diff --git a/doc/pam_matrix.8.txt b/doc/pam_matrix.8.txt index fb54f05..b15b11a 100644 --- a/doc/pam_matrix.8.txt +++ b/doc/pam_matrix.8.txt @@ -14,7 +14,7 @@ pam_matrix.so [...] DESCRIPTION --- Testing PAM application often requires to set up an authentication backend with -as little effort as possible. The *pam_matrix* module allows to authenticate +as little effort as possible. The *pam_matrix* module allows one to authenticate against a key-value text file, provided by an option or with an environment variable. diff --git a/src/modules/pam_matrix.c b/src/modules/pam_matrix.c index 6fb6a2f..cc6fbf3 100644 --- a/src/modules/pam_matrix.c +++ b/src/modules/pam_matrix.c @@ -33,6 +33,10 @@ #include #include +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + #ifndef discard_const #define discard_const(ptr) ((void *)((uintptr_t)(ptr))) #endif diff --git a/src/pam_wrapper.c b/src/pam_wrapper.c index da2c738..66673f0 100644 --- a/src/pam_wrapper.c +++ b/src/pam_wrapper.c @@ -893,6 +893,7 @@ static void pwrap_init(void) PWRAP_LOG(PWRAP_LOG_ERROR, "Failed to create pam_wrapper config dir: %s - %s", tmp_config_dir, strerror(errno)); + exit(1); } /* Create file with the PID of the the process */ @@ -1121,6 +1122,7 @@ static void pwrap_init(void) PWRAP_LOG(PWRAP_LOG_ERROR, "Failed to create pam_wrapper config dir: %s - %s", tmp_config_dir, strerror(errno)); + exit(1); } /* Create file with the PID of the the process */ -- pam wrapper repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d1d2a03d73b s3:utils: Initialize the memcache for smbpasswd via 89e376c69a3 s3:util: Add gfree_memcache() to gfree_all() via cdcaac148f3 lib:util: Add a gfree_memcache() via b3234c55743 s3:passdb: Do not leak memory if memcache add fails via 842d2eca91b lib:util: Add boolean return type for memcache_add_talloc() via 200a5b7617d lib:util: Add boolean return type for memcache_add() via a2a31519fb5 s3:utils: Initialize row variable in wspsearch from 0bb67a3a7e7 python: silos: add support for allowed to authenticate from silo shortcut https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d1d2a03d73b376d54aa6d010e521282746b068fe Author: Andreas Schneider Date: Thu Oct 26 14:37:29 2023 +0200 s3:utils: Initialize the memcache for smbpasswd Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Oct 27 06:51:48 UTC 2023 on atb-devel-224 commit 89e376c69a39175684dfb7b7cbaea9dcd996dd63 Author: Andreas Schneider Date: Thu Oct 26 14:36:02 2023 +0200 s3:util: Add gfree_memcache() to gfree_all() Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit cdcaac148f3b42d8bdf415a5ce0ef77031c2d0f5 Author: Andreas Schneider Date: Thu Oct 26 14:35:44 2023 +0200 lib:util: Add a gfree_memcache() Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit b3234c55743d8329ba1d387943865b23233e22c7 Author: Andreas Schneider Date: Thu Oct 26 14:28:19 2023 +0200 s3:passdb: Do not leak memory if memcache add fails Indirect leak of 496 byte(s) in 1 object(s) allocated from: #0 0x7ffb062dc03f in malloc (/lib64/libasan.so.8+0xdc03f) (BuildId: 3e1694ad218c99a8b1b69231666a27df63cf19d0) #1 0x7ffb06025b3e in __talloc_with_prefix ../../lib/talloc/talloc.c:783 #2 0x7ffb06027512 in __talloc ../../lib/talloc/talloc.c:825 #3 0x7ffb06027512 in _talloc_named_const ../../lib/talloc/talloc.c:982 #4 0x7ffb06027512 in _talloc_zero ../../lib/talloc/talloc.c:2421 #5 0x7ffb05a0332c in samu_new ../../source3/passdb/passdb.c:63 #6 0x7ffb05a2031f in pdb_getsampwnam ../../source3/passdb/pdb_interface.c:351 #7 0x7ffb05a0540b in local_password_change ../../source3/passdb/passdb.c:752 #8 0x56291ddd4b8b in password_change ../../source3/utils/smbpasswd.c:273 #9 0x56291ddd5b59 in process_root ../../source3/utils/smbpasswd.c:478 #10 0x56291ddd5b59 in main ../../source3/utils/smbpasswd.c:661 #11 0x7ffb024281af in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 842d2eca91be3682ba7194501cafa6a0c2152be6 Author: Andreas Schneider Date: Thu Oct 26 14:26:57 2023 +0200 lib:util: Add boolean return type for memcache_add_talloc() Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 200a5b7617d6f12a3907702bf0473f7ddda1c53b Author: Andreas Schneider Date: Thu Oct 26 14:26:26 2023 +0200 lib:util: Add boolean return type for memcache_add() Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit a2a31519fb5f0313c6dcf3b251180530c9006802 Author: Andreas Schneider Date: Thu Oct 26 14:09:33 2023 +0200 s3:utils: Initialize row variable in wspsearch ../../source3/utils/wspsearch.c:331:25: error: ‘row’ may be used uninitialized [-Werror=maybe-uninitialized] 331 | *rows_processed = row; | ^ Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- Summary of changes: lib/util/memcache.c| 24 lib/util/memcache.h| 6 -- source3/lib/util.c | 3 +++ source3/passdb/pdb_interface.c | 10 +++--- source3/utils/smbpasswd.c | 9 + source3/utils/wspsearch.c | 2 +- 6 files changed, 40 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/memcache.c b/lib/util/memcache.c index 7b0b27eaddb..98e317c66fb 100644 --- a/lib/util/memcache.c +++ b/lib/util/memcache.c @@ -265,7 +265,7 @@ void memcache_delete(struct memcache *cache, enum memcache_number n, memcache_delete_element(cache, e); } -void memcache_add(struct memcache *cache, enum memcache_number n, +bool memcache_add(struct memcache *cache, enum memcache_number n, DATA_BLOB key, DATA_BLOB value) { struct memcache_element *e; @@ -278,11 +278,11 @@ void memcache_add(struct memcache *cache, enum memcache_number n, cache = global_cache
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9f54b94b52d s4:torture: Produce more output to help debug smb2.multichannel.bugs.bug_15346 via 46f0c269658 lib/torture: Add torture_assert_size_*() macros via e933fd2dadf lib/torture: Use portable format specifiers from f83d6c53cce clang-format: sort alphabetically https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9f54b94b52db2935affc6b1cb09b71c2907f2289 Author: Joseph Sutton Date: Thu Oct 19 13:25:03 2023 +1300 s4:torture: Produce more output to help debug smb2.multichannel.bugs.bug_15346 Print the time (as reckoned by tevent) at which each ‘negprot done’ and ‘echo done’ message is produced, and print another message if one of the requests times out. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15498 Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Oct 24 15:51:40 UTC 2023 on atb-devel-224 commit 46f0c2696582ab6561808dcfadcfc5cf9bc67a3a Author: Joseph Sutton Date: Thu Oct 19 12:34:53 2023 +1300 lib/torture: Add torture_assert_size_*() macros BUG: https://bugzilla.samba.org/show_bug.cgi?id=15498 Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider commit e933fd2dadfabc04add3caed9f9496761fadba8c Author: Joseph Sutton Date: Thu Oct 19 12:34:30 2023 +1300 lib/torture: Use portable format specifiers BUG: https://bugzilla.samba.org/show_bug.cgi?id=15498 Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider --- Summary of changes: lib/torture/torture.h | 88 - source4/torture/smb2/multichannel.c | 50 +++-- 2 files changed, 115 insertions(+), 23 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/torture/torture.h b/lib/torture/torture.h index 6818084ea96..ad343cb030b 100644 --- a/lib/torture/torture.h +++ b/lib/torture/torture.h @@ -561,9 +561,9 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data) do { uint32_t __got = (got), __expected = (expected); \ if (__got != __expected) { \ torture_result(torture_ctx, TORTURE_FAIL, \ - __location__": "#got" was %ju (0x%jX), expected %ju (0x%jX): %s", \ - (uintmax_t)__got, (uintmax_t)__got, \ - (uintmax_t)__expected, (uintmax_t)__expected, \ + __location__": "#got" was %"PRIu32" (0x%"PRIX32"), expected %"PRIu32" (0x%"PRIX32"): %s", \ + __got, __got, \ + __expected, __expected, \ cmt); \ return false; \ } \ @@ -573,9 +573,9 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data) do { uint32_t __got = (got), __expected = (expected); \ if (__got != __expected) { \ torture_result(torture_ctx, TORTURE_FAIL, \ - __location__": "#got" was %ju (0x%jX), expected %ju (0x%jX): %s", \ - (uintmax_t)__got, (uintmax_t)__got, \ - (uintmax_t)__expected, (uintmax_t)__expected, \ + __location__": "#got" was %"PRIu32" (0x%"PRIX32"), expected %"PRIu32" (0x%"PRIX32"): %s", \ + __got, __got, \ + __expected, __expected, \ cmt); \ ret = false; \ goto label; \ @@ -586,8 +586,8 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data) do { uint32_t __got = (got), __not_expected = (not_expected); \ if (__got == __not_expected) { \ torture_result(torture_ctx, TORTURE_FAIL, \ - __location__": "#got" was %ju (0x%jX), expected a different number: %s", \ - (uintmax_t)__got, (uintmax_t)__got, \ + __location__": "#got" was %"PRIu32" (0x%"PRIX32"), expected a different number: %s", \ + __got, __got, \ cmt); \ return false; \ } \ @@ -597,8 +597,8 @@ static inline void torture_dump_data_str_cb(const char *buf, void *private_data) do { uint32_t __got = (got), __not_expected = (not_expected); \ if (__got == __not_expected) { \ torture_result(torture_ctx, TORTURE_FAIL, \ - __location__": "#got" was %ju (0x%jX), expec
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0e244ff79b6 s3:torture: Remove masktest.c from 3fbc514a2c3 docs:smbdotconf: Inform that changing 'winbind max domain connections' needs a restart https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0e244ff79b6d481ac995411070f83471b2e6ac40 Author: Andreas Schneider Date: Mon Sep 4 16:49:39 2023 +0200 s3:torture: Remove masktest.c The file is not built. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Sep 5 07:30:12 UTC 2023 on atb-devel-224 --- Summary of changes: source3/torture/masktest.c | 581 - 1 file changed, 581 deletions(-) delete mode 100644 source3/torture/masktest.c Changeset truncated at 500 lines: diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c deleted file mode 100644 index d7485cfb5eb..000 --- a/source3/torture/masktest.c +++ /dev/null @@ -1,581 +0,0 @@ -/* - Unix SMB/CIFS implementation. - mask_match tester - Copyright (C) Andrew Tridgell 1999 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "includes.h" -#include "system/filesys.h" -#include "trans2.h" -#include "libsmb/libsmb.h" -#include "libsmb/nmblib.h" -#include "../libcli/smb/smbXcli_base.h" -#include "lib/util/string_wrappers.h" - -static fstring password; -static fstring username; -static int got_pass; -static struct cli_credentials *test_creds; -static int max_protocol = -1; -static bool showall = False; -static bool old_list = False; -static const char *maskchars = "<>\"?*abc."; -static const char *filechars = "abcdefghijklm."; -static int verbose; -static int die_on_error; -static int NumLoops = 0; -static int ignore_dot_errors = 0; - -extern char *optarg; -extern int optind; - -/* a test fn for LANMAN mask support */ -static int ms_fnmatch_lanman_core(const char *pattern, const char *string) -{ - const char *p = pattern, *n = string; - char c; - - if (strcmp(p,"?")==0 && strcmp(n,".")==0) goto match; - - while ((c = *p++)) { - switch (c) { - case '.': - /* if (! *n && ! *p) goto match; */ - if (*n != '.') goto nomatch; - n++; - break; - - case '?': - if ((*n == '.' && n[1] != '.') || ! *n) goto next; - n++; - break; - - case '>': - if (n[0] == '.') { - if (! n[1] && ms_fnmatch_lanman_core(p, n+1) == 0) goto match; - if (ms_fnmatch_lanman_core(p, n) == 0) goto match; - goto nomatch; - } - if (! *n) goto next; - n++; - break; - - case '*': - if (! *p) goto match; - for (; *n; n++) { - if (ms_fnmatch_lanman_core(p, n) == 0) goto match; - } - break; - - case '<': - for (; *n; n++) { - if (ms_fnmatch_lanman_core(p, n) == 0) goto match; - if (*n == '.' && !strchr_m(n+1,'.')) { - n++; - break; - } - } - break; - - case '"': - if (*n == 0 && ms_fnmatch_lanman_core(p, n) == 0) goto match; - if (*n != '.') goto nomatch; - n++; - break; - - default: - if (c != *n) goto nomatch; - n++; - } - } - - if (! *n) goto match; - - nomatch: -
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 86f67f59eaf s3: libsmb: Add a missing return statement in the timeout case. via 1502ef29bf4 s3:utils: Use lpcfg_set_cmdline() in vfstest via b37269e032c s3:utils: Use lpcfg_set_cmdline() in testparm via 91e5859b50e s3:utils: Use lpcfg_set_cmdline() in smbstatus via 8f2a9f836f6 s3:utils: Remove trailing spaces in smbcquotas; no changes via 16a4c8c871f s3:utils: Use lpcfg_set_cmdline() in smbcquotas via 9ef35869864 s3:utils: Remove trailing spaces in smbcontrol; no changes via 7a4cb09a127 s3:utils: Use lpcfg_set_cmdline() in smbcontrol via d0ca11143a1 s3:utils: Remove trailing spaces in smbcacls; no changes via 0e2d13c52fd s3:utils: Use lpcfg_set_cmdline() in smbcacls via 6c00718f3de s3:utils: Use lpcfg_set_cmdline() in sharesec via ed947b16e64 s3:utils: Use lpcfg_set_cmdline() in regedit via 914d1a38ecb s3:utils: Use lpcfg_set_cmdline() in pdbedit via 10e35d6c6ea s3:utils: Remove trailing spaces in pdbedit; no changes via e6ea68b46df s3:utils: Use lpcfg_set_cmdline() in net via 2eced25407d s3:utils: Use lpcfg_set_cmdline() in mdsearch via 041e28d9244 s3:utils: Use lpcfg_set_cmdline() in dbwrap_torture via 0534e1cad5c s3:utils: Use lpcfg_set_cmdline() in dbwrap_tool via 993ba8a8fc6 s3:rpc_server: Use lpcfg_set_cmdline() in test_mdsparser_es via 4a54b0051da s3:rpcclient: Use lpcfg_set_cmdline() via b9a73ff61bd examples: Use lpcfg_set_cmdline() via c291ab2a030 s3:param: Use lpcfg_set_cmdline() from 81226b5179e vfs_aio_pthread: use SMB_VFS_NEXT_OPENAT() in aio_pthread_openat_fn() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 86f67f59eafc95ad5312fd711b0295a94237e036 Author: Jeremy Allison Date: Wed Aug 16 17:24:37 2023 -0700 s3: libsmb: Add a missing return statement in the timeout case. Obvious fix (needs a malicious server to recreate). Found by Robert Morris BUG: https://bugzilla.samba.org/show_bug.cgi?id=15426 Signed-off-by: Jeremy Allison Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Aug 23 09:29:51 UTC 2023 on atb-devel-224 commit 1502ef29bf4b7a41cc23d57fa2d245a70663b035 Author: Pavel Kalugin Date: Mon Aug 7 08:34:14 2023 +0300 s3:utils: Use lpcfg_set_cmdline() in vfstest Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider commit b37269e032c13a545af3c3ca51668ad9ee06d4c8 Author: Pavel Kalugin Date: Mon Aug 7 07:52:32 2023 +0300 s3:utils: Use lpcfg_set_cmdline() in testparm Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider commit 91e5859b50e0aee18b53b12ed648cf5d513fc948 Author: Pavel Kalugin Date: Mon Aug 7 07:48:22 2023 +0300 s3:utils: Use lpcfg_set_cmdline() in smbstatus Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider commit 8f2a9f836f688c539c623dce31c68e7af8389fdb Author: Pavel Kalugin Date: Mon Aug 7 07:43:48 2023 +0300 s3:utils: Remove trailing spaces in smbcquotas; no changes Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider commit 16a4c8c871f4c087f0cbefabaa14e4dfe5b6b798 Author: Pavel Kalugin Date: Mon Aug 7 07:43:06 2023 +0300 s3:utils: Use lpcfg_set_cmdline() in smbcquotas Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider commit 9ef35869864fe249eeaf0691e174c2d4adf05b20 Author: Pavel Kalugin Date: Mon Aug 7 07:35:59 2023 +0300 s3:utils: Remove trailing spaces in smbcontrol; no changes Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider commit 7a4cb09a127745f7fccc3ba6514883805d639274 Author: Pavel Kalugin Date: Mon Aug 7 07:34:38 2023 +0300 s3:utils: Use lpcfg_set_cmdline() in smbcontrol Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider commit d0ca11143a1d7af7790f973791e3066a645441f6 Author: Pavel Kalugin Date: Mon Aug 7 07:26:40 2023 +0300 s3:utils: Remove trailing spaces in smbcacls; no changes Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider commit 0e2d13c52fd44ef63e40230e81344f92f401665f Author: Pavel Kalugin Date: Mon Aug 7 07:25:28 2023 +0300 s3:utils: Use lpcfg_set_cmdline() in smbcacls Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider commit 6c00718f3de8a86ac659e07b98c1c85773e76fd0 Author: Pavel Kalugin Date: Mon Aug 7 07:20:58 2023 +0300 s3:utils: Use lpcfg_set_cmdline() in sharesec Signed-off-by: Pavel Kalugin Reviewed-by: Andreas Schneider commit ed947b16e64c5640e8f541f8ccf6b4c07793faba Author: Pavel Kalugin Date: Mon Aug 7 07:17:28 2023 +0300 s3:utils: Use lpcfg_set_cmdline() in regedit Signed-off-by: Pavel Kalugin
[SCM] NSS Wrapper Repository - branch master updated
The branch, master has been updated via 2dd91af src: use LIBC_SO and LIBNSL_SO from GNU libc, if available via 3a4e4a2 doc/nss_wrapper.1: Fix typo of 'environment'. from 2c879a0 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode https://git.samba.org/?p=nss_wrapper.git;a=shortlog;h=master - Log - commit 2dd91af5fe572ffebf7eb44d8386aec99cd50ab9 Author: Pino Toscano Date: Fri May 30 19:01:29 2014 +0200 src: use LIBC_SO and LIBNSL_SO from GNU libc, if available Look for gnu/lib-names.h and use the LIBC_SO and LIBNSL_SO defines to dlopen libc and libnsl, so the right library is loaded without manually searching for libc.so.N or libnsl.so.N. Signed-off-by: Simon Josefsson Reviewed-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 3a4e4a2103e7871534e4fa1d85428b0b72ea001a Author: Simon Josefsson Date: Sat Aug 5 19:13:08 2023 +0200 doc/nss_wrapper.1: Fix typo of 'environment'. Signed-off-by: Simon Josefsson Reviewed-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: ConfigureChecks.cmake | 1 + config.h.cmake| 1 + doc/nss_wrapper.1 | 2 +- doc/nss_wrapper.1.txt | 2 +- src/nss_wrapper.c | 18 ++ 5 files changed, 22 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 5bd69db..e74e83e 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -54,6 +54,7 @@ check_include_file(shadow.h HAVE_SHADOW_H) check_include_file(grp.h HAVE_GRP_H) check_include_file(nss.h HAVE_NSS_H) check_include_file(nss_common.h HAVE_NSS_COMMON_H) +check_include_file(gnu/lib-names.h HAVE_GNU_LIB_NAMES_H) # FUNCTIONS check_function_exists(strncpy HAVE_STRNCPY) diff --git a/config.h.cmake b/config.h.cmake index 6199962..37cd700 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -20,6 +20,7 @@ #cmakedefine HAVE_GRP_H 1 #cmakedefine HAVE_NSS_H 1 #cmakedefine HAVE_NSS_COMMON_H 1 +#cmakedefine HAVE_GNU_LIB_NAMES_H 1 /*** FUNCTIONS ***/ diff --git a/doc/nss_wrapper.1 b/doc/nss_wrapper.1 index 3ef5a89..78727b3 100644 --- a/doc/nss_wrapper.1 +++ b/doc/nss_wrapper.1 @@ -88,7 +88,7 @@ and the group file in .PP \fBNSS_WRAPPER_HOSTS\fR .RS 4 -If you also need to emulate network name resolution in your enviornment, especially with socket_wrapper, you can write a hosts file\&. The format is described in +If you also need to emulate network name resolution in your environment, especially with socket_wrapper, you can write a hosts file\&. The format is described in \fIman 5 hosts\fR\&. Then you can point nss_wrapper to your hosts file using: NSS_WRAPPER_HOSTS=/path/to/your/hosts .RE .PP diff --git a/doc/nss_wrapper.1.txt b/doc/nss_wrapper.1.txt index 4811dde..85a567a 100644 --- a/doc/nss_wrapper.1.txt +++ b/doc/nss_wrapper.1.txt @@ -54,7 +54,7 @@ NSS_WRAPPER_GROUP=/path/to/your/group. *NSS_WRAPPER_HOSTS*:: -If you also need to emulate network name resolution in your enviornment, +If you also need to emulate network name resolution in your environment, especially with socket_wrapper, you can write a hosts file. The format is described in 'man 5 hosts'. Then you can point nss_wrapper to your hosts file using: NSS_WRAPPER_HOSTS=/path/to/your/hosts diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c index 3399f06..78d88dc 100644 --- a/src/nss_wrapper.c +++ b/src/nss_wrapper.c @@ -61,6 +61,10 @@ #include #include +#ifdef HAVE_GNU_LIB_NAMES_H +#include +#endif + #include "nss_utils.h" /* * Defining _POSIX_PTHREAD_SEMANTICS before including pwd.h and grp.h gives us @@ -1156,6 +1160,13 @@ static void *nwrap_load_lib_handle(enum nwrap_lib lib) case NWRAP_LIBNSL: #ifdef HAVE_LIBNSL handle = nwrap_main_global->libc->nsl_handle; +#ifdef LIBNSL_SO + if (handle == NULL) { + handle = dlopen(LIBNSL_SO, flags); + + nwrap_main_global->libc->nsl_handle = handle; + } +#endif if (handle == NULL) { for (i = 10; i >= 0; i--) { char soname[256] = {0}; @@ -1193,6 +1204,13 @@ static void *nwrap_load_lib_handle(enum nwrap_lib lib) /* FALL TROUGH */ case NWRAP_LIBC: handle = nwrap_main_global->libc->handle; +#ifdef LIBC_SO + if (handle == NULL) { + handle = dlopen(LIBC_SO, flags); + + nwrap_main_global->libc->handle = handle; + } +#endif if (handle == NULL) { for (i = 10; i >= 0; i--) { char soname[256] = {0}; -- NSS Wrapper Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f348b84fbcf s3:smbd: fix multichannel connection passing race via 50d61e53002 s3:smbd: always clear filter_subreq in smb2srv_client_mc_negprot_next() via 4028d658290 s4:torture/smb2: add smb2.multichannel.bugs.bug_15346 via 2b93058be3f s4:torture/smb2: make it possible to pass existing_conn to smb2_connect_ext() via dc5a500f0a7 s4:torture/smb2: let us have a common torture_smb2_con_share() via ade663ee6ca s4:torture/smb2: let torture_smb2_con_sopt() use smb2_connect() from 9ec22e68024 dcerpc.idl: fix definitions for DCERPC_PKT_CO_CANCEL and DCERPC_PKT_ORPHANED payload https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f348b84fbcf203ab1ba92840cf7aecd55dbf9aa0 Author: Stefan Metzmacher Date: Thu Aug 3 15:45:45 2023 +0200 s3:smbd: fix multichannel connection passing race If a client opens multiple connection with the same client guid in parallel, our connection passing is likely to hit a race. Assume we have 3 processes: smbdA: This process already handles all connections for a given client guid smbdB: This just received a new connection with an SMB2 neprot for the same client guid smbdC: This also received a new connection with an SMB2 neprot for the same client guid Now both smbdB and smbdC send a MSG_SMBXSRV_CONNECTION_PASS message to smbdA. These messages contain the socket fd for each connection. While waiting for a MSG_SMBXSRV_CONNECTION_PASSED message from smbdA, both smbdB and smbdC watch the smbXcli_client.tdb record for changes (that also verifies smbdA stays alive). Once one of them say smbdB received the MSG_SMBXSRV_CONNECTION_PASSED message, the dbwrap_watch logic will wakeup smbdC in order to let it recheck the smbXcli_client.tdb record in order to handle the case where smbdA died or deleted its record. Now smbdC rechecks the smbXcli_client.tdb record, but it was not woken because of a problem with smbdA. It meant that smbdC sends a MSG_SMBXSRV_CONNECTION_PASS message including the socket fd again. As a result smbdA got the socket fd from smbdC twice (or even more), and creates two (or more) smbXsrv_connection structures for the same low level tcp connection. And it also sends more than one SMB2 negprot response. Depending on the tevent logic, it will use different smbXsrv_connection structures to process incoming requests. And this will almost immediately result in errors. The typicall error is: smb2_validate_sequence_number: smb2_validate_sequence_number: bad message_id 2 (sequence id 2) (granted = 1, low = 1, range = 1) But other errors would also be possible. The detail that leads to the long delays on the client side is that our smbd_server_connection_terminate_ex() code will close only the fd of a single smbXsrv_connection, but the refcount on the socket fd in the kernel is still not 0, so the tcp connection is still alive... Now we remember the server_id of the process that we send the MSG_SMBXSRV_CONNECTION_PASS message to. And just keep watching the smbXcli_client.tdb record if the server_id don't change. As we just need more patience to wait for the MSG_SMBXSRV_CONNECTION_PASSED message. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15346 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Aug 8 13:59:58 UTC 2023 on atb-devel-224 commit 50d61e5300250922bf36bb699306f82dff6a00b9 Author: Stefan Metzmacher Date: Thu Aug 3 15:34:29 2023 +0200 s3:smbd: always clear filter_subreq in smb2srv_client_mc_negprot_next() Commit 5d66d5b84f87267243dcd5223210906ce589af91 introduced a 'verify_again:' target, if we ever hit that, we would leak the existing filter_subreq. Moving it just above a possible messaging_filtered_read_send() will allow us to only clear it if we actually create a new request. That will help us in the next commits. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15346 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider commit 4028d6582907cf582730ceec56872d8584ad02e6 Author: Stefan Metzmacher Date: Fri Aug 4 17:16:14 2023 +0200 s4:torture/smb2: add smb2.multichannel.bugs.bug_15346 This demonstrates the race quite easily against Samba and works fine against Windows Server 2022. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15346 Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider commit 2b93058be3f6e5eaee239ad3b0e707c62089d18e Author: Stefan Metzmacher Date: Mon Aug 7 12:22:43
[SCM] pam wrapper repository - annotated tag pam_wrapper-1.1.5 created
The annotated tag, pam_wrapper-1.1.5 has been created at cc0ce1901340340b49e9490f7ec0294bb40e6c2c (tag) tagging b223df9f35e750811f812c8cfb85bc81c196102e (commit) replaces pam_wrapper-1.1.4 tagged by Andreas Schneider on Tue Aug 8 11:17:03 2023 +0200 - Log - pam_wrapper-1.1.5 * Fixed building with Python 3.12 * Removed Python 2 support -BEGIN PGP SIGNATURE- iQIzBAABCgAdFiEEjf9T4Y8qvI2PPJIjfuD8TcwBTj0FAmTSCCIACgkQfuD8TcwB Tj2HlhAAovAg2bZu2W8A1Ft55KVUgtF5SOoU/1TZMw8XorDn8elIdx1oQeGm7Zpe kSrwunjTtck0bqp6EGsw55z1wFFzWK/yDoGrsc/L201T9mHcZe7m6/WlqZodSnyL Yz7qf/1WjtI5p7c4F4dm4mMDBYoUH5StSjt9x/BLMtlPChVkqiWt8nps38y33FUM 15FOBEZe/hRsEaBZShsZC0QzdDG4vU3NRth2+tGshoy/ZCvLni8TbKYD8DFtrhba 47FBprfnq95q3t2Pce3G2gr7f+56VSNkkmwduPE6i8DBN80vnpY0Mkc70Xa58UIb tF8JrLnxCttOFEhK1HP/B4VAEMHnk+6+N3aZ9sGbN7IlwOV7fJM+XZ9rIbX9hpAb rmLyTvtbPGvkWB6RWcNto3SBzy+3gc1k3uS2LMUnEPE/KoAm9uQBOTBtzUAvOCcz F0/F2bTa5b/5Surv77qzMZSYjwKxaq+NbXWLoeFyJOc/fdYr3D0vZWWD0tapbU2+ pwcrWtQDVuP3YKR7TfMlwl31nI3u1KYBzH60rHKFQluXLZtjptmdJ9XCKBCZg1ZL DXo3GUwVIq083gD9gXepiLziGyjpFrlU+4Bba97iWJWKqBVZsefz/ve60ehRgcST CjDeMBEV+2RTX5OEhnP6U0rGaZmMM7IFSjifZdWe+fbr6/IdjtU= =3VtC -END PGP SIGNATURE- Andreas Schneider (8): gitlab-ci: Fix indentation found by yamllint gitlab-ci: Change the obj-dir so it doesn't create problems gitlab-ci: Introduce test stages Drop support for Python 2 cmake: Drop FindCMocka.cmake Module cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode cmake: Remove -Werror=declaration-after-statement Bump version to 1.1.5 --- -- pam wrapper repository
[SCM] pam wrapper repository - branch master updated
The branch, master has been updated via b223df9 Bump version to 1.1.5 from 39d9af8 cmake: Remove -Werror=declaration-after-statement https://git.samba.org/?p=pam_wrapper.git;a=shortlog;h=master - Log - commit b223df9f35e750811f812c8cfb85bc81c196102e Author: Andreas Schneider Date: Mon Jul 17 14:50:14 2023 +0200 Bump version to 1.1.5 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: CHANGELOG | 4 CMakeLists.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/CHANGELOG b/CHANGELOG index 608f45b..5e2da7c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ ChangeLog == +version 1.1.5 (released 2023-08-08) + * Fixed building with Python 3.12 + * Removed Python 2 support + version 1.1.4 (released 2020-10-28) * NOTE: pam_wrapper stopped working with the latest OpenPAM on FreeBSD 12. Help is needed to add back support. diff --git a/CMakeLists.txt b/CMakeLists.txt index 37dff75..7b01937 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") include(DefineCMakeDefaults) include(DefineCompilerFlags) -project(pam_wrapper VERSION 1.1.4 LANGUAGES C) +project(pam_wrapper VERSION 1.1.5 LANGUAGES C) # global needed variables set(APPLICATION_NAME ${PROJECT_NAME}) @@ -25,7 +25,7 @@ set(APPLICATION_NAME ${PROJECT_NAME}) # Increment PATCH. set(LIBRARY_VERSION_MAJOR 0) set(LIBRARY_VERSION_MINOR 0) -set(LIBRARY_VERSION_PATCH 7) +set(LIBRARY_VERSION_PATCH 8) set(LIBRARY_VERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY_VERSION_PATCH}") set(LIBRARY_SOVERSION ${LIBRARY_VERSION_MAJOR}) -- pam wrapper repository
[SCM] UID Wrapper Repository - branch master updated
The branch, master has been updated via c8bf3ae tests: Fix fake socket_wrapper_syscall_valid() from 850f24c cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode https://git.samba.org/?p=uid_wrapper.git;a=shortlog;h=master - Log - commit c8bf3ae675b47726d65e83e3abf62cafa93b12e6 Author: Andreas Schneider Date: Mon Aug 7 14:22:54 2023 +0200 tests: Fix fake socket_wrapper_syscall_valid() We want to return errno = ENOSYS in socket_wrapper_syscall_va(). However if we do not handle __FAKE_SOCKET_WRAPPER_SYSCALL_NO+1 then we will call libc_syscall() for __FAKE_SOCKET_WRAPPER_SYSCALL_NO+1. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15445 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15448 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: tests/uwrap_fake_socket_wrapper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/tests/uwrap_fake_socket_wrapper.c b/tests/uwrap_fake_socket_wrapper.c index 657873a..0472b45 100644 --- a/tests/uwrap_fake_socket_wrapper.c +++ b/tests/uwrap_fake_socket_wrapper.c @@ -23,7 +23,7 @@ /* simulate socket_wrapper hooks */ bool socket_wrapper_syscall_valid(long int sysno) { - if (sysno == __FAKE_SOCKET_WRAPPER_SYSCALL_NO) { + if (sysno >= __FAKE_SOCKET_WRAPPER_SYSCALL_NO) { return true; } -- UID Wrapper Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 85c8222bdb7 s4:kdc: Fix code spelling via b29793ffdee s4:dsdb:tests: Fix code spelling via bedc978c81f s4:dsdb:schema: Fix code spelling via 969bcc28627 s4:dsdb:schema: Fix trailing white spaces via f34ef1ef505 s4:dsdb:samdb: Fix code spelling via 3ebe11cd43b s4:dsdb:repl: Fix code spelling via e3319795801 s4:dsdb:kcc: Fix code spelling via 2304ec43970 s4:dsdb:common: Fix code spelling via ed3c1fcb878 s4:dns_server: Fix code spelling via dbb1fbe8668 s4:client: Fix code spelling via 694980224ab s4:cldap_server: Fix code spelling via 795e464cfaf s4:auth: Fix code spelling via 01c31c8f6d0 s3:spoolss: Remove dead code via 0ed62798ddd s3:utils: Fix code spelling via edcebcd48a4 lib:tevent: Fix code spelling via d0b2c27d2f6 lib:fuzzing: Fix code spelling from 06d673a1a0c third_party/heimdal: Import lorikeet-heimdal-202308030152 (commit 2a036a6fd80833799316b8a85623cdea3a1135df) https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 85c8222bdb7ea3524cbbfa2da6bbeb1191a819c2 Author: Andreas Schneider Date: Wed Aug 2 10:47:30 2023 +0200 s4:kdc: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Aug 3 15:25:01 UTC 2023 on atb-devel-224 commit b29793ffdee5d9b9c1c05830622e80f7faec7670 Author: Andreas Schneider Date: Wed Aug 2 10:44:32 2023 +0200 s4:dsdb:tests: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit bedc978c81fd92edeb3eb6d3efb3a55eb1a8bca3 Author: Andreas Schneider Date: Wed Aug 2 10:44:02 2023 +0200 s4:dsdb:schema: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 969bcc28627ffd22ee9251d4510c5adef263fb49 Author: Andreas Schneider Date: Wed Aug 2 10:44:50 2023 +0200 s4:dsdb:schema: Fix trailing white spaces Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit f34ef1ef5054d453e0923dbcad8fd0ca977cc3e4 Author: Andreas Schneider Date: Wed Aug 2 10:41:31 2023 +0200 s4:dsdb:samdb: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 3ebe11cd43bedb98214664e7cf99632295b0ca34 Author: Andreas Schneider Date: Wed Aug 2 10:40:56 2023 +0200 s4:dsdb:repl: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit e33197958017d6ab12649319e71ab16969694d94 Author: Andreas Schneider Date: Wed Aug 2 10:40:35 2023 +0200 s4:dsdb:kcc: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 2304ec43970ab79415ff28f3e2327b157e1b2799 Author: Andreas Schneider Date: Wed Aug 2 10:39:57 2023 +0200 s4:dsdb:common: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit ed3c1fcb878918663588652ecf4d7aa6e41711b5 Author: Andreas Schneider Date: Wed Aug 2 10:37:18 2023 +0200 s4:dns_server: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit dbb1fbe8668175aecf7f9b9a86664c1378499292 Author: Andreas Schneider Date: Thu Jul 20 11:36:01 2023 +0200 s4:client: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 694980224ab8df02945e24c2065d9af4c6f30611 Author: Andreas Schneider Date: Thu Jul 20 11:35:39 2023 +0200 s4:cldap_server: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 795e464cfaf806f758ab4c12b815d9eb4aaf3c02 Author: Andreas Schneider Date: Thu Jul 20 11:34:28 2023 +0200 s4:auth: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 01c31c8f6d02fa99cf843ded1a5c25f4d017ba62 Author: Andreas Schneider Date: Wed Aug 2 10:35:27 2023 +0200 s3:spoolss: Remove dead code Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 0ed62798ddd98d3faf5a90d9cea5bb5bc10950d8 Author: Andreas Schneider Date: Thu Jul 20 11:33:37 2023 +0200 s3:utils: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit edcebcd48a474190940a53ddb8fac6099a4f0b6d Author: Andreas Schneider Date: Wed Aug 2 10:33:35 2023 +0200 lib:tevent: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit d0b2c27d2f6778b928da4b8b76dd5a02b038f69c Author: Andreas Schneider Date: Thu Jul 20 11:31:43 2023 +0200 lib:fuzzing: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 801772012eb Revert "s3:winbindd: set TEVENT_DEPRECATED as tevent_thread_call_depth_*() api will change soon" via 40fb810de39 s4:dns_server: Add some more debugging in order to find problems with level 10 logs via 76b0530e673 s4:dns_server: defer calling werr_to_dns_err() in a central place via fb4bb188acf s3:waf: Fix code spelling via 83b58255ed5 s3:winbindd: Fix code spelling via 746ef717a74 s3:utils: Fix code spelling via 4cff81603ab s3:torture: Fix code spelling via 7077ae40423 s3:smbd: Fix code spelling via feee2018883 s3:smbd: Fix trailing white spaces in quotas.c via 26d9da1543f s3:smbd: Fix trailing white spaces in dmapi.c via 9fd809296ce s3:selftest: Fix code spelling via 18dd3f3dd31 s3:script: Fix code spelling via 9826fd4588f s3:rpc_server: Fix code spelling via 4a817b1655d s3:rpc_client: Fix code spelling via 6a359944f1f s3:registry: Fix code spelling via 1517fd17094 s3:printing: Rename variably to dummy to make codespell happy via 73abbd1465e s3:printing: Fix code spelling via d8dd743f0b2 s3:printing: Fix trailing white spaces in print_iprint.c via d41702abe09 s3:passdb: Fix code spelling via 57047ca56d6 s3:param: Fix code spelling via f8d5e70a913 s3:param: Rename bLoaded global variable from 6e4c7ae9a2e ctdb-tests: Log to stderr in statd-callout tests https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 801772012ebdd702e0c9f5335d131fb7ad07dac6 Author: Andreas Schneider Date: Wed Jul 19 11:19:55 2023 +0200 Revert "s3:winbindd: set TEVENT_DEPRECATED as tevent_thread_call_depth_*() api will change soon" This reverts commit 28ddcaf4d8ebb7a4e3498518580ff71662d3cee0. Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Jul 19 10:57:27 UTC 2023 on atb-devel-224 commit 40fb810de39c681c647b9003fe7472d9fb010667 Author: Stefan Metzmacher Date: Thu Jul 14 12:00:51 2022 +0200 s4:dns_server: Add some more debugging in order to find problems with level 10 logs We had customer problems where level 10 logs were not good enough in order to find the reason for failing dns updates. With the new debug message there's at least a chance to find out what the problem could be. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Reviewed-by: Ralph Boehme commit 76b0530e6734afe989c0defb9aba8acf2800401e Author: Stefan Metzmacher Date: Thu Jul 14 12:00:51 2022 +0200 s4:dns_server: defer calling werr_to_dns_err() in a central place The WERROR codes are much more verbose and it's better to keep them until we really need the mapping to DNS error codes. This will allow us to create much better debug messages in the next commit. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Reviewed-by: Ralph Boehme commit fb4bb188acfc3e7b500a05e9e4db8b08aed3 Author: Andreas Schneider Date: Tue Jul 18 12:29:12 2023 +0200 s3:waf: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 83b58255ed5c8cc371785ca1d42823cfb9273b06 Author: Andreas Schneider Date: Tue Jul 18 11:45:25 2023 +0200 s3:winbindd: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 746ef717a74b679da794c31f24dff0d126bd9930 Author: Andreas Schneider Date: Tue Jul 18 11:36:49 2023 +0200 s3:utils: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 4cff81603ab55ebdbe1e7581fa91d6538231e3cf Author: Andreas Schneider Date: Tue Jul 18 11:35:22 2023 +0200 s3:torture: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 7077ae40423a4cbfa79b700c9b8f4da6d5d1612f Author: Andreas Schneider Date: Tue Jul 18 11:30:18 2023 +0200 s3:smbd: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit feee201888367404dc1302888c76628c027de7ed Author: Andreas Schneider Date: Tue Jul 18 11:30:56 2023 +0200 s3:smbd: Fix trailing white spaces in quotas.c Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 26d9da1543f271c51ad8f9733b5c823cda54f105 Author: Andreas Schneider Date: Tue Jul 18 11:30:37 2023 +0200 s3:smbd: Fix trailing white spaces in dmapi.c Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 9fd809296cee4c035c6df33389b9aa84e0a6d263 Author: Andreas Schneider Date: Mon Jul 17 18:25:41 2023 +0200 s3:selftest: Fix code spelling Signed-off-b
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7c0a1c1e13f s3:winbind: Set/unset the winbind_call_flow callback if log level changes via a1b2f17c6db s3:winbind: Update winbind to tevent 0.15.0 API via 5b130e620fa s3:winbind: Add callback winbind_call_flow() via 24120728bb2 ldb: call tevent_set_max_debug_level(TEVENT_DEBUG_TRACE) together with ldb_tevent_debug() via 0031a102c3d lib/util: call tevent_set_max_debug_level() in samba_tevent_set_debug() via 6a80d170bca tevent: version 0.15.0 via 0ddf8b5645e tevent: add tevent_common_fd_str() helper via 2645be60d7a tevent: avoid calling epoll_update_event() again if epoll_check_reopen() already did it via e9d98097346 tevent: let epoll_check_reopen() clear all events before reopening them via 3217d5dc1d6 tevent: avoid epoll_check_reopen() overhead unless required via d94b9c81242 tevent: make use of TEVENT_DEBUG() when using TEVENT_DEBUG_TRACE via 812313f1c82 tevent: add TEVENT_DEBUG() avoid argument overhead when log is not active... via 2c78a4f527e tevent: introduce tevent_set_max_debug_level() (default TEVENT_DEBUG_WARNING) via 86140d7c381 tevent: add fd_speed test via d7b29125c01 tevent: Flow: add tevent_thread_call_depth_set_callback() via 0c4d6e630f5 tevent: Flow: store cleanup function name in tevent_req via 85e43e70b20 tevent: Flow: store cancel function name in tevent_req via 5e83691d1ed tevent: Flow: store trigger function name in tevent_queue_entry via deec9994eb8 tevent: Flow: store callback function name in tevent_req via fb3a9cd7329 tevent: Flow: pass function name to tevent_req_create() via 1c9e9f46046 tevent: Deprecate some tevent_thread_call_depth_*() functions via e9f38f6e6d8 tevent: Move definition of _DEPRECATED_ to the top of tevent.h via 28ddcaf4d8e s3:winbindd: set TEVENT_DEPRECATED as tevent_thread_call_depth_*() api will change soon via c1124ec8e5d tevent: add tevent_dlinklist.h as copy from lib/util/dlinklist.h via e3c77030fee lib/util: dlinklist.h sync with LGPL copy from lib/ldb/include/dlinklist.h via 8edb16a3964 ldb: clarify LGPL scope of include/dlinklist.h via 18e18006ad0 ldb: remove trailing whitespaces from include/dlinklist.h via a665d44f22c tevent: rely on epoll_create1() for epoll interface via 0daa9ebc235 lib:replace: rely on epoll_create1() for epoll interface via b649c7d3c2b tdb: release 1.4.9 via 791e2817e13 talloc: release 2.4.1 from bb6fecd9ac5 netcmd: sites: add sites and subnet list and view commands to manpage https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7c0a1c1e13fdd2209d02098e75102f46b7588fd4 Author: Pavel Filipenský Date: Wed May 3 11:21:11 2023 +0200 s3:winbind: Set/unset the winbind_call_flow callback if log level changes Done only for the parent process. Works with 'smbcontrol reload-config' Signed-off-by: Pavel Filipenský Reviewed-by: Stefan Metzmacher Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Jul 19 09:00:50 UTC 2023 on atb-devel-224 commit a1b2f17c6db3286cf991ac2ff9f62632ae0660ac Author: Pavel Filipenský Date: Tue May 2 21:59:53 2023 +0200 s3:winbind: Update winbind to tevent 0.15.0 API Signed-off-by: Pavel Filipenský Reviewed-by: Stefan Metzmacher commit 5b130e620faf0129ae4dbc456788aea693efa11e Author: Pavel Filipenský Date: Wed May 3 11:19:45 2023 +0200 s3:winbind: Add callback winbind_call_flow() Signed-off-by: Pavel Filipenský Reviewed-by: Stefan Metzmacher commit 24120728bb26ae814292e2e8c06eaa4707bb18b6 Author: Stefan Metzmacher Date: Tue Jan 31 16:25:40 2023 +0100 ldb: call tevent_set_max_debug_level(TEVENT_DEBUG_TRACE) together with ldb_tevent_debug() This means ldb_tevent_debug() is only called for TEVENT_DEBUG_TRACE. Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme commit 0031a102c3d7b21a4fe51198db9362251970a83d Author: Stefan Metzmacher Date: Tue Jan 31 16:25:40 2023 +0100 lib/util: call tevent_set_max_debug_level() in samba_tevent_set_debug() This means samba_tevent_debug() is only called when needed. Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme commit 6a80d170bca0c938f78ab12e37481b52792a9d83 Author: Stefan Metzmacher Date: Wed Jan 18 15:41:37 2023 +0100 tevent: version 0.15.0 - remove py2 ifdefs - python: Safely clear structure members - the tevent_thread_call_depth API is updated in order to allow better tracing. - add tevent_set_max_debug_level() only and don't pass TEVENT_DEBUG_TRACE to tevent_debug() callbacks by default. - Spelling fixes - Make use of epoll_create1() for epoll backend
[SCM] pam wrapper repository - branch master updated
The branch, master has been updated via 39d9af8 cmake: Remove -Werror=declaration-after-statement from 8e94874 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode https://git.samba.org/?p=pam_wrapper.git;a=shortlog;h=master - Log - commit 39d9af80cdae1be805346bca4f40b71149d62ba8 Author: Andreas Schneider Date: Mon Jul 10 11:32:23 2023 +0200 cmake: Remove -Werror=declaration-after-statement This is not compatible with Python 3.12 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: CompilerChecks.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake index 6c74b0b..559ecf9 100644 --- a/CompilerChecks.cmake +++ b/CompilerChecks.cmake @@ -32,7 +32,8 @@ if (UNIX) add_c_compiler_flag("-Wpointer-arith" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Werror=pointer-arith" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Wdeclaration-after-statement" SUPPORTED_COMPILER_FLAGS) -add_c_compiler_flag("-Werror=declaration-after-statement" SUPPORTED_COMPILER_FLAGS) +# Not compatible with Python 3.12 headers +#add_c_compiler_flag("-Werror=declaration-after-statement" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Wreturn-type" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Werror=return-type" SUPPORTED_COMPILER_FLAGS) add_c_compiler_flag("-Wuninitialized" SUPPORTED_COMPILER_FLAGS) -- pam wrapper repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 7d2c68f2e25 s3:nmbd: Fix code spelling via 0ff51f86a67 s3:nmbd: Fix trailing white spaces in nmbd_incomingrequests.c via 4e1f1a8acee s3:nmbd: Fix trailing white spaces in nmbd_incomingdgrams.c via 6c2338f36c3 s3:nmbd: Fix trailing white spaces in nmbd.c via 856b5abc957 s3:modules: Fix code spelling via 1d2ec674a70 s3:modules: Remove fruit:ressource option with incorrect spelling via 005a78ee7fd s3:modules: Remove trailing white spaces of README.nfs4acls.txt via b64308f2a42 s3:modules: Remove trailing white spaces of vfs_hpuxacl.c via b746f777328 s3:locking: Fix code spelling via f64add99473 s3:librpc: Fix code spelling via 7f033268c86 wscript: Fix code spelling via f9107c55a88 examples: Remove outdated validchars via 573e5e06f8d example: Remove outdated config files from tridge from dfeabce44fb s3:rpc_server:netlogon: generate FAULT_INVALID_TAG for invalid netr_LogonGetCapabilities levels https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 7d2c68f2e257a64b58bfa3e9fe593d27718b3cd4 Author: Andreas Schneider Date: Thu Jul 13 09:09:48 2023 +0200 s3:nmbd: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Mon Jul 17 12:41:21 UTC 2023 on atb-devel-224 commit 0ff51f86a67c5d7a08519d7a115135a6d8e910df Author: Andreas Schneider Date: Thu Jul 13 09:10:07 2023 +0200 s3:nmbd: Fix trailing white spaces in nmbd_incomingrequests.c Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 4e1f1a8acee717b3b6cd56f567dd518e93c43b51 Author: Andreas Schneider Date: Thu Jul 13 09:08:32 2023 +0200 s3:nmbd: Fix trailing white spaces in nmbd_incomingdgrams.c Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 6c2338f36c3b045850d2cc1135f4e25f51458837 Author: Andreas Schneider Date: Thu Jul 13 09:08:01 2023 +0200 s3:nmbd: Fix trailing white spaces in nmbd.c Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 856b5abc957453a58c17d2efcc1c5168200b8f59 Author: Andreas Schneider Date: Thu Jul 13 08:52:45 2023 +0200 s3:modules: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 1d2ec674a7065c5745e13618f4600353649f5b9f Author: Andreas Schneider Date: Thu Jul 13 09:03:18 2023 +0200 s3:modules: Remove fruit:ressource option with incorrect spelling The plan was to remove it in 4.7. I think it is safe to remove it with 4.19. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 005a78ee7fde3520a9532cdff3b7a6979cfec1d8 Author: Andreas Schneider Date: Thu Jul 13 08:55:31 2023 +0200 s3:modules: Remove trailing white spaces of README.nfs4acls.txt Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit b64308f2a42bfb5d1c4da553c754c8b7c27d82a8 Author: Andreas Schneider Date: Thu Jul 13 08:53:26 2023 +0200 s3:modules: Remove trailing white spaces of vfs_hpuxacl.c Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit b746f7773288fe9a42d73b5b2c82e9e6aa0e2c52 Author: Andreas Schneider Date: Thu Jul 13 08:50:21 2023 +0200 s3:locking: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit f64add99473672cdca85f53a7b3be7455f1bd594 Author: Andreas Schneider Date: Thu Jul 13 08:47:11 2023 +0200 s3:librpc: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 7f033268c86c857e20fbdfe65c64e9a00130fbda Author: Andreas Schneider Date: Thu Jul 13 08:46:20 2023 +0200 wscript: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit f9107c55a88460722fa548b2de10f41f3e8c7f06 Author: Andreas Schneider Date: Thu Jul 13 07:52:02 2023 +0200 examples: Remove outdated validchars I don't think we even look into this anymore and have other tests in place. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 573e5e06f8dac695659edc22a6934f4e10d966d7 Author: Andreas Schneider Date: Thu Jul 13 07:44:44 2023 +0200 example: Remove outdated config files from tridge I don't think he still runs Windows 95 ... Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- Summary of changes: examples/tridge/README | 8 - examples/tridge/smb.conf| 92 examples/tridge/smb.conf.WinNT | 14 -- examples/tridge/smb.conf.fjall | 20
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5a5e24e s3:libsmb: Fix code spelling via 939ec7ea46d s3:libads: Fix code spelling via 71b40127e11 s3:lib: Fix code spelling via 09d2e58986d s3:include: Fix code spelling via ba5b1f633aa s3:include: Remove trailing whitepaces in MacExtensions.h via 929ed4800ce python:tests: Fix code spelling via bb0297dadc5 python: Fix code spelling via 3d4235eb606 examples: Fix code spelling via acd846aac44 examples: Make codespell happy from 05e2ec1d8be configure: ensure sizeof(int) >= 4 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5a5e24e5fe06b1fdedb3c59efb5b67750b09 Author: Andreas Schneider Date: Wed Jul 5 11:26:30 2023 +0200 s3:libsmb: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Jul 13 06:34:01 UTC 2023 on atb-devel-224 commit 939ec7ea46d7c9fd30e4b6c1fec9354bfd9f4d40 Author: Andreas Schneider Date: Wed Jul 5 11:21:39 2023 +0200 s3:libads: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 71b40127e11c9b275f8e4049a40c5247d53b71f5 Author: Andreas Schneider Date: Wed Jul 5 11:16:18 2023 +0200 s3:lib: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 09d2e58986d30c71fa17aad12aca5e6b2807d109 Author: Andreas Schneider Date: Wed Jul 5 11:10:23 2023 +0200 s3:include: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit ba5b1f633aaad654a399c815c2a7001d560eb2fc Author: Andreas Schneider Date: Wed Jul 5 11:11:20 2023 +0200 s3:include: Remove trailing whitepaces in MacExtensions.h Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 929ed4800ce8468aa5559b9582c6342302a817e3 Author: Andreas Schneider Date: Wed Jul 5 11:07:52 2023 +0200 python:tests: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit bb0297dadc537022a1002743d2858b48db2ea1d4 Author: Andreas Schneider Date: Wed Jul 5 11:05:09 2023 +0200 python: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 3d4235eb606b486b59a2a468a35809aec8a81b52 Author: Andreas Schneider Date: Wed Jul 5 11:02:04 2023 +0200 examples: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit acd846aac44767b8035be1c2443acf590d9d79dc Author: Andreas Schneider Date: Wed Jul 5 11:01:25 2023 +0200 examples: Make codespell happy Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke --- Summary of changes: examples/dce-dfs/smb.conf | 4 +- examples/scripts/wins_hook/dns_update | 2 +- python/samba/dbchecker.py | 2 +- python/samba/tests/dns.py | 2 +- source3/include/MacExtensions.h| 74 +++--- source3/lib/adouble.c | 2 +- source3/lib/cbuf.h | 12 ++-- source3/lib/charcnv.c | 6 +- source3/lib/eventlog/eventlog.c| 6 +- source3/lib/g_lock.c | 6 +- source3/lib/interface.c| 2 +- source3/lib/ldap_escape.c | 2 +- source3/lib/ms_fnmatch.c | 2 +- .../examples/netdomjoin-gui/netdomjoin-gui.c | 4 +- source3/lib/netapi/tests/netgroup.c| 2 +- source3/lib/per_thread_cwd.c | 2 +- source3/lib/smbconf/smbconf_init.c | 2 +- source3/lib/smbconf/smbconf_init.h | 2 +- source3/lib/smbldap.c | 4 +- source3/lib/srprs.h| 2 +- source3/lib/substitute.c | 4 +- source3/lib/sysacls.c | 2 +- source3/lib/system.c | 22 +++ source3/lib/tevent_glib_glue.c | 6 +- source3/lib/util.c | 6 +- source3/lib/util_malloc.c | 4 +- source3/lib/util_sec.c | 2 +- source3/lib/util_sock.c| 2 +- source3/libads/authdata.c | 2 +- source3/libads/kerberos.c | 2 +- source3/libads/ldap.c | 22 +++ source3/libads/sitename_cache.c| 4 +- source3/libsmb/cli_smb2_fnu
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0bfdefffc8b s3:include: Fix code spelling via a26c00db11d s4:client: Fix code spelling via ef5ab45be70 s3:auth: Use new debug macros for logging via e57f034f013 s3:auth: Fix code spelling via 60b02126a3c selftest: Fix code spelling via 2bba3ef297f script: Fix code spelling via 3233fc03356 python:tests: Fix code spelling from 3522cddf9cf libcli/smb: Remove unused fallback case for ALLOW_GNUTLS_AEAD_CIPHER_ENCRYPTV2_AES_GCM https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0bfdefffc8b269674e4ffeb273170ad68f8efa32 Author: Andreas Schneider Date: Fri Jun 30 12:10:26 2023 +0200 s3:include: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Jul 5 07:32:15 UTC 2023 on atb-devel-224 commit a26c00db11d9e02b18e7ef9a516eca4a107764d6 Author: Andreas Schneider Date: Fri Jun 30 12:06:20 2023 +0200 s4:client: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit ef5ab45be70469b9471455574ac38e7fb435c043 Author: Andreas Schneider Date: Mon Jul 3 11:19:33 2023 +0200 s3:auth: Use new debug macros for logging Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit e57f034f013bda65618898f22f3fb0cb903f0d94 Author: Andreas Schneider Date: Fri Jun 30 12:06:01 2023 +0200 s3:auth: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 60b02126a3c0c05e710ad5be59257e969c0f1e2a Author: Andreas Schneider Date: Fri Jun 30 12:04:33 2023 +0200 selftest: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 2bba3ef297f5f9a8ff55db0b73da5e9ec253e9cb Author: Andreas Schneider Date: Fri Jun 30 11:57:55 2023 +0200 script: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 3233fc0335607ee67c1e03b6387d4b3efb0cc24d Author: Andreas Schneider Date: Fri Jun 30 11:56:06 2023 +0200 python:tests: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton --- Summary of changes: python/samba/tests/dsdb.py | 2 +- script/traffic_replay| 2 +- script/traffic_summary.pl| 8 +++--- selftest/create_smb1_fail_skipfile.txt | 6 ++--- selftest/flapping.d/nbt_dgram| 2 +- selftest/knownfail | 4 +-- selftest/knownfail.d/dns | 2 +- selftest/knownfail.d/samba-4.5-emulation | 2 +- selftest/knownfail_heimdal_kdc | 2 +- selftest/knownfail_mit_kdc | 2 +- selftest/knownfail_mit_kdc_pre_1_20 | 2 +- selftest/manage-ca/manage-ca.sh | 2 +- selftest/ns/mk_nsenter.sh| 2 +- selftest/selftest.pl | 2 +- selftest/target/Samba3.pm| 6 ++--- selftest/todo_smb2_tests_to_port.list| 2 +- source3/auth/auth.c | 46 ++-- source3/auth/auth_builtin.c | 2 +- source3/auth/auth_generic.c | 2 +- source3/auth/auth_util.c | 2 +- source3/auth/auth_winbind.c | 2 +- source3/auth/check_samsec.c | 4 +-- source3/auth/pampass.c | 10 +++ source3/auth/pass_check.c| 2 +- source3/auth/proto.h | 12 - source3/client/clitar.c | 4 +-- source3/include/fake_file.h | 2 +- source3/include/idmap.h | 6 ++--- source3/include/idmap_autorid_tdb.h | 4 +-- source3/include/libsmbclient.h | 20 +++--- source3/include/local.h | 6 ++--- source3/include/messages.h | 4 +-- source3/include/nameserv.h | 2 +- source3/include/passdb.h | 30 ++--- source3/include/smb.h| 2 +- source3/include/vfs.h| 8 +++--- 36 files changed, 112 insertions(+), 106 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/tests/dsdb.py b/python/samba/tests/dsdb.py index d8d9ac1ee3c..37c36d6ab02 100644 --- a/python/samba/tests/dsdb.py +++ b/python/samba/tests/dsdb.py @@ -1189,7 +1189,7 @@ class DsdbStartUpTests(TestCase): lp = samba.tests.env_loadparm() path = lp.configfile -# This is to avoid a tatoo of the global state +# This is to avoid a tattoo of the global state self.lp = LoadParm(filename_for_non_global_lp=path) self.creds = Credentials() self.creds.guess(self.lp) diff
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3522cddf9cf libcli/smb: Remove unused fallback case for ALLOW_GNUTLS_AEAD_CIPHER_ENCRYPTV2_AES_GCM from 7c8fbf15b99 build: We don't need SEEKDIR_RETURNS_VOID https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3522cddf9cf68dd0e2cefa0ee5ed36c4beea0229 Author: Andrew Bartlett Date: Sat Jul 1 08:02:36 2023 +1200 libcli/smb: Remove unused fallback case for ALLOW_GNUTLS_AEAD_CIPHER_ENCRYPTV2_AES_GCM We now require a GnuTLS version that is not impacted for AES-GCM (fixed in 3.6.11, we require 3.6.13). Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jul 4 07:42:35 UTC 2023 on atb-devel-224 --- Summary of changes: libcli/smb/smb2_signing.c | 70 - wscript_configure_system_gnutls | 7 ++--- 2 files changed, 2 insertions(+), 75 deletions(-) Changeset truncated at 500 lines: diff --git a/libcli/smb/smb2_signing.c b/libcli/smb/smb2_signing.c index 223a1234dcb..83e26ac0c6f 100644 --- a/libcli/smb/smb2_signing.c +++ b/libcli/smb/smb2_signing.c @@ -319,7 +319,6 @@ static NTSTATUS smb2_signing_gmac(gnutls_aead_cipher_hd_t cipher_hnd, { size_t tag_size = _tag_size; int rc; -#ifdef ALLOW_GNUTLS_AEAD_CIPHER_ENCRYPTV2_AES_GCM rc = gnutls_aead_cipher_encryptv2(cipher_hnd, iv, iv_size, @@ -331,58 +330,6 @@ static NTSTATUS smb2_signing_gmac(gnutls_aead_cipher_hd_t cipher_hnd, } return NT_STATUS_OK; -#else /* ALLOW_GNUTLS_AEAD_CIPHER_ENCRYPTV2_AES_GCM */ - TALLOC_CTX *tmp_ctx = NULL; - size_t atext_size = 0; - uint8_t *atext = NULL; - size_t len = 0; - size_t i; - - /* -* If we come from python bindings, we don't have a stackframe -* around, so use the NULL context. -* -* This is fine as we make sure we free the memory. -*/ - if (talloc_stackframe_exists()) { - tmp_ctx = talloc_tos(); - } - - for (i=0; i < auth_iovcnt; i++) { - atext_size += auth_iov[i].iov_len; - } - - atext = talloc_size(tmp_ctx, atext_size); - if (atext == NULL) { - return NT_STATUS_NO_MEMORY; - } - - for (i = 0; i < auth_iovcnt; i++) { - memcpy(atext + len, - auth_iov[i].iov_base, - auth_iov[i].iov_len); - - len += auth_iov[i].iov_len; - if (len > atext_size) { - TALLOC_FREE(atext); - return NT_STATUS_INTERNAL_ERROR; - } - } - - rc = gnutls_aead_cipher_encrypt(cipher_hnd, - iv, iv_size, - atext, - atext_size, - tag_size, - NULL, 0, - tag, _size); - TALLOC_FREE(atext); - if (rc < 0) { - return gnutls_error_to_ntstatus(rc, NT_STATUS_HMAC_NOT_SUPPORTED); - } - - return NT_STATUS_OK; -#endif /* ALLOW_GNUTLS_AEAD_CIPHER_ENCRYPTV2_AES_GCM */ } static NTSTATUS smb2_signing_calc_signature(struct smb2_signing_key *signing_key, @@ -786,9 +733,7 @@ NTSTATUS smb2_signing_encrypt_pdu(struct smb2_signing_key *encryption_key, struct iovec *vector, int count) { -#ifdef HAVE_GNUTLS_AEAD_CIPHER_ENCRYPTV2 bool use_encryptv2 = false; -#endif uint16_t cipher_id; uint8_t *tf; size_t a_total; @@ -839,9 +784,7 @@ NTSTATUS smb2_signing_encrypt_pdu(struct smb2_signing_key *encryption_key, case SMB2_ENCRYPTION_AES128_GCM: algo = GNUTLS_CIPHER_AES_128_GCM; iv_size = gnutls_cipher_get_iv_size(algo); -#ifdef ALLOW_GNUTLS_AEAD_CIPHER_ENCRYPTV2_AES_GCM use_encryptv2 = true; -#endif break; case SMB2_ENCRYPTION_AES256_CCM: algo = GNUTLS_CIPHER_AES_256_CCM; @@ -853,9 +796,7 @@ NTSTATUS smb2_signing_encrypt_pdu(struct smb2_signing_key *encryption_key, case SMB2_ENCRYPTION_AES256_GCM: algo = GNUTLS_CIPHER_AES_256_GCM; iv_size = gnutls_cipher_get_iv_size(algo); -#ifdef ALLOW_GNUTLS_AEAD_CIPHER_ENCRYPTV2_AES_GCM use_encryptv2 = true; -#endif break; default: return NT_STATUS_INVALID_PARAMETER; @@ -896,7 +837,6 @@ NTSTATUS smb2_signing_encrypt_pdu(struct smb2_signing_key *encryption_key, 0, 16 - iv_size
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via acd081a70d2 build: Remove unused check for SHA1_Update and SHA1_RENAME_NEEDED via 11b3c6826d1 Remove redundant check and fallback for AES CMAC 128 as we now require GnuTLS 3.6.13 via 95c843de926 crypto: Remove aesni-intel accelerated AES crypto functions via a21ca8ac9ca Remove rudundent check and fallback for AES CFB8 as we now require GnuTLS 3.6.13 via a815eead841 Remove rudundent check/workaround for buggy GnuTLS 3.5.2 as we now require GnuTLS 3.6.13 via 055318d7e74 Remove rudundent check for gnutls_pkcs7_get_embedded_data_oid as we now require GnuTLS 3.6.13 via c630afa3c9c Remove check for gnutls_set_default_priority_append as it unused via eda1022b599 crypto: Rely on GnuTLS 3.6.13 and gnutls_pbkdf2() via 702bcbfc39a build: Set minimum required GnuTLS version to 3.6.13 from 358631ce331 smbd: Merge openat_pathref_fsp_nosymlink() into _internal() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit acd081a70d215483548d57a56b30918ed08e999a Author: Andrew Bartlett Date: Fri Jun 30 22:41:51 2023 +1200 build: Remove unused check for SHA1_Update and SHA1_RENAME_NEEDED I can not find the code that required this, even in the history. Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Jun 30 14:59:46 UTC 2023 on atb-devel-224 commit 11b3c6826d19d60937f75825075fc5eb67385e11 Author: Andrew Bartlett Date: Thu Oct 27 11:09:19 2022 +1300 Remove redundant check and fallback for AES CMAC 128 as we now require GnuTLS 3.6.13 This allows us to remove a lot of conditionally compiled code and so know with more certainly that our tests are covering our code-paths. Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider commit 95c843de926ec46ab9d52ae8394250f93ee843c4 Author: Andrew Bartlett Date: Thu Oct 27 11:05:17 2022 +1300 crypto: Remove aesni-intel accelerated AES crypto functions These will shortly be unused as we will rely on GnuTLS for all AES cryptography now that we require GnuTLS 3.6.13 Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider commit a21ca8ac9ca5305cae59d1733fffb38ce6bebb8f Author: Andrew Bartlett Date: Thu Oct 27 10:53:53 2022 +1300 Remove rudundent check and fallback for AES CFB8 as we now require GnuTLS 3.6.13 This allows us to remove a lot of conditionally compiled code and so know with more certaintly that our tests are covering our codepaths. Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider commit a815eead8414fe6e8e30ca4befa7c295497e Author: Andrew Bartlett Date: Thu Oct 27 10:48:42 2022 +1300 Remove rudundent check/workaround for buggy GnuTLS 3.5.2 as we now require GnuTLS 3.6.13 Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider commit 055318d7e74f3b1aad305334fa4fe5fd4b593e75 Author: Andrew Bartlett Date: Thu Oct 27 10:47:27 2022 +1300 Remove rudundent check for gnutls_pkcs7_get_embedded_data_oid as we now require GnuTLS 3.6.13 Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider commit c630afa3c9c7cdf927c2f55c63bdf418c5cf6900 Author: Andrew Bartlett Date: Thu Oct 27 10:03:48 2022 +1300 Remove check for gnutls_set_default_priority_append as it unused This became unused with d30865014569f4b9a1261d9f0c40bc4fc98f883e Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider commit eda1022b599a98edcd8da3440bfa7675f987cec0 Author: Andrew Bartlett Date: Thu Oct 27 09:57:06 2022 +1300 crypto: Rely on GnuTLS 3.6.13 and gnutls_pbkdf2() This removes a lot of inline #ifdef and means this feature is always tested. We can do this as we have chosen GnuTLS 3.6.13 as the new minimum version. Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider commit 702bcbfc39af77c1ab94a7f13fe7a50784646e5a Author: Andrew Bartlett Date: Thu Oct 27 09:51:09 2022 +1300 build: Set minimum required GnuTLS version to 3.6.13 Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider --- Summary of changes: auth/gensec/schannel.c | 40 - lib/crypto/aes.c | 329 --- lib/crypto/aes.h | 634 - lib/crypto/aes_cmac_128.c | 121 - lib/crypto/aes_cmac_128.h | 47 - lib/crypto/aes_cmac_128_test.c | 119 - lib/crypto/aes_test.h | 67 - lib/crypto/aesni.h | 66 - lib/crypto
[SCM] Socket Wrapper Repository - annotated tag socket_wrapper-1.4.2 created
The annotated tag, socket_wrapper-1.4.2 has been created at 877bdaa29842c5d6717d9470c6123337a0649b23 (tag) tagging d07136e8a6934e128b8be6860b7d08966691f8c8 (commit) replaces socket_wrapper-1.4.0 tagged by Andreas Schneider on Thu Jun 29 14:45:20 2023 +0200 - Log - socket_wrapper-1.4.2 * Fixed LFS issues on 32bit platforms -BEGIN PGP SIGNATURE- iQIzBAABCgAdFiEEjf9T4Y8qvI2PPJIjfuD8TcwBTj0FAmSdfPcACgkQfuD8TcwB Tj3iVBAAsLX3h2z8peXyj3wmi4h+gIZi+XSzou6xcGUxPQtjTMsO7U+g2wpEyw1t dSqiMpp2VcccsNWsFIxokLzGfCIyERcopsF+NQiUuQZMq5A3iCLDGHYZmfg5LU/K E46KzWilHprMM7NeImvQQxUl7uoWcZ1hZkNIvvUAsYVlwunw2V4J7PrD8RVKfYW6 QSYvdqYMN3R8fr/IzuZMwfZw1P1hFP/W5K1XMt3QTvkgFm+ppcIe+hR8fjk4RJGE yG2c2UziNtevohgGTt4QCx90g6Wu92uoeqQ8vRdOxwTWS9Z/SHf8qXSs6mRBZBaK u9DhQMgqKoqRs6Y1YHcDH9ylD/bOcP65WJx7HWNIpn0OLDNdofxkcjS/P1guTF0a rst7SM4VoKYt46tbDketKeIeWa7iLJYcS4Z/9D9/nedyFwY1V2TxBE5U4seztvdo rrkwX9xIgD2FK3d8cywg9pbrO8rB4EmvrsmWXnEQRdBHbBoqfUjLZLRreaQByKuB zukAjb01sGZxub6t8YqTpRGpmnhQCLtvogl7+l0zRqV/8zkZp1ho0iErMM8gi87n dluKhgLECXLdGXnDV/EPhEQRnQI3JIDsvoQY8iSxaZHBSwBPBBkj/0rAEz4Kb7Bx FfQHUJqNFaVgRvTORt934+w/k0saXopNd7Uu+ngCQVTT4Eaq6PU= =ID7+ -END PGP SIGNATURE- Andreas Schneider (14): cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode gitlab-ci: Add a 32bit build cmake: Define large file support for tests tests: Use F_(OFD)SETLK(64) in test_fcntl_lock swrap: Add support for openat64() Bump version to 1.4.1 tests: Do not build test_swrap_unit with LFS support swrap: Make sure we do not redirect (f)open(at)() or fcntl() tests: Implement test_fcntl_lock correctly tests(cmake): Fix handling of LFS support swrap: Fix fnctl64() swrap: Provide a fcntl64() gitlab-ci: Add Ubuntu 32bit build Bump version to 1.4.2 Andrew Bartlett (2): Add test for F_SETLK as this is needs to be 64-bit aware on 32-bit userspace Add fix for incorrect mapping of fcntl64() -> fcntl(), causing locking failures Jakub Jelen (2): tests: Try larger writes and reads tests: New test with poll --- -- Socket Wrapper Repository
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via d07136e Bump version to 1.4.2 from 81a8970 gitlab-ci: Add Ubuntu 32bit build https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit d07136e8a6934e128b8be6860b7d08966691f8c8 Author: Andreas Schneider Date: Thu Jun 29 13:37:19 2023 +0200 Bump version to 1.4.2 Reviewed-by: Stefan Metzmacher --- Summary of changes: CHANGELOG | 3 +++ CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/CHANGELOG b/CHANGELOG index 0e1d39c..48192d5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,9 @@ CHANGELOG = +version 1.4.2 (released 2023-06-29) + * Fixed LFS issues on 32bit platforms + version 1.4.1 (released 2023-06-21) * Fixed issue with fnctl() on 32bit * Added openat64() to detect stale fds diff --git a/CMakeLists.txt b/CMakeLists.txt index 02fe340..5b235d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") include(DefineCMakeDefaults) include(DefineCompilerFlags) -project(socket_wrapper VERSION 1.4.1 LANGUAGES C) +project(socket_wrapper VERSION 1.4.2 LANGUAGES C) # global needed variables set(APPLICATION_NAME ${PROJECT_NAME}) -- Socket Wrapper Repository
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via 81a8970 gitlab-ci: Add Ubuntu 32bit build via 3d318d4 swrap: Provide a fcntl64() via 593ab18 swrap: Fix fnctl64() via 51fbe21 tests(cmake): Fix handling of LFS support via 72d3b3c tests: Implement test_fcntl_lock correctly via bbe14cc swrap: Make sure we do not redirect (f)open(at)() or fcntl() via 70ecbaa tests: Do not build test_swrap_unit with LFS support from d8b61a6 Bump version to 1.4.1 https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit 81a897096588acc658f3834f084ea92c3a8c1746 Author: Andreas Schneider Date: Thu Jun 22 18:30:52 2023 +0200 gitlab-ci: Add Ubuntu 32bit build Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 3d318d40907964168cc0fdda9492b80f11c1dddf Author: Andreas Schneider Date: Fri Jun 23 11:10:45 2023 +0200 swrap: Provide a fcntl64() We want to run with and without large file support. It depends on if the application is build with large file support so it will either choose fcntl or fcntl64. Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 593ab1862a1d076f30185f7fc03a1fdcf725be56 Author: Andreas Schneider Date: Thu Jun 22 18:32:30 2023 +0200 swrap: Fix fnctl64() Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 51fbe21156fcb55db6dba3fb329daae24f0fba3d Author: Andreas Schneider Date: Tue Jun 27 12:02:30 2023 +0200 tests(cmake): Fix handling of LFS support Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 72d3b3c26a51024e35f82673f6d7ce734ccf54bf Author: Andreas Schneider Date: Fri Jun 23 13:50:03 2023 +0200 tests: Implement test_fcntl_lock correctly This does: openat(AT_FDCWD, "/tmp/test_socket_wrapper_Win6aA/file", O_RDWR|O_CREAT, 0600) = 3 fcntl(3, F_OFD_SETLK, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=1}) = 0 write(3, "fd=3\n", 5) = 5 fcntl(3, F_OFD_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=1}) = 0 unlink("/tmp/test_socket_wrapper_Win6aA/file") = 0 close(3) close(3) = 0 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit bbe14cc3200ca553b13ed49357e2e88ba487eeaa Author: Andreas Schneider Date: Tue Jun 27 12:18:53 2023 +0200 swrap: Make sure we do not redirect (f)open(at)() or fcntl() Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher commit 70ecbaaac38dd47d1b3343ae828a3a7b9ab980c2 Author: Andreas Schneider Date: Tue Jun 27 12:01:46 2023 +0200 tests: Do not build test_swrap_unit with LFS support Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- Summary of changes: .gitlab-ci.yml | 20 config.h.cmake | 1 + src/socket_wrapper.c| 129 tests/CMakeLists.txt| 21 ++-- tests/test_fcntl_lock.c | 46 - 5 files changed, 182 insertions(+), 35 deletions(-) Changeset truncated at 500 lines: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ef98aeb..3643167 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ variables: TUMBLEWEED_BUILD: buildenv-tumbleweed MINGW_BUILD: buildenv-mingw UBUNTU_BUILD: buildenv-ubuntu + UBUNTU32_BUILD: buildenv-ubuntu32 stages: - build @@ -307,3 +308,22 @@ ubuntu/x86_64: when: on_failure paths: - obj/ + +ubuntu/x86: + stage: test + image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$UBUNTU32_BUILD + script: +- mkdir -p obj && cd obj && cmake + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && ctest --output-on-failure + tags: +- shared + except: +- tags + artifacts: +expire_in: 1 week +when: on_failure +paths: + - obj/ diff --git a/config.h.cmake b/config.h.cmake index 399013e..3a5843a 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -45,6 +45,7 @@ #cmakedefine HAVE_OPEN64 1 #cmakedefine HAVE_OPENAT64 1 #cmakedefine HAVE_FOPEN64 1 +#cmakedefine HAVE_FCNTL64 1 #cmakedefine HAVE_GETPROGNAME 1 #cmakedefine HAVE_GETEXECNAME 1 #cmakedefine HAVE_PLEDGE 1 diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index dc07b53..c759d35 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -44,6 +44,12 @@ #include "config.h" +/* + * Make sure we do not redirect (f)open(at)() or fcntl() to their 64bit + * v
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c837ecf442c python:samba: Fix code spelling via d4798967c00 python:samba:tests: Fix code spelling via ab3792931b3 python:samba:subunit: Fix code spelling via cac56ae4b8f python:samba:samba3: Fix code spelling via e5476ecfb07 python:samba:provision: Fix code spelling via e046986d04c python:samba:netcmd: Fix code spelling via de2c4879cef python:samba:kcc: Fix code spelling via 97fb06a2607 python:samba:gp_parse: Fix code spelling via f3b2814d842 python:samba:gp: Fix code spelling via a15b8611ceb python:samba:emulate: Fix code spelling via 535617a840d pidl: Fix code spelling via 35500dc4e34 packaging:systemd: Fix code spelling via 51bec2206e0 nsswitch: Fix code spelling via eba5b05a511 librpc:rpc: Fix code spelling via 4ec8ecce076 librpc:ndr: Fix code spelling via ba02d89be10 librpc:idl: Fix code spelling via 5d759393e5c libgpo:admx: Fix code spelling via 232f281bd40 libcli:smbreadline: Fix code spelling from 91eb3f1d223 testprogs/blackbox: add --recursive tests to test_samba-tool_ntacl.sh https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c837ecf442cfb8e19abaa917ff61f323a41829fd Author: Andreas Schneider Date: Tue Jun 6 13:31:52 2023 +0200 python:samba: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Jun 23 14:51:14 UTC 2023 on atb-devel-224 commit d4798967c00bd78f102acb9cba8641390072fbdc Author: Andreas Schneider Date: Tue Jun 6 13:28:13 2023 +0200 python:samba:tests: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit ab3792931b38d1941cb915d0d79d4035111afbd1 Author: Andreas Schneider Date: Tue Jun 6 13:23:25 2023 +0200 python:samba:subunit: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit cac56ae4b8f253482f8441c7c35ba6f5a77462f5 Author: Andreas Schneider Date: Tue Jun 6 13:22:56 2023 +0200 python:samba:samba3: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit e5476ecfb0751d83ba5568a632052700c691ef9e Author: Andreas Schneider Date: Tue Jun 6 13:22:19 2023 +0200 python:samba:provision: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit e046986d04cb9323a5853f565ca1e5e422f1d976 Author: Andreas Schneider Date: Tue Jun 6 13:17:58 2023 +0200 python:samba:netcmd: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit de2c4879cefd83a9ca7d91b236669fa54806a22e Author: Andreas Schneider Date: Tue Jun 6 13:14:39 2023 +0200 python:samba:kcc: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 97fb06a26072e61ea8f2b9efd94e13d50fb30e3d Author: Andreas Schneider Date: Tue Jun 6 13:13:28 2023 +0200 python:samba:gp_parse: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit f3b2814d842809e5e95e2eba094ab08fe71057e2 Author: Andreas Schneider Date: Tue Jun 6 13:13:15 2023 +0200 python:samba:gp: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit a15b8611cebc7161e68444143174ce087a5df8ef Author: Andreas Schneider Date: Tue Jun 6 13:12:45 2023 +0200 python:samba:emulate: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 535617a840d24c4502e52c0eae192df5f2dd00f7 Author: Andreas Schneider Date: Tue Jun 6 13:04:46 2023 +0200 pidl: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 35500dc4e34bc6315948fd6fb415510c9c2c9cf2 Author: Andreas Schneider Date: Tue Jun 6 13:02:02 2023 +0200 packaging:systemd: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 51bec2206e02979ffd9abc635d862e332ee6caab Author: Andreas Schneider Date: Tue Jun 6 13:01:27 2023 +0200 nsswitch: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit eba5b05a511ce1de1c5609d11a32903b536a1b41 Author: Andreas Schneider Date: Tue Jun 6 13:00:06 2023 +0200 librpc:rpc: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 4ec8ecce07615a4e6ac208bc600e0b1cacb058da Author: Andreas Schneider Date: Tue Jun 6 12:59:25 2023 +0200 librpc:ndr: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit ba02d89be104ad1bd5e5712af8fde3bd90d0d2ea Author: Andreas Schneider
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via d8b61a6 Bump version to 1.4.1 from 71a55a6 swrap: Add support for openat64() https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit d8b61a6734e9dba718308ece5a66c751e3150c83 Author: Andreas Schneider Date: Mon May 8 12:59:33 2023 +0200 Bump version to 1.4.1 Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme --- Summary of changes: CHANGELOG | 4 CMakeLists.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/CHANGELOG b/CHANGELOG index 68e40f9..0e1d39c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,10 @@ CHANGELOG = +version 1.4.1 (released 2023-06-21) + * Fixed issue with fnctl() on 32bit + * Added openat64() to detect stale fds + version 1.4.0 (released 2023-01-18) * Added support for sendmmsg()/recvmmsg() * Added support for handling close, recvmmsg and sendmmsg syscalls diff --git a/CMakeLists.txt b/CMakeLists.txt index 47e9824..02fe340 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules") include(DefineCMakeDefaults) include(DefineCompilerFlags) -project(socket_wrapper VERSION 1.4.0 LANGUAGES C) +project(socket_wrapper VERSION 1.4.1 LANGUAGES C) # global needed variables set(APPLICATION_NAME ${PROJECT_NAME}) @@ -25,7 +25,7 @@ set(APPLICATION_NAME ${PROJECT_NAME}) # Increment PATCH. set(LIBRARY_VERSION_MAJOR 0) set(LIBRARY_VERSION_MINOR 4) -set(LIBRARY_VERSION_PATCH 0) +set(LIBRARY_VERSION_PATCH 1) set(LIBRARY_VERSION "${LIBRARY_VERSION_MAJOR}.${LIBRARY_VERSION_MINOR}.${LIBRARY_VERSION_PATCH}") set(LIBRARY_SOVERSION ${LIBRARY_VERSION_MAJOR}) -- Socket Wrapper Repository
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via 71a55a6 swrap: Add support for openat64() via 6bbf07e tests: Use F_(OFD)SETLK(64) in test_fcntl_lock via cc80f53 cmake: Define large file support for tests from cb5d579 gitlab-ci: Add a 32bit build https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit 71a55a64d6b6dcba9582cbded86d321ce0318fc0 Author: Andreas Schneider Date: Mon Jun 19 16:23:50 2023 +0200 swrap: Add support for openat64() Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 6bbf07e6c4475928de5a5005c1fb5804e3cebcde Author: Andreas Schneider Date: Tue May 9 09:19:07 2023 +0200 tests: Use F_(OFD)SETLK(64) in test_fcntl_lock Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit cc80f531f439af77590b0f411ed3b38742d5ac08 Author: Andreas Schneider Date: Tue May 9 09:09:01 2023 +0200 cmake: Define large file support for tests Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- Summary of changes: ConfigureChecks.cmake | 1 + config.h.cmake | 1 + src/CMakeLists.txt | 6 + src/socket_wrapper.c| 68 + tests/CMakeLists.txt| 7 - tests/test_fcntl_lock.c | 9 ++- 6 files changed, 90 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index c99e2ae..daaee2b 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -70,6 +70,7 @@ check_function_exists(timerfd_create HAVE_TIMERFD_CREATE) check_function_exists(bindresvport HAVE_BINDRESVPORT) check_function_exists(accept4 HAVE_ACCEPT4) check_function_exists(open64 HAVE_OPEN64) +check_function_exists(openat64 HAVE_OPENAT64) check_function_exists(fopen64 HAVE_FOPEN64) check_function_exists(getprogname HAVE_GETPROGNAME) check_function_exists(getexecname HAVE_GETEXECNAME) diff --git a/config.h.cmake b/config.h.cmake index a637a34..399013e 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -43,6 +43,7 @@ #cmakedefine HAVE_BINDRESVPORT 1 #cmakedefine HAVE_ACCEPT4 1 #cmakedefine HAVE_OPEN64 1 +#cmakedefine HAVE_OPENAT64 1 #cmakedefine HAVE_FOPEN64 1 #cmakedefine HAVE_GETPROGNAME 1 #cmakedefine HAVE_GETEXECNAME 1 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a1dbfaf..19e0d26 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,6 +8,12 @@ target_compile_options(socket_wrapper PRIVATE ${DEFAULT_C_COMPILE_FLAGS} -D_GNU_SOURCE) +if (CMAKE_SIZEOF_VOID_P EQUAL 4) +target_compile_options(socket_wrapper + PRIVATE + -D_LARGEFILE64_SOURCE) +endif() + target_link_libraries(socket_wrapper PRIVATE ${SWRAP_REQUIRED_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index de2f732..dc07b53 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -531,6 +531,9 @@ typedef int (*__libc_open)(const char *pathname, int flags, ...); #ifdef HAVE_OPEN64 typedef int (*__libc_open64)(const char *pathname, int flags, ...); #endif /* HAVE_OPEN64 */ +#ifdef HAVE_OPENAT64 +typedef int (*__libc_openat64)(int dirfd, const char *pathname, int flags, ...); +#endif /* HAVE_OPENAT64 */ typedef int (*__libc_openat)(int dirfd, const char *path, int flags, ...); typedef int (*__libc_pipe)(int pipefd[2]); typedef int (*__libc_read)(int fd, void *buf, size_t count); @@ -631,6 +634,9 @@ struct swrap_libc_symbols { SWRAP_SYMBOL_ENTRY(open); #ifdef HAVE_OPEN64 SWRAP_SYMBOL_ENTRY(open64); +#endif +#ifdef HAVE_OPENAT64 + SWRAP_SYMBOL_ENTRY(openat64); #endif SWRAP_SYMBOL_ENTRY(openat); SWRAP_SYMBOL_ENTRY(pipe); @@ -1136,6 +1142,29 @@ static int libc_vopen64(const char *pathname, int flags, va_list ap) } #endif /* HAVE_OPEN64 */ +#ifdef HAVE_OPENAT64 +static int +libc_vopenat64(int dirfd, const char *pathname, int flags, va_list ap) +{ + int mode = 0; + int fd; + + swrap_bind_symbol_all(); + + swrap_inject_o_largefile(); + + if (flags & O_CREAT) { + mode = va_arg(ap, int); + } + fd = swrap.libc.symbols._libc_openat64.f(dirfd, +pathname, +flags, +(mode_t)mode); + + return fd; +} +#endif /* HAVE_OPENAT64 */ + static int libc_vopenat(int dirfd, const char *path, int flags, va_list ap) { int mode = 0; @@ -1441,6 +1470,9 @@ static void __swrap_bind_symbol_all_once(void) swrap_bind_symbol_libc(open); #ifdef HAVE_OP
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d34ff44d91b s3:winbind: Fix talloc parent in find_dc() leading to a segfault from 6640cf5e32f samba-tool: add new --dns-directory-partition option to dns zonecreate command https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d34ff44d91ba4ffad45dfa3e4ee37470498b3f2d Author: Andreas Schneider Date: Tue Jun 20 11:52:12 2023 +0200 s3:winbind: Fix talloc parent in find_dc() leading to a segfault [2023/06/16 16:30:18.677249, 0, pid=28112, effective(0, 0), real(0, 0), traceid=35] ../../lib/cmdline/cmdline.c:56(_samba_cmdline_talloc_log) Bad talloc magic value - unknown value [2023/06/16 16:30:18.677374, 0, pid=28112, effective(0, 0), real(0, 0), traceid=35] ../../lib/util/fault.c:173(smb_panic_log) === [2023/06/16 16:30:18.677388, 0, pid=28112, effective(0, 0), real(0, 0), traceid=35] ../../lib/util/fault.c:177(smb_panic_log) INTERNAL ERROR: Bad talloc magic value - unknown value in pid 28112 (4.18.3) [2023/06/16 16:30:18.677398, 0, pid=28112, effective(0, 0), real(0, 0), traceid=35] ../../lib/util/fault.c:182(smb_panic_log) If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting [2023/06/16 16:30:18.677408, 0, pid=28112, effective(0, 0), real(0, 0), traceid=35] ../../lib/util/fault.c:183(smb_panic_log) === [2023/06/16 16:30:18.677420, 0, pid=28112, effective(0, 0), real(0, 0), traceid=35] ../../lib/util/fault.c:185(smb_panic_log) PANIC (pid 28112): Bad talloc magic value - unknown value in 4.18.3 [2023/06/16 16:30:18.677698, 0, pid=28112, effective(0, 0), real(0, 0), traceid=35] ../../lib/util/fault.c:293(log_stack_trace) BACKTRACE: 22 stack frames: #0 /usr/lib64/samba/libgenrand-samba4.so(log_stack_trace+0x34) [0x7fcc04ad35d4] #1 /usr/lib64/samba/libgenrand-samba4.so(smb_panic+0xd) [0x7fcc04ad382d] #2 /lib64/libtalloc.so.2(+0x3121) [0x7fcc04650121] #3 /usr/sbin/winbindd(_wbint_InitConnection+0xe8) [0x55aa1fd79028] #4 /usr/sbin/winbindd(+0x59488) [0x55aa1fd7e488] #5 /lib64/libdcerpc-server-core.so.0(dcesrv_call_dispatch_local+0x69) [0x7fcc05890469] #6 /usr/sbin/winbindd(winbindd_dual_ndrcmd+0x3c5) [0x55aa1fd762d5] #7 /usr/sbin/winbindd(+0x4d664) [0x55aa1fd72664] #8 /lib64/libtevent.so.0(tevent_common_invoke_fd_handler+0x97) [0x7fcc03d2e707] #9 /lib64/libtevent.so.0(+0xef4f) [0x7fcc03d34f4f] #10 /lib64/libtevent.so.0(+0xcf5b) [0x7fcc03d32f5b] #11 /lib64/libtevent.so.0(_tevent_loop_once+0x95) [0x7fcc03d2d9b5] #12 /usr/sbin/winbindd(+0x4fd14) [0x55aa1fd74d14] #13 /usr/sbin/winbindd(+0x505cd) [0x55aa1fd755cd] #14 /lib64/libtevent.so.0(tevent_common_invoke_immediate_handler+0x182) [0x7fcc03d2ec72] #15 /lib64/libtevent.so.0(tevent_common_loop_immediate+0x27) [0x7fcc03d2eca7] #16 /lib64/libtevent.so.0(+0xed2f) [0x7fcc03d34d2f] #17 /lib64/libtevent.so.0(+0xcf5b) [0x7fcc03d32f5b] #18 /lib64/libtevent.so.0(_tevent_loop_once+0x95) [0x7fcc03d2d9b5] #19 /usr/sbin/winbindd(main+0xd34) [0x55aa1fd402f4] #20 /lib64/libc.so.6(__libc_start_main+0xe5) [0x7fcc0339dd85] #21 /usr/sbin/winbindd(_start+0x2e) [0x55aa1fd40e8e] [2023/06/16 16:30:18.677828, 0, pid=28112, effective(0, 0), real(0, 0), traceid=35] ../../source3/lib/dumpcore.c:318(dump_core) coredump is handled by helper binary specified at /proc/sys/kernel/core_pattern BUG: https://bugzilla.samba.org/show_bug.cgi?id=15398 Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jun 20 11:07:45 UTC 2023 on atb-devel-224 --- Summary of changes: source3/winbindd/winbindd_cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 264fc1368d6..4aaa67521ee 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -1559,7 +1559,7 @@ static bool find_dc(TALLOC_CTX *mem_ctx, if (*dcnames[fd_index] != '\0' && !is_ipaddress(dcnames[fd_index])) { /* Ok, we've got a name for the DC */ TALLOC_FREE(domain->dcname); - domain->dcname = talloc_strdup(mem_ctx, dcnames[fd_index]); + domain->dcname = talloc_strdup(domain, dcnames[fd_index]); if (domain->dcname == NULL) {
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e0b1aaea1a3 third_party: Update nss_wrapper to version 1.1.15 via 076d8524671 testprogs: Add test_alias_membership via 33b3a51a313 s4:torture: Limit run of test_membership_user() only to ad_member_idmap_rid via 4cf5abb8b3e s3:selftest: Pass environ to local.nss via c0b819e3e32 s3:selftest: Add environ parameter to plansmbtorture4testsuite via 611444a22c3 tests: Fix idmap.rid.getgrnam for ad_member_idmap_rid with 'winbind expand groups = 10' via 99d42ed8654 selftest: set 'winbind expand groups = 10' for ad_member_idmap_rid via 09e853af7f8 s4:torture: Skip test_membership_user for users that get incorrectly assigned group sid via a1e611a8c74 s3:winbind: Fix the default group for the 'Guest' user via 783c9d22373 s3:winbind: Include local groups in _wbint_QueryGroupList via f116cda34f4 s3:winbind: Remove SID_NAME_ALIAS code from rpc_lookup_groupmem() via 47b3a5d0def s3:winbind: s/wb_group_members_send/wb_alias_members_send/ for SID_NAME_ALIAS in wb_getgrsid_sid2gid_done() via d8f7d244f40 lib:dbwrap: Add dbwrap_merge_dbs() via 6bdd29a7a4d lib:dbwrap: Fix trailing whitespace in lib/dbwrap/dbwrap.h via fa7d9c13c3c s3:winbind: Convert wb_group_members_send() to resolve array of groups via 6b321cb17ed s3:winbind: Add wb_alias_members_{send/recv} via 38565ff2df4 s3:winbind: Add wbint_LookupAliasMembers to winbind interface via 92b2eb9c3f2 s3:winbind: Add lookup_aliasmem to winbindd_methods and implement it in all backends via b67dc2586f8 s3:winbind: Fix trailing whitespace in winbindd_cache.c via d58872053ce s3:winbind: Fix trailing whitespace in winbindd_reconnect.c via f91c8bf8d0a s3:winbind: Fix trailing whitespace in winbindd_msrpc.c from e40c86e970e gp: Fix user apply failure when droping privs https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e0b1aaea1a3969103b3aab4572f45a333a533ce4 Author: Pavel Filipenský Date: Tue Jan 24 11:20:49 2023 +0100 third_party: Update nss_wrapper to version 1.1.15 Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jun 13 13:09:41 UTC 2023 on atb-devel-224 commit 076d8524671fec53943cc24ba9da4adccb46d24f Author: Pavel Filipenský Date: Wed Apr 12 09:29:18 2023 +0200 testprogs: Add test_alias_membership Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider commit 33b3a51a3138c5001248125a2d930517591f64e7 Author: Pavel Filipenský Date: Thu Apr 6 16:59:24 2023 +0200 s4:torture: Limit run of test_membership_user() only to ad_member_idmap_rid Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider commit 4cf5abb8b3edb0b6d57d2902c32ec0e5f96bee04 Author: Pavel Filipenský Date: Tue Apr 11 12:09:10 2023 +0200 s3:selftest: Pass environ to local.nss Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider commit c0b819e3e32045f98a59c4d1e1943521184e57fa Author: Pavel Filipenský Date: Tue Apr 11 12:08:14 2023 +0200 s3:selftest: Add environ parameter to plansmbtorture4testsuite Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider commit 611444a22c3815fcc93c8e81697975f5190f4b5f Author: Pavel Filipenský Date: Mon Apr 24 00:11:34 2023 +0200 tests: Fix idmap.rid.getgrnam for ad_member_idmap_rid with 'winbind expand groups = 10' Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider commit 99d42ed86544e6e3cdeb1a4eb876c45d795e9411 Author: Pavel Filipenský Date: Mon Feb 27 17:03:31 2023 +0100 selftest: set 'winbind expand groups = 10' for ad_member_idmap_rid This is for alias members tests. Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider commit 09e853af7f8649bddcc5311e4d3529c3cde7b65d Author: Pavel Filipenský Date: Mon Mar 27 20:00:05 2023 +0200 s4:torture: Skip test_membership_user for users that get incorrectly assigned group sid This commit should be removed once wb_queryuser() is fixed. Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider commit a1e611a8c74827242e6c5ebf766d1fd4abe63748 Author: Pavel Filipenský Date: Fri Mar 24 15:03:21 2023 +0100 s3:winbind: Fix the default group for the 'Guest' user If samlogon cache has no entry for the 'Guest' user, the group sid should default to 'Guests' group. Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider commit 783c9d22373c32d2b2b4172595bc1d7a3352b1d7 Author: Pavel Filipenský Date: Mon Feb 27 17:03:32 2023 +0100 s3:winbind: Include local groups in _wbint_QueryGroupList This is needed for GETGRENT to show also e.g
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via dc6edc48818 WHATSNEW.txt: Improved winbind logging and samba-log-parser via 15fdf7b36f3 docs-xml:manpages: Add man page for samba-log-parser via c9fa3dff8ca s3:script: Add samba-log-parser from fcedf5514b1 smbcacls/smbcquotas: check for valid UNC path https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit dc6edc488189cf02c8e75016104324d497273152 Author: Pavel Filipenský Date: Wed Jun 7 14:55:49 2023 +0200 WHATSNEW.txt: Improved winbind logging and samba-log-parser Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Jun 7 15:06:07 UTC 2023 on atb-devel-224 commit 15fdf7b36f3c63be70483d72af3b46b29d4034b4 Author: Pavel Filipenský Date: Tue May 9 14:09:55 2023 +0200 docs-xml:manpages: Add man page for samba-log-parser Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider commit c9fa3dff8ca38d27b6452c6b854e45ec44de4932 Author: Pavel Filipenský Date: Thu Feb 9 16:48:49 2023 +0100 s3:script: Add samba-log-parser Signed-off-by: Pavel Filipenský Signed-off-by: Andreas Schneider Pair-Programmed-With: Andreas Schneider --- Summary of changes: WHATSNEW.txt | 10 + docs-xml/manpages/samba-log-parser.1.xml | 147 ++ docs-xml/wscript_build | 1 + source3/script/samba-log-parser | 325 +++ source3/script/wscript_build | 1 + 5 files changed, 484 insertions(+) create mode 100644 docs-xml/manpages/samba-log-parser.1.xml create mode 100755 source3/script/samba-log-parser Changeset truncated at 500 lines: diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 2b472aa0cdc..8fbf1b59dbd 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -36,6 +36,15 @@ an implementation written in python. The new function can be imported via `import samba.gp`. The python implementation connects to Active Directory using the SamDB module, instead of ADS (which is what libgpo uses). +Improved winbind logging and a new tool for parsing the winbind logs + + +Winbind logs (if smb.conf 'winbind debug traceid = yes' is set) contain new +trace header fields 'traceid' and 'depth'. Field 'traceid' allows to track the +trace records belonging to the same request. Field 'depth' allows to track the +request nesting level. A new tool samba-log-parser is added for better log +parsing. + REMOVED FEATURES @@ -45,6 +54,7 @@ smb.conf changes Parameter Name Description Default -- --- --- + winbind debug traceid Add traceid No KNOWN ISSUES diff --git a/docs-xml/manpages/samba-log-parser.1.xml b/docs-xml/manpages/samba-log-parser.1.xml new file mode 100644 index 000..ea6fd9150df --- /dev/null +++ b/docs-xml/manpages/samba-log-parser.1.xml @@ -0,0 +1,147 @@ + +http://www.samba.org/samba/DTD/samba-doc;> + + + + samba-log-parser + 1 + Samba + User Commands + + + + + + samba-log-parser + Samba (winbind) trace parser. + +options: + -h, --help show this help message and exit + --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 + --flow show the request/sub-request flow traces + --flow-compact show the request/sub-request flow traces without dcerpc details + + + + samba-log-parser + path + --pid=PID + --traceid=ID + --breakdown + --merge + --flow + --flow-compact + -h|--help + + + + + DESCRIPTION + + This tool is part of the samba + 7 suite. + + The samba-log-parser program parses samba winbind + logs. + + + + + OPTIONS + + The following options are available to the samba-log-parser program. + + + + + --pid=PID + Display traces for winbind client with the matching PID. + + + + + --traceid=ID + Display traces with matching traceid debug header field. + + + + + --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.flowcomp
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 198a844ff51 third_party: Fix version of socket_wrapper and uid_wrapper from 1e793357906 smbd: Remove smb1-only perfcount subsystem https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 198a844ff51cc42b520b46ee96f28bf52d8f7e92 Author: SATOH Fumiyasu Date: Tue May 23 09:38:24 2023 +0900 third_party: Fix version of socket_wrapper and uid_wrapper Signed-off-by: SATOH Fumiyasu Reviewed-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Jun 6 08:34:55 UTC 2023 on atb-devel-224 --- Summary of changes: buildtools/wafsamba/samba_third_party.py | 4 ++-- third_party/socket_wrapper/wscript | 2 +- third_party/uid_wrapper/wscript | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba_third_party.py b/buildtools/wafsamba/samba_third_party.py index b0a5190bbb2..14b14c517e8 100644 --- a/buildtools/wafsamba/samba_third_party.py +++ b/buildtools/wafsamba/samba_third_party.py @@ -24,7 +24,7 @@ Build.BuildContext.CHECK_CMOCKA = CHECK_CMOCKA @conf def CHECK_SOCKET_WRAPPER(conf): -return conf.CHECK_BUNDLED_SYSTEM_PKG('socket_wrapper', minversion='1.3.4') +return conf.CHECK_BUNDLED_SYSTEM_PKG('socket_wrapper', minversion='1.4.0') Build.BuildContext.CHECK_SOCKET_WRAPPER = CHECK_SOCKET_WRAPPER @conf @@ -39,7 +39,7 @@ Build.BuildContext.CHECK_RESOLV_WRAPPER = CHECK_RESOLV_WRAPPER @conf def CHECK_UID_WRAPPER(conf): -return conf.CHECK_BUNDLED_SYSTEM_PKG('uid_wrapper', minversion='1.2.7') +return conf.CHECK_BUNDLED_SYSTEM_PKG('uid_wrapper', minversion='1.3.0') Build.BuildContext.CHECK_UID_WRAPPER = CHECK_UID_WRAPPER @conf diff --git a/third_party/socket_wrapper/wscript b/third_party/socket_wrapper/wscript index af6eb303e0a..bc5083847dc 100644 --- a/third_party/socket_wrapper/wscript +++ b/third_party/socket_wrapper/wscript @@ -2,7 +2,7 @@ import os -VERSION="1.3.4" +VERSION="1.4.0" def configure(conf): if conf.CHECK_SOCKET_WRAPPER(): diff --git a/third_party/uid_wrapper/wscript b/third_party/uid_wrapper/wscript index 182ef88d3df..c9238818466 100644 --- a/third_party/uid_wrapper/wscript +++ b/third_party/uid_wrapper/wscript @@ -3,7 +3,7 @@ from waflib import Options import os, sys -VERSION="1.2.7" +VERSION="1.3.0" def configure(conf): if conf.CHECK_UID_WRAPPER(): -- Samba Shared Repository
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via cb5d579 gitlab-ci: Add a 32bit build via df91870 Add fix for incorrect mapping of fcntl64() -> fcntl(), causing locking failures via ceb139d Add test for F_SETLK as this is needs to be 64-bit aware on 32-bit userspace from b15c02f tests: New test with poll https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit cb5d5790fff30e3be5a9465a85b1ac0aaaebfed2 Author: Andreas Schneider Date: Fri May 5 07:14:26 2023 +0200 gitlab-ci: Add a 32bit build BUG: https://bugzilla.samba.org/show_bug.cgi?id=15367 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit df918708717c084ec9048be2864edcde81816108 Author: Andrew Bartlett Date: Fri May 5 13:34:00 2023 +1200 Add fix for incorrect mapping of fcntl64() -> fcntl(), causing locking failures We need to call fcntl64() if possible for 32-bit hosts This is a strange case of socket_wrapper breaking normal file operation. Newer glibc has introduced fcntl64 and symbol renaming but the end function call was not caught by the automatic rename. This means socket_wrapper would call fcntl(), not fcntl64 in libc and this would do a "struct flock" -> "struct flock64" translation on the supplied argument, despite this being already a flock64 from the caller. This in turn changed the lock offset values (eg to 0, 0). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15367 Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider commit ceb139dc42c50275a11ca974ef8800032cf24b6f Author: Andrew Bartlett Date: Fri May 5 13:15:51 2023 +1200 Add test for F_SETLK as this is needs to be 64-bit aware on 32-bit userspace If this is not correctly routed to fcntl64 (where that exists) then an incorrect thunking could be applied breaking the functionality. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15367 Signed-off-by: Andrew Bartlett Reviewed-by: Andreas Schneider --- Summary of changes: .gitlab-ci.yml | 20 ++ ConfigureChecks.cmake | 1 + cmake/Toolchain-cross-m32.cmake | 23 +++ src/socket_wrapper.c| 25 tests/CMakeLists.txt| 1 + tests/test_fcntl_lock.c | 86 + 6 files changed, 156 insertions(+) create mode 100644 cmake/Toolchain-cross-m32.cmake create mode 100644 tests/test_fcntl_lock.c Changeset truncated at 500 lines: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5dc461..ef98aeb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -224,6 +224,26 @@ tumbleweed/x86_64/clang: paths: - obj/ +tumbleweed/x86/gcc: + stage: test + image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD + script: +- mkdir -p obj && cd obj && cmake + -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cross-m32.cmake + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && ctest --output-on-failure + tags: +- shared + except: +- tags + artifacts: +expire_in: 1 week +when: on_failure +paths: + - obj/ + tumbleweed/static-analysis: stage: analysis image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index b820a65..c99e2ae 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -80,6 +80,7 @@ check_function_exists(__close_nocancel HAVE___CLOSE_NOCANCEL) check_function_exists(recvmmsg HAVE_RECVMMSG) check_function_exists(sendmmsg HAVE_SENDMMSG) check_function_exists(syscall HAVE_SYSCALL) +check_function_exists(fcntl64 HAVE_FCNTL64) if (UNIX) find_library(DLFCN_LIBRARY dl) diff --git a/cmake/Toolchain-cross-m32.cmake b/cmake/Toolchain-cross-m32.cmake new file mode 100644 index 000..7918c60 --- /dev/null +++ b/cmake/Toolchain-cross-m32.cmake @@ -0,0 +1,23 @@ +set(CMAKE_C_FLAGS "-m32" CACHE STRING "C compiler flags" FORCE) +set(CMAKE_CXX_FLAGS "-m32" CACHE STRING "C++ compiler flags" FORCE) + +set(LIB32 /usr/lib) # Fedora + +if(EXISTS /usr/lib32) +set(LIB32 /usr/lib32) # Arch, Solus +endif() + +set(CMAKE_SYSTEM_LIBRARY_PATH ${LIB32} CACHE STRING "system library search path" FORCE) +set(CMAKE_LIBRARY_PATH${LIB32} CACHE STRING "library search path" FORCE) + +# this is probably unlikely to be needed, but just in case +set(CMAKE_EXE_LINKER_FLAGS"-m32 -L${LIB32}" CACHE STRING "executable linker flags" FORCE) +set(CMAKE_SHARED_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "shar
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6490ff63552 s3:lib: Give better warnings about corrupted AppleDobule files via a269ab4a9b5 s3:lib: Move ad_unpack() debug message to notice level from e38f864017a gitlab-ci: Update Fedora to version 38 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6490ff635521295b1f55f697f1950e1721d543ca Author: Andreas Schneider Date: Wed Apr 26 08:40:29 2023 +0200 s3:lib: Give better warnings about corrupted AppleDobule files Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Apr 27 09:25:50 UTC 2023 on atb-devel-224 commit a269ab4a9b5c75e41ecb0cba4cfd13d1f1aa2737 Author: Andreas Schneider Date: Wed Apr 26 08:30:38 2023 +0200 s3:lib: Move ad_unpack() debug message to notice level We should give a good warning message one level above. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- Summary of changes: source3/lib/adouble.c | 72 +-- 1 file changed, 47 insertions(+), 25 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c index 062c73ec758..81229310c13 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -967,14 +967,14 @@ static bool ad_unpack(struct adouble *ad, const size_t nentries, */ if (bufsize < (AD_HEADER_LEN + (AD_ENTRY_LEN * nentries))) { - DEBUG(1, ("bad size\n")); + DBG_NOTICE("Bad size\n"); return false; } ad->ad_magic = RIVAL(ad->ad_data, 0); ad->ad_version = RIVAL(ad->ad_data, ADEDOFF_VERSION); if ((ad->ad_magic != AD_MAGIC) || (ad->ad_version != AD_VERSION)) { - DEBUG(1, ("wrong magic or version\n")); + DBG_NOTICE("Wrong magic or version\n"); return false; } @@ -982,8 +982,7 @@ static bool ad_unpack(struct adouble *ad, const size_t nentries, adentries = RSVAL(ad->ad_data, ADEDOFF_NENTRIES); if (adentries != nentries) { - DEBUG(1, ("invalid number of entries: %zu\n", - adentries)); + DBG_NOTICE("Invalid number of entries: %zu\n", adentries); return false; } @@ -995,7 +994,7 @@ static bool ad_unpack(struct adouble *ad, const size_t nentries, len = RIVAL(ad->ad_data, AD_HEADER_LEN + (i * AD_ENTRY_LEN) + 8); if (!eid || eid >= ADEID_MAX) { - DEBUG(1, ("bogus eid %d\n", eid)); + DBG_NOTICE("Bogus eid %d\n", eid); return false; } @@ -1005,16 +1004,22 @@ static bool ad_unpack(struct adouble *ad, const size_t nentries, * ensure the specified offset is within that bound */ if ((off > bufsize) && (eid != ADEID_RFORK)) { - DEBUG(1, ("bogus eid %d: off: %" PRIu32 ", len: %" PRIu32 "\n", - eid, off, len)); + DBG_NOTICE("Fogus eid %d: off: %" PRIu32 + ", len: %" PRIu32 "\n", + eid, + off, + len); return false; } ok = ad_entry_check_size(eid, bufsize, off, len); if (!ok) { - DBG_ERR("bogus eid [%"PRIu32"] bufsize [%zu] " - "off [%"PRIu32"] len [%"PRIu32"]\n", - eid, bufsize, off, len); + DBG_NOTICE("bogus eid [%" PRIu32 "] bufsize [%zu] " + "off [%" PRIu32 "] len [%" PRIu32 "]\n", + eid, + bufsize, + off, + len); return false; } @@ -1022,8 +1027,11 @@ static bool ad_unpack(struct adouble *ad, const size_t nentries, * That would be obviously broken */ if (off > filesize) { - DEBUG(1, ("bogus eid %d: off: %" PRIu32 ", len: %" PRIu32 "\n", - eid, off, len)); + DBG_NOTICE("Bogus eid %
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e38f864017a gitlab-ci: Update Fedora to version 38 via fad7f77d161 selftest:knownfail: Update S4U knownfail for MIT KRB5 1.20 via 60f9396a7d2 wafsamba: Normalize strings in gdb output when comparing ABI via b5e9c2bc0ed s3:torture: Fix possible array out of bounds access via 732efb3d962 s3:torture: Remove trailing white spaces in locktest2.c via 0c6fb4bfb01 dfs_server: Fix debug statement if searched_site is NULL via 3e6a6c00cc0 lib:krb5_wrap: Fix debug statements when princ_s is NULL from 8027283dd7c tests: Test ldap whoami exop https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e38f864017a06cab61ad878db8bca02b26f2e0d5 Author: Andreas Schneider Date: Thu Apr 20 08:25:31 2023 +0200 gitlab-ci: Update Fedora to version 38 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Apr 27 08:22:58 UTC 2023 on atb-devel-224 commit fad7f77d161e0466edfb58d3ca5968e1a4dc1319 Author: Andreas Schneider Date: Tue Apr 25 07:50:55 2023 +0200 selftest:knownfail: Update S4U knownfail for MIT KRB5 1.20 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 60f9396a7d2211b55d3d91196561678a9f9f6942 Author: Alexander Bokovoy Date: Mon Apr 24 14:29:49 2023 +0200 wafsamba: Normalize strings in gdb output when comparing ABI This fixes an issue with gdb >= 13: libndr.so: symbol ndr_transfer_syntax_ndr64 has changed old_signature: uuid = { time_low = 1903232307, time_mid = 48826, time_hi_and_version = 18743, clock_seq = "\203\031", node = "\265\333\357\234\314\066" }, if_version = 1 new_signature: uuid = { time_low = 1903232307, time_mid = 48826, time_hi_and_version = 18743, clock_seq = "\203\031", node = "\265\333\357\234\3146" }, if_version = 1 \314\066 and \3146 are the same as \066 translates into the char '6'. In order to address this we should do byte comparison in python. Pair-Programmed-With: Andreas Schneider Signed-off-by: Andreas Schneider Signed-off-by: Alexander Bokovoy Reviewed-by: Andrew Bartlett commit b5e9c2bc0ed5d24aa994a3f278e31aba4d4f58a6 Author: Andreas Schneider Date: Thu Apr 20 13:29:27 2023 +0200 s3:torture: Fix possible array out of bounds access In function ‘test_one’, inlined from ‘retest’ at source3/torture/locktest2.c:401:8: source3/torture/locktest2.c:331:37: error: array subscript 2 is above array bounds of ‘int[2][2][2]’ [-Werror=array-bounds=] 331 | fnum[server][fstype][conn][f] = try_open(cli[server][conn], nfs[server], fstype, FILENAME, | ^~~~ source3/torture/locktest2.c: In function ‘retest’: source3/torture/locktest2.c:390:23: note: while referencing ‘fnum’ 390 | int fnum[NSERVERS][NUMFSTYPES][NCONNECTIONS][NFILES], | ^~~~ In function ‘test_one’, inlined from ‘retest’ at source3/torture/locktest2.c:401:8: source3/torture/locktest2.c:316:62: error: array subscript 2 is above array bounds of ‘int[2][2][2]’ [-Werror=array-bounds=] 316 | fnum[server][fstype][conn][f], | ^~~~ source3/torture/locktest2.c: In function ‘retest’: source3/torture/locktest2.c:390:23: note: while referencing ‘fnum’ 390 | int fnum[NSERVERS][NUMFSTYPES][NCONNECTIONS][NFILES], | ^~~~ In function ‘test_one’, inlined from ‘retest’ at source3/torture/locktest2.c:401:8: source3/torture/locktest2.c:300:60: error: array subscript 2 is above array bounds of ‘int[2][2][2]’ [-Werror=array-bounds=] 300 | fnum[server][fstype][conn][f], |^~~~ source3/torture/locktest2.c: In function ‘retest’: source3/torture/locktest2.c:390:23: note: while referencing ‘fnum’ 390 | int fnum[NSERVERS][NUMFSTYPES][NCONNECTIONS][NFILES], | ^~~~~~~~ Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 732efb3d9629ba0af602066f134e6519efadcef5 Author: Andreas Schneider Date: Thu Apr 20 13:28:59 2023 +0200
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3c50a921aec s3:client: Remove unused tree.c via ba4c322ac78 s3:libsmb: Also deprecate smbc_init() via 092a6a62e1f s3:utils: Use smbc_set_credentials_with_fallback() for smbget via c44109142a6 s3:libsmb: Mark smbc_set_credentials() as deprecated from 9eb44306623 s3:lib: Do not try to match '.' and '..' directories in is_in_path() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3c50a921aec1b25c0247cc8639714a2a0933a01f Author: Andreas Schneider Date: Thu Apr 20 13:02:05 2023 +0200 s3:client: Remove unused tree.c Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Apr 20 12:56:53 UTC 2023 on atb-devel-224 commit ba4c322ac7877824e23856396a82123843162870 Author: Andreas Schneider Date: Tue Apr 18 16:00:51 2023 +0200 s3:libsmb: Also deprecate smbc_init() Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský commit 092a6a62e1f568543a01a48e193ef0acebf47caa Author: Andreas Schneider Date: Thu Apr 13 15:41:53 2023 +0200 s3:utils: Use smbc_set_credentials_with_fallback() for smbget smbc_set_credentials() is deprecated. Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský commit c44109142a63b2b650f180fcf5737ffa22ef1d26 Author: Andreas Schneider Date: Thu Apr 13 15:31:04 2023 +0200 s3:libsmb: Mark smbc_set_credentials() as deprecated This will issue a compiler warning! Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- Summary of changes: source3/client/tree.c | 812 - source3/include/libsmbclient.h | 56 +-- source3/utils/smbget.c | 103 +++--- 3 files changed, 80 insertions(+), 891 deletions(-) delete mode 100644 source3/client/tree.c Changeset truncated at 500 lines: diff --git a/source3/client/tree.c b/source3/client/tree.c deleted file mode 100644 index 0e51f6105b9..000 --- a/source3/client/tree.c +++ /dev/null @@ -1,812 +0,0 @@ -/* - Unix SMB/CIFS implementation. - SMB client GTK+ tree-based application - Copyright (C) Andrew Tridgell 1998 - Copyright (C) Richard Sharpe 2001 - Copyright (C) John Terpstra 2001 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* example-gtk+ application, ripped off from the gtk+ tree.c sample */ - -#include -#include -#include -#include "libsmbclient.h" - -static GtkWidget *clist; - -struct tree_data { - - guint32_t type;/* Type of tree item, an SMBC_TYPE */ - char name[256]; /* May need to change this later */ - -}; - -static void tree_error_message(gchar *message) { - - GtkWidget *dialog, *label, *okay_button; - - /* Create the widgets */ - - dialog = gtk_dialog_new(); - gtk_window_set_modal(GTK_WINDOW(dialog), True); - label = gtk_label_new (message); - okay_button = gtk_button_new_with_label("Okay"); - - /* Ensure that the dialog box is destroyed when the user clicks ok. */ - - gtk_signal_connect_object (GTK_OBJECT (okay_button), "clicked", -GTK_SIGNAL_FUNC (gtk_widget_destroy), dialog); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->action_area), -okay_button); - - /* Add the label, and show everything we've added to the dialog. */ - - gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), -label); - gtk_widget_show_all (dialog); -} - -/* - * We are given a widget, and we want to retrieve its URL so we - * can do a directory listing. - * - * We walk back up the tree, picking up pieces until we hit a server or - * workgroup type and return a path from there - */ - -static char *path_string; - -char *get_path(TALLOC_CTX *ctx, GtkWidget *item) -{ - GtkWidget *p = item; - struct tree_data *pd; - char *comps[1024]; /* We keep pointers to the components here */ - int i = 0, j, level,type; - - /* Walk back up the tree, getting the private data */ - - level = GTK_TREE(item->parent)->level; - - /* Pick up this item
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 31418f95d3a testprogs: Set PREFIX_ABS before it is used in test_primary_group.sh via cfa53c8a801 lib:util: Fix code spelling via b3271603779 lib:util: Remove trailing white spaces in byteorder.h via 89d5c0dc5c7 lib:tsocket: Fix code spelling via 6eed0c128ce lib:tevent: Fix code spelling via 2afd7b1bb86 lib:tdb: Fix code spelling via b6de03c74c2 lib:talloc: Fix code spelling via c6e1a949156 lib:socket: Fix code spelling via 189f156c8c7 lib:smbconf: Fix code spelling via 8d647f2f7c0 lib:replace: Fix code spelling via 9d42ba7661f lib:replace: Remove trailing white spaces in xattr.c from 53f0a292f80 selftest:Samba3: use the correct NSS_WRAPPER_HOSTNAME https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 31418f95d3a44b2c43081b3095ca813fbdb3d6a1 Author: Pavel Filipenský Date: Thu Apr 13 09:41:26 2023 +0200 testprogs: Set PREFIX_ABS before it is used in test_primary_group.sh Signed-off-by: Pavel Filipenský Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Apr 14 06:18:18 UTC 2023 on atb-devel-224 commit cfa53c8a80134dea025bd9cfe7b9c6518e75cae6 Author: Andreas Schneider Date: Thu Apr 13 13:29:32 2023 +0200 lib:util: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit b3271603779a04beee795c5ba8244923b4d04ef4 Author: Andreas Schneider Date: Thu Apr 13 13:27:37 2023 +0200 lib:util: Remove trailing white spaces in byteorder.h Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 89d5c0dc5c709fef5d64715ab8a288b86db6aaca Author: Andreas Schneider Date: Thu Apr 13 13:19:05 2023 +0200 lib:tsocket: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 6eed0c128ce4d42409226a48dba147a22e2acacf Author: Andreas Schneider Date: Thu Apr 13 13:18:05 2023 +0200 lib:tevent: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 2afd7b1bb86a7454a960bacafc9dc9df0ba68dfc Author: Andreas Schneider Date: Thu Apr 13 13:17:08 2023 +0200 lib:tdb: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit b6de03c74c28b6ef3517801260e02fde802b5fdb Author: Andreas Schneider Date: Thu Apr 13 13:14:10 2023 +0200 lib:talloc: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit c6e1a949156398952ba7ea3bd8a164409abe985a Author: Andreas Schneider Date: Thu Apr 13 12:54:55 2023 +0200 lib:socket: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 189f156c8c7f1fc48048169e23861fdb9a4841cf Author: Andreas Schneider Date: Thu Apr 13 12:54:21 2023 +0200 lib:smbconf: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 8d647f2f7c00424ab52ada98d9131e81bfa38d1c Author: Andreas Schneider Date: Thu Apr 13 12:53:07 2023 +0200 lib:replace: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 9d42ba7661f46b7d76a7e4901c3752be43541548 Author: Andreas Schneider Date: Thu Apr 13 12:52:52 2023 +0200 lib:replace: Remove trailing white spaces in xattr.c Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton --- Summary of changes: lib/replace/xattr.c | 10 +- lib/smbconf/pysmbconf.c | 4 +- lib/smbconf/smbconf.h| 6 +- lib/socket/interfaces.c | 2 +- lib/talloc/pytalloc_guide.txt| 2 +- lib/talloc/pytalloc_util.c | 2 +- lib/talloc/talloc.c | 6 +- lib/tdb/common/lock.c| 4 +- lib/tdb/common/mutex.c | 8 +- lib/tdb/common/open.c| 4 +- lib/tdb/common/transaction.c | 2 +- lib/tdb/common/traverse.c| 2 +- lib/tdb/docs/mutex.txt | 4 +- lib/tdb/test/lock-tracking.c | 2 +- lib/tevent/doc/tevent_events.dox | 4 +- lib/tevent/doc/tevent_queue.dox | 4 +- lib/tevent/doxy.config | 2 +- lib/tevent/testsuite.c | 2 +- lib/tevent/tevent.c | 2 +- lib/tevent/tevent.h | 8 +- lib/tevent/tevent_threads.c | 4 +- lib/tsocket/tsocket.h| 4 +- lib/tsocket/tsocket_guide.txt| 4 +- lib/util/access.c| 4 +- lib/util/byteorder.h | 14 +- lib/util/charset
[SCM] Samba Shared Repository - branch master updated
, only one of which contained an error. We now use bash with the pipefail option, which makes the return code of the last failing command into the return code of the entire pipeline. That means that we properly fail if a testsuite returns a non-zero exit code, but doesn't otherwise exhibit any failures in its output. This doesn't help for cases where a testsuite has other failing tests that become xfails due to knownfail entries. In that case, the overall 'testsuite-failure' will be turned into 'testsuite-xfail' by filter-subunit and the silent failures will remain unheeded. Still, this is better than the existing situation. Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Apr 12 14:57:55 UTC 2023 on atb-devel-224 commit 62893486c62a2cf08191cdc92f851b2815461a59 Author: Joseph Sutton Date: Wed Apr 12 13:20:00 2023 +1200 selftest: Fix samba3.clustered.smb2.deny.deny2 test This test failed to start, emitting the following error: Unknown torture operation 'clustered.smb2.deny.deny2' To fix this, remove the 'clustered.' prefix from the test name. Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider commit 839ca0cd353df9272fdfbb18e551892135cf48fd Author: Joseph Sutton Date: Wed Apr 12 10:15:30 2023 +1200 selftest: Only run clusteredmember tests if ctdb is built Trying to run any of these tests without having built ctdb results in a failure, as the environment cannot be started. Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider commit 44d03bf47930e81679feede7a7719feb7aa77c95 Author: Joseph Sutton Date: Wed Apr 12 09:41:29 2023 +1200 lib/torture: Don't overwrite test outcomes If a test fails an assertion, and later calls torture_skip() to skip part of the test, the TORTURE_SKIP result will overwrite the TORTURE_FAIL result, and the overall outcome will be successful. To avoid this, we now arrange possible outcomes in order of priority, and ensure we always keep the higher priority one. This reveals some failing tests. Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider commit 80c548437a7a199c3897246a71df2a2c5348b37a Author: Joseph Sutton Date: Tue Apr 11 20:57:31 2023 +1200 s4:torture: Don't try to close the connection after running disconnect tests dcerpc_mdssvc_close() would always fail with STATUS_CONNECTION_DISCONNECTED, causing the testsuite as a whole to fail. Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider commit 2aa9fae1f8d71d1d2c6bca2035ece62d7759e97d Author: Joseph Sutton Date: Wed Apr 12 10:34:22 2023 +1200 s4:torture: Correctly zero structure Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider commit 6a3accec4c7556190f889aab588638c62baa6e3d Author: Joseph Sutton Date: Tue Apr 11 20:36:15 2023 +1200 s4:rpc_server: Ensure EnumDomainUsers() doesn't return a NULL array This is what source4/torture/rpc/samr.c:test_EnumDomainUsers_all() in the test 'samba4.rpc.samr' expects, and allows that test to pass. Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider commit 6abc50c94ece9beb235bd748dec8aeaa4260 Author: Joseph Sutton Date: Tue Apr 11 20:19:52 2023 +1200 s4:rpc_server: Handle LDB_ERR_NO_SUCH_ATTRIBUTE when deleting group This is what source4/torture/rpc/samr.c:test_AddGroupMember() in the test 'samba4.rpc.samr' expects. Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider commit 91ed2f3d5d232e17e963f8542304873986b102bd Author: Joseph Sutton Date: Tue Apr 11 20:04:23 2023 +1200 selftest: Fix typo Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider commit 8e7abe72a82e6bb64d611533b37d5d6adf98f227 Author: Joseph Sutton Date: Tue Apr 11 19:37:21 2023 +1200 s4:torture: Fix typo Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider commit 8e7c7680f38ebf493f9a462a5dd433f98fbf841d Author: Joseph Sutton Date: Tue Apr 11 15:39:04 2023 +1200 s3:selftest: Enable winbindd for maptoguest environment This is required for the samba3.blackbox.guest test to work. Without it, the test fails to find a group map. Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider commit aa05498b1ed8ffc60f41f155b3bef1de1b56ae30 Author: Joseph Sutton Date: Tue Apr 11 14:43:23 2023 +1200 s3:tests: Correct condition Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider commit f407b3ec0d86fef43e48da27b33007347e7256f9 Author: Joseph Sutton Date: Tue Apr 11 14:38:30 2023 +1200 testprogs: Return correct status code Signed-off-by: Joseph Sutton Reviewed-by: Andreas Schneider
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via b15c02f tests: New test with poll via 8b1b825 tests: Try larger writes and reads from 97fe09e cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit b15c02fc0187103ddad4c05adc0ff292f774c1ef Author: Jakub Jelen Date: Thu Mar 2 10:46:53 2023 +0100 tests: New test with poll Signed-off-by: Jakub Jelen Reviewed-by: Stefan Metzmacher Reviewed-by: Andreas Schneider commit 8b1b82567794470e829bd0a34e99eeec397c7e6d Author: Jakub Jelen Date: Thu Feb 23 14:55:02 2023 +0100 tests: Try larger writes and reads Signed-off-by: Jakub Jelen Reviewed-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- Summary of changes: tests/CMakeLists.txt | 1 + tests/test_echo_tcp_poll.c | 226 +++ tests/test_echo_tcp_write_read.c | 93 +++- 3 files changed, 292 insertions(+), 28 deletions(-) create mode 100644 tests/test_echo_tcp_poll.c Changeset truncated at 500 lines: diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3748461..b1a3c6c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -64,6 +64,7 @@ set(SWRAP_TESTS test_echo_tcp_sendmsg_recvmsg test_echo_tcp_sendmmsg_recvmmsg test_echo_tcp_write_read +test_echo_tcp_poll test_echo_tcp_writev_readv test_echo_tcp_get_peer_sock_name test_echo_udp_sendto_recvfrom diff --git a/tests/test_echo_tcp_poll.c b/tests/test_echo_tcp_poll.c new file mode 100644 index 000..1632eae --- /dev/null +++ b/tests/test_echo_tcp_poll.c @@ -0,0 +1,226 @@ +#include +#include +#include +#include + +#include "config.h" +#include "torture.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int setup_echo_srv_tcp_ipv4(void **state) +{ + torture_setup_echo_srv_tcp_ipv4(state); + + return 0; +} + +#ifdef HAVE_IPV6 +static int setup_echo_srv_tcp_ipv6(void **state) +{ + torture_setup_echo_srv_tcp_ipv6(state); + + return 0; +} +#endif + +static int teardown(void **state) +{ + torture_teardown_echo_srv(state); + + return 0; +} + +static void handle_poll_loop(size_t size, int s) +{ + char send_buf[size]; + char recv_buf[size]; + int nfds, num_open_fds; + struct pollfd pfds[1]; + size_t nread = 0, nwrote = 0; + ssize_t ret; + int i; + + num_open_fds = nfds = 1; + pfds[0].fd = s; + pfds[0].events = POLLIN | POLLOUT; + + i = 0; + memset(send_buf, 0, sizeof(send_buf)); + + while (num_open_fds > 0 && i < 10) { + int ready; + + printf("About to poll()\n"); + ready = poll(pfds, nfds, -1); + assert_int_not_equal(ready, -1); + + printf("Ready: %d\n", ready); + + /* Deal with array returned by poll(). */ + for (int j = 0; j < nfds; j++) { + if (pfds[j].revents != 0) { + printf(" fd=%d; events: %s%s%s%s\n", pfds[j].fd, + (pfds[j].revents & POLLIN) ? "POLLIN " : "", + (pfds[j].revents & POLLOUT) ? "POLLOUT " : "", + (pfds[j].revents & POLLHUP) ? "POLLHUP " : "", + (pfds[j].revents & POLLERR) ? "POLLERR " : ""); + } + + if (pfds[j].revents & POLLIN) { + ret = read(s, + recv_buf + nread, + sizeof(recv_buf) - nread); + printf(" fd=%d: read=%zd\n", pfds[j].fd, ret); + assert_int_not_equal(ret, -1); + nread += ret; + /* try to delay */ + sleep(5); + } + if (pfds[j].revents & POLLOUT) { + snprintf(send_buf, sizeof(send_buf), +"packet.%d", i); + ret = write(s, + send_buf + nwrote, + sizeof(send_buf) - nwrote); + printf(" fd=%d: wrote=%zd\n", pfds[j].fd, ret); + assert_int_not_equal(ret, -1); +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d788d3d974a s3-client: Provide more information on protocol negotiation failures from ad7418d23f8 lib:replace: Fix snprintf of rep_inet_ntop() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d788d3d974ac4393f0286ab20f4e7b561d6761ec Author: Andrew Bartlett Date: Tue Mar 14 13:01:07 2023 +1300 s3-client: Provide more information on protocol negotiation failures In particular, this may help track down REASON: Exception: Exception: protocol negotiation failed: NT_STATUS_IO_TIMEOUT Signed-off-by: Andrew Bartlett Reviewed-by: Ralph Boehme Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Apr 11 13:47:01 UTC 2023 on atb-devel-224 --- Summary of changes: source3/libsmb/clidfs.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index 9982f97d43a..d111fce033a 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -27,6 +27,7 @@ #include "libsmb/nmblib.h" #include "../libcli/smb/smbXcli_base.h" #include "auth/credentials/credentials.h" +#include "lib/param/param.h" / Important point. @@ -196,8 +197,16 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx, lp_client_min_protocol(), lp_client_max_protocol()); - if (!NT_STATUS_IS_OK(status)) { - d_printf("protocol negotiation failed: %s\n", + if (NT_STATUS_EQUAL(status, NT_STATUS_IO_TIMEOUT)) { + d_printf("Protocol negotiation (with timeout %d ms) timed out against server %s\n", +c->timeout, +smbXcli_conn_remote_name(c->conn)); + cli_shutdown(c); + } else if (!NT_STATUS_IS_OK(status)) { + d_printf("Protocol negotiation to server %s (for a protocol between %s and %s) failed: %s\n", +smbXcli_conn_remote_name(c->conn), +lpcfg_get_smb_protocol(lp_client_min_protocol()), +lpcfg_get_smb_protocol(lp_client_max_protocol()), nt_errstr(status)); cli_shutdown(c); return status; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ad7418d23f8 lib:replace: Fix snprintf of rep_inet_ntop() via f1209a7a15d lib:replace: Fix code spelling via 8c32a475e4a lib:pthreadpool: Fix code spelling via 25e1987e155 lib:param: Fix code spelling via 4b12dc1fb5a lib:messaging: Fix code spelling via 5e9bfcf4b2e lib:ldb: Fix code spelling via e288aca9d8e examples: Fix spelling via bca9c059c39 dynconfig: Fix code spelling via 3c96f7d80e5 docs-xml: Fix spelling via 8f18fadd31d ctdb: Fix code spelling via 9580d66b149 Makefile: Fix spelling from 0cd66fe6bd4 libsmb: Fix test for smbc_getxattr https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ad7418d23f891227bb8302d0514f82fcd438280c Author: Andreas Schneider Date: Thu Apr 6 16:17:16 2023 +0200 lib:replace: Fix snprintf of rep_inet_ntop() Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Apr 11 10:08:54 UTC 2023 on atb-devel-224 commit f1209a7a15dc9a08071873d27946953558dfc15c Author: Andreas Schneider Date: Thu Apr 6 16:16:19 2023 +0200 lib:replace: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 8c32a475e4a9ae94a450be30bcd5e5d12b9e20fe Author: Andreas Schneider Date: Thu Apr 6 16:05:03 2023 +0200 lib:pthreadpool: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 25e1987e155e189e6c7e2984914820bcaad4e47c Author: Andreas Schneider Date: Thu Apr 6 16:04:08 2023 +0200 lib:param: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 4b12dc1fb5abb94eafdb99c8a3f2451849f6657b Author: Andreas Schneider Date: Thu Apr 6 16:02:58 2023 +0200 lib:messaging: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 5e9bfcf4b2e31ac45b4212f5894c4b698839ca37 Author: Andreas Schneider Date: Thu Apr 6 16:01:33 2023 +0200 lib:ldb: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit e288aca9d8ed378e4763ad567543a2910187128a Author: Andreas Schneider Date: Thu Apr 6 15:54:30 2023 +0200 examples: Fix spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit bca9c059c398ed61960bdabbb0756c9dd4d68a6d Author: Andreas Schneider Date: Thu Apr 6 15:52:49 2023 +0200 dynconfig: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 3c96f7d80e5f300aa5f53666a14bc9e02080969e Author: Andreas Schneider Date: Thu Apr 6 15:51:35 2023 +0200 docs-xml: Fix spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 8f18fadd31d2be93234f37eac312cd87759022d0 Author: Andreas Schneider Date: Thu Apr 6 15:45:07 2023 +0200 ctdb: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton commit 9580d66b1497cd2b3a33df05ee091f5a7a20b480 Author: Andreas Schneider Date: Thu Apr 6 15:43:10 2023 +0200 Makefile: Fix spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Joseph Sutton --- Summary of changes: Makefile | 2 +- ctdb/config/events/README| 2 +- ctdb/config/events/legacy/10.interface.script| 2 +- ctdb/config/functions| 2 +- docs-xml/Samba-Developers-Guide/internals.xml| 2 +- docs-xml/build/DTD/samba.entities| 6 +++--- docs-xml/smbdotconf/protocol/clientusespnego.xml | 4 ++-- docs-xml/xslt/docbook2pearson.xsl| 2 +- docs-xml/xslt/strip-references.xsl | 2 +- dynconfig/wscript| 2 +- examples/LDAP/samba-schema.IBMSecureWay | 2 +- lib/ldb/ldb_mdb/ldb_mdb.c| 2 +- lib/ldb/man/ldb.3.xml| 2 +- lib/ldb/tests/ldb_filter_attrs_in_place_test.c | 4 ++-- lib/ldb/tools/ldbutil.c | 2 +- lib/messaging/messages_dgm.c | 2 +- lib/param/README | 4 ++-- lib/param/loadparm.c
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e3b9e252338 lib:registry: drop unused argument of reg_open_remote() from c50cde0cd5e python:tests: Correctly skip some GPO tests in release tarball https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e3b9e252338bd65ece3f7180a16db83ec9842d35 Author: Dmitry Antipov Date: Fri Mar 17 13:06:52 2023 +0300 lib:registry: drop unused argument of reg_open_remote() Drop 'struct auth_session_info *' argument of reg_open_remote() which is actually unused (NULL passed by all of the callers). Signed-off-by: Dmitry Antipov Reviewed-by: Andreas Schneider Reviewed-by: Joseph Sutton Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Apr 6 16:46:03 UTC 2023 on atb-devel-224 --- Summary of changes: source4/lib/registry/registry.h | 1 - source4/lib/registry/rpc.c | 1 - source4/lib/registry/tools/common.c | 2 +- source4/lib/registry/tools/regdiff.c | 3 +-- 4 files changed, 2 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/lib/registry/registry.h b/source4/lib/registry/registry.h index c22038cbfa9..84173cb74ee 100644 --- a/source4/lib/registry/registry.h +++ b/source4/lib/registry/registry.h @@ -381,7 +381,6 @@ WERROR reg_open_samba(TALLOC_CTX *mem_ctx, */ WERROR reg_open_remote(TALLOC_CTX *mem_ctx, struct registry_context **ctx, - struct auth_session_info *session_info, struct cli_credentials *credentials, struct loadparm_context *lp_ctx, const char *location, struct tevent_context *ev); diff --git a/source4/lib/registry/rpc.c b/source4/lib/registry/rpc.c index 2f6edf3b569..a0c959f1f4f 100644 --- a/source4/lib/registry/rpc.c +++ b/source4/lib/registry/rpc.c @@ -538,7 +538,6 @@ static struct registry_operations reg_backend_rpc = { _PUBLIC_ WERROR reg_open_remote(TALLOC_CTX *mem_ctx, struct registry_context **ctx, - struct auth_session_info *session_info, struct cli_credentials *credentials, struct loadparm_context *lp_ctx, const char *location, struct tevent_context *ev) diff --git a/source4/lib/registry/tools/common.c b/source4/lib/registry/tools/common.c index a2fda8d48df..7fd5bd26125 100644 --- a/source4/lib/registry/tools/common.c +++ b/source4/lib/registry/tools/common.c @@ -31,7 +31,7 @@ struct registry_context *reg_common_open_remote(const char *remote, struct registry_context *h = NULL; WERROR error; - error = reg_open_remote(NULL, , NULL, creds, lp_ctx, remote, ev_ctx); + error = reg_open_remote(NULL, , creds, lp_ctx, remote, ev_ctx); if (!W_ERROR_IS_OK(error)) { fprintf(stderr, "Unable to open remote registry at %s:%s \n", diff --git a/source4/lib/registry/tools/regdiff.c b/source4/lib/registry/tools/regdiff.c index aab7b68944c..977a9745492 100644 --- a/source4/lib/registry/tools/regdiff.c +++ b/source4/lib/registry/tools/regdiff.c @@ -48,8 +48,7 @@ static struct registry_context *open_backend(TALLOC_CTX *mem_ctx, creds); break; case REG_REMOTE: - error = reg_open_remote(mem_ctx, , NULL, - creds, lp_ctx, + error = reg_open_remote(mem_ctx, , creds, lp_ctx, remote_host, ev_ctx); break; case REG_NULL: -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 484bf9c49ae testprogs: Remove unused test_export_keytab_(heimdal|mit).sh via d9a9cb0396a testprogs: Merge export keytab tests into a single script for MIT and Heimdal via deb9d1f6565 testprogs: Fix shell arithmetic in test_export_keytab_mit.sh via 245990998fd testprogs: Reformat test_export_keytab_mit.sh via e560cf8ae1f testprogs: Fix shell arithmetic in test_export_keytab_heimdal.sh via 0b21e492c5b testprogs: Reformat test_export_keytab_heimdal.sh via 51cebd4ba69 testprogs: Remove unused test_kinit_trusts_(heimdal|mit).sh via f18ca8a5c8b testprogs: Merge kinit trust tests into a single script for MIT and Heimdal via cbf756bb011 testprogs: Fix shell arithmetic in test_kinit_trusts_heimdal.sh via 01b1dd8f7b9 testprogs: Fix shell arithmetic in test_kinit_trusts_mit.sh via ccce9d3fb3c testprogs: Reformat test_kinit_trusts_mit.sh via 58ca14845c1 testprogs: Reformat test_kinit_trusts_heimdal.sh via f7402c3400c testprogs: Remove unused test_kinit_(heimdal|mit).sh via de8a0ee0206 testprogs: Merge kinit tests into a single script for MIT and Heimdal via 3d63419f927 testprogs: Fix shell arithmetic in test_kinit_mit.sh via deff466648d testprogs: Reformat test_kinit_mit.sh via 715f7c46b90 testprogs: Use common binary detection functions in test_kinit_heimdal.sh via aea8611b393 testprogs: Fix shell arithmetic in test_kinit_heimdal.sh via c5bf365d923 testprogs: Reformat test_kinit_heimdal.sh via b6cf609e9fd nsswitch:tests: Use configuration variable passed to test_rfc2307_mapping.sh via aa2ece8f649 s4:selftest: Move rfc2307_mapping test to ad_dc via c042b1fba06 s4:selftest: Reformat samba4.blackbox.rfc2307_mapping via f91f042c1d9 testprogs: Pass configuration to test_kinit_trusts_mit.sh via 4ea94c8eaac testprogs: Pass configuration to test_kinit_trusts_heimdal.sh via 3b78011213a testprogs: Remove UID_WRAPPER_ROOT export via 9e7de6dff6d testprogs: Pass configuration to test_password_settings.sh via 3af471fe452 s4:selftest: Use ad_dc env for samba4.blackbox.password_settings via 7ed669ce905 s4:selftest: Reformat samba4.blackbox.password_settings via 41b4a2a2520 testprogs: Pass configuration to test_kpasswd_mit.sh via 9e949bc403b testprogs: Pass configuration to test_kpasswd_heimdal.sh via 62cfab55e6b testprogs: Specify the KRB5CCNAME on the command line via d2bd1e34091 testprogs: Pass configuration to test_export_keytab_mit.sh via ff77e910bc2 testprogs: Pass configuration to test_export_keytab_heimdal.sh via f9441ca26b1 testprogs: Correctly set configuration in test_kinit_heimdal.sh via 4f228c57f63 testprogs: Correctly set configuration in test_kinit_mit.sh via 2ad6b6fe2e7 s4:selftest: Use ad_dc environment for kinit tests via 4fa89f3aeae s4:selftest: Use smbclient3 for kinit tests via 12d44773b58 s4:tests: Reformat kerberos tests via 94778b66e03 testprogs: Fix running export.keytab heimdal test from ca7b7bde391 selftest: Use "debug syslog format = always" in selftest https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 484bf9c49ae91ee57db4dd79cdd7d295faa7a75a Author: Andreas Schneider Date: Tue Mar 21 09:15:20 2023 +0100 testprogs: Remove unused test_export_keytab_(heimdal|mit).sh Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Apr 6 14:47:20 UTC 2023 on atb-devel-224 commit d9a9cb0396a819148b5e22154bee07dab1d1c0fa Author: Andreas Schneider Date: Wed Mar 15 13:14:16 2023 +0100 testprogs: Merge export keytab tests into a single script for MIT and Heimdal BUG: https://bugzilla.samba.org/show_bug.cgi?id=15336 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit deb9d1f65656057fc0d24a8418592e1c61e612e8 Author: Andreas Schneider Date: Tue Mar 21 09:34:52 2023 +0100 testprogs: Fix shell arithmetic in test_export_keytab_mit.sh Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 245990998fd118a4e5a4ea3a1ac95224a5635e51 Author: Andreas Schneider Date: Tue Mar 21 09:34:29 2023 +0100 testprogs: Reformat test_export_keytab_mit.sh Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit e560cf8ae1f73ac4b098ed8bd4a6ea1f58c9b09b Author: Andreas Schneider Date: Tue Mar 21 09:26:24 2023 +0100 testprogs: Fix shell arithmetic in test_export_keytab_heimdal.sh Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 0b21e492c5bcf35ee7cfab73009d78fe38cdaec8 Author: Andreas Schneider Date: Tue
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 925b026a235 lib:ldb:tests: Fix code spelling via a8c571e9831 lib:ldb:nssldb: Fix code spelling via 73d04200bc0 lib:ldb:ldb_sqlite3: Fix code spelling via 4eac2614b3d lib:ldb:ldb_map: Fix code spelling via 594d6ef444f lib:ldb:ldb_key_value: Fix code spelling via f75adc4871b lib:ldb:include: Fix code spelling via fc28daa6c72 lib:ldb:common: Fix code spelling via 1bb75c5471d docs-xml: Fix spelling in Samba-Developers-Guide via a9d4915cd62 docs-xml: Fix spelling in smb.conf manpage via 0007102d2b5 docs-xml: Fix spelling in manpages via 409ede2d1f1 ctdb:doc: Fix code spelling via e081fa4cc9e bootstrap: Fix spelling in README.md via 856f584107a Fix spelling in README.Coding.md from 38d2ca0a670 smbd: Indicate posix pathnames if SMB311 POSX cc requested https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 925b026a2351bead78b622d026429a45809475a3 Author: Andreas Schneider Date: Mon Apr 3 10:21:21 2023 +0200 lib:ldb:tests: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Apr 4 08:30:28 UTC 2023 on atb-devel-224 commit a8c571e98319f6e96dd08cd530146bd08954c3f3 Author: Andreas Schneider Date: Mon Apr 3 10:17:14 2023 +0200 lib:ldb:nssldb: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 73d04200bc0d19ec3c0649237d2be8af0757e3bd Author: Andreas Schneider Date: Mon Apr 3 10:16:26 2023 +0200 lib:ldb:ldb_sqlite3: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 4eac2614b3d98c12578b1050cee5aa16377082e1 Author: Andreas Schneider Date: Mon Apr 3 10:15:08 2023 +0200 lib:ldb:ldb_map: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 594d6ef444fddde6d3b451df5671bdcd148a644b Author: Andreas Schneider Date: Mon Apr 3 10:13:18 2023 +0200 lib:ldb:ldb_key_value: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit f75adc4871bdd5230fda97642a5929f4610b508b Author: Andreas Schneider Date: Mon Apr 3 10:10:17 2023 +0200 lib:ldb:include: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit fc28daa6c7269cb94d0f7c52b4293dc0d3f10acc Author: Andreas Schneider Date: Mon Apr 3 10:07:39 2023 +0200 lib:ldb:common: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 1bb75c5471d729177071d95d3286616ed50a9184 Author: Andreas Schneider Date: Mon Apr 3 10:00:27 2023 +0200 docs-xml: Fix spelling in Samba-Developers-Guide Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit a9d4915cd62ccd263f68143f82aa1aea28bb50c3 Author: Andreas Schneider Date: Mon Apr 3 09:58:47 2023 +0200 docs-xml: Fix spelling in smb.conf manpage Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 0007102d2b56b4f870a89989ec9e7fb31b514edc Author: Andreas Schneider Date: Mon Apr 3 09:56:46 2023 +0200 docs-xml: Fix spelling in manpages Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 409ede2d1f15cebc3f8cb57e5074d5997da587fa Author: Andreas Schneider Date: Mon Apr 3 09:48:38 2023 +0200 ctdb:doc: Fix code spelling Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit e081fa4cc9e02e230e0e9704b873be17030ed53e Author: Andreas Schneider Date: Mon Apr 3 09:45:42 2023 +0200 bootstrap: Fix spelling in README.md Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 856f584107af60364ae58137f26d89a90ee3f4a0 Author: Andreas Schneider Date: Mon Apr 3 09:44:45 2023 +0200 Fix spelling in README.Coding.md Best reviewed with: `git show --word-diff`. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- Summary of changes: README.Coding.md
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f448a1649cf pyldb: Fix a copy error, CID 1524512 DEADCODE via 5533ae3be06 lib:talloc: Move talloc_get_size() out of the talloc reference group from 76573d6d8f1 s3: libcli: Refuse to connect to any server with zero values for max_trans_size, max_read_size, max_write_size. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f448a1649cf4af11f1ceba55ec62e9b2a3db24f1 Author: Volker Lendecke Date: Sat Mar 25 16:34:57 2023 +0100 pyldb: Fix a copy error, CID 1524512 DEADCODE Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Thu Mar 30 08:08:32 UTC 2023 on atb-devel-224 commit 5533ae3be0689de763aa034311a7b12b6fba9775 Author: Andreas Schneider Date: Tue Mar 28 10:17:29 2023 +0200 lib:talloc: Move talloc_get_size() out of the talloc reference group This is not specific to talloc references. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- Summary of changes: lib/ldb/pyldb.c | 2 +- lib/talloc/talloc.h | 26 +- 2 files changed, 14 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index b7bc3bf0e62..4574f398c92 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -1768,7 +1768,7 @@ static PyObject *ldb_ldif_to_pyobject(struct ldb_context *ldb, struct ldb_ldif * deleteoldrdn_obj = Py_False; } newdn_obj = pyldb_Dn_FromDn(newdn); - if (olddn_obj == NULL) { + if (newdn_obj == NULL) { deleteoldrdn_obj = NULL; Py_CLEAR(olddn_obj); return NULL; diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h index c466c36406b..711e70bd190 100644 --- a/lib/talloc/talloc.h +++ b/lib/talloc/talloc.h @@ -665,6 +665,19 @@ _PUBLIC_ void *talloc_parent(const void *ptr); */ _PUBLIC_ const char *talloc_parent_name(const void *ptr); +/** + * @brief Get the size of a talloc chunk. + * + * This function lets you know the amount of memory allocated so far by + * this context. It does NOT account for subcontext memory. + * This can be used to calculate the size of an array. + * + * @param[in] ctx The talloc chunk. + * + * @return The size of the talloc chunk. + */ +_PUBLIC_ size_t talloc_get_size(const void *ctx); + /** * @brief Get the total size of a talloc chunk including its children. * @@ -1070,19 +1083,6 @@ _PUBLIC_ int talloc_unlink(const void *context, void *ptr); */ _PUBLIC_ void *talloc_autofree_context(void) _DEPRECATED_; -/** - * @brief Get the size of a talloc chunk. - * - * This function lets you know the amount of memory allocated so far by - * this context. It does NOT account for subcontext memory. - * This can be used to calculate the size of an array. - * - * @param[in] ctx The talloc chunk. - * - * @return The size of the talloc chunk. - */ -_PUBLIC_ size_t talloc_get_size(const void *ctx); - /** * @brief Show the parentage of a context. * -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ffdfb78da7f buildtools: Remove compile_commands.json symlink via be4e3bb2fec Add .clangd configuration file via 553948ba289 s3:waf: Fix One Definition Rule (ODR) violation of libsecrets3 from cfc31bfe11d s3:libsmb: Fix conflicting declaration/implementation https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ffdfb78da7f5cdabeb06036d0851c83f920e99ea Author: Andreas Schneider Date: Sat Mar 25 17:10:19 2023 +0100 buildtools: Remove compile_commands.json symlink We are telling clangd with the .clangd project config file where to find it. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Mar 29 17:54:05 UTC 2023 on atb-devel-224 commit be4e3bb2fec61fd0b9b28174d8dde290edf08587 Author: Andreas Schneider Date: Sat Mar 25 17:09:28 2023 +0100 Add .clangd configuration file This is supported since clang 11. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 553948ba2896098ce3fe4034d7ea5f30e8a5560e Author: Andreas Schneider Date: Tue Mar 28 14:46:14 2023 +0200 s3:waf: Fix One Definition Rule (ODR) violation of libsecrets3 ==7109==ERROR: AddressSanitizer: odr-violation (0x7f7d682b4f00): [1] size=88 'ndr_table_secrets' source3/librpc/gen_ndr/ndr_secrets.c:1002:34 [2] size=88 'ndr_table_secrets' source3/librpc/gen_ndr/ndr_secrets.c:1002:34 These globals were registered at these points: [1]: #0 0x7f7d6843eda8 (/lib64/libasan.so.8+0x3eda8) #1 0x7f7d682970ed in _sub_I_00099_1 (bin/shared/private/libsecrets3-samba4.so+0x1a0ed) #2 0x7f7d68af72fd in call_init /usr/src/debug/glibc-2.37/elf/dl-init.c:70 #3 0x7f7d68af72fd in call_init /usr/src/debug/glibc-2.37/elf/dl-init.c:26 [2]: #0 0x7f7d6843eda8 (/lib64/libasan.so.8+0x3eda8) #1 0x7f7d65d423fb in _sub_I_00099_1 (bin/shared/private/libndr-samba4.so+0x3423fb) #2 0x7f7d68af72fd in call_init /usr/src/debug/glibc-2.37/elf/dl-init.c:70 #3 0x7f7d68af72fd in call_init /usr/src/debug/glibc-2.37/elf/dl-init.c:26 Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- Summary of changes: .clangd | 3 +++ buildtools/wafsamba/wscript | 5 - source3/wscript_build | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 .clangd Changeset truncated at 500 lines: diff --git a/.clangd b/.clangd new file mode 100644 index 000..c505c93e378 --- /dev/null +++ b/.clangd @@ -0,0 +1,3 @@ +# https://clangd.llvm.org/config.html +CompileFlags: +CompilationDatabase: bin/default diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 47ed3f71234..30cb366331a 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -720,11 +720,6 @@ struct foo bar = { .y = 'X', .x = 1 }; conf.DEFINE('FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION', 1) conf.env.FUZZ_TARGET_LDFLAGS = Options.options.FUZZ_TARGET_LDFLAGS -# Create a symlink of the compile db for clangd -symlink(os.path.join(conf.bldnode.abspath(), 'default/compile_commands.json'), -os.path.join(conf.srcnode.abspath(), 'compile_commands.json'), -force=True) - conf.SAMBA_BUILD_ENV() diff --git a/source3/wscript_build b/source3/wscript_build index 4042d8e9c8d..ec63417732c 100644 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -469,7 +469,7 @@ bld.SAMBA3_LIBRARY('secrets3', passdb/secrets_lsa.c ''', deps=''' -NDR_SECRETS +ndr-samba4 smbconf samba3util dbwrap -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via cfc31bfe11d s3:libsmb: Fix conflicting declaration/implementation via ec3229ed5c8 s3:libsmb: Remove trailing whitespaces in clientgen.c via 34251ba8f20 examples: Improve comment in smb.conf.default via d1db4ac0945 examples: Remove trailing whitespaces in smb.conf.default via 1ba146dda30 examples: Fix code spelling via ff46836eecc examples: Remove trailing whitespaces in mklogon.conf via 4ada0ddea67 examples: Remove trailing whitespaces in ol-schema-migrate.pl via b1767d505e8 buildtools: Fix code spelling via 98c14205a0d auth: Fix code spelling via 71eb85bc252 s3:utils: Fix grammar in testparm from a11d6fe5907 s3:winbind: Fix wrong string zero termination for empty groups https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit cfc31bfe11d74be36b6725cdc0f3f57809ce60cf Author: Andreas Schneider Date: Mon Mar 27 09:59:50 2023 +0200 s3:libsmb: Fix conflicting declaration/implementation ../../source3/libsmb/clientgen.c:61:19: error: conflicting types for ‘cli_state_create’ due to enum/integer mismatch; have ‘struct cli_state *(TALLOC_CTX *, int, const char *, int , int)’ {aka ‘struct cli_state *(void *, int, const char *, int, int)’} [-Werror=enum-int-mismatch] 61 | struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, | ^~~~ In file included from ../../source3/libsmb/libsmb.h:28, from ../../source3/libsmb/clientgen.c:22: ../../source3/libsmb/proto.h:180:19: note: previous declaration of ‘cli_state_create’ with type ‘struct cli_state *(TALLOC_CTX *, int, const char *, enum smb_signing_setting, int)’ {aka ‘struct cli_state *(void *, int, const char *, enum smb_signing_setting, int)’} 180 | struct cli_state *cli_state_create(TALLOC_CTX *mem_ctx, | ^~~~ Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Tue Mar 28 10:27:19 UTC 2023 on atb-devel-224 commit ec3229ed5c892eee53fe2d7aefac5a1efd7ab731 Author: Andreas Schneider Date: Mon Mar 27 09:59:22 2023 +0200 s3:libsmb: Remove trailing whitespaces in clientgen.c Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison commit 34251ba8f209d42f7a1dd1e8a2e24339b3c0a56b Author: Andreas Schneider Date: Mon Mar 27 11:33:53 2023 +0200 examples: Improve comment in smb.conf.default Signed-off-by: Andreas Schneider Reviewed-by: Rowland Penny commit d1db4ac09454e02f534fe6da0733f77d6ad6aa32 Author: Andreas Schneider Date: Mon Mar 27 11:33:32 2023 +0200 examples: Remove trailing whitespaces in smb.conf.default Signed-off-by: Andreas Schneider Reviewed-by: Rowland Penny commit 1ba146dda309af3842d7a75bca2ac45e4363ac2c Author: Andreas Schneider Date: Wed Mar 22 10:05:24 2023 +0100 examples: Fix code spelling Signed-off-by: Andreas Schneider Reviewed-by: Rowland Penny commit ff46836eeccf9ea43a2af296e9b5ecc242df2325 Author: Andreas Schneider Date: Wed Mar 22 10:07:06 2023 +0100 examples: Remove trailing whitespaces in mklogon.conf Signed-off-by: Andreas Schneider Reviewed-by: Rowland Penny commit 4ada0ddea6775dd4b8ee7e6556f401ab7306eade Author: Andreas Schneider Date: Wed Mar 22 09:55:10 2023 +0100 examples: Remove trailing whitespaces in ol-schema-migrate.pl Signed-off-by: Andreas Schneider Reviewed-by: Rowland Penny commit b1767d505e85b4c73d41256515f859eb8f3f6b52 Author: Andreas Schneider Date: Tue Mar 14 08:53:49 2023 +0100 buildtools: Fix code spelling Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider Reviewed-by: Rowland Penny commit 98c14205a0d2ff380ef65120aae52a1567ee443b Author: Andreas Schneider Date: Tue Mar 14 08:50:34 2023 +0100 auth: Fix code spelling Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider Reviewed-by: Rowland Penny commit 71eb85bc252637db908ca57c2d9790f6109491e0 Author: Andreas Schneider Date: Tue Feb 28 20:41:59 2023 +0100 s3:utils: Fix grammar in testparm Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider Reviewed-by: Volker Lendecke Reviewed-by: Rowland Penny --- Summary of changes: auth/auth_log.c| 4 +- auth/common_auth.h | 2 +- auth/credentials/credentials.c | 10 ++-- auth/credentials/credentials_internal.h| 2 +- auth/credentials/credentials_krb5.c| 2
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d964700a19b ctdb:utils: Fix code spelling via 8ccd915587f ctdb:utils: Remove trailing whitespaces in scsi_io.c via 88ee870e67d ctdb:tool: Fix code spelling via 9a37aa39697 ctdb:tests: Fix code spelling via 7aeed61dc5f ctdb:tcp: Fix code spelling via 7749df49924 ctdb:server: Fix code spelling via 19f418b68fe ctdb:server: Remove trailing whitespaces in ctdb_server.c via 59af5049997 ctdb:server: Remove trailing whitespaces in ctdb_recover.c via 200bc1f9374 ctdb:include: Fix code spelling via 44bde7a7880 ctdb:include: Remove trailing whitespaces in ctdb_protocol.h via 2e10481dacf ctdb:common: Fix code spelling via 6d7d82938b6 ctdb:client: Fix code spelling from e7ef43cead4 s4:dsdb/extended_dn_out: hide backlinks with DSDB_RMD_FLAG_HIDDEN_BL by default https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d964700a19b7fa032ead7f64c7c5bb3cd2532500 Author: Andreas Schneider Date: Wed Mar 22 09:45:26 2023 +0100 ctdb:utils: Fix code spelling Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Fri Mar 24 07:57:37 UTC 2023 on atb-devel-224 commit 8ccd915587f40febed56445bc37ca4185d254bcc Author: Andreas Schneider Date: Wed Mar 22 09:45:04 2023 +0100 ctdb:utils: Remove trailing whitespaces in scsi_io.c Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 88ee870e67daea1ea54503c3eaf819c87c2da2ff Author: Andreas Schneider Date: Wed Mar 22 09:42:43 2023 +0100 ctdb:tool: Fix code spelling Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 9a37aa39697494692e0a4a13fb8723b1d15c9599 Author: Andreas Schneider Date: Wed Mar 22 09:42:10 2023 +0100 ctdb:tests: Fix code spelling Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 7aeed61dc5fa7c3c3f762c18ad56d96de8d3fd1b Author: Andreas Schneider Date: Wed Mar 22 09:40:05 2023 +0100 ctdb:tcp: Fix code spelling Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 7749df49924ef30108880580b271657b923639d3 Author: Andreas Schneider Date: Wed Mar 22 09:36:23 2023 +0100 ctdb:server: Fix code spelling Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 19f418b68feee62d50ce092af848c9dd474b60b3 Author: Andreas Schneider Date: Wed Mar 22 09:35:55 2023 +0100 ctdb:server: Remove trailing whitespaces in ctdb_server.c Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 59af5049997aa793ab3ea97e6a410da5d5367feb Author: Andreas Schneider Date: Wed Mar 22 09:33:04 2023 +0100 ctdb:server: Remove trailing whitespaces in ctdb_recover.c Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 200bc1f9374c5dd21bc6bd33d3aa7c7d8d77b70f Author: Andreas Schneider Date: Wed Mar 22 09:29:34 2023 +0100 ctdb:include: Fix code spelling Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 44bde7a78809cc872e7e35b81f9b15b680537052 Author: Andreas Schneider Date: Wed Mar 22 09:30:31 2023 +0100 ctdb:include: Remove trailing whitespaces in ctdb_protocol.h Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 2e10481dacf5a6e79622416ec5d78b9d2f5a957f Author: Andreas Schneider Date: Wed Mar 22 09:24:04 2023 +0100 ctdb:common: Fix code spelling Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke commit 6d7d82938b6134ca4bae45614efd409271535b5a Author: Andreas Schneider Date: Wed Mar 22 09:22:37 2023 +0100 ctdb:client: Fix code spelling Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider Reviewed-by: Martin Schwenke --- Summary of changes: ctdb/client/client.h | 4 +- ctdb/common/cmdline.h | 4 +- ctdb/common/conf.c | 2 +- ctdb/common/conf.h | 2 +- ctdb/common/ctdb_ltdb.c| 2 +- ctdb/common/rb_tree.c | 2 +- ctdb/common/rb_tree.h | 2 +- ctdb/common/reqid.h| 2 +- ctdb
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 795bab56291 lib:ldb: Correctly cast pointers for assert_string_equal() from b4a6c054ec6 selftest: Use setUpClass() to reduce "make test TESTS=large_ldap" time https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 795bab5629195395d512bb9a830542de6067195b Author: Andreas Schneider Date: Tue Mar 14 09:48:37 2023 +0100 lib:ldb: Correctly cast pointers for assert_string_equal() This is a change in cmocka to avoid hiding possible errors. Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Wed Mar 15 07:53:54 UTC 2023 on atb-devel-224 --- Summary of changes: lib/ldb/tests/ldb_filter_attrs_test.c | 10 +- lib/ldb/tests/ldb_mod_op_test.c | 22 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/ldb/tests/ldb_filter_attrs_test.c b/lib/ldb/tests/ldb_filter_attrs_test.c index 7d555e0da2e..9e985e13c63 100644 --- a/lib/ldb/tests/ldb_filter_attrs_test.c +++ b/lib/ldb/tests/ldb_filter_attrs_test.c @@ -660,7 +660,7 @@ static void test_filter_attrs_one_attr_matched_star(void **state) assert_string_equal(ldb_msg_find_attr_as_string(filtered_msg, "foo", NULL), - value); + (const char *)value); } /* @@ -729,11 +729,11 @@ static void test_filter_attrs_two_attr_matched_star(void **state) assert_string_equal(ldb_msg_find_attr_as_string(filtered_msg, "foo", NULL), - value1); + (const char *)value1); assert_string_equal(ldb_msg_find_attr_as_string(filtered_msg, "bar", NULL), - value2); + (const char *)value2); } /* @@ -828,7 +828,7 @@ static void test_filter_attrs_one_attr_matched_star_dn(void **state) assert_string_equal(ldb_msg_find_attr_as_string(filtered_msg, "foo", NULL), - value); + (const char *)value); } /* @@ -877,7 +877,7 @@ static void test_filter_attrs_one_attr_matched_dn(void **state) assert_ptr_equal(filtered_msg->dn, in.dn); assert_string_equal(filtered_msg->elements[0].name, "distinguishedName"); assert_int_equal(filtered_msg->elements[0].num_values, 1); - assert_string_equal(filtered_msg->elements[0].values[0].data, + assert_string_equal((const char *)filtered_msg->elements[0].values[0].data, ldb_dn_get_linearized(in.dn)); } diff --git a/lib/ldb/tests/ldb_mod_op_test.c b/lib/ldb/tests/ldb_mod_op_test.c index cf40fe42b73..eca59068c9f 100644 --- a/lib/ldb/tests/ldb_mod_op_test.c +++ b/lib/ldb/tests/ldb_mod_op_test.c @@ -152,7 +152,7 @@ static void test_ldif_message(void **state) "supersecret: password\n" "binary:: //8=\n" "\n"; - + struct ldb_message *msg = get_test_ldb_message(test_ctx, test_ctx->ldb); @@ -182,13 +182,13 @@ static void test_ldif_message_redacted(void **state) "supersecret", NULL }; - + struct ldb_message *msg = ldb_msg_new(test_ctx); ldb_set_opaque(test_ctx->ldb, LDB_SECRET_ATTRIBUTE_LIST_OPAQUE, secret_attrs); - + assert_non_null(msg); msg->dn = ldb_dn_new(msg, test_ctx->ldb, "dc=samba,dc=org"); @@ -924,12 +924,12 @@ static void test_ldb_modify_add_key(void **state) el = ldb_msg_find_element(res->msgs[0], "cn"); assert_non_null(el); assert_int_equal(el->num_values, 1); - assert_string_equal(el->values[0].data, "test_mod_cn"); + assert_string_equal((const char *)el->values[0].data, "test_mod_cn"); el = ldb_msg_find_element(res->msgs[0], "name"); assert_non_null(el); assert_int_equal(el->num_values, 1); - assert_string_equal(el->values[0].data, "test_mod_name"); + assert_string_equal((const char *
[SCM] Resolv Wrapper Repository - branch master updated
The branch, master has been updated via f2e7f58 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode via dcbc2d4 tests: Fix pointer type for assert_string_equal() from 7403361 Bump version to 1.1.8 https://git.samba.org/?p=resolv_wrapper.git;a=shortlog;h=master - Log - commit f2e7f58025ecb4cf399494166abea01813b1d0f0 Author: Andreas Schneider Date: Fri Feb 17 17:51:27 2023 +0100 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský commit dcbc2d4c8f0648b0c1b78b2b43c3a28640dc3576 Author: Andreas Schneider Date: Fri Feb 17 18:01:57 2023 +0100 tests: Fix pointer type for assert_string_equal() error: pointer targets in passing argument 1 of ‘_assert_string_equal’ differ in signedness [-Werror=pointer-sign] Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- Summary of changes: tests/CMakeLists.txt | 4 tests/test_dns_fake.c | 16 2 files changed, 12 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1262bed..7f2f4ee 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,9 @@ project(tests C) +if (TARGET cmocka::cmocka) +set(CMOCKA_LIBRARY cmocka::cmocka) +endif() + set(TORTURE_LIBRARY torture) # A simple DNS server for testing diff --git a/tests/test_dns_fake.c b/tests/test_dns_fake.c index c057ebe..4f19f12 100644 --- a/tests/test_dns_fake.c +++ b/tests/test_dns_fake.c @@ -392,7 +392,7 @@ static void test_res_fake_uri_query(void **state) assert_int_equal(prio, 2); assert_int_equal(weight, 5); - assert_string_equal(rrdata, "https://vpn.cwrap.org/VPN;); + assert_string_equal((const char *)rrdata, "https://vpn.cwrap.org/VPN;); assert_int_equal(ns_parserr(, ns_s_an, 1, ), 0); assert_int_equal(ns_rr_type(rr), ns_t_uri); @@ -402,7 +402,7 @@ static void test_res_fake_uri_query(void **state) assert_int_equal(prio, 2); assert_int_equal(weight, 10); - assert_string_equal(rrdata, "https://vpn2.cwrap.org/VPN;); + assert_string_equal((const char *)rrdata, "https://vpn2.cwrap.org/VPN;); assert_int_equal(ns_parserr(, ns_s_an, 2, ), 0); assert_int_equal(ns_rr_type(rr), ns_t_uri); @@ -412,7 +412,7 @@ static void test_res_fake_uri_query(void **state) assert_int_equal(prio, 2); assert_int_equal(weight, 20); - assert_string_equal(rrdata, "https://vpn3.cwrap.org/VPN;); + assert_string_equal((const char *)rrdata, "https://vpn3.cwrap.org/VPN;); } @@ -461,7 +461,7 @@ static void test_res_fake_uri_query_minimal(void **state) assert_int_equal(prio, 1); assert_int_equal(weight, 100); - assert_string_equal(rrdata, "ftp://ftp.cwrap.org/public;); + assert_string_equal((const char *)rrdata, "ftp://ftp.cwrap.org/public;); } static void test_res_fake_soa_query(void **state) @@ -746,7 +746,7 @@ static void test_res_fake_txt_query(void **state) assert_int_equal(ns_rr_type(rr), ns_t_txt); rrdata = ns_rr_rdata(rr); - assert_string_equal(rrdata, "v=spf1 mx"); + assert_string_equal((const char *)rrdata, "v=spf1 mx"); } static void test_res_fake_uri_nsearch(void **state) @@ -787,7 +787,7 @@ static void test_res_fake_uri_nsearch(void **state) NS_GET16(weight, rrdata); assert_int_equal(prio, 2); assert_int_equal(weight, 5); - assert_string_equal(rrdata, "https://vpn.cwrap.org/VPN;); + assert_string_equal((const char *)rrdata, "https://vpn.cwrap.org/VPN;); assert_int_equal(ns_parserr(, ns_s_an, 1, ), 0); assert_int_equal(ns_rr_type(rr), ns_t_uri); @@ -796,7 +796,7 @@ static void test_res_fake_uri_nsearch(void **state) NS_GET16(weight, rrdata); assert_int_equal(prio, 2); assert_int_equal(weight, 10); - assert_string_equal(rrdata, "https://vpn2.cwrap.org/VPN;); + assert_string_equal((const char *)rrdata, "https://vpn2.cwrap.org/VPN;); assert_int_equal(ns_parserr(, ns_s_an, 2, ), 0); assert_int_equal(ns_rr_type(rr), ns_t_uri); @@ -805,7 +805,7 @@ static void test_res_fake_uri_nsearch(void **state) NS_GET16(weight, rrdata); assert_int_equal(prio, 2); assert_int_equal(weight, 20); - assert_string_equal(rrdata, "https://vpn3.cwrap.org/VPN;); + assert_string_equal((const char *)rrdata, "https://vpn3.cwrap.org/VPN;); } int main(void) -- Resolv Wrapper Repository
[SCM] Priv Wrapper Repository - branch main updated
The branch, main has been updated via 295bcbe cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode from f387dad Bump version to 1.0.1 https://git.samba.org/?p=priv_wrapper.git;a=shortlog;h=main - Log - commit 295bcbe9de1fb37531678d482efb12583b77c6d0 Author: Andreas Schneider Date: Fri Feb 17 17:51:27 2023 +0100 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- Summary of changes: tests/CMakeLists.txt | 4 1 file changed, 4 insertions(+) Changeset truncated at 500 lines: diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d33cf15..46147cf 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,9 @@ project(tests C) +if (TARGET cmocka::cmocka) +set(CMOCKA_LIBRARY cmocka::cmocka) +endif() + include_directories( ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} -- Priv Wrapper Repository
[SCM] pam wrapper repository - branch master updated
The branch, master has been updated via 8e94874 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode via 9e7f8ac cmake: Drop FindCMocka.cmake Module from 2b486d5 Drop support for Python 2 https://git.samba.org/?p=pam_wrapper.git;a=shortlog;h=master - Log - commit 8e94874bf5c0d569a16985eafa9922d8c527a9fb Author: Andreas Schneider Date: Fri Feb 17 17:51:27 2023 +0100 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský commit 9e7f8ac9ee1f968ac8af2d9c2e9dbd91a3090b73 Author: Andreas Schneider Date: Fri Feb 17 18:08:45 2023 +0100 cmake: Drop FindCMocka.cmake Module We should use config mode. Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- Summary of changes: cmake/Modules/FindCMocka.cmake | 49 -- tests/CMakeLists.txt | 4 2 files changed, 4 insertions(+), 49 deletions(-) delete mode 100644 cmake/Modules/FindCMocka.cmake Changeset truncated at 500 lines: diff --git a/cmake/Modules/FindCMocka.cmake b/cmake/Modules/FindCMocka.cmake deleted file mode 100644 index 2dd9fc5..000 --- a/cmake/Modules/FindCMocka.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# - Try to find CMocka -# Once done this will define -# -# CMOCKA_ROOT_DIR - Set this variable to the root installation of CMocka -# -# Read-Only variables: -# CMOCKA_FOUND - system has CMocka -# CMOCKA_INCLUDE_DIR - the CMocka include directory -# CMOCKA_LIBRARIES - Link these to use CMocka -# CMOCKA_DEFINITIONS - Compiler switches required for using CMocka -# -#= -# Copyright (c) 2011-2012 Andreas Schneider -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#= -# - -find_path(CMOCKA_INCLUDE_DIR -NAMES -cmocka.h -PATHS -${CMOCKA_ROOT_DIR}/include -) - -find_library(CMOCKA_LIBRARY -NAMES -cmocka -PATHS -${CMOCKA_ROOT_DIR}/include -) - -if (CMOCKA_LIBRARY) - set(CMOCKA_LIBRARIES - ${CMOCKA_LIBRARIES} - ${CMOCKA_LIBRARY} - ) -endif (CMOCKA_LIBRARY) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(CMocka DEFAULT_MSG CMOCKA_LIBRARIES CMOCKA_INCLUDE_DIR) - -# show the CMOCKA_INCLUDE_DIR and CMOCKA_LIBRARIES variables only in the advanced view -mark_as_advanced(CMOCKA_INCLUDE_DIR CMOCKA_LIBRARIES) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9d56f21..26f2da2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,9 @@ project(tests C) +if (TARGET cmocka::cmocka) +set(CMOCKA_LIBRARY cmocka::cmocka) +endif() + set(PAM_MATRIX_PATH "${CMAKE_BINARY_DIR}/src/modules/pam_matrix.so") configure_file(services/matrix.in ${CMAKE_CURRENT_BINARY_DIR}/services/matrix @ONLY) -- pam wrapper repository
[SCM] UID Wrapper Repository - branch master updated
The branch, master has been updated via 850f24c cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode from 9db9f48 cmake: Print a message that uid_wrapper was found with find_package() https://git.samba.org/?p=uid_wrapper.git;a=shortlog;h=master - Log - commit 850f24c6366abda30bfd77734b90330b8809d306 Author: Andreas Schneider Date: Fri Feb 17 17:51:27 2023 +0100 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- Summary of changes: tests/CMakeLists.txt | 4 1 file changed, 4 insertions(+) Changeset truncated at 500 lines: diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 635e86e..68e050e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,9 @@ project(tests C) +if (TARGET cmocka::cmocka) +set(CMOCKA_LIBRARY cmocka::cmocka) +endif() + add_library(uwrap_fake_socket_wrapper SHARED uwrap_fake_socket_wrapper.c) target_compile_options(uwrap_fake_socket_wrapper PRIVATE -- UID Wrapper Repository
[SCM] NSS Wrapper Repository - branch master updated
The branch, master has been updated via 2c879a0 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode from db887c0 Bump version to 1.1.15 https://git.samba.org/?p=nss_wrapper.git;a=shortlog;h=master - Log - commit 2c879a0ffa70cee33329291d7576ec971d420da2 Author: Andreas Schneider Date: Fri Feb 17 17:51:27 2023 +0100 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- Summary of changes: tests/CMakeLists.txt | 4 1 file changed, 4 insertions(+) Changeset truncated at 500 lines: diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3b94076..733cc4e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,9 @@ project(tests C) +if (TARGET cmocka::cmocka) +set(CMOCKA_LIBRARY cmocka::cmocka) +endif() + set(TESTSUITE_LIBRARIES nss_utils ${NWRAP_REQUIRED_LIBRARIES} ${CMOCKA_LIBRARY}) string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER) -- NSS Wrapper Repository
[SCM] Socket Wrapper Repository - branch master updated
The branch, master has been updated via 97fe09e cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode from 3c945e0 Bump version to 1.4.0 https://git.samba.org/?p=socket_wrapper.git;a=shortlog;h=master - Log - commit 97fe09e583f6e2ef94623c872e0c56bcd8817303 Author: Andreas Schneider Date: Fri Feb 17 17:51:27 2023 +0100 cmake: Fix cmocka >= 1.1.6 find_package() in CONFIG mode Signed-off-by: Andreas Schneider Reviewed-by: Pavel Filipenský --- Summary of changes: tests/CMakeLists.txt | 5 + 1 file changed, 5 insertions(+) Changeset truncated at 500 lines: diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6c3aae9..3748461 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -7,6 +7,11 @@ include_directories( ${CMOCKA_INCLUDE_DIR} ) +# Required for cmocka >= 1.1.6 +if (TARGET cmocka::cmocka) +set(CMOCKA_LIBRARY cmocka::cmocka) +endif() + set(TORTURE_LIBRARY torture) # RFC862 echo server -- Socket Wrapper Repository