<samba:parameter name="passwd chat"
context="G"
type="string"
+ substitution="1"
xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
<description>
<para>This string controls the <emphasis>"chat"</emphasis>
struct smb_pam_userdata *udp = (struct smb_pam_userdata *)appdata_ptr;
struct chat_struct *pw_chat;
struct chat_struct *t;
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
bool found;
*resp = NULL;
if (num_msg <= 0)
return PAM_CONV_ERR;
- if ((pw_chat = make_pw_chat(lp_passwd_chat(talloc_tos()))) == NULL)
+ if ((pw_chat = make_pw_chat(lp_passwd_chat(talloc_tos(), lp_sub))) == NULL)
return PAM_CONV_ERR;
/*
bool chgpasswd(const char *name, const char *rhost, const struct passwd *pass,
const char *oldpass, const char *newpass, bool as_root)
{
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
char *passwordprogram = NULL;
char *chatsequence = NULL;
size_t i;
DEBUG(2, ("chgpasswd: Null password program - no password changing\n"));
return false;
}
- chatsequence = lp_passwd_chat(ctx);
+ chatsequence = lp_passwd_chat(ctx, lp_sub);
if (!chatsequence || !*chatsequence) {
DEBUG(2, ("chgpasswd: Null chat sequence - no password changing\n"));
return false;
int ret = 0;
SMB_STRUCT_STAT st;
const char *socket_options;
+ const struct loadparm_substitution *lp_sub =
+ loadparm_s3_global_substitution();
if (lp_security() >= SEC_DOMAIN && !lp_encrypt_passwords()) {
fprintf(stderr, "ERROR: in 'security=domain' mode the "
}
#endif
- if(lp_passwd_chat(talloc_tos()) == NULL) {
+ if(lp_passwd_chat(talloc_tos(), lp_sub) == NULL) {
fprintf(stderr,
"ERROR: the 'unix password sync' parameter is "
"set and there is no valid 'passwd chat' "
*/
if(lp_encrypt_passwords()) {
- if(strstr_m( lp_passwd_chat(talloc_tos()), "%o")!=NULL) {
+ if(strstr_m( lp_passwd_chat(talloc_tos(), lp_sub), "%o")!=NULL) {
fprintf(stderr,
"ERROR: the 'passwd chat' script [%s] "
"expects to use the old plaintext "
"password via the %%o substitution. With "
"encrypted passwords this is not "
"possible.\n\n",
- lp_passwd_chat(talloc_tos()) );
+ lp_passwd_chat(talloc_tos(), lp_sub) );
ret = 1;
}
}