diff options
46 files changed, 301 insertions, 252 deletions
@@ -4282,7 +4282,7 @@ wdt.8 iwdt.8 (ipmiutil wdt) OEM C8 = AC Power On asserted util/isensor.c - show unit=0xC0 sensors as NotAvailable -09/18/2017 ARCress ipmiutil-3.0.7 changes (iver 3.07) +09/20/2017 ARCress ipmiutil-3.0.7 changes (iver 3.07) util/oem_supermicro.c - set typestr for some OEM events util/ievents.c - added undefined OS Boot types 7, 8 for SuperMicro vcvars32.bat - run vcvars from VCINSTALLDIR or VSINSTALLDIR @@ -4297,3 +4297,12 @@ wdt.8 iwdt.8 (ipmiutil wdt) util/icmd.c - auto-request admin priv always if remote util/ihealth.c - set do_powerstate=0 for Sun, continue if error +01/08/2018 ARCress ipmiutil-3.0.8 changes (iver 3.08) + configure.ac - add -fno-strict-aliasing flag + doc/ipmiutil.spec - handle if dmidecode is missing, + fix scr_dir typo (RHBZ# 1531830) + util/iuser.c - default to -V4 admin privilege for lan + util/ilan.c - show & clear GetSOL error if present + util/ipmicmd.c - add decode_rv to ipmi_open errors + lib/lanplus/lanplus_crypt_impl.c - use win_rand_filename not RAND_file_name + @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for ipmiutil 3.0.7. +# Generated by GNU Autoconf 2.63 for ipmiutil 3.0.8. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='ipmiutil' PACKAGE_TARNAME='ipmiutil' -PACKAGE_VERSION='3.0.7' -PACKAGE_STRING='ipmiutil 3.0.7' +PACKAGE_VERSION='3.0.8' +PACKAGE_STRING='ipmiutil 3.0.8' PACKAGE_BUGREPORT='' ac_unique_file="util/ipmiutil.c" @@ -1503,7 +1503,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ipmiutil 3.0.7 to adapt to many kinds of systems. +\`configure' configures ipmiutil 3.0.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1573,7 +1573,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ipmiutil 3.0.7:";; + short | recursive ) echo "Configuration of ipmiutil 3.0.8:";; esac cat <<\_ACEOF @@ -1683,7 +1683,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ipmiutil configure 3.0.7 +ipmiutil configure 3.0.8 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1697,7 +1697,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ipmiutil $as_me 3.0.7, which was +It was created by ipmiutil $as_me 3.0.8, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2551,7 +2551,7 @@ fi # Define the identity of the package. PACKAGE='ipmiutil' - VERSION='3.0.7' + VERSION='3.0.8' cat >>confdefs.h <<_ACEOF @@ -13304,6 +13304,17 @@ else echo "ok, suppress excess warnings" fi rm -f $tmpc $tmpo >/dev/null 2>&1 + echo $ECHO_N "checking strict aliasing warning flags ... $ECHO_C" + cfalias="-fno-strict-aliasing" + echo "int main() { return(1); }" >$tmpc + $CC -o $tmpo -c $cfalias $tmpc >/dev/null 2>&1 + if test $? -ne 0 ; then + cfalias= + echo "skip" + else + echo "ok, suppress aliasing warnings" + fi + rm -f $tmpc $tmpo >/dev/null 2>&1 echo $ECHO_N "checking compile fortify flags ... $ECHO_C" cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" echo "int main() { alloca(100); return(1); }" >$tmpc @@ -13367,16 +13378,19 @@ else sed -i 's/# Default-Stop:/# Default-Stop: 0 1 2 6/' $init_scripts fi # The openssl rpm might not be installed + sslver="" which rpm >/dev/null 2>&1 if test $? -eq 0 ; then sslver=`rpm -q openssl-devel |cut -f3 -d'-' |cut -f1-2 -d'.'` - else - sslver=`openssl version |awk '{ print $2 }'|cut -f1-2 -d'.'` + fi + if test "$sslver" = ""; then + sslver=`openssl version |awk '{ print $2 }'|cut -f1-2 -d'.'` fi if test "$sslver" = "1.1"; then echo "Detected openssl-$sslver" MD2_CFLAGS="-DSKIP_MD2 -DSSL11" else + echo "Detected openssl-$sslver" if test -f "$LIB_DIR/libcrypto.so"; then strings $LIB_DIR/libcrypto.so | grep EVP_md2 >/dev/null 2>&1 if test $? -ne 0; then @@ -13388,7 +13402,7 @@ else MD2_CFLAGS="-DSKIP_MD2" fi fi - OS_CFLAGS="-DLINUX $MD2_CFLAGS -fPIC $cfwarn $cfgnu $cfhard" + OS_CFLAGS="-DLINUX $MD2_CFLAGS -fPIC $cfwarn $cfgnu $cfalias $cfhard" else macos=1 # =1 means not mac # usually "x$sysname" = "xFreeBSD", but allow NetBSD @@ -13943,7 +13957,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ipmiutil $as_me 3.0.7, which was +This file was extended by ipmiutil $as_me 3.0.8, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14006,7 +14020,7 @@ Report bugs to <bug-autoconf@gnu.org>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -ipmiutil config.status 3.0.7 +ipmiutil config.status 3.0.8 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index edbf6f2..480de2d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(ipmiutil,3.0.7) +AC_INIT(ipmiutil,3.0.8) AC_CONFIG_SRCDIR(util/ipmiutil.c) echo "ipmiutil version ${PACKAGE_VERSION}" AC_CONFIG_HEADERS(config.h) @@ -342,6 +342,17 @@ else echo "ok, suppress excess warnings" fi rm -f $tmpc $tmpo >/dev/null 2>&1 + echo $ECHO_N "checking strict aliasing warning flags ... $ECHO_C" + cfalias="-fno-strict-aliasing" + echo "int main() { return(1); }" >$tmpc + $CC -o $tmpo -c $cfalias $tmpc >/dev/null 2>&1 + if test $? -ne 0 ; then + cfalias= + echo "skip" + else + echo "ok, suppress aliasing warnings" + fi + rm -f $tmpc $tmpo >/dev/null 2>&1 echo $ECHO_N "checking compile fortify flags ... $ECHO_C" cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" echo "int main() { alloca(100); return(1); }" >$tmpc @@ -405,16 +416,19 @@ else sed -i 's/# Default-Stop:/# Default-Stop: 0 1 2 6/' $init_scripts fi # The openssl rpm might not be installed + sslver="" which rpm >/dev/null 2>&1 if test $? -eq 0 ; then sslver=`rpm -q openssl-devel |cut -f3 -d'-' |cut -f1-2 -d'.'` - else - sslver=`openssl version |awk '{ print $2 }'|cut -f1-2 -d'.'` - fi + fi + if test "$sslver" = ""; then + sslver=`openssl version |awk '{ print $2 }'|cut -f1-2 -d'.'` + fi if test "$sslver" = "1.1"; then echo "Detected openssl-$sslver" MD2_CFLAGS="-DSKIP_MD2 -DSSL11" else + echo "Detected openssl-$sslver" if test -f "$LIB_DIR/libcrypto.so"; then strings $LIB_DIR/libcrypto.so | grep EVP_md2 >/dev/null 2>&1 if test $? -ne 0; then @@ -426,7 +440,7 @@ else MD2_CFLAGS="-DSKIP_MD2" fi fi - OS_CFLAGS="-DLINUX $MD2_CFLAGS -fPIC $cfwarn $cfgnu $cfhard" + OS_CFLAGS="-DLINUX $MD2_CFLAGS -fPIC $cfwarn $cfgnu $cfalias $cfhard" else macos=1 # =1 means not mac # usually "x$sysname" = "xFreeBSD", but allow NetBSD diff --git a/debpkg/changelog b/debpkg/changelog index 728dcf0..11411a2 100644 --- a/debpkg/changelog +++ b/debpkg/changelog @@ -1,3 +1,9 @@ +ipmiutil (3.0.8-1) unstable; urgency=low + + * New upstream version. + + -- Andy Cress <arcress@users.sourceforge.net> Tue, 05 Dec 2017 14:14:42 -0500 + ipmiutil (3.0.7-1) unstable; urgency=low * New upstream version. diff --git a/doc/Makefile b/doc/Makefile index 381c0dc..5b0b4b1 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -46,12 +46,12 @@ CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run aclocal-1.11 -AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run tar +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run aclocal-1.11 +AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run tar AR = ar -AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run autoconf -AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run autoheader -AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run automake-1.11 +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run automake-1.11 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 @@ -99,13 +99,13 @@ LIB_DIR = /usr/lib64 LIPO = LN_S = ln -s LTLIBOBJS = -MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run makeinfo +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run makeinfo MKDIR_P = /bin/mkdir -p NM = /usr/bin/nm -B NMEDIT = OBJDUMP = objdump OBJEXT = o -OS_CFLAGS = -DLINUX -fPIC -Wno-pointer-sign -Wno-sign-conversion -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 +OS_CFLAGS = -DLINUX -fPIC -Wno-pointer-sign -Wno-sign-conversion -fno-strict-aliasing -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 OS_DRIVERS = imbapi.c ipmimv.c ipmild.c ipmidir.c OS_LFLAGS = OTOOL = @@ -113,9 +113,9 @@ OTOOL64 = PACKAGE = ipmiutil PACKAGE_BUGREPORT = PACKAGE_NAME = ipmiutil -PACKAGE_STRING = ipmiutil 3.0.7 +PACKAGE_STRING = ipmiutil 3.0.8 PACKAGE_TARNAME = ipmiutil -PACKAGE_VERSION = 3.0.7 +PACKAGE_VERSION = 3.0.8 PATH_SEPARATOR = : PKG_DIR = /root/rpmbuild RANLIB = ranlib @@ -127,11 +127,11 @@ SHR_LINK = libipmiutil.so.1 STRIP = strip SUBDIR_S = doc scripts lib util SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 3.0.7 -abs_builddir = /usr/dev/ipmiutil-3.0.7/doc -abs_srcdir = /usr/dev/ipmiutil-3.0.7/doc -abs_top_builddir = /usr/dev/ipmiutil-3.0.7 -abs_top_srcdir = /usr/dev/ipmiutil-3.0.7 +VERSION = 3.0.8 +abs_builddir = /usr/dev/ipmiutil-3.0.8/doc +abs_srcdir = /usr/dev/ipmiutil-3.0.8/doc +abs_top_builddir = /usr/dev/ipmiutil-3.0.8 +abs_top_srcdir = /usr/dev/ipmiutil-3.0.8 ac_ct_CC = gcc ac_ct_DUMPBIN = am__include = include @@ -159,7 +159,7 @@ host_vendor = redhat htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.7/install-sh +install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.8/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale diff --git a/doc/UserGuide b/doc/UserGuide index e5681f1..105a4bd 100644 --- a/doc/UserGuide +++ b/doc/UserGuide @@ -1,6 +1,6 @@ IPMIUTIL USER GUIDE - VERSION 3.0.7 + VERSION 3.0.8 An easy-to-use IPMI server management utility @@ -189,18 +189,20 @@ supported by ipmiutil. Key Strengths = supports any IPMI server platforms, top-down user-friendly IPMI functions, + only IPMI project to support Windows natively, detection, portability, incorporates fixes and new features quickly Target Market = Administrators, Developers, and OEMs +License = BSD (supports open or proprietary use) OS Support = Linux, Windows, Solaris, FreeBSD, and MacOSX (supports Windows natively for local or remote interface) -License = BSD Drivers = For Linux: openipmi, imb, valinux ipmikcs, lan, lanplus, landesk, and driverless direct KCS or SSIF - For Windows: Intel IMB and Microsoft IPMI drivers - For Solaris: bmc - For FreeBSD: openipmi, driverless KCS or SSIF - For MacOSX: remote only + For Windows: Intel IMB and Microsoft IPMI drivers + For Solaris: bmc + For FreeBSD: openipmi, driverless KCS or SSIF + For MacOSX: remote only +Discrete sensors = Show interpreted meaning or raw value instead of 'na' LEDs = Show/set ATCA LEDs, set identify LED, Intel Telco Alarm LEDs health = show overall health and product information discovery = find all IPMI LAN servers on a given subnet @@ -208,14 +210,14 @@ fru = Display all FRU and SPD inventory data, also Set some FRU product fields (asset tag, serial number) sensor = Show SDRs and sensor readings, also set sensor thresholds getevent = Receive any IPMI events and decode them, - The IPMI event monitoring service is automated in Linux via - the ipmiutil_evt init script. + The IPMI event monitoring service is automated in Linux via + the ipmiutil_evt init script. reset = IPMI local and remote reset/power-control, IPMI boot device selection. -remote IPMI = Perform an OS shutdown/restart request via IPMI LAN, -soft-shutdown using ipmiutil getevt -a and invoking ipmiutil reset -o. - This async bridge service is automated in Linux via the - ipmiutil_asy init script. +remote soft-boot = Perform a remote OS shutdown/restart request, soft-shutdown + using ipmiutil getevt -a and invoking ipmiutil reset -o. + This async bridge service is automated in Linux via the + ipmiutil_asy init script, without requiring acpid. cmd = Execute raw IPMI commands locally or remotely lan = Show/set IPMI LAN and PEF configuration parameters, adds more PEF rules, or can add a custom PEF rule @@ -224,12 +226,12 @@ sel = Show decoded System Event Log records, clear SEL, see the checksel cron script to automate SEL management. sol console = Start/stop an SOL console session watchdog = Show, set, and reset the IPMI watchdog timer and its actions, - The watchdog timer service can be automated in Linux via the - ipmiutil_wdt init script. + The watchdog timer service can be automated in Linux via the + ipmiutil_wdt init script. save/restore = save and restore all BMC configuration parameters ievents = Standalone app to decode IPMI or PET event data, especially useful at the management station for interpreting - IPMI PET SNMP traps. See also SNMP PET MIB (bmclanpet.mib). + IPMI PET SNMP traps. See also SNMP PET MIB (bmclanpet.mib). picmg = Support IPMI PICMG functions firewall = Support IPMI firmware firewall functions @@ -238,12 +240,12 @@ IPMI tasks: ipmi_port = Automatically prevent Linux port mapper from stealing the RMCP port 623 used by IPMI LAN firmware. checksel = a cron script to daily write new SEL records to syslog, and - clear the SEL if nearly full. + clear the SEL if nearly full. ipmiutil_asy = A Linux init script using the ipmiutil getevt -a service to - enable receiving soft-shutdown requests from ipmiutil reset -o + enable receiving soft-shutdown requests from ipmiutil reset -o ipmiutil_wdt = A Linux init script to reset the watchdog timer every 60 sec. ipmiutil_evt = A Linux init script using the ipmiutil getevt -s service to - monitor IPMI events, log them, and optionally run a script. + monitor IPMI events, log them, and optionally run a script. @@ -5534,6 +5536,17 @@ The Windows equivalent would have to put the -N option immediately after the subfunction, as shown below: > ipmiutil cmd -N 192.168.1.154 00 20 18 01 + +For Serial-Over-Lan console usage from a Windows client, ipmiutil provides: +- Full ANSI (VT100) Support +- Full Support for PC Keyboard +- Unicode (UTF-8) support +- Full support for Line Drawing Characters + (VT100 Special Graphics, Unicode Box Characters and OEM CP Characters) +- Full Screen works for BIOS and Unix (using vt100 terminfo setting) + +For proper operation during BIOS setup the Windows console window size must be set to 80x25. The Windows console buffer size can be set to the desired scroll back size. For proper operation when logged on to Unix the windows size can be set to anything but the OS must be told of the proper size using "stty rows <height> cols <width>". + -------------------------- 6.0 SAMPLE OUTPUT diff --git a/doc/ipmiutil.spec b/doc/ipmiutil.spec index c6c39c2..7551bb2 100644 --- a/doc/ipmiutil.spec +++ b/doc/ipmiutil.spec @@ -3,7 +3,7 @@ # Copyright (c) 2012 Andy Cress # Name: ipmiutil -Version: 3.0.7 +Version: 3.0.8 Release: 1%{?dist} Summary: Easy-to-use IPMI server management utilities License: BSD @@ -12,37 +12,33 @@ Source: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz URL: http://ipmiutil.sourceforge.net BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) # Suggests: cron or vixie-cron or cronie or similar -%if 0%{?sles_version} >= 10 -%define bldreq0 libopenssl-devel -%else -%define bldreq0 openssl-devel -%endif +%{!?_unitdir: %define _unitdir /usr/lib/systemd/system} +%define unit_dir %{_unitdir} +%define init_dir %{_initrddir} +%define systemd_fls %{_datadir}/%{name} +%define bldreq0 openssl-devel +%define bldreq_extra gcc gcc-c++ libtool %if 0%{?fedora} >= 15 %define bldreq_extra systemd autoconf automake systemd-units Requires: systemd-units Group: System Environment/Base +%if 0%{?fedora} == 16 +%define unit_dir /lib/systemd/system +%endif %endif %if 0%{?rhel} >= 7 %define bldreq_extra autoconf automake systemd-units %endif +%if 0%{?sles_version} > 10 +%define bldreq0 libopenssl-devel +%endif %if 0%{?suse_version} >= 1210 %define bldreq_extra gcc gcc-c++ libtool systemd %define req_systemd 1 -%define unit_dir %{_unitdir} %define systemd_fls %{unit_dir} # Requires: %{?systemd_requires} -%else -%define bldreq_extra gcc gcc-c++ libtool -%define systemd_fls %{_datadir}/%{name} -%if 0%{?fedora} == 16 -%define unit_dir /lib/systemd/system -%else -%{!?_unitdir: %define _unitdir /usr/lib/systemd/system} -%define unit_dir %{_unitdir} -%endif %endif BuildRequires: %{bldreq0} %{bldreq_extra} -%define init_dir %{_initrddir} %description The ipmiutil package provides easy-to-use utilities to view the SEL, @@ -59,6 +55,7 @@ detected, ipmiutil will use user-space direct I/Os instead. %package devel Group: Development/Libraries Summary: Includes libraries and headers for the ipmiutil package +Requires: ipmiutil %description devel The ipmiutil-devel package contains headers and libraries which are @@ -194,6 +191,9 @@ rm -rf %{buildroot} %post devel /sbin/ldconfig +%postun devel +/sbin/ldconfig + %pre %if 0%{?req_systemd} %service_add_pre ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service @@ -229,14 +229,19 @@ then # Test whether an IPMI interface is known to the motherboard IPMIret=1 - %{_sbindir}/dmidecode |grep -q IPMI && IPMIret=0 - # Run some ipmiutil command to see if any IPMI interface works. - # Some may not have IPMI on the motherboard, so need to check, but - # some kernels may have IPMI driver partially loaded, which breaks this - %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 && IPMIret=0 + which dmidecode >/dev/null 2>&1 && IPMIret=0 if [ $IPMIret -eq 0 ]; then + IPMIret=1 + %{_sbindir}/dmidecode |grep -q IPMI && IPMIret=0 + if [ $IPMIret -eq 0 ]; then + # Run some ipmiutil command to see if any IPMI interface works. + # Some may not have IPMI on the motherboard, so need to check, but + # some kernels may have IPMI driver partially loaded, which breaks this + IPMIret=1 + %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 && IPMIret=0 + if [ $IPMIret -eq 0 ]; then if [ ! -x %{init_dir}/ipmi ]; then - cp -f %{scr_dir}/ipmi.init.basic %{init_dir}/ipmi + cp -f ${scr_dir}/ipmi.init.basic %{init_dir}/ipmi fi # If IPMI is enabled, automate managing the IPMI SEL if [ -d %{_sysconfdir}/cron.daily ]; then @@ -263,15 +268,20 @@ then rm -f $sensorout fi fi + fi + fi fi else # postinstall, doing rpm update - IPMIret=0 - %{_bindir}/ipmiutil sel -v >/dev/null 2>&1 || IPMIret=1 + IPMIret=1 + which dmidecode >/dev/null 2>&1 && IPMIret=0 if [ $IPMIret -eq 0 ]; then + %{_sbindir}/dmidecode |grep -q IPMI && IPMIret=0 + if [ $IPMIret -eq 0 ]; then if [ -d %{_sysconfdir}/cron.daily ]; then cp -f %{_datadir}/%{name}/checksel %{_sysconfdir}/cron.daily fi + fi fi fi %if 0%{?fedora} >= 18 diff --git a/lib/Makefile b/lib/Makefile index 93b57de..f56f858 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -47,12 +47,12 @@ CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run aclocal-1.11 -AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run tar +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run aclocal-1.11 +AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run tar AR = ar -AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run autoconf -AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run autoheader -AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run automake-1.11 +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run automake-1.11 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 @@ -101,13 +101,13 @@ LIB_DIR = /usr/lib64 LIPO = LN_S = ln -s LTLIBOBJS = -MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run makeinfo +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run makeinfo MKDIR_P = /bin/mkdir -p NM = /usr/bin/nm -B NMEDIT = OBJDUMP = objdump OBJEXT = o -OS_CFLAGS = -DLINUX -fPIC -Wno-pointer-sign -Wno-sign-conversion -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 +OS_CFLAGS = -DLINUX -fPIC -Wno-pointer-sign -Wno-sign-conversion -fno-strict-aliasing -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 OS_DRIVERS = imbapi.c ipmimv.c ipmild.c ipmidir.c OS_LFLAGS = OTOOL = @@ -115,9 +115,9 @@ OTOOL64 = PACKAGE = ipmiutil PACKAGE_BUGREPORT = PACKAGE_NAME = ipmiutil -PACKAGE_STRING = ipmiutil 3.0.7 +PACKAGE_STRING = ipmiutil 3.0.8 PACKAGE_TARNAME = ipmiutil -PACKAGE_VERSION = 3.0.7 +PACKAGE_VERSION = 3.0.8 PATH_SEPARATOR = : PKG_DIR = /root/rpmbuild RANLIB = ranlib @@ -129,11 +129,11 @@ SHR_LINK = libipmiutil.so.1 STRIP = strip SUBDIR_S = doc scripts lib util SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 3.0.7 -abs_builddir = /usr/dev/ipmiutil-3.0.7/lib -abs_srcdir = /usr/dev/ipmiutil-3.0.7/lib -abs_top_builddir = /usr/dev/ipmiutil-3.0.7 -abs_top_srcdir = /usr/dev/ipmiutil-3.0.7 +VERSION = 3.0.8 +abs_builddir = /usr/dev/ipmiutil-3.0.8/lib +abs_srcdir = /usr/dev/ipmiutil-3.0.8/lib +abs_top_builddir = /usr/dev/ipmiutil-3.0.8 +abs_top_srcdir = /usr/dev/ipmiutil-3.0.8 ac_ct_CC = gcc ac_ct_DUMPBIN = am__include = include @@ -161,7 +161,7 @@ host_vendor = redhat htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.7/install-sh +install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.8/install-sh libdir = $(iprefix)/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale diff --git a/lib/lanplus/lanplus_crypt_impl.c b/lib/lanplus/lanplus_crypt_impl.c index 1daf230..389a436 100644 --- a/lib/lanplus/lanplus_crypt_impl.c +++ b/lib/lanplus/lanplus_crypt_impl.c @@ -41,7 +41,27 @@ #include <openssl/err.h> #include <assert.h> - +#ifdef WIN32 +/* win_rand_filename + Custom RAND_file_name routine to use better path than C:\ + Use: %USERPROFILE%, %HOME%, %HOMEPATH%, + USERPROFILE=C:\Users\acress + HOMEDRIVE=C: + HOMEPATH=\Users\acress + */ +char *win_rand_filename(char *buffer, int bufsz) +{ + char *root = "C:\\"; + char *envpath = NULL; + + envpath = getenv("USERPROFILE"); + if ((envpath == NULL) || (envpath[0] == '\0')) { + envpath = root; + } + snprintf(buffer,bufsz,"%s\\.rnd",envpath); + return(buffer); +} +#endif /* * lanplus_seed_prng @@ -60,7 +80,8 @@ int lanplus_seed_prng(uint32_t bytes) char buffer[200]; static FILE *fp = NULL; size_t i; - randfile = RAND_file_name(buffer, sizeof buffer); /* usu C:\.rnd */ + // randfile = RAND_file_name(buffer, sizeof buffer); /* usu C:\.rnd */ + randfile = win_rand_filename(buffer, sizeof buffer); if ((randfile != NULL) && (fp == NULL)) { fp = fopen(randfile,"r"); /*check the randfile*/ if (fp == NULL) { /*does not exist, create it*/ diff --git a/lib/libipmiutil.pc b/lib/libipmiutil.pc index 53f78b8..81d8d4e 100644 --- a/lib/libipmiutil.pc +++ b/lib/libipmiutil.pc @@ -8,6 +8,6 @@ nutuser=@RUN_AS_USER@ Name: libipmiutil Description: Library for ipmiutil -Version: 3.0.7 +Version: 3.0.8 Libs: -L${libdir} -lipmi_lanplus Cflags: -I${includedir} diff --git a/scripts/Makefile b/scripts/Makefile index f0a4171..4f4124a 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -46,12 +46,12 @@ CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run aclocal-1.11 -AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run tar +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run aclocal-1.11 +AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run tar AR = ar -AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run autoconf -AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run autoheader -AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run automake-1.11 +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run automake-1.11 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 @@ -99,13 +99,13 @@ LIB_DIR = /usr/lib64 LIPO = LN_S = ln -s LTLIBOBJS = -MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.7/missing --run makeinfo +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.8/missing --run makeinfo MKDIR_P = /bin/mkdir -p NM = /usr/bin/nm -B NMEDIT = OBJDUMP = objdump OBJEXT = o -OS_CFLAGS = -DLINUX -fPIC -Wno-pointer-sign -Wno-sign-conversion -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 +OS_CFLAGS = -DLINUX -fPIC -Wno-pointer-sign -Wno-sign-conversion -fno-strict-aliasing -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 OS_DRIVERS = imbapi.c ipmimv.c ipmild.c ipmidir.c OS_LFLAGS = OTOOL = @@ -113,9 +113,9 @@ OTOOL64 = PACKAGE = ipmiutil PACKAGE_BUGREPORT = PACKAGE_NAME = ipmiutil -PACKAGE_STRING = ipmiutil 3.0.7 +PACKAGE_STRING = ipmiutil 3.0.8 PACKAGE_TARNAME = ipmiutil -PACKAGE_VERSION = 3.0.7 +PACKAGE_VERSION = 3.0.8 PATH_SEPARATOR = : PKG_DIR = /root/rpmbuild RANLIB = ranlib @@ -127,11 +127,11 @@ SHR_LINK = libipmiutil.so.1 STRIP = strip SUBDIR_S = doc scripts lib util SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 3.0.7 -abs_builddir = /usr/dev/ipmiutil-3.0.7/scripts -abs_srcdir = /usr/dev/ipmiutil-3.0.7/scripts -abs_top_builddir = /usr/dev/ipmiutil-3.0.7 -abs_top_srcdir = /usr/dev/ipmiutil-3.0.7 +VERSION = 3.0.8 +abs_builddir = /usr/dev/ipmiutil-3.0.8/scripts +abs_srcdir = /usr/dev/ipmiutil-3.0.8/scripts +abs_top_builddir = /usr/dev/ipmiutil-3.0.8 +abs_top_srcdir = /usr/dev/ipmiutil-3.0.8 ac_ct_CC = gcc ac_ct_DUMPBIN = am__include = include @@ -159,7 +159,7 @@ host_vendor = redhat htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.7/install-sh +install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.8/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale diff --git a/util/ialarms.c b/util/ialarms.c index 836ec8c..d9c6d5e 100644 --- a/util/ialarms.c +++ b/util/ialarms.c @@ -75,7 +75,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* * Global variables */ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "ialarms"; static char fdebug = 0; static char fbmctam = 0; diff --git a/util/icmd.c b/util/icmd.c index 789c69d..ed89004 100644 --- a/util/icmd.c +++ b/util/icmd.c @@ -78,7 +78,7 @@ extern void ipmi_lan_set_timeout(int ipmito, int tries, int pingto); /* * Global variables */ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "icmd"; static char fdebug = 0; static char fquiet = 0; diff --git a/util/iconfig.c b/util/iconfig.c index db70075..b9da59b 100644 --- a/util/iconfig.c +++ b/util/iconfig.c @@ -172,7 +172,7 @@ typedef struct /* * Global variables */ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "iconfig"; static char fdebug = 0; static char fipmilan = 0; diff --git a/util/idcmi.c b/util/idcmi.c index 8bf2000..f35e711 100644 --- a/util/idcmi.c +++ b/util/idcmi.c @@ -62,7 +62,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "idcmi.h" static char * progname = "idcmi"; -static char * progver = "3.07"; +static char * progver = "3.08"; extern char fdebug; /*from ipmicmd.c*/ static uchar g_bus = PUBLIC_BUS; static uchar g_sa = BMC_SA; diff --git a/util/ievents.c b/util/ievents.c index d07a35f..b244b68 100644 --- a/util/ievents.c +++ b/util/ievents.c @@ -76,7 +76,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define SELprintf printf #define SMS_SA 0x41 #define SMI_SA 0x21 -static char *progver = "3.07"; +static char *progver = "3.08"; static char *progname = "ievents"; static char fsensdesc = 0; /* 1= get extended sensor descriptions*/ static char fcanonical = 0; /* 1= show canonical, delimited output*/ diff --git a/util/ifirewall.c b/util/ifirewall.c index 3f81b3b..e410a45 100644 --- a/util/ifirewall.c +++ b/util/ifirewall.c @@ -64,7 +64,7 @@ /* global variables */ static char * progname = "ifirewall"; -static char * progver = "3.07"; +static char * progver = "3.08"; static char fdebug = 0; static uchar g_bus = PUBLIC_BUS; static uchar g_sa = BMC_SA; diff --git a/util/ifru.c b/util/ifru.c index 9775d7d..cc866d8 100644 --- a/util/ifru.c +++ b/util/ifru.c @@ -116,7 +116,7 @@ extern int ipmi_kontronoem_main(void * intf, int argc, char ** argv); #endif static char *progname = "ifru"; -static char *progver = "3.07"; +static char *progver = "3.08"; static int vend_id = 0; static int prod_id = 0; static char fdebug = 0; diff --git a/util/ifruset.c b/util/ifruset.c index 8b77489..0a9ac00 100644 --- a/util/ifruset.c +++ b/util/ifruset.c @@ -106,7 +106,7 @@ extern void fmt_time(time_t etime, char *buf, int bufsz); /*see ievents.c*/ #define IPROD_OEM 7 static char *progname = "ifruset"; -static char *progver = "3.07"; +static char *progver = "3.08"; static char fdebug = 0; static char fpicmg = 0; static char fonlybase = 0; diff --git a/util/igetevent.c b/util/igetevent.c index 61abc96..1cda21c 100644 --- a/util/igetevent.c +++ b/util/igetevent.c @@ -169,7 +169,7 @@ extern void free_sdr_cache(uchar *pret); /*see isensor.c*/ * Global variables */ static char * progname = "igetevent"; -static char * progver = "3.07"; +static char * progver = "3.08"; static char fdebug = 0; static char fipmilan = 0; static char frunonce = 0; diff --git a/util/ihealth.c b/util/ihealth.c index 087fcdf..dd9be29 100644 --- a/util/ihealth.c +++ b/util/ihealth.c @@ -83,7 +83,7 @@ extern int oem_supermicro_get_firmware_str(char *pstr, int sz); /*oem_supermicro * Global variables */ static char * progname = "ihealth"; -static char * progver = "3.07"; +static char * progver = "3.08"; static char fdebug = 0; static char fipmilan = 0; static char fcanonical = 0; diff --git a/util/ilan.c b/util/ilan.c index e54233f..a6e91a3 100644 --- a/util/ilan.c +++ b/util/ilan.c @@ -306,7 +306,7 @@ extern char *get_sensor_type_desc (uchar stype); /*from ievents.c */ * Global variables */ static char * progname = "ilan"; -static char * progver = "3.07"; +static char * progver = "3.08"; static char fdebug = 0; static char fipmilan = 0; static char fIPMI10 = 0; /* =1 if IPMI v1.0 or less */ @@ -1894,7 +1894,7 @@ GetFirstIP (uchar * ipaddr, uchar * macadr, char *ipname, char fdbg) } /* - * Set BMC MAC corresponding to current BMC IP address (Windows). + * Get BMC MAC corresponding to current BMC IP address (Windows). */ int GetLocalIPByMAC (uchar * macadr) @@ -2431,9 +2431,9 @@ GetBmcEthDevice (uchar lan_parm, uchar * pchan) lan_ch = (uchar) j; /*set lan channel for GetLanEntry */ ret = GetLanEntry (5 /*MAC_ADDRESS_LAN_PARAM */ , 0, &LanRecord); if (ret != 0) { - lan_ch = (uchar) jlan; /*restore lan_ch */ - printf ("GetBmcEthDevice: GetLanEntry failed\n"); - return devnum; + lan_ch = (uchar) jlan; /*restore lan_ch */ + printf ("GetBmcEthDevice: GetLanEntry(5) failed\n"); + return devnum; } else { pb = &LanRecord.data[0]; @@ -4425,7 +4425,7 @@ main(int argc, char **argv) if ((fsetarp == 0) && ostype == OS_WINDOWS) arp_ctl = 0x03; /*grat arp & arp resp enabled */ - ret = GetDeviceID (&LanRecord); + ret = ipmi_getdeviceid((uchar *)&LanRecord,16,fdebug); if (ret != 0) { goto do_exit; } @@ -4434,29 +4434,20 @@ main(int argc, char **argv) ipmi_maj = LanRecord.data[4] & 0x0f; ipmi_min = LanRecord.data[4] >> 4; show_devid (LanRecord.data[2], LanRecord.data[3], ipmi_maj, ipmi_min); - if (ipmi_maj == 0) - fIPMI10 = 1; - else if (ipmi_maj == 1 && ipmi_min < 5) - fIPMI10 = 1; - else - fIPMI10 = 0; /* >= IPMI 1.5 is ok */ - if (ipmi_maj >= 2) - fIPMI20 = 1; - if (fIPMI20) - show_users = 5; - else - show_users = 3; + if (ipmi_maj == 0) fIPMI10 = 1; /* IPMI 1.0 is limited */ + else if (ipmi_maj == 1 && ipmi_min < 5) fIPMI10 = 1; + else fIPMI10 = 0; /* >= IPMI 1.5 is ok */ + if (ipmi_maj >= 2) fIPMI20 = 1; /* IPMI 2.0 has more */ + if (fIPMI20) show_users = 5; + else show_users = 3; if (fIPMI10) { printf ("This IPMI v%d.%d system does not support PEF records.\n", ipmi_maj, ipmi_min); /* Wont handle PEF, but continue and look for BMC LAN anyway */ - // fIPMI10 = 1; - // ipmi_close_(); - // exit(1); } prod_id = LanRecord.data[9] + (LanRecord.data[10] << 8); vend_id = LanRecord.data[6] + (LanRecord.data[7] << 8) - + (LanRecord.data[8] << 16); + + (LanRecord.data[8] << 16); /* check Device ID response for Manufacturer ID = 0x0322 (NSC) */ if (vend_id == VENDOR_NSC) { /* NSC = 0x000322 */ fmBMC = 1; /*NSC miniBMC */ @@ -4999,8 +4990,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } /*end for */ } } /*end if not fIPMI10 */ @@ -5345,8 +5335,10 @@ main(int argc, char **argv) // else lan_access = 0x04; /*Admin*/ if (!fIPMI10) { /* Get SOL params */ ret = GetSerialOverLan (lan_ch, 0, 0); - if (ret != 0) - printf ("GetSOL error %d\n", ret); + if (ret != 0) { + printf ("GetSOL error %d, %s\n", ret, decode_rv(ret)); + ret = 0; /*does not fail entire command*/ + } } for (i = 1; i <= show_users; i++) GetUser ((uchar) i, lan_ch); @@ -5421,8 +5413,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } if (lan_user != 0) { j = DisableUser (lan_user, lan_ch); /*disable this lan user */ @@ -5431,8 +5422,7 @@ main(int argc, char **argv) nerrs++; lasterr = j; } - else - ngood++; + else ngood++; } LanRecord.data[0] = 0x01; /* static IP address source */ ret = SetLanEntry (4, &LanRecord, 1); @@ -5441,8 +5431,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; /* clear the BMC IP address */ memset (&LanRecord, 0, 4); ret = SetLanEntry (3, &LanRecord, 4); @@ -5451,8 +5440,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; /* clear the gateway IP address */ memset (&LanRecord, 0, 4); ret = SetLanEntry (12, &LanRecord, 4); @@ -5461,8 +5449,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; /* clear the gateway MAC address */ memset (&LanRecord, 0, 6); ret = SetLanEntry (13, &LanRecord, 6); @@ -5471,8 +5458,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } else if (fdisableSOL) { ret = SetupSerialOverLan (0); /*disable */ @@ -5481,8 +5467,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } else { /*fenable */ uchar chanctl; @@ -5497,8 +5482,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; ret = SetChanAcc (lan_ch, 0x40, chanctl); if (fdebug) printf ("SetChanAcc(lan/nonvol), ret = %d\n", ret); @@ -5506,8 +5490,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; if (flansecure) { j = DisableUser (0, lan_ch); /*disable the default null user */ printf ("DisableUser(0), ret = %d\n", j); @@ -5518,8 +5501,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } if (fdisable && (vend_id == VENDOR_SUPERMICROX || vend_id == VENDOR_SUPERMICRO)) { @@ -5555,8 +5537,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; /* Get the values to use from Linux eth0, etc. */ ret = Get_IPMac_Addr (); @@ -5569,8 +5550,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; if (MacIsValid (rgmymac)) { memcpy (&LanRecord, rgmymac, 6); ret = SetLanEntry (5, &LanRecord, 6); @@ -5584,8 +5564,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } } @@ -5611,8 +5590,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } } else { /* use static IP */ @@ -5639,8 +5617,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; memcpy (&LanRecord, rgmyip, 4); ret = SetLanEntry (3, &LanRecord, 4); printf ("SetLanEntry(3), ret = %d\n", ret); @@ -5648,8 +5625,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; if (MacIsValid (rgmymac)) { memcpy (&LanRecord, rgmymac, 6); ret = SetLanEntry (5, &LanRecord, 6); @@ -5668,8 +5644,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } } if (!SubnetIsValid (rgsubnet)) /* not specified, use previous */ @@ -5681,8 +5656,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; if (vend_id != VENDOR_PEPPERCON) { /* may want to check bparm7 here */ LanRecord.data[0] = parm7[0]; /*IPv4 header, TTL */ @@ -5694,8 +5668,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } /* if lan_ch == 3, gcm gets error setting grat arp (ccode=0xCD) */ if (lan_ch != gcm_ch) { /*skip if gcm */ @@ -5707,8 +5680,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } LanRecord.data[0] = arp_interval; /*grat arp interval */ ret = SetLanEntry (11, &LanRecord, 1); @@ -5725,8 +5697,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } } else { /* error, don't continue */ @@ -5775,8 +5746,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; if (!MacIsValid (rggwymac)) { /* if gwy MAC not resolved */ printf (" Warning: Gateway MAC address was not resolved! " "Check %s interface, use -i ethN, or use -H gwymac.\n", @@ -5792,8 +5762,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } if (IpIsValid (rggwy2ip)) { if (!MacIsValid (rggwy2mac)) /* if gwy2 MAC not set by user */ @@ -5806,8 +5775,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; memcpy (&LanRecord, rggwy2mac, 6); ret = SetLanEntry (15, &LanRecord, 6); printf ("SetLanEntry(15), ret = %d\n", ret); @@ -5815,8 +5783,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } } /* end-else static IP */ if (flansecure) { /* disable cipher 0 */ @@ -5839,8 +5806,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } ret = SetupSerialOverLan (1); /*enable */ SELprintf ("SetupSerialOverLan: ret = %d\n", ret); @@ -5889,8 +5855,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; /* Set Alert Destination Type */ LanRecord.data[0] = alertnum; /* dest id = 1 */ LanRecord.data[1] = 0x00; /* dest type = PET, no ack */ @@ -5929,8 +5894,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; /* ChanAcc changed, so show it again */ j = ShowChanAcc (lan_ch); } @@ -5945,8 +5909,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } else { /*vlan_enable == 1, enable vlan with id */ LanRecord.data[0] = (vlan_id & 0x00ff); @@ -5957,8 +5920,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; LanRecord.data[0] = vlan_prio; ret = SetLanEntry (21, &LanRecord, 1); printf ("SetLanEntry(21), ret = %d\n", ret); @@ -5966,8 +5928,7 @@ main(int argc, char **argv) nerrs++; lasterr = ret; } - else - ngood++; + else ngood++; } } if (failover_enable != PARM_INIT) { diff --git a/util/ipicmg.c b/util/ipicmg.c index af10750..67ce69e 100644 --- a/util/ipicmg.c +++ b/util/ipicmg.c @@ -81,7 +81,7 @@ /* Global data */ static char * progname = "ipicmg"; -static char * progver = "3.07"; +static char * progver = "3.08"; static char fdebug = 0; static char fset_mc = 0; static uint8_t g_bus = PUBLIC_BUS; diff --git a/util/ipmicmd.c b/util/ipmicmd.c index 45d6e8c..b7c8a5f 100644 --- a/util/ipmicmd.c +++ b/util/ipmicmd.c @@ -846,7 +846,7 @@ int ipmi_cmdraw(uchar cmd, uchar netfn, uchar sa, uchar bus, uchar lun, fprintf(fpdbg,"Driver type %s, open rc = %d\n", show_driver_type(fDriverTyp),rc); if (rc == ERR_NO_DRV && !fipmi_lan) fprintf(fperr, "%s", msg_no_drv); - else if (rc != 0) fprintf(fperr,"ipmi_open error = %d\n", rc); + else if (rc != 0) fprintf(fperr,"ipmi_open error = %d %s\n", rc,decode_rv(rc)); if (rc != 0) return(rc); } /*endif first time*/ @@ -1006,7 +1006,7 @@ int ipmi_cmd(ushort icmd, uchar *pdata, int sdata, uchar *presp, show_driver_type(fDriverTyp),rc); if (rc != 0) { if (rc == ERR_NO_DRV && !fipmi_lan) fprintf(fperr, "%s", msg_no_drv); - else fprintf(fperr,"ipmi_open error = %d\n", rc); + else fprintf(fperr,"ipmi_open error = %d %s\n", rc,decode_rv(rc)); return(rc); } } /*endif first time*/ diff --git a/util/ipmidir.c b/util/ipmidir.c index 12b379c..0378d46 100644 --- a/util/ipmidir.c +++ b/util/ipmidir.c @@ -403,13 +403,13 @@ int ipmi_open_direct(int fdebugcmd) #endif } - /* Read ipmi_if config file data, if present. */ - status = get_ipmi_if(); - if (status == -1) { + /* Read ipmi_if config file data, if present. */ + status = get_ipmi_if(); + if (status == -1) { uchar iftype, iver, sa, inc; int mybase; - /* Read SMBIOS to get IPMI struct */ - status = get_IpmiStruct(&iftype,&iver,&sa,&mybase,&inc); + /* Read SMBIOS to get IPMI struct */ + status = get_IpmiStruct(&iftype,&iver,&sa,&mybase,&inc); if (status == 0) { if (iftype == 0x04) { g_DriverType = DRV_SMB; @@ -427,7 +427,7 @@ int ipmi_open_direct(int fdebugcmd) } else { return ERR_NO_DRV; /*no SMBIOS IPMI record*/ } - } + } #ifndef DOS /* superuser/root priv is required for direct I/Os */ @@ -438,20 +438,20 @@ int ipmi_open_direct(int fdebugcmd) } #endif /* check lock for driverless interface */ - i = check_lock_dir(); + i = check_lock_dir(); if (i != 0) { fprintf(stdout,"open_direct interface locked, %s in use\n", lock_dir_file); return ERR_NO_DRV; } - /* Find the SMBIOS IPMI driver type, data */ + /* Find the SMBIOS IPMI driver type, data */ status = ImbInit_dir(); DBGP2("open_direct Init status = %d\n",status); DBGP2("open_direct base=%x spacing=%d\n",BMC_base,kcs_inc); if (status == 0) { fDetectedIF = 1; /*Successfully detected interface */ - /* Send a command to the IPMI interface */ + /* Send a command to the IPMI interface */ if (!fjustpass) status = GetDeviceId(&g_bmcType,&g_ipmiVersion); if (status == 0) { @@ -459,14 +459,13 @@ int ipmi_open_direct(int fdebugcmd) if (g_DriverType == DRV_SMB) typ = "smb"; else typ = "kcs"; set_driver_type(typ); - } - } + } + /* set lock for driverless interface */ + i = set_lock_dir(); + } DBGP("open_direct: status=%d, %s drv, ipmi=%d\n", status,BmcDesc(g_DriverType),g_ipmiVersion); - - /* set lock for driverless interface */ - i = set_lock_dir(); - return status; + return status; } int ipmi_close_direct(void) diff --git a/util/ipmiutil.c b/util/ipmiutil.c index 9e5bc1f..3d7d91d 100644 --- a/util/ipmiutil.c +++ b/util/ipmiutil.c @@ -57,7 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "ipmiutil.h" static char *progname = "ipmiutil"; -static char *progver = "3.07"; +static char *progver = "3.08"; // static char fdebug = 0; /*int ipmiutil(int argc, char **argv); */ diff --git a/util/ireset.c b/util/ireset.c index 36134bc..3853569 100644 --- a/util/ireset.c +++ b/util/ireset.c @@ -108,7 +108,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* * Global variables */ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "ireset"; static uchar ipmi_maj; static uchar ipmi_min; @@ -205,7 +205,7 @@ char *reset_str(uchar breset, uchar bopt) case 4: str = "sending NMI"; break; case 5: str = "shutdown/reset"; break; case 6: str = "shutdown/power_off"; break; /*via agent*/ - case 7: str = "cold reset"; break; + case 7: str = "cold reset BMC"; break; default: str = "resetting"; break; } if (bopt > 0) @@ -546,7 +546,7 @@ main(int argc, char **argv) iana[1] = ((mfg & 0x00FF00) >> 8); iana[2] = (mfg & 0x0000FF); break; - case 'k': breset = 7; break; /* cold reset */ + case 'k': breset = 7; break; /* cold reset to BMC */ case 'w': fwait = 1; break; /* wait for ready */ case 'y': fpersist = 1; break; /* yes, persist boot options */ case 'm': /* specific MC, 3-byte address, e.g. "409600" */ @@ -672,7 +672,7 @@ main(int argc, char **argv) } } - if (breset == 7) { /*do Cold Reset */ + if (breset == 7) { /*do Cold Reset to BMC */ printf("%s: %s ...\n",progname,reset_str(breset,bopt)); rslen = sizeof(rsdata); ret = ipmi_cmdraw( 0x02, NETFN_APP, g_sa, g_bus, g_lun, @@ -681,9 +681,9 @@ main(int argc, char **argv) printf("cold_reset(%02x) ret=%d cc=%x, rslen=%d\n",g_sa,ret,cc,rslen); if (ret == 0) ret = cc; if (ret == 0) - printf("%s: Cold_Reset ok\n",progname); + printf("%s: Cold_Reset to BMC ok\n",progname); else - printf("%s: Cold_Reset error %d\n",progname,ret); + printf("%s: Cold_Reset to BMC error %d\n",progname,ret); ipmi_close_(); } else if (fshutdown && fipmilan && (platform == platIntel)) { /*soft reset*/ diff --git a/util/isel.c b/util/isel.c index 925a689..ede4d52 100644 --- a/util/isel.c +++ b/util/isel.c @@ -162,7 +162,7 @@ typedef struct #define RDATA_OFFSET 13 //byte offset to the record event data static char *progname = "isel"; -static char *progver = "3.07"; +static char *progver = "3.08"; #ifdef WIN32 #define IDXFILE "sel.idx" static char idxfile[80] = IDXFILE; diff --git a/util/iseltime.c b/util/iseltime.c index 0900c31..41f628b 100644 --- a/util/iseltime.c +++ b/util/iseltime.c @@ -78,7 +78,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* * Global variables */ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "iseltime"; static char fdebug = 0; static char fset = 0; diff --git a/util/isensor.c b/util/isensor.c index 7418ae9..286b19d 100644 --- a/util/isensor.c +++ b/util/isensor.c @@ -255,7 +255,7 @@ char *decode_entity_id(int id) { * Global Data ************************/ static char *progname = "isensor"; -static char *progver = "3.07"; +static char *progver = "3.08"; #ifdef WIN32 static char savefile[] = "%ipmiutildir%\\thresholds.cmd"; #else diff --git a/util/iserial.c b/util/iserial.c index f8377c7..cf69129 100644 --- a/util/iserial.c +++ b/util/iserial.c @@ -155,7 +155,7 @@ typedef struct /* * Global variables */ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "iserial"; static int vend_id = 0; static int prod_id = 0; diff --git a/util/isol.c b/util/isol.c index 1713ede..b8ccb1f 100644 --- a/util/isol.c +++ b/util/isol.c @@ -165,7 +165,7 @@ void dbglog( char *pattn, ... ); /*local prototype*/ /* * Global variables */ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "isol"; static char fdebug = 0; static char fpicmg = 0; diff --git a/util/itsol.c b/util/itsol.c index 57bb1eb..6f508ef 100644 --- a/util/itsol.c +++ b/util/itsol.c @@ -98,7 +98,7 @@ int gettimeofday(struct timeval *tv, struct timezone *tz); extern int verbose; extern char fdebug; /*from ipmicmd.c*/ static char * progname = "itsol"; -static char * progver = "3.07"; +static char * progver = "3.08"; static uchar g_bus = PUBLIC_BUS; static uchar g_sa = BMC_SA; static uchar g_lun = BMC_LUN; diff --git a/util/iuser.c b/util/iuser.c index fa8297c..9537f16 100644 --- a/util/iuser.c +++ b/util/iuser.c @@ -57,7 +57,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* global variables */ static char * progname = "iuser"; -static char * progver = "3.07"; +static char * progver = "3.08"; static char fdebug = 0; static char fcanonical = 0; static char bdelim = '|'; @@ -243,6 +243,8 @@ main(int argc, char **argv) printf("%s ver %s\n", progname,progver); + parse_lan_options('V',"4",0); /*default to admin priv*/ + while ( (c = getopt( argc, argv,"cm:T:V:J:EYF:P:N:R:U:Z:x?")) != EOF ) switch (c) { case 'c': fcanonical = 1; break; diff --git a/util/iwdt.c b/util/iwdt.c index d8c3c84..f73d045 100644 --- a/util/iwdt.c +++ b/util/iwdt.c @@ -100,7 +100,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* * Global variables */ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "iwdt"; static char fdebug = 0; static char fdontlog = 0; diff --git a/util/oem_asus.c b/util/oem_asus.c index d5861d4..6aba5ba 100644 --- a/util/oem_asus.c +++ b/util/oem_asus.c @@ -61,7 +61,7 @@ extern char fdebug; /*ipmicmd.c*/ void set_loglevel(int level); /*prototype */ static char * progname = "iasusoem"; -static char * progver = "3.07"; +static char * progver = "3.08"; static int verbose = 0; static uchar g_bus = PUBLIC_BUS; static uchar g_sa = BMC_SA; diff --git a/util/oem_dell.c b/util/oem_dell.c index dcfe52a..9f13b12 100644 --- a/util/oem_dell.c +++ b/util/oem_dell.c @@ -132,7 +132,7 @@ char NIC_Selection_Mode_String_12g[] [50] = { "shared with failover all loms" }; -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "idelloem"; static int verbose = 0; static char fdebug = 0; diff --git a/util/oem_fujitsu.c b/util/oem_fujitsu.c index 9f11b19..5963df2 100644 --- a/util/oem_fujitsu.c +++ b/util/oem_fujitsu.c @@ -52,7 +52,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* extern void get_mfgid(int *vend, int *prod); * from ipmicmd.h*/ /* extern int get_lan_options(); * from ipmicmd.h */ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "ifujitsuoem"; static char fdebug = 0; static char freadok = 1; diff --git a/util/oem_hp.c b/util/oem_hp.c index 862456a..705e8ed 100644 --- a/util/oem_hp.c +++ b/util/oem_hp.c @@ -44,7 +44,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "ievents.h" #include "isensor.h" -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "ihpoem"; static char *redund_str(uchar b) diff --git a/util/oem_intel.c b/util/oem_intel.c index b8d9454..a79e73a 100644 --- a/util/oem_intel.c +++ b/util/oem_intel.c @@ -83,7 +83,7 @@ extern char fdebug; /*ipmicmd.c*/ /* * Global variables */ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "iinteloem"; static char fRelayBits = 0; static uchar g_bus = PUBLIC_BUS; diff --git a/util/oem_kontron.c b/util/oem_kontron.c index 6a3964f..170a304 100644 --- a/util/oem_kontron.c +++ b/util/oem_kontron.c @@ -73,7 +73,7 @@ typedef uint32_t socklen_t; #define FRU_TYPE_COMPONENT 0x01 #define FRU_TYPE_BASEBOARD 0x07 -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "ikontronoem"; const struct valstr ktc5520_post[] = { /*from EAS*/ { 0x0003, "Start POST Init" }, diff --git a/util/oem_lenovo.c b/util/oem_lenovo.c index f37388f..1f23e0f 100644 --- a/util/oem_lenovo.c +++ b/util/oem_lenovo.c @@ -61,7 +61,7 @@ extern uchar bitnum(ushort value); /*isensor.c*/ extern char fdebug; /*ipmicmd.c*/ void set_loglevel(int level); /*prototype */ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "ilenovooem"; static int verbose = 0; static uchar g_bus = PUBLIC_BUS; diff --git a/util/oem_newisys.c b/util/oem_newisys.c index 9ae794b..62486d8 100644 --- a/util/oem_newisys.c +++ b/util/oem_newisys.c @@ -43,7 +43,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "ipmicmd.h" #include "ievents.h" -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "inewisysoem"; static char fdebug = 0; static uchar g_bus = PUBLIC_BUS; diff --git a/util/oem_quanta.c b/util/oem_quanta.c index ab9b105..f41e4d2 100644 --- a/util/oem_quanta.c +++ b/util/oem_quanta.c @@ -45,7 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. extern int decode_sensor_intel_nm(uchar *sdr,uchar *reading, char *pstring,int slen); /*oem_intel.c*/ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "iquantaoem"; static char fdbg = 0; diff --git a/util/oem_sun.c b/util/oem_sun.c index 9ccc905..604caa7 100644 --- a/util/oem_sun.c +++ b/util/oem_sun.c @@ -109,7 +109,7 @@ static const struct valstr sunoem_led_mode_optvals[] = { /* global variables */ static char * progname = "isunoem"; -static char * progver = "3.07"; +static char * progver = "3.08"; static char fdebug = 0; static uchar g_bus = PUBLIC_BUS; static uchar g_sa = BMC_SA; diff --git a/util/oem_supermicro.c b/util/oem_supermicro.c index 1924345..82d6647 100644 --- a/util/oem_supermicro.c +++ b/util/oem_supermicro.c @@ -68,7 +68,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. void set_loglevel(int level); /*prototype */ extern char fsm_debug; /*mem_if.c*/ -static char * progver = "3.07"; +static char * progver = "3.08"; static char * progname = "ismcoem"; static int verbose = 0; static char fdebug = 0; |