From eb63058bc3d8a3d31060423e47f6be6db422627d Mon Sep 17 00:00:00 2001 From: Zdenek Styblik Date: Mon, 8 Apr 2013 17:21:38 +0000 Subject: [PATCH] ID: 2871903 - ipmitool user priv incorrectly sets Link Auth Commit fixes issue in 'user priv' sub-command which turns off LinkAuth whenever user's privilege is changed. This was caused by not setting apropriate bits. However, fix leverages Set User Access Command(IPMI spec. v2 PDF, p.320) and sets 7th bit of 1st byte to 0. This tells BMC not to change IPMI messaging, LinkAuth and Callback for given user. As a consequence, ipmitool no longer turns 'IPMI messaging' on by default when user's privilege is being set. IPMI messaging can be turned on/off via 'channel setaccess' sub-command. Reported-by: Kipp Glover --- ipmitool/lib/ipmi_user.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ipmitool/lib/ipmi_user.c b/ipmitool/lib/ipmi_user.c index d7ab00b..6cad887 100644 --- a/ipmitool/lib/ipmi_user.c +++ b/ipmitool/lib/ipmi_user.c @@ -377,7 +377,7 @@ ipmi_user_set_userpriv( { struct ipmi_rs *rsp; struct ipmi_rq req; - uint8_t msg_data[4]; + uint8_t msg_data[4] = {0, 0, 0, 0}; memset(&req, 0, sizeof(req)); req.msg.netfn = IPMI_NETFN_APP; /* 0x06 */ @@ -387,7 +387,6 @@ ipmi_user_set_userpriv( /* The channel number will remain constant throughout this function */ msg_data[0] = (channel & 0x0f); - msg_data[0] |= 0x90; /* enable ipmi messaging */ msg_data[1] = (user_id & 0x3f); msg_data[2] = (privLevel & 0x0f); msg_data[3] = 0;