summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/096-manpage_longlines.patch56
-rw-r--r--debian/patches/097-source_typo.patch27
-rw-r--r--debian/patches/098-manpage_typo.patch245
-rw-r--r--debian/patches/099_readme_typo25
-rw-r--r--debian/patches/101_fix_buf_overflow.patch22
-rw-r--r--debian/patches/112_fix_CVE-2011-4339.patch21
-rw-r--r--debian/patches/115-lib_declarations.patch23
-rw-r--r--debian/patches/120-Dell-13G.patch401
-rw-r--r--debian/patches/series8
9 files changed, 828 insertions, 0 deletions
diff --git a/debian/patches/096-manpage_longlines.patch b/debian/patches/096-manpage_longlines.patch
new file mode 100644
index 0000000..4acf71a
--- /dev/null
+++ b/debian/patches/096-manpage_longlines.patch
@@ -0,0 +1,56 @@
+Description: long lines in man-page
+ prevent "can't break line" warnings
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Forwarded: not-needed
+Last-Update: 2014-05-20
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/doc/ipmitool.1
+===================================================================
+--- trunk.orig/doc/ipmitool.1 2014-05-27 19:38:41.000000000 +0200
++++ trunk/doc/ipmitool.1 2014-05-27 19:38:41.000000000 +0200
+@@ -1034,7 +1034,7 @@
+ AMC slot B2 topology:
+ Port 0 =====> On Carrier Device ID 0, Port 3
+ Port 2 =====> AMC slot B1, Port 2
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-*
+ From Carrier file: carrierfru
+ On Carrier Device ID 0 topology:
+ Port 0 =====> AMC slot B1, Port 4
+@@ -1090,7 +1090,7 @@
+ \-Link Type: AMC.2 Ethernet
+ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+ \-Link Group ID: 0 || Link Asym. Match: exact match
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-*
+ AMC slot B1 port 1 ==> On-Carrier Device 0 port 12
+ Matching Result
+ - From On-Carrier Device ID 0
+@@ -1103,7 +1103,7 @@
+ \-Link Type: AMC.2 Ethernet
+ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+ \-Link Group ID: 0 || Link Asym. Match: exact match
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-*
+ On-Carrier Device vs AMC slot A2
+ AMC slot A2 port 0 ==> On-Carrier Device 0 port 3
+ Matching Result
+@@ -1117,7 +1117,7 @@
+ \-Link Type: AMC.2 Ethernet
+ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+ \-Link Group ID: 0 || Link Asym. Match: exact match
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-*
+ AMC slot B1 vs AMC slot A2
+ AMC slot A2 port 2 ==> AMC slot B1 port 2
+ Matching Result
+@@ -1131,7 +1131,7 @@
+ \-Link Type: AMC.3 Storage
+ \-Link Type extension: Serial Attached SCSI (SAS/SATA)
+ \-Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match}
+- *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
++ *-*-*-* *-*-* *-*-* *-*-* *-*-* *-*-* *-*-*
+ .TP
+ \fIunmatch\fP <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fr
+ .br
diff --git a/debian/patches/097-source_typo.patch b/debian/patches/097-source_typo.patch
new file mode 100644
index 0000000..1323caf
--- /dev/null
+++ b/debian/patches/097-source_typo.patch
@@ -0,0 +1,27 @@
+Description: typo in source
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Forwarded: https://sourceforge.net/p/ipmitool/patches/101/
+Last-Update: 2014-05-19
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/lib/ipmi_fwum.c
+===================================================================
+--- trunk.orig/lib/ipmi_fwum.c 2014-03-28 13:36:21.000000000 +0100
++++ trunk/lib/ipmi_fwum.c 2014-05-19 14:58:48.313044838 +0200
+@@ -892,14 +892,14 @@
+ }
+ if (rc == 0) {
+ if ((address % 1024) == 0) {
+- KfwumShowProgress("Writting Firmware in Flash",
++ KfwumShowProgress("Writing Firmware in Flash",
+ address, totalSize);
+ }
+ sequenceNumber++;
+ }
+ } while ((rc == 0) && (address < totalSize));
+ if (rc == 0) {
+- KfwumShowProgress("Writting Firmware in Flash",
++ KfwumShowProgress("Writing Firmware in Flash",
+ 100, 100);
+ }
+ return rc;
diff --git a/debian/patches/098-manpage_typo.patch b/debian/patches/098-manpage_typo.patch
new file mode 100644
index 0000000..c667278
--- /dev/null
+++ b/debian/patches/098-manpage_typo.patch
@@ -0,0 +1,245 @@
+Description: typo in man-page
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Last-Update: 2014-05-19
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/doc/ipmitool.1
+===================================================================
+--- trunk.orig/doc/ipmitool.1 2014-05-19 14:51:15.664997239 +0200
++++ trunk/doc/ipmitool.1 2014-05-19 14:54:07.340072131 +0200
+@@ -10,47 +10,47 @@
+ Any recognized option is accepted. Conditional options may be ignored or it's usage postponed until shell or exec processes relevant command.
+ .br
+
+-<general-options> := [ -h | -V | -v | -I <interface> | -H <address> |
+- -d <N> | -p <port> | -c | -U <username> |
+- -L <privlvl> | -l <lun> | -m <local_address> |
+- -N <sec> | -R <count> | <password-option> |
++<general\-options> := [ \-h | \-V | \-v | \-I <interface> | \-H <address> |
++ \-d <N> | \-p <port> | \-c | \-U <username> |
++ \-L <privlvl> | \-l <lun> | \-m <local_address> |
++ \-N <sec> | \-R <count> | <password\-option> |
+ <oem-option> | <bridge-options> ]
+
+-<conditional-opts> := [ <lan-options> | <lanplus-options> |
+- <command-options> ]
++<conditional\-opts> := [ <lan\-options> | <lanplus\-options> |
++ <command\-options> ]
+ .br
+ Bridging:
+ .br
+-<bridge-options> := -t <target_address> [ -b <channel> |
+- [ -T <address> | -B <channel> ] ]
++<bridge\-options> := \-t <target_address> [ \-b <channel> |
++ [ \-T <address> | \-B <channel> ] ]
+ .br
+
+-Options used with -I lan:
++Options used with \-I lan:
+ .br
+-<lan-options> := [ -A <authtype> ]
++<lan\-options> := [ \-A <authtype> ]
+ .br
+
+-Options used with -I lanplus:
++Options used with \-I lanplus:
+ .br
+-<lanplus-options> := [ -C <ciphersuite> | <key-option> ]
++<lanplus\-options> := [ \-C <ciphersuite> | <key\-option> ]
+ .br
+
+ Option groups setting same value:
+ .br
+-<key-option> := [ -k <key> | -K | -y <hex_key> | -Y ]
++<key\-option> := [ \-k <key> | \-K | \-y <hex_key> | \-Y ]
+ .br
+-<password-option> := [ -f <password_file> | -a | -P <password> | -E ]
++<password\-option> := [ \-f <password_file> | \-a | \-P <password> | \-E ]
+ .br
+-<oem-option> := [ -o <oemtype> | -g | -s ]
++<oem\-option> := [ \-o <oemtype> | \-g | \-s ]
+ .br
+
+ Options used with specific command <command-options>:
+ .br
+-<options-sdr> := [ -S <sdr_cache_file> ]
++<options\-sdr> := [ \-S <sdr_cache_file> ]
+ .br
+-<options-sel> := [ -O <sel_oem> ]
++<options\-sel> := [ \-O <sel_oem> ]
+ .br
+-<options-sol> := [ -e <sol_escape_char> ]
++<options\-sol> := [ \-e <sol_escape_char> ]
+
+
+ .SH "DESCRIPTION"
+@@ -120,7 +120,7 @@
+ will default to NULL.
+ .TP
+ \fB\-g\fR
+-Deprecated. Use: -o intelplus
++Deprecated. Use: \-o intelplus
+ .TP
+ \fB\-h\fR
+ Get basic usage help from the command line.
+@@ -151,7 +151,7 @@
+ .TP
+ \fB\-m\fR <\fIlocal_address\fP>
+ Set the local IPMB address. The local address defaults to 0x20
+-or is auto discovered on PICMG platforms when -m is not specified.
++or is auto discovered on PICMG platforms when \-m is not specified.
+ There should be no need to change the local address for normal operation.
+ .TP
+ \fB\-N\fR <\fIsec\fP>
+@@ -185,7 +185,7 @@
+ Command \fIhpm\fP uses fixed value of 10 retries.
+ .TP
+ \fB\-s\fR
+-Deprecated. Use: -o supermicro
++Deprecated. Use: \-o supermicro
+ .TP
+ \fB\-S\fR <\fIsdr_cache_file\fP>
+ Use local file for remote SDR cache. Using a local SDR cache
+@@ -223,7 +223,7 @@
+ \fB\-y\fR <\fIhex key\fP>
+ Use supplied Kg key for IPMIv2.0 authentication. The key is expected in
+ hexadecimal format and can be used to specify keys with non-printable
+-characters. E.g. '-k PASSWORD' and '-y 50415353574F5244' are
++characters. E.g. '\-k PASSWORD' and '\-y 50415353574F5244' are
+ equivalent.
+ The default is not to use any Kg key.
+ .TP
+@@ -1051,7 +1051,7 @@
+ \fIpower\fP <\fBxx=filename1\fR> <\fBxx=filename2\fR> \fB...\fr
+ .br
+
+-Display power supply informations between carrier and AMC modules.
++Display power supply information between carrier and AMC modules.
+ .TP
+ \fIall\fP <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fr
+ .br
+@@ -1063,7 +1063,7 @@
+ .TP
+ \fIfrushow\fP <\fBxx=filename\fR>
+ .br
+-Convert a binary FRU file into human readable text format. Use -v option to get
++Convert a binary FRU file into human readable text format. Use \-v option to get
+ more display information.
+
+ .RE
+@@ -1081,56 +1081,56 @@
+ AMC slot B1 port 0 ==> On-Carrier Device 0 port 16
+ Matching Result
+ - From On-Carrier Device ID 0
+- -Channel ID 11 || Lane 0: enable
+- -Link Type: AMC.2 Ethernet
+- -Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+- -Link Group ID: 0 || Link Asym. Match: exact match
++ \-Channel ID 11 || Lane 0: enable
++ \-Link Type: AMC.2 Ethernet
++ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
++ \-Link Group ID: 0 || Link Asym. Match: exact match
+ - To AMC slot B1
+- -Channel ID 0 || Lane 0: enable
+- -Link Type: AMC.2 Ethernet
+- -Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+- -Link Group ID: 0 || Link Asym. Match: exact match
++ \-Channel ID 0 || Lane 0: enable
++ \-Link Type: AMC.2 Ethernet
++ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
++ \-Link Group ID: 0 || Link Asym. Match: exact match
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ AMC slot B1 port 1 ==> On-Carrier Device 0 port 12
+ Matching Result
+ - From On-Carrier Device ID 0
+- -Channel ID 6 || Lane 0: enable
+- -Link Type: AMC.2 Ethernet
+- -Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+- -Link Group ID: 0 || Link Asym. Match: exact match
++ \-Channel ID 6 || Lane 0: enable
++ \-Link Type: AMC.2 Ethernet
++ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
++ \-Link Group ID: 0 || Link Asym. Match: exact match
+ - To AMC slot B1
+- -Channel ID 1 || Lane 0: enable
+- -Link Type: AMC.2 Ethernet
+- -Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+- -Link Group ID: 0 || Link Asym. Match: exact match
++ \-Channel ID 1 || Lane 0: enable
++ \-Link Type: AMC.2 Ethernet
++ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
++ \-Link Group ID: 0 || Link Asym. Match: exact match
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ On-Carrier Device vs AMC slot A2
+ AMC slot A2 port 0 ==> On-Carrier Device 0 port 3
+ Matching Result
+ - From On-Carrier Device ID 0
+- -Channel ID 9 || Lane 0: enable
+- -Link Type: AMC.2 Ethernet
+- -Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+- -Link Group ID: 0 || Link Asym. Match: exact match
++ \-Channel ID 9 || Lane 0: enable
++ \-Link Type: AMC.2 Ethernet
++ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
++ \-Link Group ID: 0 || Link Asym. Match: exact match
+ - To AMC slot A2
+- -Channel ID 0 || Lane 0: enable
+- -Link Type: AMC.2 Ethernet
+- -Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
+- -Link Group ID: 0 || Link Asym. Match: exact match
++ \-Channel ID 0 || Lane 0: enable
++ \-Link Type: AMC.2 Ethernet
++ \-Link Type extension: 1000BASE-BX (SerDES Gigabit) Ethernet link
++ \-Link Group ID: 0 || Link Asym. Match: exact match
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ AMC slot B1 vs AMC slot A2
+ AMC slot A2 port 2 ==> AMC slot B1 port 2
+ Matching Result
+ - From AMC slot B1
+- -Channel ID 2 || Lane 0: enable
+- -Link Type: AMC.3 Storage
+- -Link Type extension: Serial Attached SCSI (SAS/SATA)
+- -Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match}
++ \-Channel ID 2 || Lane 0: enable
++ \-Link Type: AMC.3 Storage
++ \-Link Type extension: Serial Attached SCSI (SAS/SATA)
++ \-Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match}
+ - To AMC slot A2
+- -Channel ID 2 || Lane 0: enable
+- -Link Type: AMC.3 Storage
+- -Link Type extension: Serial Attached SCSI (SAS/SATA)
+- -Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match}
++ \-Channel ID 2 || Lane 0: enable
++ \-Link Type: AMC.3 Storage
++ \-Link Type extension: Serial Attached SCSI (SAS/SATA)
++ \-Link Group ID: 0 || Link Asym. Match: FC or SAS interface {exact match}
+ *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+ .TP
+ \fIunmatch\fP <\fBxx=filename\fR> <\fBxx=filename\fR> \fB...\fr
+@@ -2981,7 +2981,7 @@
+
+ Execute the service processor command line interface commands.
+ Without any command string, an interactive session is started
+-in the service processor command line environ ment. If a
++in the service processor command line environment. If a
+ command string is specified, the command string is executed
+ on the service processor and the connection is closed.
+ .TP
+@@ -3376,7 +3376,7 @@
+ The ipmitool \fIfree\fP interface utilizes the FreeIPMI libfreeipmi
+ drivers.
+ .LP
+-You can tell ipmitool to use the FreeIPMI interface with the -I option:
++You can tell ipmitool to use the FreeIPMI interface with the \-I option:
+ .PP
+ ipmitool \fB\-I\fR \fIfree\fP <\fIcommand\fP>
+
+@@ -3386,7 +3386,7 @@
+ The ipmitool \fIimb\fP interface supports the Intel IMB (Intel
+ Inter-module Bus) Interface through the /dev/imb device.
+ .LP
+-You can tell ipmitool to use the IMB interface with the -I option:
++You can tell ipmitool to use the IMB interface with the \-I option:
+ .PP
+ ipmitool \fB\-I\fR \fIimb\fP <\fIcommand\fP>
+
diff --git a/debian/patches/099_readme_typo b/debian/patches/099_readme_typo
new file mode 100644
index 0000000..732fc43
--- /dev/null
+++ b/debian/patches/099_readme_typo
@@ -0,0 +1,25 @@
+## 99_readme_typo.dpatch by dann frazier <dannf@hp.com>
+##
+## Typo in README. Closes: #508231
+--- a/README
++++ b/README
+@@ -24,7 +24,7 @@
+ ==========
+ I originally wrote ipmitool while between projects and employeed at Sun
+ Microsystems. Sun had just embarked on a new line of general-purpose x86
+-servers that inclued an OEM Intel board with an IPMIv1.5 BMC on board.
++servers that included an OEM Intel board with an IPMIv1.5 BMC on board.
+ It started with an idea that remote chassis power control would be a handy
+ feature for my systems in the lab and from there it grew into a multi-
+ purpose tool that lots of people found useful. I decided to release it
+--- a/doc/ipmitool.1
++++ b/doc/ipmitool.1
+@@ -44,7 +44,7 @@
+ IPMI management of a local system interface requires a compatible IPMI
+ kernel driver to be installed and configured. On Linux this driver is
+ called \fIOpenIPMI\fP and it is included in standard distributions.
+-On Solaris this driver is called \fIBMC\fP and is inclued in Solaris 10.
++On Solaris this driver is called \fIBMC\fP and is included in Solaris 10.
+ Management of a remote station requires the IPMI\-over\-LAN interface to be
+ enabled and configured. Depending on the particular requirements of each
+ system it may be possible to enable the LAN interface using ipmitool over
diff --git a/debian/patches/101_fix_buf_overflow.patch b/debian/patches/101_fix_buf_overflow.patch
new file mode 100644
index 0000000..68f05d8
--- /dev/null
+++ b/debian/patches/101_fix_buf_overflow.patch
@@ -0,0 +1,22 @@
+Description: fix buffer overflow
+ based on 101_fix_buf_overflow from Leo Iannacone <l3on@ubuntu.com>
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Bug: TSOL buffer overflow
+Bug-ubuntu: https://bugs.launchpad.net/ubuntu/+source/ipmitool/+bug/633054
+Forwarded: https://sourceforge.net/p/ipmitool/patches/100/
+Last-Update: 2014-05-18
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/lib/ipmi_tsol.c
+===================================================================
+--- trunk.orig/lib/ipmi_tsol.c 2014-05-18 19:36:46.059192272 +0200
++++ trunk/lib/ipmi_tsol.c 2014-05-18 19:37:36.028189246 +0200
+@@ -385,7 +385,7 @@
+ socklen_t mylen;
+ char *recvip = NULL;
+ char out_buff[IPMI_BUF_SIZE * 8], in_buff[IPMI_BUF_SIZE];
+- char buff[IPMI_BUF_SIZE + 4];
++ char buff[IPMI_BUF_SIZE * 8 + 4];
+ int fd_socket, result, i;
+ int out_buff_fill, in_buff_fill;
+ int ip1, ip2, ip3, ip4;
diff --git a/debian/patches/112_fix_CVE-2011-4339.patch b/debian/patches/112_fix_CVE-2011-4339.patch
new file mode 100644
index 0000000..f67b845
--- /dev/null
+++ b/debian/patches/112_fix_CVE-2011-4339.patch
@@ -0,0 +1,21 @@
+Description: CVE-2011-4339
+ insecure file permission when creating PID files
+ based on 112_fix_CVE-2011-4339
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=651917
+Forwarded: https://sourceforge.net/p/ipmitool/patches/99/
+Last-Update: 2014-05-18
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/lib/helper.c
+===================================================================
+--- trunk.orig/lib/helper.c 2014-05-18 18:50:55.000000000 +0200
++++ trunk/lib/helper.c 2014-05-18 19:30:41.275908129 +0200
+@@ -657,7 +657,6 @@
+ #endif
+
+ chdir("/");
+- umask(0);
+
+ for (fd=0; fd<64; fd++) {
+ if (fd != intf->fd)
diff --git a/debian/patches/115-lib_declarations.patch b/debian/patches/115-lib_declarations.patch
new file mode 100644
index 0000000..8fc1356
--- /dev/null
+++ b/debian/patches/115-lib_declarations.patch
@@ -0,0 +1,23 @@
+Description: Correct function declarations
+Author: Jörg Frings-Fürst <debian@jff-webhosting.net>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749913
+Last-Update: 2014-05-31
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/lib/ipmi_kontronoem.c
+===================================================================
+--- trunk.orig/lib/ipmi_kontronoem.c 2014-03-28 13:36:21.000000000 +0100
++++ trunk/lib/ipmi_kontronoem.c 2014-05-31 10:25:10.583475442 +0200
+@@ -53,9 +53,9 @@
+ uint8_t id, uint32_t offset, uint32_t length,
+ uint8_t *frubuf);
+ extern int write_fru_area(struct ipmi_intf * intf, struct fru_info *fru,
+- unsigned char id, unsigned int soffset,
+- unsigned int doffset, unsigned int length,
+- unsigned char *pFrubuf);
++ uint8_t id, uint16_t soffset,
++ uint16_t doffset, uint16_t length,
++ uint8_t *pFrubuf);
+
+ extern char * get_fru_area_str(uint8_t * data, uint32_t * offset);
+
diff --git a/debian/patches/120-Dell-13G.patch b/debian/patches/120-Dell-13G.patch
new file mode 100644
index 0000000..0f4ef9b
--- /dev/null
+++ b/debian/patches/120-Dell-13G.patch
@@ -0,0 +1,401 @@
+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>
+Last-Update: 2014-08-07
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: trunk/include/ipmitool/ipmi_delloem.h
+===================================================================
+--- trunk.orig/include/ipmitool/ipmi_delloem.h 2014-08-04 17:24:11.291429804 +0200
++++ trunk/include/ipmitool/ipmi_delloem.h 2014-08-04 17:24:11.279429542 +0200
+@@ -72,6 +72,7 @@
+
+ #define IDRAC_11G 1
+ #define IDRAC_12G 2
++#define IDRAC_13G 3
+ // Return Error code for license
+ #define LICENSE_NOT_SUPPORTED 0x6F
+ #define VFL_NOT_LICENSED 0x33
+@@ -184,6 +185,9 @@
+ #define IMC_IDRAC_12G_MONOLITHIC (uint8_t) (0x10)
+ #define IMC_IDRAC_12G_MODULAR (uint8_t) (0x11)
+
++#define IMC_IDRAC_13G_MONOLITHIC (uint8_t) (0x20)
++#define IMC_IDRAC_13G_MODULAR (uint8_t) (0x21)
++#define IMC_IDRAC_13G_DCS (uint8_t) (0x22)
+
+
+ typedef struct
+Index: trunk/lib/ipmi_delloem.c
+===================================================================
+--- trunk.orig/lib/ipmi_delloem.c 2014-08-04 17:24:11.291429804 +0200
++++ trunk/lib/ipmi_delloem.c 2014-08-04 17:24:11.279429542 +0200
+@@ -123,6 +123,16 @@
+
+ static int current_arg =0;
+ uint8_t iDRAC_FLAG=0;
++
++/*
++ * new flags for
++ * 11G || 12G || 13G -> _ALL
++ * 12G || 13G -> _12_13
++ *
++ */
++uint8_t iDRAC_FLAG_ALL=0;
++uint8_t iDRAC_FLAG_12_13=0;
++
+ LCD_MODE lcd_mode;
+ static uint8_t LcdSupported=0;
+ static uint8_t SetLEDSupported=0;
+@@ -358,7 +368,7 @@
+ lprintf(LOG_ERR, "lcd is not supported on this system.");
+ return -1;
+ } else if (strncmp(argv[current_arg], "info\0", 5) == 0) {
+- if ((iDRAC_FLAG==IDRAC_11G) || (iDRAC_FLAG==IDRAC_12G)) {
++ if (iDRAC_FLAG_ALL) {
+ rc = ipmi_lcd_get_info_wh(intf);
+ } else {
+ rc = ipmi_lcd_get_info(intf);
+@@ -392,7 +402,7 @@
+ }
+ }
+ if ((strncmp(argv[current_arg], "mode\0", 5) == 0)
+- && ((iDRAC_FLAG==IDRAC_11G) || (iDRAC_FLAG==IDRAC_12G))) {
++ && (iDRAC_FLAG_ALL)) {
+ current_arg++;
+ if (argc <= current_arg) {
+ ipmi_lcd_usage();
+@@ -446,7 +456,7 @@
+ ipmi_lcd_usage();
+ }
+ } else if ((strncmp(argv[current_arg], "lcdqualifier\0", 13) == 0)
+- && ((iDRAC_FLAG==IDRAC_11G) || (iDRAC_FLAG==IDRAC_12G))) {
++ && (iDRAC_FLAG_ALL)) {
+ current_arg++;
+ if (argc <= current_arg) {
+ ipmi_lcd_usage();
+@@ -470,7 +480,7 @@
+ ipmi_lcd_usage();
+ }
+ } else if ((strncmp(argv[current_arg], "errordisplay\0", 13) == 0)
+- && ((iDRAC_FLAG==IDRAC_11G) || (iDRAC_FLAG==IDRAC_12G))) {
++ && (iDRAC_FLAG_ALL)) {
+ current_arg++;
+ if (argc <= current_arg) {
+ ipmi_lcd_usage();
+@@ -635,17 +645,33 @@
+ val2str(rsp->ccode, completion_code_vals)); */
+ return -1;
+ }
++ /*
++ * Set the new flags to 0
++ */
++ iDRAC_FLAG_ALL = 0;
++ iDRAC_FLAG_12_13 = 0;
+ /* Support the 11G Monolithic, modular, Maisy and Coaster */
+ if ((IMC_IDRAC_11G_MONOLITHIC == data[10])
+ || (IMC_IDRAC_11G_MODULAR == data[10])
+ || (IMC_MASER_LITE_BMC == data[10])
+ || (IMC_MASER_LITE_NU == data[10])) {
+ iDRAC_FLAG=IDRAC_11G;
++ iDRAC_FLAG_ALL = 1;
+ } else if((IMC_IDRAC_12G_MONOLITHIC == data[10])
+ || (IMC_IDRAC_12G_MODULAR == data[10])) {
+ iDRAC_FLAG = IDRAC_12G;
++ iDRAC_FLAG_ALL = 1;
++ iDRAC_FLAG_12_13 = 1;
++ } else if( (IMC_IDRAC_13G_MONOLITHIC == data[10])
++ || (IMC_IDRAC_13G_MODULAR == data[10])
++ || (IMC_IDRAC_13G_DCS == data[10]) ) {
++ iDRAC_FLAG=IDRAC_13G;
++ iDRAC_FLAG_ALL = 1;
++ iDRAC_FLAG_12_13 = 1;
+ } else {
+ iDRAC_FLAG = 0;
++ iDRAC_FLAG_ALL = 0;
++ iDRAC_FLAG_12_13 = 0;
+ }
+ IMC_Type = data[10];
+ return 0;
+@@ -1394,7 +1420,7 @@
+ lprintf(LOG_NOTICE,
+ "");
+ lprintf(LOG_NOTICE,
+-"iDRAC 11g or iDRAC 12g:");
++"iDRAC 11g or iDRAC 12g or iDRAC 13g :");
+ lprintf(LOG_NOTICE,
+ " lcd set {mode}|{lcdqualifier}|{errordisplay}");
+ lprintf(LOG_NOTICE,
+@@ -1561,7 +1587,9 @@
+ return -1;
+ }
+ if ((IMC_IDRAC_12G_MODULAR == IMC_Type)
+- || (IMC_IDRAC_12G_MONOLITHIC== IMC_Type)) {
++ || (IMC_IDRAC_12G_MONOLITHIC== IMC_Type)
++ || (IMC_IDRAC_13G_MODULAR == IMC_Type)
++ || (IMC_IDRAC_13G_MONOLITHIC== IMC_Type)) {
+ /* Get the Chasiss Assigned MAC Addresss for 12g Only */
+ memcpy(VirtualMacAddress, ((rsp->data) + 1), MACADDRESSLENGH);
+ for (i = 0; i < MACADDRESSLENGH; i++) {
+@@ -1599,6 +1627,9 @@
+ } else if ((IMC_IDRAC_12G_MODULAR == IMC_Type)
+ || (IMC_IDRAC_12G_MONOLITHIC== IMC_Type)) {
+ printf("\niDRAC7 MAC Address ");
++ } else if ((IMC_IDRAC_13G_MODULAR == IMC_Type)
++ || (IMC_IDRAC_13G_MONOLITHIC== IMC_Type)) {
++ printf ("\niDRAC8 MAC Address ");
+ } else if ((IMC_MASER_LITE_BMC== IMC_Type)
+ || (IMC_MASER_LITE_NU== IMC_Type)) {
+ printf("\nBMC MAC Address ");
+@@ -1668,6 +1699,9 @@
+ } else if ((IMC_IDRAC_12G_MODULAR == IMC_Type)
+ || (IMC_IDRAC_12G_MONOLITHIC== IMC_Type)) {
+ printf("\niDRAC7 MAC Address ");
++ } else if ((IMC_IDRAC_13G_MODULAR == IMC_Type)
++ || (IMC_IDRAC_13G_MONOLITHIC== IMC_Type)) {
++ printf ("\niDRAC8 MAC Address ");
+ } else if ((IMC_MASER_LITE_BMC== IMC_Type)
+ || (IMC_MASER_LITE_NU== IMC_Type)) {
+ printf("\n\rBMC MAC Address ");
+@@ -1879,6 +1913,8 @@
+ || IMC_IDRAC_11G_MONOLITHIC == IMC_Type)
+ || (IMC_IDRAC_12G_MODULAR == IMC_Type
+ || IMC_IDRAC_12G_MONOLITHIC == IMC_Type)
++ || (IMC_IDRAC_13G_MODULAR == IMC_Type
++ || IMC_IDRAC_13G_MONOLITHIC == IMC_Type)
+ || (IMC_MASER_LITE_NU == IMC_Type || IMC_MASER_LITE_BMC== IMC_Type)) {
+ return ipmi_macinfo_11g(intf,NicNum);
+ } else {
+@@ -1946,7 +1982,7 @@
+ ipmi_lan_usage();
+ return -1;
+ }
+- if (iDRAC_FLAG == IDRAC_12G) {
++ if (iDRAC_FLAG_12_13) {
+ nic_selection = get_nic_selection_mode_12g(intf, current_arg, argv,
+ nic_set);
+ if (INVALID == nic_selection) {
+@@ -2063,7 +2099,7 @@
+ }
+ if (argv[current_arg] != NULL
+ && strncmp(argv[current_arg], "lom1\0", 5) == 0) {
+- if (IMC_IDRAC_12G_MODULAR == IMC_Type) {
++ if ((IMC_IDRAC_12G_MODULAR == IMC_Type) || (IMC_IDRAC_13G_MODULAR == IMC_Type)) {
+ return INVAILD_SHARED_MODE;
+ }
+ if (failover) {
+@@ -2082,7 +2118,7 @@
+ return 0;
+ } else if (argv[current_arg] != NULL
+ && strncmp(argv[current_arg], "lom2\0", 5) == 0) {
+- if (IMC_IDRAC_12G_MODULAR == IMC_Type) {
++ if ((IMC_IDRAC_12G_MODULAR == IMC_Type) || (IMC_IDRAC_13G_MODULAR == IMC_Type)) {
+ return INVAILD_SHARED_MODE;
+ }
+ if (failover) {
+@@ -2101,7 +2137,7 @@
+ return 0;
+ } else if (argv[current_arg] != NULL
+ && strncmp(argv[current_arg], "lom3\0", 5) == 0) {
+- if (IMC_IDRAC_12G_MODULAR == IMC_Type) {
++ if ((IMC_IDRAC_12G_MODULAR == IMC_Type) || (IMC_IDRAC_13G_MODULAR == IMC_Type)) {
+ return INVAILD_SHARED_MODE;
+ }
+ if (failover) {
+@@ -2120,7 +2156,7 @@
+ return 0;
+ } else if (argv[current_arg] != NULL
+ && strncmp(argv[current_arg], "lom4\0", 5) == 0) {
+- if (IMC_IDRAC_12G_MODULAR == IMC_Type) {
++ if ((IMC_IDRAC_12G_MODULAR == IMC_Type) || (IMC_IDRAC_13G_MODULAR == IMC_Type)) {
+ return INVAILD_SHARED_MODE;
+ }
+ if (failover) {
+@@ -2139,7 +2175,7 @@
+ return 0;
+ } else if (failover && argv[current_arg] != NULL
+ && strncmp(argv[current_arg], "none\0", 5) == 0) {
+- if (IMC_IDRAC_12G_MODULAR == IMC_Type) {
++ if ((IMC_IDRAC_12G_MODULAR == IMC_Type) || (IMC_IDRAC_13G_MODULAR == IMC_Type) ) {
+ return INVAILD_SHARED_MODE;
+ }
+ if (failover) {
+@@ -2159,7 +2195,7 @@
+ current_arg++;
+ if (failover && argv[current_arg] != NULL
+ && strncmp(argv[current_arg], "loms\0", 5) == 0) {
+- if (IMC_IDRAC_12G_MODULAR == IMC_Type) {
++ if ((IMC_IDRAC_12G_MODULAR == IMC_Type) || (IMC_IDRAC_13G_MODULAR == IMC_Type)) {
+ return INVAILD_SHARED_MODE;
+ }
+ if (nic_set[0] == 1) {
+@@ -2242,7 +2278,8 @@
+ lprintf(LOG_ERR, "Error in setting nic selection");
+ return -1;
+ } else if( (nic_selection[0] == 1)
+- && ((iDRAC_FLAG == IDRAC_12G) && (rsp->ccode == LICENSE_NOT_SUPPORTED))) {
++ && (( iDRAC_FLAG_12_13 )
++ && (rsp->ccode == LICENSE_NOT_SUPPORTED))) {
+ /* Check license only for setting the dedicated nic. */
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+@@ -2297,7 +2334,7 @@
+ input_length = 0;
+ req.msg.netfn = DELL_OEM_NETFN;
+ req.msg.lun = 0;
+- if (iDRAC_FLAG == IDRAC_12G) {
++ if( iDRAC_FLAG_12_13 ) {
+ req.msg.cmd = GET_NIC_SELECTION_12G_CMD;
+ } else {
+ req.msg.cmd = GET_NIC_SELECTION_CMD;
+@@ -2314,7 +2351,7 @@
+ return -1;
+ }
+ nic_selection = rsp->data[0];
+- if (iDRAC_FLAG == IDRAC_12G) {
++ if( iDRAC_FLAG_12_13 ) {
+ nic_selection_failover = rsp->data[1];
+ if ((nic_selection < 6) && (nic_selection > 0)
+ && (nic_selection_failover < 7)) {
+@@ -2413,7 +2450,7 @@
+ lprintf(LOG_NOTICE,
+ " sets the NIC Selection Mode :");
+ lprintf(LOG_NOTICE,
+-" on iDRAC12g :");
++" on iDRAC12g OR iDRAC13g :");
+ lprintf(LOG_NOTICE,
+ " dedicated, shared with lom1, shared with lom2,shared with lom3,shared");
+ lprintf(LOG_NOTICE,
+@@ -2433,7 +2470,7 @@
+ lprintf(LOG_NOTICE,
+ " lan get ");
+ lprintf(LOG_NOTICE,
+-" on iDRAC12g :");
++" on iDRAC12g or iDRAC13g :");
+ lprintf(LOG_NOTICE,
+ " returns the current NIC Selection Mode (dedicated, shared with lom1, shared");
+ lprintf(LOG_NOTICE,
+@@ -2662,7 +2699,7 @@
+ if (rsp == NULL) {
+ lprintf(LOG_ERR, "Error getting powercap status");
+ return -1;
+- } else if((iDRAC_FLAG == IDRAC_12G) && (rsp->ccode == LICENSE_NOT_SUPPORTED)) {
++ } else if(( iDRAC_FLAG_12_13 ) && (rsp->ccode == LICENSE_NOT_SUPPORTED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+ return -1; /* Return Error as unlicensed */
+@@ -2713,7 +2750,7 @@
+ if (rsp == NULL) {
+ lprintf(LOG_ERR, "Error setting powercap status");
+ return -1;
+- } else if ((iDRAC_FLAG == IDRAC_12G) && (rsp->ccode == LICENSE_NOT_SUPPORTED)) {
++ } else if ((iDRAC_FLAG_12_13) && (rsp->ccode == LICENSE_NOT_SUPPORTED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+ return -1; /* return unlicensed Error code */
+@@ -2807,7 +2844,7 @@
+ return -1;
+ }
+
+- if((iDRAC_FLAG == IDRAC_12G) && (rsp->ccode == LICENSE_NOT_SUPPORTED)) {
++ if((iDRAC_FLAG_12_13) && (rsp->ccode == LICENSE_NOT_SUPPORTED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+ return -1;
+@@ -2910,7 +2947,7 @@
+ if (rsp == NULL) {
+ lprintf(LOG_ERR, "Error clearing power values.");
+ return -1;
+- } else if ((iDRAC_FLAG == IDRAC_12G)
++ } else if ((iDRAC_FLAG_12_13)
+ && (rsp->ccode == LICENSE_NOT_SUPPORTED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+@@ -2988,7 +3025,7 @@
+ if (rsp == NULL) {
+ lprintf(LOG_ERR, "Error getting power headroom status");
+ return -1;
+- } else if ((iDRAC_FLAG == IDRAC_12G)
++ } else if ((iDRAC_FLAG_12_13)
+ && (rsp->ccode == LICENSE_NOT_SUPPORTED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+@@ -3122,7 +3159,7 @@
+ if (rsp == NULL) {
+ lprintf(LOG_ERR, "Error getting instantaneous power consumption data .");
+ return -1;
+- } else if ((iDRAC_FLAG == IDRAC_12G)
++ } else if ((iDRAC_FLAG_12_13)
+ && (rsp->ccode == LICENSE_NOT_SUPPORTED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+@@ -3215,7 +3252,7 @@
+ lprintf(LOG_ERR,
+ "Error getting average power consumption history data.");
+ return -1;
+- } else if ((iDRAC_FLAG == IDRAC_12G) && (rc == LICENSE_NOT_SUPPORTED)) {
++ } else if ((iDRAC_FLAG_12_13) && (rc == LICENSE_NOT_SUPPORTED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+ return -1;
+@@ -3264,7 +3301,7 @@
+ if (rc < 0) {
+ lprintf(LOG_ERR, "Error getting peak power consumption history data.");
+ return -1;
+- } else if ((iDRAC_FLAG == IDRAC_12G) && (rc == LICENSE_NOT_SUPPORTED)) {
++ } else if ((iDRAC_FLAG_12_13) && (rc == LICENSE_NOT_SUPPORTED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+ return -1;
+@@ -3321,7 +3358,7 @@
+ if (rc < 0) {
+ lprintf(LOG_ERR, "Error getting peak power consumption history data .");
+ return -1;
+- } else if ((iDRAC_FLAG == IDRAC_12G) && (rc == LICENSE_NOT_SUPPORTED)) {
++ } else if ((iDRAC_FLAG_12_13) && (rc == LICENSE_NOT_SUPPORTED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+ return -1;
+@@ -3518,7 +3555,7 @@
+ if (rc < 0) {
+ lprintf(LOG_ERR, "Error getting power cap.");
+ return -1;
+- } else if ((iDRAC_FLAG == IDRAC_12G) && (rc == LICENSE_NOT_SUPPORTED)) {
++ } else if ((iDRAC_FLAG_12_13) && (rc == LICENSE_NOT_SUPPORTED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+ return -1;
+@@ -3618,7 +3655,7 @@
+ if (rc < 0) {
+ lprintf(LOG_ERR, "Error getting power cap.");
+ return -1;
+- } else if ((iDRAC_FLAG == IDRAC_12G) && (rc == LICENSE_NOT_SUPPORTED)) {
++ } else if ((iDRAC_FLAG_12_13) && (rc == LICENSE_NOT_SUPPORTED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+ return -1;
+@@ -3698,7 +3735,7 @@
+ if (rc < 0) {
+ lprintf(LOG_ERR, "Error setting power cap");
+ return -1;
+- } else if ((iDRAC_FLAG == IDRAC_12G) && (rc == LICENSE_NOT_SUPPORTED)) {
++ } else if ((iDRAC_FLAG_12_13) && (rc == LICENSE_NOT_SUPPORTED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
+ return -1;
+@@ -3860,7 +3897,7 @@
+
+ sdcardinfoblock = (IPMI_DELL_SDCARD_INFO *) (void *) rsp->data;
+
+- if ((iDRAC_FLAG == IDRAC_12G)
++ if ((iDRAC_FLAG_12_13)
+ && (sdcardinfoblock->vflashcompcode == VFL_NOT_LICENSED)) {
+ lprintf(LOG_ERR,
+ "FM001 : A required license is missing or expired");
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1239814
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,8 @@
+120-Dell-13G.patch
+115-lib_declarations.patch
+097-source_typo.patch
+098-manpage_typo.patch
+101_fix_buf_overflow.patch
+112_fix_CVE-2011-4339.patch
+099_readme_typo
+096-manpage_longlines.patch