The Samba-Bugzilla – Attachment 16717 Details for
Bug 14779
Winbind should not start if the socket path is too long
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.15
v4-15-fix-winbind_socket_path.patch (text/plain), 4.37 KB, created by
Andreas Schneider
on 2021-08-05 07:28:05 UTC
(
hide
)
Description:
patch for 4.15
Filename:
MIME Type:
Creator:
Andreas Schneider
Created:
2021-08-05 07:28:05 UTC
Size:
4.37 KB
patch
obsolete
>From b1160e6fc8b8bb05ff5463500f56ff92042000fc Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Tue, 3 Aug 2021 11:04:37 +0200 >Subject: [PATCH 1/2] 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 <asn@samba.org> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> >(cherry picked from commit aab5cc95e224fef0efafeb1c37a4eb414aee65a0) >--- > source3/winbindd/winbindd.c | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > >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); > } >-- >2.32.0 > > >From bc93f309f21f9eca4733cdcd6b91d8c9a60e4a2e Mon Sep 17 00:00:00 2001 >From: Andreas Schneider <asn@samba.org> >Date: Tue, 3 Aug 2021 13:20:40 +0200 >Subject: [PATCH 2/2] 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 <asn@samba.org> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> > >Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> >Autobuild-Date(master): Tue Aug 3 20:35:49 UTC 2021 on sn-devel-184 >--- > .gitlab-ci-main.yml | 12 ++++++------ > script/autobuild.py | 6 +++--- > 2 files changed, 9 insertions(+), 9 deletions(-) > >diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml >index 1aee591b068..0979c007dc6 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 85dff88a773..c554c331da4 100755 >--- a/script/autobuild.py >+++ b/script/autobuild.py >@@ -655,7 +655,7 @@ tasks = { > ], > }, > >- "samba-ad-dc-1-mitkrb5": { >+ "samba-addc-mit-1": { > "dependency": "samba-mit-build", > "sequence": [ > ("random-sleep", random_sleep(1, 1)), >@@ -671,7 +671,7 @@ tasks = { > ], > }, > >- "samba-ad-dc-4a-mitkrb5": { >+ "samba-addc-mit-4a": { > "dependency": "samba-mit-build", > "sequence": [ > ("random-sleep", random_sleep(1, 1)), >@@ -684,7 +684,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)), >-- >2.32.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
abartlet
:
review+
Actions:
View
Attachments on
bug 14779
:
16714
| 16717 |
16741