diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2004-10-05 22:18:32 +0000 | 
|---|---|---|
| committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:52:54 -0500 | 
| commit | 1cc0c7414aedaa933b0552aa15ee2e2a74664026 (patch) | |
| tree | 551a1a1e8db228b53ae193d50f0c80017f7cf307 | |
| parent | d9b8eaabc5e1d549aa56ed45f2e410ad766075be (diff) | |
| download | samba-1cc0c7414aedaa933b0552aa15ee2e2a74664026.tar.gz samba-1cc0c7414aedaa933b0552aa15ee2e2a74664026.tar.bz2 samba-1cc0c7414aedaa933b0552aa15ee2e2a74664026.zip  | |
r2826: Complain if 'password chat' doesn't contain the %u variable. based on a patch by Ronan Waide
(This used to be commit a48b3b291cfe5883da1a36b368ddf725b5ff9375)
| -rw-r--r-- | source3/utils/testparm.c | 9 | 
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index 9db6d538d2..d4dc22ec91 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -132,7 +132,8 @@ parameter.\n" );  cannot be executed (error was %s).\n", truncated_prog, strerror(errno) );  					ret = 1;  				} -			} + +             }  #ifdef WITH_PAM  		} @@ -142,6 +143,11 @@ cannot be executed (error was %s).\n", truncated_prog, strerror(errno) );  			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 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_  	}  	return(ret);  } +  | 
