summaryrefslogtreecommitdiff
path: root/lib/ipmi_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ipmi_user.c')
-rw-r--r--lib/ipmi_user.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/lib/ipmi_user.c b/lib/ipmi_user.c
index cee7abb..97db5ee 100644
--- a/lib/ipmi_user.c
+++ b/lib/ipmi_user.c
@@ -388,60 +388,6 @@ ipmi_user_set_username(
return 0;
}
-/*
- * ipmi_user_set_password
- *
- * This function is responsible for 4 things
- * Enabling/Disabling users
- * Setting/Testing passwords
- */
-static int
-ipmi_user_set_password(struct ipmi_intf *intf, uint8_t user_id,
- uint8_t operation, const char *password,
- uint8_t is_twenty_byte_password)
-{
- struct ipmi_rs * rsp;
- struct ipmi_rq req;
- uint8_t msg_data[22];
-
- int password_length = (is_twenty_byte_password? 20 : 16);
-
- memset(&req, 0, sizeof(req));
- req.msg.netfn = IPMI_NETFN_APP; /* 0x06 */
- req.msg.cmd = IPMI_SET_USER_PASSWORD; /* 0x47 */
- req.msg.data = msg_data;
- req.msg.data_len = password_length + 2;
-
-
- /* The channel number will remain constant throughout this function */
- msg_data[0] = user_id;
-
- if (is_twenty_byte_password)
- msg_data[0] |= 0x80;
-
- msg_data[1] = operation;
-
- memset(msg_data + 2, 0, password_length);
-
- if (password != NULL)
- strncpy((char *)(msg_data + 2), password, password_length);
-
- rsp = intf->sendrecv(intf, &req);
-
- if (rsp == NULL) {
- lprintf(LOG_ERR, "Set User Password command failed (user %d)",
- user_id);
- return -1;
- }
- if (rsp->ccode > 0) {
- lprintf(LOG_ERR, "Set User Password command failed (user %d): %s",
- user_id, val2str(rsp->ccode, completion_code_vals));
- return rsp->ccode;
- }
-
- return 0;
-}
-
/* ipmi_user_test_password - Call _ipmi_set_user_password() with operation bit
* set to test password and interpret result.
*/