57 Commits

Author SHA1 Message Date
Zdenek Styblik
0a1f5c03e5 Replace deprecated bzero() with memset()
Commit replaces deprecated bzero() with memset().
2014-12-23 05:46:28 +01:00
Zdenek Styblik
140add9d77 Fix user input validation in Channel and User sub-commands
Commit fixes validation of user input in Channel and User sub-commands.
2014-12-22 18:21:51 +01:00
Zdenek Styblik
0562c809af Cleanup if/else in ipmi_channel_main() 2014-12-22 08:49:58 +01:00
Zdenek Styblik
a87b2ccc67 Cleanup of code formatting in ipmi_channel.c
At least a bit.
2014-12-22 07:57:18 +01:00
Zdenek Styblik
ad77da2065 ID:349 - user set password - add option to choose 16/20 byte password
Commit adds option to 'user set password' to choose whether password should be
stored as 16 byte or 20 byte. From now on, it's possible to store even 5 bytes
long password as 20 byte password which should make it useless for IPMI v1.5
auth/sessions.
2014-12-20 16:40:55 +01:00
Zdenek Styblik
6e6a04f971 Make user User Privilege Limit is within range
Despite the fact we could leave this up to IPMI stack, we won't do that.
Therefore, is_ipmi_user_priv_limit() is added and user provided value checked.
2014-12-20 13:57:06 +01:00
Zdenek Styblik
befb21497f Create ask_password() and re-use code
Commit add function ask_password() which leads to code re-usability and shedding
couple lines of otherwise redundant code.
2014-12-20 13:43:38 +01:00
Zdenek Styblik
1d1ce49bf4 Fix 'user help' output
Commit fixes padding of 'user help' output. Also, list of expected values of
privilege leves have been added.
2014-12-19 09:57:49 +01:00
Zdenek Styblik
50bd7d01a8 Don't use tmp variable since it's not necessary in ipmi_user_test() 2014-12-19 08:49:20 +01:00
Zdenek Styblik
4d3decc4c0 Split ipmi_user_main() into smaller functions
Commit splits ipmi_user_main() into smaller functions. Hopefully, this will be
better than giant main() function.
2014-12-18 18:40:51 +01:00
Zdenek Styblik
f8ce85ee6c Clenaup formatting in ipmi_user_main() 2014-12-09 18:59:37 +01:00
Zdenek Styblik
2aa5d8c902 Code cleanup in ipmi_user_main()
This is just a tip of an iceberg, really.
2014-12-09 18:59:36 +01:00
Zdenek Styblik
3c34aa0e1d Cleanup formatting in ipmi_user_main() 2014-12-09 18:59:36 +01:00
Zdenek Styblik
a58a627fae Remove trailing white-spaces in ipmi_user.c 2014-12-09 18:59:36 +01:00
Zdenek Styblik
aaf98b89d5 ID:348 Add support for the "System Firmware Version"
Add support for the "System Firmware Version" parameter selector (1) to the "Get
System Info Parameters" command ("mc getsysinfo system_fw_version"). The "mc
getsysinfo" command was already implemented and supported, but strangely, only
standard parameter selecter values 2, 3, 4 and Dell-defined parameters were
supported; the standard parameter value 1 (system firmare version) was not
supported.
2014-12-05 14:15:02 +01:00
Zdenek Styblik
7cd86aaf1e ID:347 - Incorrect reserved channel number
Fix validation of IPMI channel numbers according to IPMIv2.0 rev1.1 and update
documentation as well.
2014-12-05 13:39:31 +01:00
Zdenek Styblik
d671052143 ID:345 - Do not do several close session retries when catching SIGINT
Reduce number of retries to 1 when closing interface on SIGINT.
This reduces time needed to terminate the LAN connection.
2014-11-29 18:06:13 +01:00
Zdenek Styblik
e9c3de03c3 ID:346 - lib/ipmi_sdradd.c ipmi_sdr_read_record has a file descriptor leak
'lib/ipmi_sdradd.c' ipmi_sdr_read_records() opens a file descriptor and never
closes it. Here is a patch in use by SGI for quite some time now. Suggested
patch attached.
2014-11-29 17:52:18 +01:00
Zdenek Styblik
1cf65c3236 ID:344 - Fix HPM.2 long message support
Due to a typo in the result checking. HPM.2 long message support detection does
not work.
2014-11-29 17:45:41 +01:00
Zdenek Styblik
0eaa2eae51 ID:343 - Print actual sensor thresholds in 'sensors' comand
Use Get Sensor Threshold command for obtaining thresholds, since SDR records may
contain not actual threhsolds.
2014-11-29 17:44:07 +01:00
Zdenek Styblik
21fbd0e967 ID#340 - ipmitool sol session improperly closes on packet retry
Commit for Pat Donlin
2014-10-17 20:14:12 +02:00
Zdenek Styblik
58837647c2 lib/ipmi_kontronoem.c - clean up formatting, code
Commit cleans up formatting in 'lib/ipmi_kontronoem.c'. Also, it adds some error
messages and fixes return codes.
2014-09-21 09:36:14 +02:00
Zdenek Styblik
5c85c7bc61 ID: 247 - 'sensor thresh' help output is wrong
Fix invalid help output by copy-pasting part of 'sensor thresh help'.
2014-09-20 18:21:23 +02:00
Zdenek Styblik
aa8bac2da2 Rename printf_sensor_get_usage() -> print_sensor_get_usage() 2014-09-20 18:07:23 +02:00
Zdenek Styblik
2b15969dcb Put 'sensor thresh help' into function
Move help text for 'sensor thresh help' into its own function.
2014-09-20 18:05:04 +02:00
Zdenek Styblik
7560d4f2f4 ID: 324 - conflicting declaration write_fru_area()
Commit fixes conflicting declarations of write_fru_area().

Author: Jörg Frings-Fürst
2014-09-20 15:43:30 +02:00
Zdenek Styblik
859e8a4576 ID: 337 - Add support for 13G Dell PowerEdge
Description: Add support for Dell 13G server.
 Add support for upcoming Dell PowerEdge 13G server
 and replace multiple if statments.
 Based on patch from  SriniG <srinivas_g_gowda@dell.com>

Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
Origin: based on patch from SriniG <srinivas_g_gowda@dell.com>
Bug: http://sourceforge.net/p/ipmitool/patches/102/
Bug-debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756555
Forwarded: http://sourceforge.net/p/ipmitool/patches/102/
Reviewed-by: 2014-08-07 SriniG <srinivas_g_gowda@dell.com>
2014-09-20 15:30:55 +02:00
Parthasarathy Bhuvaragan
bee3fda656 update result ptr before return
Change-Id: If976f5c769d8ba83eefa1693e6969ef17f357ba8
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.xx.bhuvaragan@ericsson.com>
2014-09-03 09:44:57 +02:00
Jim Mankovich
96b19bb62d ID: 325 DDR4 DIMM Decoding Logic
Bug 325 was associated with identification of DDR4 SDRAM, but correct decoding
logic was necessary to actually support DDR4 decode.    This commit adds the
necessary logic to decode and display DDR4 DIMMS.
2014-08-13 07:12:42 -06:00
Jim Mankovich
9372d2e34e ID: 328 HPM.2 fixes
Fix commited for Dmitry Bazhenov
2014-08-11 11:21:23 -06:00
Jim Mankovich
9babab10f3 ID: 329 hpm.1 upgrade fixes
Fix commited for Dmitry Bazhenov
2014-08-11 11:17:41 -06:00
Jim Mankovich
58d510f90f ID : 103 picmg discover messages should be DEBUG, not INFO
Changed picmg discover messages to LOG_DEBUG
2014-08-11 10:49:10 -06:00
Jim Mankovich
ea49700ec1 ID: 331 Passwords provided in file (-f option) truncated on space
Code changed to remove truncation on space since space is valid in a password
2014-08-11 10:38:09 -06:00
Jim Mankovich
732be1b968 ID: 325 - Can not identify DDR4 SDRAM 2014-08-11 08:34:58 -06:00
Zdenek Styblik
d79b0e05af ID: 318 - ipmi_tsol.c: fix buffer overflow
Commit fixes buffer over-flow in ipmi_tsol caused by mis-calculation in buffer
size, resp. using wrong variables completely.
2014-05-29 20:19:37 +02:00
Zdenek Styblik
3b15a7c0e2 ID: 306 - "fru print" command prints the FRU #0 twice
This patch make the command to spit FRU info #0 only once.

Commit for Dmitry Bazhenov
2014-05-25 08:52:07 +02:00
Zdenek Styblik
3f508629a5 ID: 305 - HPM.1 deferred activation support fixup
Currently, the HPM.1 agent in the IPMItool does not differ between Rollback
support and Deferred Activation Support. The patch fixes up this bug.

Commit for Dmitry Bazhenov
2014-05-25 08:48:50 +02:00
Zdenek Styblik
3473670051 lib/ipmi_tsol.c - remove dead code 2014-05-24 10:05:30 +02:00
Zdenek Styblik
aefd287222 lib/ipmi_tsol.c - make code formatting saner 2014-05-24 10:05:05 +02:00
Zdenek Styblik
6d25903a0b ID: 317 - ipmi_fwum.c: fix typo 2014-05-24 09:18:32 +02:00
Zdenek Styblik
b37b914973 ID: 103 - 'lib/ipmi_ekanalyzer.c' needs a re-work
Most of the code is reformatted. I've removed some if blocks which didn't make
sense along the way. However, huge pile of work remains.
2014-05-19 05:35:16 +02:00
Zdenek Styblik
4e4a92100c ID: 103 - 'lib/ipmi_ekanalyzer.c' needs a re-work
Remove trailing empty lines.
2014-05-18 06:32:44 +02:00
Zdenek Styblik
8f7837364b ID: 46 - SEL OEM record corner case
According to 31.6.1 SEL Record Type Ranges, IPMIv2.0 specification, timestamped
OEM SEL records are in interval of <C0h,DFh> and not <C0h,DFh).
2014-05-17 11:39:42 +02:00
Zdenek Styblik
eeeb973e39 Make comment about 'source offset' explicit 2014-04-26 14:43:30 +02:00
Zdenek Styblik
166ae1da23 ID: 308 - "fru edit" no longer works for non-zero fields
1. Warnings about "FRU Area Length" based on uninitialized (malloc'd) memory
contents (due to fru->max_read_size not being initialized, left at 0) and
fru_data not being zeroed after malloc() in ipmi_fru_set_field_string().

2. "fru edit" commands for any field index other than 0 would fail (with "Field
not found !" error) due to a couple offset and length calculation errors (for
all the supported "area" types) in ipmi_fru_set_field_string().

3. "fru edit" commands would corrupt the FRU Inventory Area due to incorrect
"source offset" value being specified in write_fru_area() call in
impi_fru_set_field_string().

Commit for Rob Swindell
2014-04-25 20:48:40 +02:00
Anton Blanchard
8d5e8fcf7a Incorrect byteswap in SOL maximum payload code
max_inbound_payload_size, max_outbound_payload_size and port are
assembled byte by byte using shifts. This works correctly in both
little and big endian and doing a subsequent byte swap is wrong.

To highlight this issue I dumped the values on a big endian machine:

max_inbound_payload_size 51200
max_outbound_payload_size 51200
port 28418

And after this fix:

max_inbound_payload_size 200
max_outbound_payload_size 200
port 623

Signed-off-by: Zdenek Styblik <stybla@turnovfree.net>
2014-04-12 15:13:25 +02:00
Anton Blanchard
2c7526be6b Fix build error in HPM.2 code
lib/hpm2.c uses BSWAP_16 without including ipmitool/bswap.h.

Signed-off-by: Zdenek Styblik <stybla@turnovfree.net>
2014-04-12 15:08:39 +02:00
Zdenek Styblik
a88db0d181 ID: 300 - new sunoem functionality
Main changes include:

 * direct connection to ILOM command line interface
 * ability to add/delete ssh keys fot ILOM users
 * ability to set ILOM properties
 * ability to retrieve various logs from SP
 * removal of obsolete/non-functioning code and other misc changes

Commit for Martin Hovorka of Oracle
2014-04-09 21:24:05 +02:00
Zdenek Styblik
42aba7eb4f ID: 144 - Fix 'dcmi power set_limit action <value>'
From the ticket:
(v1.8.12) "dcmi power set_limit action <value>" (where <value> is either
"sel_logging" or "power_off") does not actually send the "Set Power Limit"
command (so no change to the power limit policy is made).

This was caused by all atoi(), strtol(), strtoul() calls being replaced. This
patch should fix it.

Commit for Holger Liebig
2014-04-08 15:24:55 +02:00
Zdenek Styblik
23e9340b49 ID:302 - HPM.2 long message support
This patch adds basic long message support for PICMG-based systems according to
the HPM.2 specification.
It also introduces APIs for setting inbound and outbound messages sizes per
selected interface.
This APIs are used in LAN and LAN+ interfaces to set autonomously detected
inbound and outbound message sizes.
The newly introduced APIs also replace the existing message size detection code
in several ipmitool commands in order to leverage the advantages of long message
support (HPM.1 upgrade, SDR acquring, FRU inventory read and write).
The Kontron-specific long message support is moved under a OEM option.

Commit for Dmitry Bazhenov
2014-04-08 15:18:50 +02:00