svn commit: samba r2827 - in trunk/source/utils: .

jelmer at samba.org jelmer at samba.org
Tue Oct 5 22:19:10 GMT 2004


Author: jelmer
Date: 2004-10-05 22:19:09 +0000 (Tue, 05 Oct 2004)
New Revision: 2827

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/trunk/source/utils&rev=2827&nolog=1

Log:
Complain if 'password chat' doesn't contain '%u'. Based on a patch by Ronan Waide

Modified:
   trunk/source/utils/testparm.c


Changeset:
Modified: trunk/source/utils/testparm.c
===================================================================
--- trunk/source/utils/testparm.c	2004-10-05 22:18:32 UTC (rev 2826)
+++ trunk/source/utils/testparm.c	2004-10-05 22:19:09 UTC (rev 2827)
@@ -132,8 +132,9 @@
 cannot be executed (error was %s).\n", truncated_prog, strerror(errno) );
 					ret = 1;
 				}
-			}
 
+             }
+
 #ifdef WITH_PAM
 		}
 #endif
@@ -142,6 +143,11 @@
 			fprintf(stderr, "ERROR: the 'unix password sync' parameter is set and there is no valid 'passwd chat' \
 parameter.\n");
 			ret = 1;
+		} else 
+		/* check if there's a %u parameter present */
+		if(strstr_m(lp_passwd_chat(), "%u") == NULL) {
+			fprintf(stderr, "ERROR: the 'passwd program' (%s) requires a '%%u' parameter.\n", lp_passwd_program());
+			ret = 1;
 		}
 
 		/*
@@ -365,3 +371,4 @@
 	}
 	return(ret);
 }
+



More information about the samba-cvs mailing list