clear password if authtype NONE specified on command line

This commit is contained in:
Duncan Laurie 2006-05-01 22:33:21 +00:00
parent 9132b30b6c
commit b800400c41

View File

@ -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;
}