pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/samba4 Add a patch taken from upstream to allow sm...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8ec4fd5c3602
branches:  trunk
changeset: 392387:8ec4fd5c3602
user:      roy <roy%pkgsrc.org@localhost>
date:      Fri Mar 01 20:03:24 2019 +0000

description:
Add a patch taken from upstream to allow smbd to work when
winbindd has been started but not configured.

diffstat:

 net/samba4/Makefile                                |   4 +-
 net/samba4/distinfo                                |   3 +-
 net/samba4/patches/patch-source3_auth_token_util.c |  53 ++++++++++++++++++++++
 3 files changed, 57 insertions(+), 3 deletions(-)

diffs (87 lines):

diff -r e9f572f14d68 -r 8ec4fd5c3602 net/samba4/Makefile
--- a/net/samba4/Makefile       Fri Mar 01 18:53:29 2019 +0000
+++ b/net/samba4/Makefile       Fri Mar 01 20:03:24 2019 +0000
@@ -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 -r e9f572f14d68 -r 8ec4fd5c3602 net/samba4/distinfo
--- a/net/samba4/distinfo       Fri Mar 01 18:53:29 2019 +0000
+++ b/net/samba4/distinfo       Fri Mar 01 20:03:24 2019 +0000
@@ -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_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 -r e9f572f14d68 -r 8ec4fd5c3602 net/samba4/patches/patch-source3_auth_token_util.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/samba4/patches/patch-source3_auth_token_util.c        Fri Mar 01 20:03:24 2019 +0000
@@ -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@localhost>
+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@localhost>
+Reviewed-by: Alexander Bokovoy <ab%samba.org@localhost>
+(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



Home | Main Index | Thread Index | Old Index