diff options
author | roy <roy@pkgsrc.org> | 2019-03-01 20:03:24 +0000 |
---|---|---|
committer | roy <roy@pkgsrc.org> | 2019-03-01 20:03:24 +0000 |
commit | 9ba7a7a075a7b033a3edf2216746fab2c27f2b26 (patch) | |
tree | 0e0bc4e4fdb7c12d4c057512513bbede8725aff9 /net | |
parent | fe33ee564dd5de09d60846e672aa9bc96f89e0b8 (diff) | |
download | pkgsrc-9ba7a7a075a7b033a3edf2216746fab2c27f2b26.tar.gz |
Add a patch taken from upstream to allow smbd to work when
winbindd has been started but not configured.
Diffstat (limited to 'net')
-rw-r--r-- | net/samba4/Makefile | 4 | ||||
-rw-r--r-- | net/samba4/distinfo | 3 | ||||
-rw-r--r-- | net/samba4/patches/patch-source3_auth_token_util.c | 53 |
3 files changed, 57 insertions, 3 deletions
diff --git a/net/samba4/Makefile b/net/samba4/Makefile index e9339d1cfdc..ec7f4c6d1b0 100644 --- a/net/samba4/Makefile +++ b/net/samba4/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.59 2019/02/23 21:29:29 jperkin Exp $ +# $NetBSD: Makefile,v 1.60 2019/03/01 20:03:24 roy Exp $ DISTNAME= samba-4.9.4 -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= net MASTER_SITES= http://download.samba.org/pub/samba/stable/ diff --git a/net/samba4/distinfo b/net/samba4/distinfo index 7aaed17dc1d..6ef870395ed 100644 --- a/net/samba4/distinfo +++ b/net/samba4/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.22 2018/12/22 01:13:52 adam Exp $ +$NetBSD: distinfo,v 1.23 2019/03/01 20:03:24 roy Exp $ SHA1 (samba-4.9.4.tar.gz) = 7f8e15709e03e52d14bd9c85dd717366c106993f RMD160 (samba-4.9.4.tar.gz) = d0a43b85b85906f860de12b0b0abb1fcc5643b7a @@ -14,6 +14,7 @@ SHA1 (patch-lib_param_loadparm.h) = 0216b69d33d1e17260a446e11bee764116c52b18 SHA1 (patch-lib_replace_wscript) = b6a042c2c13c0be78d7b64c0ce2efdaf4bbb1f3b SHA1 (patch-lib_tevent_wscript) = fbbe2024096b57d651d90064f53489a974db9d7a SHA1 (patch-nsswitch_wscript__build) = e8a6251e031ffa13d6347fade8891f7afd65d3eb +SHA1 (patch-source3_auth_token_util.c) = fbe67b501fa4325c9fb3e37c51bc424847f5e908 SHA1 (patch-source4_heimdal__build_roken.h) = ee535f8e7cc46a3487d95bc859438c476a88fe60 SHA1 (patch-source4_scripting_wsript_build) = bd4feddcaadf1c3d2d25eb7914e7b5843e4e9511 SHA1 (patch-source4_torture_local_nss__tests.c) = 8c878a8ed771ba996a7a325a1ad41bd13016c70c diff --git a/net/samba4/patches/patch-source3_auth_token_util.c b/net/samba4/patches/patch-source3_auth_token_util.c new file mode 100644 index 00000000000..d9a8d43c652 --- /dev/null +++ b/net/samba4/patches/patch-source3_auth_token_util.c @@ -0,0 +1,53 @@ +$NetBSD: patch-source3_auth_token_util.c,v 1.1 2019/03/01 20:03:24 roy Exp $ + +Taken from https://bugzilla.samba.org/show_bug.cgi?id=13697 + +From 1e8931dfc24a2576a3b1fe9115c4ccbfefbbd298 Mon Sep 17 00:00:00 2001 +From: Stefan Metzmacher <metze@samba.org> +Date: Wed, 19 Dec 2018 09:38:33 +0100 +Subject: [PATCH] s3:auth: ignore create_builtin_guests() failing without a + valid idmap configuration + +This happens on standalone servers, where winbindd is automatically +started by init scripts if it's installed. But it's not really +used and may not have a valid idmap configuration ( +"idmap config * : range" has no default!) + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13697 + +Signed-off-by: Stefan Metzmacher <metze@samba.org> +Reviewed-by: Alexander Bokovoy <ab@samba.org> +(cherry picked from commit 865538fabaea33741f5fa542dbc3f2e08308c2c1) +--- + source3/auth/token_util.c | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/source3/auth/token_util.c b/source3/auth/token_util.c +index f5b0e6944335..ee38d6c9645b 100644 +--- source3/auth/token_util.c ++++ source3/auth/token_util.c +@@ -745,7 +745,23 @@ NTSTATUS finalize_local_nt_token(struct security_token *result, + status = create_builtin_guests(domain_sid); + unbecome_root(); + +- if (NT_STATUS_EQUAL(status, NT_STATUS_PROTOCOL_UNREACHABLE)) { ++ /* ++ * NT_STATUS_PROTOCOL_UNREACHABLE: ++ * => winbindd is not running. ++ * ++ * NT_STATUS_ACCESS_DENIED: ++ * => no idmap config at all ++ * and wbint_AllocateGid()/winbind_allocate_gid() ++ * failed. ++ * ++ * NT_STATUS_NO_SUCH_GROUP: ++ * => no idmap config at all and ++ * "tdbsam:map builtin = no" means ++ * wbint_Sids2UnixIDs() fails. ++ */ ++ if (NT_STATUS_EQUAL(status, NT_STATUS_PROTOCOL_UNREACHABLE) || ++ NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED) || ++ NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_GROUP)) { + /* + * Add BUILTIN\Guests directly to token. + * But only if the token already indicates |