1365 Commits

Author SHA1 Message Date
Jim Mankovich
f907245d39 Constrain setting of the username to no greater than 16 characters per the
IPMI specification.   ID 3001519
2012-04-30 12:43:17 +00:00
Jim Mankovich
fbd0c88ae6 Constrain User ID between 1 and 63. ID - 3519225
Fix and testing done by Duncan Idaho
2012-04-27 12:12:56 +00:00
Jordan Hargrave
373e4fe28d Use consistent netfn/cmd for getsysinfo command 2012-03-22 17:08:32 +00:00
Albert Chu
fdf1176fa0 fix manpage misdocumentation on cipher suite privilige configuration 2012-03-06 01:41:50 +00:00
Jim Mankovich
062bd1f9a4 Fix a proplem when using bridged IPMI commands on the lanplus interface (-I
lanplus with -b -t or -m switches)  resulting in "Close Session command
failure".
2012-02-17 21:49:20 +00:00
Jim Mankovich
6e5043f289 sensor units should handle percentage units - ID: 3014014 2012-02-16 12:55:52 +00:00
Zdenek Styblik
83b34749c5 Commit modifies return codes under various circumstances for subcommand LAN.
Return 0 for help. Return <> 0 on error eg. not enough parameters.
2012-02-09 13:51:53 +00:00
Zdenek Styblik
403c86e51c Commit fixes wrong evaluation of is_lan_channel() in find_lan_channel()
introduced by yesterday's changes of 'lib/ipmi_lanp.c'.
2012-02-09 12:40:40 +00:00
Zdenek Styblik
89759cbdec Commit remedies bug introduced by modifications of ipmi_lanp_main() yesterday.
Fixes wrong evaluation of strncmp() in ipmi_lanp_main().
2012-02-09 12:34:18 +00:00
Zdenek Styblik
89243c2929 Feature Requests item #3486218 - remove bloat in 'lib/ipmi_lanp.c'
Commit removes bloat code in ipmi_lan_stats_clear() in 'lib/ipmi_lanp.c' and
replaces duplicate code with call to is_lan_channel().
2012-02-09 12:26:31 +00:00
Zdenek Styblik
9d8aa74a54 Feature Requests item #3486218 - remove bloat in 'lib/ipmi_lanp.c'
Commit removes bloat code in ipmi_lan_stats_clear() in 'lib/ipmi_lanp.c' and
replaces duplicate code with call to is_lan_channel().
2012-02-09 12:22:37 +00:00
Zdenek Styblik
ad4065a370 List of changes in 'lib/ipmi_lanp.c':
* return value != 0 when no or not enough params given
* replaces strtol() calls with str2uchar() ones
* invalid input checking and error messages for such events
* ipmi_lanp_main() got slight work-over
2012-02-08 15:31:00 +00:00
Zdenek Styblik
e230427138 Changes return value of ipmi_lan_stats_get() and ipmi_lan_stats_clear() on
error in 'lib/ipmi_lanp.c'. Changes return value from 0 to (-1).
2012-02-08 14:50:37 +00:00
Zdenek Styblik
4a462cd714 Change return type and value of find_lan_channel() in 'lib/ipmi_lanp.c'
Changes return type from int to uint8 since returned value is being assigned
into uint8_t.
Changes return value from (-1) to 0, because of uint8_t. 0 is considered as an
invalid LAN channel anyway, so there is no reason for returning (-1).
2012-02-08 14:42:47 +00:00
Zdenek Styblik
29d82210b4 Change return value of ipmi_get_channel_medium() in 'lib/ipmi_channel.c'
Return 0 instead of (-1) since ipmi_get_channel_medium() is supposed to return
uint8_t.
2012-02-08 13:40:51 +00:00
Zdenek Styblik
adbdafb535 Fixes ID:3485340 - user input not handled in 'lib/ipmi_user.c'
Replaces strtol() calls with str2uchar() ones and adds error messages, where
neccessary, if invalid input is given.
2012-02-07 13:14:12 +00:00
Zdenek Styblik
8a6343ff0d Fixes two problems in 'lib/ipmi_channel.c':
* str2uint() used, but should have been str2uchar()
* can't pass address of bitfield; variable used instead
2012-02-06 20:36:06 +00:00
Zdenek Styblik
a1dcd5790a Fixes ID:3485004 - 'lib/ipmi_channel.c' - misuse of strtol()
Replaces calls to strtol() with str2uchar() calls and adds error messages if
invalid input is given.
2012-02-06 15:50:13 +00:00
Zdenek Styblik
a2485a3b5e Fixes couple indentation issues in 'lib/ipmi_channel.c'. 2012-02-06 13:38:16 +00:00
Zdenek Styblik
bb632de830 Fixes bug ID:3484936 - missing user input validation in 'lib/ipmi_session.c'
It replaces strtol() calls with str2uint() ones and adds error messages if
invalid input is given.
2012-02-06 12:48:09 +00:00
Zdenek Styblik
78d7ae8d88 Removes debug printf() left by somebody in 'lib/ipmi_sdr.c' and crapping all
over the regular output.
2012-02-06 11:49:59 +00:00
Zdenek Styblik
904cbebce5 Fixes ID:3421347 Sensor list command should use channel field from SDR
Running an "ipmitool sensor list" command on a system where remote sensors are
not on channel 0 results in unexpected behavior. The SDR functions were fixed
in January of 2009 (lib/ipmi_sdr.c, rev 1.86) to use target I2C addresses and
LUNs for non-BMC-owned sensors. Sensors owned by satellite controllers on other
channels were read as if they were on channel 0.

I've fitted patch, posted alongside bug report, to CVS version.
2012-02-06 09:51:58 +00:00
Zdenek Styblik
09fc12a929 Fixes silly mistake I made in comparison in functions str2long() and
str2ulong() in 'lib/helper.c'.

Fixes: end_ptr -> *end_ptr
2012-01-26 14:30:53 +00:00
Zdenek Styblik
2902784cf3 Fixes possible *flows via user input in 'lib/ipmi_chassis.c' which may(and do)
lead to unpredicted/unwanted behaviour.

Commit replaces use of atoi() with str2NUM() functions and adds error messages
if invalid input supplied.
2012-01-26 12:50:26 +00:00
Zdenek Styblik
a9b78ab736 Fixes missing semicolons at the end of the line in 'include/ipmitool/helper.h'. 2012-01-26 10:04:04 +00:00
Zdenek Styblik
3d5e378e90 Commit adds input validation for -N(timeout) and -R(retry) parameters. It
changes types of variables 'timeout' and 'retry' to types wich should be passed
to called functions.
2012-01-26 09:22:57 +00:00
Zdenek Styblik
d4c2577a16 Commit updates list of functions in 'include/ipmitool/helper.h'.
Adds str2NUM() functions I've added earlier in 'lib/helper.c'.
2012-01-26 09:15:08 +00:00
Zdenek Styblik
f681fe89b7 Adds function str2uint() to convert from string to uint32_t with checks for valid input. 2012-01-26 08:22:11 +00:00
Zdenek Styblik
ca062647be Adds use of str2NUM() functions for the most of user input parameters in
'lib/main.c'. Error messages added as well.
2012-01-25 15:27:13 +00:00
Zdenek Styblik
3423c1d92f 'lib/helper.c' - str2uchar() - renamed arg_long -> arg_ulong 2012-01-25 15:09:49 +00:00
Zdenek Styblik
e0b75fba8c Adds function str2uint() to convert string to uint16_t with checks for valid input. 2012-01-25 14:57:12 +00:00
Zdenek Styblik
7dd969f2c6 Replaces use of atoi() for parameters d, p and C with str2int() function and
adds range validation for these parameters.
2012-01-25 12:56:36 +00:00
Zdenek Styblik
a9c68c76c3 Remove extra new-lines from error messages in 'src/ipmievd.c'. 2012-01-25 12:08:46 +00:00
Zdenek Styblik
e29166e4e8 Add input validation for time-out parameter in 'src/ipmievd.c'. 2012-01-25 11:53:41 +00:00
Zdenek Styblik
9217312cc4 Fixes missing return for selwatch_wait() in 'src/ipmievd.c'.
Added return 0;''.
2012-01-25 09:12:42 +00:00
Zdenek Styblik
fbf75dd075 Adds check whether PID fp was acquired or not. If not, then init logging
facility, print error and exit.
2012-01-25 09:02:59 +00:00
Zdenek Styblik
bf1e9952e1 Fixes ignorance of existing PID file which results in PID being overwritten.
Start of the daemon has shifted couple lines bellow, because it doesn't make
sense to start daemon first and check existence of PID file later.
2012-01-24 13:59:58 +00:00
Zdenek Styblik
5ed7f6ac0a Fixes CVE-2011-4339 - world writeable PID file
Adds proper umask() before writing PID file.
2012-01-24 13:26:56 +00:00
Zdenek Styblik
b6d2f7e302 Commit introduces set of functions to safely convert user input to numbers.
These functions utilize strtol() and strtoul() to convert input and check for
invalid input as well as for *flows.

Functions added: str2long(), str2ulong(), str2int(), str2short(), str2uchar();
2012-01-24 12:14:21 +00:00
Zdenek Styblik
bb40822d34 Replace whitespace indentations with tabs in 'lib/helper.c'. 2012-01-21 08:31:09 +00:00
Zdenek Styblik
835fe8886c Replace whitespaces with tabs, remove trailing spaces/tabs and other formatting inconsistencies. 2012-01-21 07:19:52 +00:00
Zdenek Styblik
55ee48696a Remove hardcoded CR('\r') from 'lib/ipmi_delloem.c'. 2012-01-21 05:38:49 +00:00
Zdenek Styblik
fedd6f187f Remove hardcoded CR('\r') from 'lib/ipmi_ekanalyzer.c'. 2012-01-21 05:37:41 +00:00
Zdenek Styblik
a6cad674d0 Remove hardcoded CR('\r') from 'lib/ipmi_fru.c'. 2012-01-21 05:36:58 +00:00
Zdenek Styblik
c1e46b35cd Remove hardcoded CR('\r') from 'lib/ipmi_fwum.c'. 2012-01-21 05:35:49 +00:00
Zdenek Styblik
a65d5add66 Remove hardcoded CR('\r') from 'lib/ipmi_hpmfwupg.c'. 2012-01-21 05:34:33 +00:00
Zdenek Styblik
ba6f2fe2a2 Remove hardcoded CR('\r') from 'lib/ipmi_isol.c'. 2012-01-21 05:32:24 +00:00
Zdenek Styblik
ebab3919ef Remove hardcoded CR('\r') from 'lib/ipmi_kontronoem.c'. 2012-01-21 05:31:16 +00:00
Zdenek Styblik
e6db6a04b5 Remove hardcoded CR('\r') from 'lib/ipmi_main.c'. 2012-01-21 05:29:41 +00:00
Zdenek Styblik
fb75f8d8fc Remove hardcoded CR('\r') from 'lib/ipmi_picmg.c'. 2012-01-21 05:28:39 +00:00