The branch, master has been updated via 000f389d09e gitlab: Use shorter names for Samba AD DC env with MIT KRB5 via aab5cc95e22 s3:winbindd: Add a check for the path length of 'winbindd socket directory' from e2962b4262f configure: Do not put arguments into double quotes
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 000f389d09ec9e9906d5e2a0aa317c471c5f5b96 Author: Andreas Schneider <a...@samba.org> Date: Tue Aug 3 13:20:40 2021 +0200 gitlab: Use shorter names for Samba AD DC env with MIT KRB5 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14779 Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> Autobuild-User(master): Andrew Bartlett <abart...@samba.org> Autobuild-Date(master): Tue Aug 3 20:35:49 UTC 2021 on sn-devel-184 commit aab5cc95e224fef0efafeb1c37a4eb414aee65a0 Author: Andreas Schneider <a...@samba.org> Date: Tue Aug 3 11:04:37 2021 +0200 s3:winbindd: Add a check for the path length of 'winbindd socket directory' BUG: https://bugzilla.samba.org/show_bug.cgi?id=14779 Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> ----------------------------------------------------------------------- Summary of changes: .gitlab-ci-main.yml | 12 ++++++------ script/autobuild.py | 6 +++--- source3/winbindd/winbindd.c | 25 +++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml index 9ea3a3f5606..657b28e274f 100644 --- a/.gitlab-ci-main.yml +++ b/.gitlab-ci-main.yml @@ -331,10 +331,10 @@ samba-ad-dc-ntvfs: samba-admem-mit: extends: .needs_samba-mit-build -samba-ad-dc-4a-mitkrb5: +samba-addc-mit-4a: extends: .needs_samba-mit-build -samba-ad-dc-4b-mitkrb5: +samba-addc-mit-4b: extends: .needs_samba-mit-build # This task is run first to ensure we compile before we start the @@ -389,7 +389,7 @@ samba-ad-dc-1: samba-nt4: extends: .needs_samba-nt4-build-private -samba-ad-dc-1-mitkrb5: +samba-addc-mit-1: extends: .needs_samba-mit-build-private samba-no-opath1: @@ -421,15 +421,15 @@ pages: - samba-ctdb - samba-ad-dc-ntvfs - samba-admem-mit - - samba-ad-dc-4a-mitkrb5 - - samba-ad-dc-4b-mitkrb5 + - samba-addc-mit-4a + - samba-addc-mit-4b - samba-ad-back1 - samba-ad-back2 - samba-fileserver - samba-ad-dc-1 - samba-nt4 - samba-schemaupgrade - - samba-ad-dc-1-mitkrb5 + - samba-addc-mit-1 - samba-fips - samba-no-opath1 - samba-no-opath2 diff --git a/script/autobuild.py b/script/autobuild.py index 7ec3073f67e..efecaf41d74 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -659,7 +659,7 @@ tasks = { ], }, - "samba-ad-dc-1-mitkrb5": { + "samba-addc-mit-1": { "dependency": "samba-mit-build", "sequence": [ ("random-sleep", random_sleep(1, 1)), @@ -675,7 +675,7 @@ tasks = { ], }, - "samba-ad-dc-4a-mitkrb5": { + "samba-addc-mit-4a": { "dependency": "samba-mit-build", "sequence": [ ("random-sleep", random_sleep(1, 1)), @@ -688,7 +688,7 @@ tasks = { ("check-clean-tree", CLEAN_SOURCE_TREE_CMD), ], }, - "samba-ad-dc-4b-mitkrb5": { + "samba-addc-mit-4b": { "dependency": "samba-mit-build", "sequence": [ ("random-sleep", random_sleep(1, 1)), diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 4f367d07ecb..89e62b43ca0 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -1658,6 +1658,7 @@ int main(int argc, const char **argv) bool ok; const struct dcesrv_endpoint_server *ep_server = NULL; struct dcesrv_context *dce_ctx = NULL; + size_t winbindd_socket_dir_len = 0; setproctitle_init(argc, discard_const(argv), environ); @@ -1810,6 +1811,30 @@ int main(int argc, const char **argv) } } + winbindd_socket_dir_len = strlen(lp_winbindd_socket_directory()); + if (winbindd_socket_dir_len > 0) { + size_t winbindd_socket_len = + winbindd_socket_dir_len + 1 + + strlen(WINBINDD_SOCKET_NAME); + struct sockaddr_un un = { + .sun_family = AF_UNIX, + }; + size_t sun_path_len = sizeof(un.sun_path); + + if (winbindd_socket_len >= sun_path_len) { + DBG_ERR("The winbind socket path [%s/%s] is too long " + "(%zu >= %zu)\n", + lp_winbindd_socket_directory(), + WINBINDD_SOCKET_NAME, + winbindd_socket_dir_len, + sun_path_len); + exit(1); + } + } else { + DBG_ERR("'winbindd_socket_directory' parameter is empty\n"); + exit(1); + } + if (!cluster_probe_ok()) { exit(1); } -- Samba Shared Repository