svn commit: samba r21613 - in branches/SAMBA_3_0/source/nsswitch: .

jerry at samba.org jerry at samba.org
Thu Mar 1 03:12:17 GMT 2007


Author: jerry
Date: 2007-03-01 03:12:16 +0000 (Thu, 01 Mar 2007)
New Revision: 21613

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21613

Log:
perform variable subsitution on home directories and shells provided by the nss_info backend
Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_user.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_user.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_user.c	2007-03-01 03:10:29 UTC (rev 21612)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_user.c	2007-03-01 03:12:16 UTC (rev 21613)
@@ -41,20 +41,21 @@
 	if (out == NULL)
 		return False;
 
+	/* The substitution of %U and %D in the 'template 
+	   homedir' is done by talloc_sub_specified() below.
+	   If we have an in string (which means the value has already
+	   been set in the nss_info backend), then use that.
+	   Otherwise use the template value passed in. */
+
 	if ( in && !strequal(in,"") && lp_security() == SEC_ADS ) {
-		safe_strcpy(out, in, sizeof(fstring) - 1);
-		return True;
+		templ = talloc_sub_specified(NULL, in, 
+					     username, domname,
+				     uid, gid);
+	} else {
+		templ = talloc_sub_specified(NULL, lp_template, 
+					     username, domname,
+					     uid, gid);		
 	}
-
-	/* Home directory and shell - use template config parameters.  The
-	   defaults are /tmp for the home directory and /bin/false for
-	   shell. */
-	
-	/* The substitution of %U and %D in the 'template homedir' is done
-	   by talloc_sub_specified() below. */
-
-	templ = talloc_sub_specified(NULL, lp_template, username, domname,
-				     uid, gid);
 		
 	if (!templ)
 		return False;



More information about the samba-cvs mailing list