mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
smbdotconf: mark "passwd program" with substitution="1"
Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
4551dd2784
commit
1743ff48ba
docs-xml/smbdotconf/security
source3
@ -1,6 +1,7 @@
|
||||
<samba:parameter name="passwd program"
|
||||
context="G"
|
||||
type="string"
|
||||
substitution="1"
|
||||
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
|
||||
<description>
|
||||
<para>The name of a program that can be used to set
|
||||
|
@ -594,7 +594,7 @@ bool chgpasswd(const char *name, const char *rhost, const struct passwd *pass,
|
||||
return false;
|
||||
}
|
||||
|
||||
passwordprogram = lp_passwd_program(ctx);
|
||||
passwordprogram = lp_passwd_program(ctx, lp_sub);
|
||||
if (!passwordprogram || !*passwordprogram) {
|
||||
DEBUG(2, ("chgpasswd: Null password program - no password changing\n"));
|
||||
return false;
|
||||
|
@ -375,8 +375,8 @@ static int do_global_checks(void)
|
||||
if (!lp_pam_password_change()) {
|
||||
#endif
|
||||
|
||||
if((lp_passwd_program(talloc_tos()) == NULL) ||
|
||||
(strlen(lp_passwd_program(talloc_tos())) == 0))
|
||||
if((lp_passwd_program(talloc_tos(), lp_sub) == NULL) ||
|
||||
(strlen(lp_passwd_program(talloc_tos(), lp_sub)) == 0))
|
||||
{
|
||||
fprintf(stderr,
|
||||
"ERROR: the 'unix password sync' "
|
||||
@ -388,7 +388,7 @@ static int do_global_checks(void)
|
||||
char *truncated_prog = NULL;
|
||||
const char *p;
|
||||
|
||||
passwd_prog = lp_passwd_program(talloc_tos());
|
||||
passwd_prog = lp_passwd_program(talloc_tos(), lp_sub);
|
||||
p = passwd_prog;
|
||||
next_token_talloc(talloc_tos(),
|
||||
&p,
|
||||
@ -417,15 +417,15 @@ static int do_global_checks(void)
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
if ((lp_passwd_program(talloc_tos()) != NULL) &&
|
||||
(strlen(lp_passwd_program(talloc_tos())) > 0))
|
||||
if ((lp_passwd_program(talloc_tos(), lp_sub) != NULL) &&
|
||||
(strlen(lp_passwd_program(talloc_tos(), lp_sub)) > 0))
|
||||
{
|
||||
/* check if there's a %u parameter present */
|
||||
if(strstr_m(lp_passwd_program(talloc_tos()), "%u") == NULL) {
|
||||
if(strstr_m(lp_passwd_program(talloc_tos(), lp_sub), "%u") == NULL) {
|
||||
fprintf(stderr,
|
||||
"ERROR: the 'passwd program' (%s) "
|
||||
"requires a '%%u' parameter.\n\n",
|
||||
lp_passwd_program(talloc_tos()));
|
||||
lp_passwd_program(talloc_tos(), lp_sub));
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user