mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
s3:rpc_server: Use BURN_STR() to zero password
This ensures these calls are not optimised away. Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 1258746ba85b8702628f95a19aba9afea96eab8b)
This commit is contained in:
parent
3d7a2a3603
commit
0044f598dd
@ -1358,7 +1358,7 @@ NTSTATUS pass_oem_change(char *user, const char *rhost,
|
||||
True, reject_reason);
|
||||
unbecome_root();
|
||||
|
||||
memset(new_passwd, 0, strlen(new_passwd));
|
||||
BURN_STR(new_passwd);
|
||||
|
||||
done:
|
||||
TALLOC_FREE(sampass);
|
||||
|
@ -4946,9 +4946,7 @@ static NTSTATUS set_user_info_23(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
}
|
||||
|
||||
if (plaintext_buf) {
|
||||
memset(plaintext_buf, '\0', strlen(plaintext_buf));
|
||||
}
|
||||
BURN_STR(plaintext_buf);
|
||||
|
||||
if (IS_SAM_CHANGED(pwd, PDB_GROUPSID) &&
|
||||
(!NT_STATUS_IS_OK(status = pdb_set_unix_primary_group(mem_ctx,
|
||||
@ -5018,7 +5016,7 @@ static bool set_user_info_pw(uint8_t *pass, const char *rhost, struct samu *pwd)
|
||||
}
|
||||
}
|
||||
|
||||
memset(plaintext_buf, '\0', strlen(plaintext_buf));
|
||||
BURN_STR(plaintext_buf);
|
||||
|
||||
DEBUG(5,("set_user_info_pw: pdb_update_pwd()\n"));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user