mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
testparm: only check for %u und passwd program when passwd program is given.
Michael
(This used to be commit af12b24c4f
)
This commit is contained in:
parent
7ec398b188
commit
37e04236bb
@ -140,11 +140,16 @@ 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_program(), "%u") == NULL) {
|
||||
fprintf(stderr, "ERROR: the 'passwd program' (%s) requires a '%%u' parameter.\n", lp_passwd_program());
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
if ((lp_passwd_program() != NULL) &&
|
||||
(strlen(lp_passwd_program()) > 0))
|
||||
{
|
||||
/* check if there's a %u parameter present */
|
||||
if(strstr_m(lp_passwd_program(), "%u") == NULL) {
|
||||
fprintf(stderr, "ERROR: the 'passwd program' (%s) requires a '%%u' parameter.\n", lp_passwd_program());
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user