[Pkg-samba-maint] r3539 - in trunk/samba/debian: . patches

bubulle at alioth.debian.org bubulle at alioth.debian.org
Wed Jul 14 17:31:09 UTC 2010


tags 586337 pending
thanks

Author: bubulle
Date: 2010-07-14 17:31:07 +0000 (Wed, 14 Jul 2010)
New Revision: 3539

Added:
   trunk/samba/debian/patches/bug_586337_upstream_7139.patch
Modified:
   trunk/samba/debian/changelog
   trunk/samba/debian/patches/series
Log:
Backport patch for upstream bug #7139 to fix "owner of file not
available with kerberos"
Closes: #586337   

Modified: trunk/samba/debian/changelog
===================================================================
--- trunk/samba/debian/changelog	2010-07-11 07:19:59 UTC (rev 3538)
+++ trunk/samba/debian/changelog	2010-07-14 17:31:07 UTC (rev 3539)
@@ -14,7 +14,10 @@
   * Don't copy system accounts from /etc/passwd to
     /var/lib/samba/passdb.tdb. Closes: #502801
   * Update Standards to 3.9.0 (checked, no change)
-   
+  * Backport patch for upstream bug #7139 to fix "owner of file not
+    available with kerberos"
+    Closes: #586337   
+
  -- Steve Langasek <vorlon at debian.org>  Sat, 15 May 2010 13:23:30 -0700
 
 samba (2:3.4.8~dfsg-1) unstable; urgency=low

Added: trunk/samba/debian/patches/bug_586337_upstream_7139.patch
===================================================================
--- trunk/samba/debian/patches/bug_586337_upstream_7139.patch	                        (rev 0)
+++ trunk/samba/debian/patches/bug_586337_upstream_7139.patch	2010-07-14 17:31:07 UTC (rev 3539)
@@ -0,0 +1,57 @@
+Goal: To provide the user with the same SID when doing Kerberos logins,
+      attempt to do a make_server_info_sam instead of a make_server_info_pw.
+
+
+Fixes: #586337
+
+Status wrt upstream: Fixed in 3.5.0
+
+Author: Volker Lendecke <vl at samba.org>
+
+Index: samba/source3/smbd/sesssetup.c
+===================================================================
+--- samba.orig/source3/smbd/sesssetup.c
++++ samba/source3/smbd/sesssetup.c
+@@ -495,10 +495,40 @@
+ 		}
+ 
+ 	} else {
+-		ret = make_server_info_pw(&server_info, real_username, pw);
++		/*
++		 * We didn't get a PAC, we have to make up the user
++		 * ourselves. Try to ask the pdb backend to provide
++		 * SID consistency with ntlmssp session setup
++		 */
++		struct samu *sampass;
++
++		sampass = samu_new(talloc_tos());
++		if (sampass == NULL) {
++			ret = NT_STATUS_NO_MEMORY;
++			data_blob_free(&ap_rep);
++			data_blob_free(&session_key);
++			TALLOC_FREE(mem_ctx);
++			reply_nterror(req, nt_status_squash(ret));
++			return;
++		}
++
++		if (pdb_getsampwnam(sampass, real_username)) {
++			DEBUG(10, ("found user %s in passdb, calling "
++				   "make_server_info_sam\n", real_username));
++			ret = make_server_info_sam(&server_info, sampass);
++		} else {
++			/*
++			 * User not in passdb, make it up artificially
++			 */
++			TALLOC_FREE(sampass);
++			DEBUG(10, ("didn't find user %s in passdb, calling "
++				   "make_server_info_pw\n", real_username));
++			ret = make_server_info_pw(&server_info, real_username,
++						  pw);
++		}
+ 
+ 		if ( !NT_STATUS_IS_OK(ret) ) {
+-			DEBUG(1,("make_server_info_pw failed: %s!\n",
++			DEBUG(1,("make_server_info_[sam|pw] failed: %s!\n",
+ 				 nt_errstr(ret)));
+ 			data_blob_free(&ap_rep);
+ 			data_blob_free(&session_key);

Modified: trunk/samba/debian/patches/series
===================================================================
--- trunk/samba/debian/patches/series	2010-07-11 07:19:59 UTC (rev 3538)
+++ trunk/samba/debian/patches/series	2010-07-14 17:31:07 UTC (rev 3539)
@@ -13,3 +13,4 @@
 codepages-location.patch
 external-talloc-support.patch
 autoconf.patch
+bug_586337_upstream_7139.patch





More information about the Pkg-samba-maint mailing list