Dear list,
I may have discovered a bug in ipmi_sim. I’m not sure about this (because I
don’t know enough about IPMI), so here comes the 'bug report' via email
instead of via sourceforge.
We’re using ipmi_sim via the VM interface with ipmitool from inside a QEMU.
Observed behaviour:
$ sudo ipmitool user disable 17
disables user 1 instead of user 17
Expected behaviour:
$ sudo ipmitool user disable 17
should either disable user 17 or complain that no such user exists
Steps to reproduce:
This also works with the lanplus interface, so here’s the simple way to test
it:
1. Start ipmi_sim with the lan.conf and the ipmisim1.emu and fresh state
2. $ ipmitool -I lanplus -H localhost -p 9001 -U ipmiusr -P test \
user disable 17
3. Observe how IPMI Msg of user 1 changes in a subsequent
$ ipmitool -I lanplus -H localhost -p 9001 -U ipmiusr -P test \
user list
I think the cause for this is in lanserv/bmc_app.c, line 807:
user = msg->data[0] & 0x3f;
if (user == 0) {
rdata[0] = IPMI_INVALID_DATA_FIELD_CC;
*rdata_len = 1;
return;
}
The user is here taken & 0x3f, which is effectively a % 16. However, MAX_USERS
is set to 63 by default. One of the two needs changing. Considering that the
0x3f constant is used elsewhere, it may be worth setting MAX_USERS to 15 by
default, since that is more realistic for BMCs anyways (as far as I know). (I
also don’t know whether IPMI even allows user IDs > 15, i.e. if changing that
mask would break anything.)
kind regards,
Jonas Wielicki
--
Werkstudent
CLOUD&HEAT
Firmen- und Rechnungsanschrift:
CLOUD & HEAT Technologies GmbH
Zeitenströmung
Königsbrücker Str. 96 - Halle 15
01099 Dresden, Germany
Lieferanschrift Produktion:
CLOUD & HEAT Technologies GmbH
Zeitenströmung
Königsbrücker Str. 96 - Halle 16A
01099 Dresden, Germany
Tel: +49 351 479 3670-100
Fax: +49 351 479 3670-110
E-Mail: [email protected]
Web: https://www.cloudandheat.com
Besuchen Sie uns:
Facebook <https://www.facebook.com/CloudandHeat>
Google+ <https://plus.google.com/+Cloudandheat>
LinkedIn <https://www.linkedin.com/company/cloud-&-heat-technologies-gmbh>
Twitter <https://twitter.com/CLOUDandHEAT>
Xing <https://www.xing.com/companies/cloud%2526heattechnologiesgmbh>
Youtube <https://www.youtube.com/cloudandheat>
Handelsregister: Amtsgericht Dresden
Registernummer: HRB 30549
USt.-Ident.-Nr.: DE281093504
Geschäftsführer: Nicolas Röhrs
Gemeinsam mit uns nachhaltig sein!
Nicht jede E-Mail muss gedruckt werden.
Hinweis: Diese E-Mail und / oder die Anhänge ist / sind vertraulich und
ausschließlich für den bezeichneten Adressaten bestimmt. Die Weitergabe
oder Kopieren dieser E-Mail ist strengstens verboten. Wenn Sie diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte unverzüglich den
Absender und vernichten Sie die Nachricht und alle Anhänge. Vielen Dank.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer