Performing prefix or postfix increments, eg. ++var or var++, in the
arguments to printf is inherently non-portable and may give different
results on different platforms.
Commit mends this issue.
Commit for Dan Gora
Commit adds the hex value for the sensor type to displays so that the user
can correlate sensor type values with their hex values without having to
look them up in the IPMI spec.
Commit for Dan Gora
Previous versions had two values for "Watchdog" in the list which
means that users could not perform # ipmitool sdr type "Watchdog";
and get the IPMI v1.0 and later version of the watchdog sensor,
eg. 0x23 instead of 0x11.
Commit for Dan Gora
Commit removes -Wno-packed-bitfield-compat from 'configure.in'. This was hiding
an important bug in ipmi_fru.h and is not a valid flag for older versions of
gcc.
Commit for Dan Gora
This code was moved to ipmi_main.c from open.c and in the change a bug
was introduced where the PICMG Get Device Locator command would not
be run unless the user explicitly set my_addr to 0 with the -m command.
The more sensible thing to do is to run this unless the user explictly
overrides it with the -m option.
Commit for Dan Gora
The previous test to see if we need pragma pack(1) was failing if we
cross compile because there was no way to run the test.
We now use AC_TRY_COMPILE and add the pragma pack(1) to the test code.
If it compiles, it must be good, so add the define.
Commit for Dan Gora
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
Commit fixes incorrect evaluation of str2uchar() return value in
ipmi_sdr_print_type(). Prior to this fix, practically no user input was accepted
as a valid one in # ipmitool sdr type HEX_SENSOR_TYPE ;
This bug was introduced by ID#3528368 - 'lib/ipmi_sdr.c' - possible int *flow
Commit fixes problem in 'lib/ipmi_delloem.c'. Command % ipmitool delloem mac;
returns wrong MAC when flex addressing is enabled on the blade chassis.
Commit for Krishnaprasad K
The Information given by the command SEL was incorrect in "Get SEL Allocation"
command. According to the specification "byte 10" in response denotes the
"Maximum record size in allocation units". This information is given as "Max
Record Size : " in sel command. However, ipmitool was getting "byte 9" instead
of "byte 10".
Commit for Gokulakannan
The event data and SDRs support assertions and deassertions for threshold events
as well as discrete events. So print out assertion and deassertion on all
events.
Commit for Corey Minyard
Commit is a response(and fix) to double-free bug in 'lib/ipmi_main.c' via
username. Now, pointers should be set to NULL after calling free().
Reported-by: Ales Ledvinka
Commit changes code formatting in 'lib/ipmi_delloem.c' to be more consistent
with the rest of ipmitool's code. No functional changes are intended.
Clean up isn't perfect, but it's one of steps in long term effort.
Commit removes 'size' check from ipmi_fru_get_multirec_from_file() as
an unsigned value can't be less than zero(0).
This error has been introduced by ID#3600911.
Reported-by: Ales Ledvinka
Commit fixes possible NULL reference in 'lib/ipmi_lanp.c' which is caused by not
checking return value of get_lan_param(), resp. get_lan_param_select(). This
function can return NULL in certain situations.
I'm reverting previous commit. I'm not sure what happened, but there is a huge
difference between what got committed, what came as a diff in e-mail and what
should have been committed in the first place.
Commit replaces condition ``if (p == NULL)'' in get_lan_param_select(). This
condition is never met, because structure is on heap.
Condition is replaced by for() control structure which goes through structure
ipmi_lan_params and checks whether requested LAN parameter is defined in
structure or not.
Reported-by: Ales Ledvinka
Commit fixes possible integer *flows in 'lib/ipmi_delloem.c'. Function
make_int() is removed and replaced with calls to appropriate str2*() function
calls from 'lib/helper.c'.
Reported-by: Duncan Idaho
Commit changes handling of response in ipmi_event_fromsensor(). If ccode doesn't
equal to 0, then error message is printed and function returns.
Reported-by: Duncan Idaho
Commit is a rewrite of function ipmi_fru_get_multirec_from_file() in
'lib/ipmi_fru.c'.
Changes:
* argument size is checked; size must be greater than 0
* argument pFileName is checked
* return value of seek() is checked
* error messages are printed on STDERR
* code flow got a re-work
Commit moves one #ifdef upwards in the code, so resources are not wasted
pointlessly. There is no need to allocate memory for variables/structs and open
interface, if we're about to quit immediately because LAN+ support is not
enabled.
Error message got changed as well and it gets printed on STDERR where it
belongs!
Commit changes return value of ipmi_fru_get_adjust_size_from_buffer() from void
to int in order to determine whether call was successful or wasn't.
ipmi_fru_upg_ekeying() got re-work as well.
Changes to ipmi_fru_get_adjust_size_from_buffer():
* CHUNK_SIZE removed
* code formatting
* return value void -> int
Changes to ipmi_fru_upg_ekeying():
* check whether pFilename is NULL
* check return values of called functions
* re-work code - return early on error instead of nested if()
* added (error) messages
Commit fixes memory leanks in functions ipmi_fru_set_field_string() and
ipmi_fru_set_field_string_rebuild() in 'lib/ipmi_fru.c'.
Note: it seems to me like these for() cycles do nothing.
Reported-by: Ales Ledvinka
Commit changes function ipmi_lcd_get_platform_model_name() to return integer
instead of void to signal potentional problems/issues.
Reported-by: Ales Ledvinka
Commit changes are related to ipmi_ldc_set_lock() in 'lib/ipmi_delloem.c':
* use 'else if' instead of 'if' since it's the same given the context and
probably better
* use 'rc' variable, since it's there, rather than 'return'
Note: ipmi_lcd_set_lock() would use some re-write.
Reported-by: Ales Ledvinka
Commit changes evaluation order of 'oemtype' which is an input parameter to
ipmi_oem_setup() in 'lib/ipmi_oem.c'. Make the check whether 'oemtype' is NULL
or not one of the first things we do rather than blindly use 'oemtype' in
strncmp() and then check if it isn't NULL. Yes, this is a potential crash
waiting to happen.
Reported-by: Ales Ledvinka
Commit fixes NULL dereference in 'lib/ipmi_sdr.c' by checking whether Sensor is
type of 'full' or 'compact'.
Fix by: Jim Mank
Reported by: Ales Ledvinka