mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
add cleanup function to clear sdr cache,
zero password field when setting
This commit is contained in:
parent
2e1f1ef750
commit
1a34cc960e
@ -150,6 +150,7 @@ void ipmi_intf_session_set_password(struct ipmi_intf * intf, char * password)
|
||||
intf->session->password = 0;
|
||||
if (password) {
|
||||
intf->session->password = 1;
|
||||
memset(intf->session->authcode, 0, IPMI_AUTHCODE_BUFFER_SIZE);
|
||||
memcpy(intf->session->authcode,
|
||||
password,
|
||||
min(strlen(password), IPMI_AUTHCODE_BUFFER_SIZE));
|
||||
@ -174,3 +175,8 @@ void ipmi_intf_session_set_authtype(struct ipmi_intf * intf, unsigned char autht
|
||||
if (intf && intf->session)
|
||||
intf->session->authtype_set = authtype;
|
||||
}
|
||||
|
||||
void ipmi_cleanup(struct ipmi_intf * intf)
|
||||
{
|
||||
ipmi_sdr_list_empty(intf);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user