From d7a3f2405014db638baf54d9306d87c6cd1fbdea Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Oct 11 2007 20:25:58 +0000 Subject: * Thu Oct 11 2007 Simo Sorce 3.0.26a-4.fc8 - Fix idmap_rid module with compatible config syntax --- diff --git a/samba.spec b/samba.spec index 4ec12ef..f2ed46a 100644 --- a/samba.spec +++ b/samba.spec @@ -2,7 +2,7 @@ Summary: The Samba Suite of programs Name: samba Epoch: 0 Version: 3.0.26a -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ and LGPLv2+ Group: System Environment/Daemons URL: http://www.samba.org/ @@ -41,7 +41,7 @@ Patch107: samba-3.0.23rc3-passwd.patch Patch110: samba-3.0.21pre1-smbspool.patch Patch111: samba-3.0.13-smbclient.patch Patch200: samba-3.0.25rc1-inotifiy.patch - +Patch201: samba3_idmap_default_domain.patch Requires(pre): samba-common = %{epoch}:%{version}-%{release} Requires: pam >= 0:0.64 @@ -158,6 +158,7 @@ cp %{SOURCE11} packaging/Fedora/ %patch110 -p1 -b .smbspool %patch111 -p1 -b .smbclient %patch200 -p0 -b .inotify +%patch201 -p0 -b .idmap_def_dom mv source/VERSION source/VERSION.orig sed -e 's/SAMBA_VERSION_VENDOR_SUFFIX=$/&\"%{release}\"/' < source/VERSION.orig > source/VERSION @@ -644,6 +645,9 @@ exit 0 #%{_includedir}/libmsrpc.h %changelog +* Thu Oct 11 2007 Simo Sorce 3.0.26a-4.fc8 +- Fix idmap_rid module with compatible config syntax + * Sat Oct 6 2007 Simo Sorce 3.0.26a-3.fc8 - Fix bug 245506 diff --git a/samba3_idmap_default_domain.patch b/samba3_idmap_default_domain.patch new file mode 100644 index 0000000..a5505a8 --- /dev/null +++ b/samba3_idmap_default_domain.patch @@ -0,0 +1,65 @@ +Index: source/nsswitch/idmap.c +=================================================================== +--- source/nsswitch/idmap.c (revision 25609) ++++ source/nsswitch/idmap.c (working copy) +@@ -252,12 +252,6 @@ + return NT_STATUS_OK; + } + +-/********************************************************************** +- Initialise idmap cache and a remote backend (if configured). +-**********************************************************************/ +- +-static const char *idmap_default_domain[] = { "default domain", NULL }; +- + /**************************************************************************** + ****************************************************************************/ + +@@ -292,6 +286,7 @@ + char *compat_backend = NULL; + char *compat_params = NULL; + const char **dom_list = NULL; ++ const char *default_domain = NULL; + char *alloc_backend = NULL; + BOOL default_already_defined = False; + BOOL pri_dom_is_in_list = False; +@@ -356,7 +351,25 @@ + } + + if ( ! dom_list) { +- dom_list = idmap_default_domain; ++ /* generate a list with our main domain */ ++ char ** dl; ++ ++ dl = talloc_array(idmap_ctx, char *, 2); ++ if (dl == NULL) { ++ ret = NT_STATUS_NO_MEMORY; ++ goto done; ++ } ++ dl[0] = talloc_strdup(dl, lp_workgroup()); ++ if (dl[0] == NULL) { ++ ret = NT_STATUS_NO_MEMORY; ++ goto done; ++ } ++ ++ /* terminate */ ++ dl[1] = NULL; ++ ++ dom_list = dl; ++ default_domain = dl[0]; + } + + /*************************** +@@ -398,10 +411,10 @@ + "default", False); + + if (dom->default_domain || +- strequal(dom_list[i], idmap_default_domain[0])) { ++ (default_domain && strequal(dom_list[i], default_domain))) { + + /* make sure this is set even when we match +- * idmap_default_domain[0] */ ++ * default_domain */ + dom->default_domain = True; + + if (default_already_defined) {