Author: jelmer Date: 2004-10-05 22:18:32 +0000 (Tue, 05 Oct 2004) New Revision: 2826
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_3_0/source/utils&rev=2826&nolog=1 Log: Complain if 'password chat' doesn't contain the %u variable. based on a patch by Ronan Waide Modified: branches/SAMBA_3_0/source/utils/testparm.c Changeset: Modified: branches/SAMBA_3_0/source/utils/testparm.c =================================================================== --- branches/SAMBA_3_0/source/utils/testparm.c 2004-10-05 11:10:26 UTC (rev 2825) +++ branches/SAMBA_3_0/source/utils/testparm.c 2004-10-05 22:18:32 UTC (rev 2826) @@ -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); } +