mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
clear password if authtype NONE specified on command line
This commit is contained in:
parent
9132b30b6c
commit
b800400c41
@ -260,6 +260,12 @@ ipmi_intf_session_set_authtype(struct ipmi_intf * intf, uint8_t authtype)
|
||||
if (intf->session == NULL)
|
||||
return;
|
||||
|
||||
/* clear password field if authtype NONE specified */
|
||||
if (authtype == IPMI_SESSION_AUTHTYPE_NONE) {
|
||||
memset(intf->session->authcode, 0, IPMI_AUTHCODE_BUFFER_SIZE);
|
||||
intf->session->password = 0;
|
||||
}
|
||||
|
||||
intf->session->authtype_set = authtype;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user