diff options
author | Zdenek Styblik <stybla@turnovfree.net> | 2015-10-09 20:53:24 +0200 |
---|---|---|
committer | Zdenek Styblik <stybla@turnovfree.net> | 2015-10-09 20:53:24 +0200 |
commit | ffeb535db80b954ee2ae74671d1355c9ee15c596 (patch) | |
tree | aea81afc7170320a77b8957aba33ddbebdf86a89 /lib/ipmi_channel.c | |
parent | 4a8691f47765f984416388be4565eccadbe37b57 (diff) | |
download | ipmitool-ffeb535db80b954ee2ae74671d1355c9ee15c596.tar.gz |
ID:392 - _ipmi_get_user_name() work-around for some BMCs
Commit adds a work-around for some BMCs which return ccode 0xCC when user is
disabled. However, this isn't reason to stop listing users as this ccode is
perceived as being "normal".
When 0xCC is returned, empty user name will be printed instead of bailing out.
Diffstat (limited to 'lib/ipmi_channel.c')
-rw-r--r-- | lib/ipmi_channel.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ipmi_channel.c b/lib/ipmi_channel.c index 5921e21..95017b8 100644 --- a/lib/ipmi_channel.c +++ b/lib/ipmi_channel.c @@ -707,7 +707,10 @@ ipmi_get_user_access(struct ipmi_intf *intf, uint8_t channel, uint8_t user_id) memset(&user_name, 0, sizeof(user_name)); user_name.user_id = curr_uid; ccode = _ipmi_get_user_name(intf, &user_name); - if (eval_ccode(ccode) != 0) { + if (ccode == 0xCC) { + user_name.user_id = curr_uid; + memset(&user_name.user_name, '\0', 17); + } else if (eval_ccode(ccode) != 0) { lprintf(LOG_ERR, "Unable to Get User Name (id %d)", curr_uid); return (-1); } |