mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 04:30:28 +00:00
When we reset the password via an external command, we should also reset the
password stored in the in-memory list, too (otherwise it doesn't really take effect). (closes issue #11809) Reported by: davetroy Patches: fix_externpass.diff uploaded by davetroy (license 384) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@99777 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -856,8 +856,11 @@ static void vm_change_password_shell(struct ast_vm_user *vmu, char *newpassword)
|
|||||||
{
|
{
|
||||||
char buf[255];
|
char buf[255];
|
||||||
snprintf(buf,255,"%s %s %s %s",ext_pass_cmd,vmu->context,vmu->mailbox,newpassword);
|
snprintf(buf,255,"%s %s %s %s",ext_pass_cmd,vmu->context,vmu->mailbox,newpassword);
|
||||||
if (!ast_safe_system(buf))
|
if (!ast_safe_system(buf)) {
|
||||||
ast_copy_string(vmu->password, newpassword, sizeof(vmu->password));
|
ast_copy_string(vmu->password, newpassword, sizeof(vmu->password));
|
||||||
|
/* Reset the password in memory, too */
|
||||||
|
reset_user_pw(vmu->context, vmu->mailbox, newpassword);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int make_dir(char *dest, int len, const char *context, const char *ext, const char *folder)
|
static int make_dir(char *dest, int len, const char *context, const char *ext, const char *folder)
|
||||||
|
Reference in New Issue
Block a user