rpms/samba/F-7 samba3_idmap_default_domain.patch, NONE, 1.1 samba.spec, 1.134, 1.135

Simo Sorce (simo) fedora-extras-commits at redhat.com
Thu Oct 11 19:53:34 UTC 2007


Author: simo

Update of /cvs/pkgs/rpms/samba/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17530

Modified Files:
	samba.spec 
Added Files:
	samba3_idmap_default_domain.patch 
Log Message:
* Sat Oct 10 2007 Simo Sorce <ssorce at redhat.com> 3.0.26a-4.fc7
- Fix idmap_rid module with compatible config syntax


samba3_idmap_default_domain.patch:

--- NEW FILE samba3_idmap_default_domain.patch ---
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) {


Index: samba.spec
===================================================================
RCS file: /cvs/pkgs/rpms/samba/F-7/samba.spec,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -r1.134 -r1.135
--- samba.spec	8 Oct 2007 13:50:47 -0000	1.134
+++ samba.spec	11 Oct 2007 19:53:01 -0000	1.135
@@ -2,7 +2,7 @@
 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,6 +41,7 @@
 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
@@ -157,6 +158,7 @@
 %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
@@ -642,6 +644,9 @@
 #%{_includedir}/libmsrpc.h
 
 %changelog
+* Sat Oct 10 2007 Simo Sorce <ssorce at redhat.com> 3.0.26a-4.fc7
+- Fix idmap_rid module with compatible config syntax
+
 * Sat Oct 6 2007 Simo Sorce <ssorce at redhat.com> 3.0.26a-3.fc7
 - Fix bug 245506 
 




More information about the fedora-extras-commits mailing list