rpms/OpenIPMI/devel ipmitool-1.8.2-fru.patch, NONE, 1.1 ipmitool-1.8.2-kgkey.patch, NONE, 1.1 OpenIPMI.spec, 1.21, 1.22
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Jan 9 15:46:30 UTC 2006
Author: pknirsch
Update of /cvs/dist/rpms/OpenIPMI/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv13271
Modified Files:
OpenIPMI.spec
Added Files:
ipmitool-1.8.2-fru.patch ipmitool-1.8.2-kgkey.patch
Log Message:
- Included FRU fix for displaying FRUs with ipmitool
- Included patch for new option to specify a BMC password for IPMI 2.0 sessions
ipmitool-1.8.2-fru.patch:
ipmi_fru.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
--- NEW FILE ipmitool-1.8.2-fru.patch ---
--- OpenIPMI-1.4.11/ipmitool-1.8.2/lib/ipmi_fru.c.fru 2005-05-18 02:08:30.000000000 -0500
+++ OpenIPMI-1.4.11/ipmitool-1.8.2/lib/ipmi_fru.c 2005-11-11 17:39:17.000000000 -0600
@@ -197,7 +197,7 @@
req.msg.data = msg_data;
req.msg.data_len = 4;
- if (fru->access && fru_data_rqst_size > 16)
+ if (fru_data_rqst_size > 16)
fru_data_rqst_size = 16;
do {
tmp = fru->access ? off >> 1 : off;
@@ -216,8 +216,6 @@
break;
}
if (rsp->ccode > 0) {
- lprintf(LOG_NOTICE, "FRU Read failed: %s",
- val2str(rsp->ccode, completion_code_vals));
/* if we get C7 or C8 return code then we requested too
* many bytes at once so try again with smaller size */
if ((rsp->ccode == 0xc7 || rsp->ccode == 0xc8) &&
@@ -226,6 +224,8 @@
fru_data_rqst_size);
continue;
}
+ lprintf(LOG_NOTICE, "FRU Read failed: %s",
+ val2str(rsp->ccode, completion_code_vals));
break;
}
@@ -780,15 +780,15 @@
lprintf(LOG_DEBUG, "fru.header.version: 0x%x",
header.version);
lprintf(LOG_DEBUG, "fru.header.offset.internal: 0x%x",
- header.offset.internal);
+ header.offset.internal * 8);
lprintf(LOG_DEBUG, "fru.header.offset.chassis: 0x%x",
- header.offset.chassis);
+ header.offset.chassis * 8);
lprintf(LOG_DEBUG, "fru.header.offset.board: 0x%x",
- header.offset.board);
+ header.offset.board * 8);
lprintf(LOG_DEBUG, "fru.header.offset.product: 0x%x",
- header.offset.product);
+ header.offset.product * 8);
lprintf(LOG_DEBUG, "fru.header.offset.multi: 0x%x",
- header.offset.multi);
+ header.offset.multi * 8);
/*
* rather than reading the entire part
ipmitool-1.8.2-kgkey.patch:
include/ipmitool/ipmi_intf.h | 1 +
lib/ipmi_main.c | 15 +++++++++++++--
src/plugins/ipmi_intf.c | 16 ++++++++++++++++
src/plugins/lanplus/lanplus.c | 3 ++-
src/plugins/lanplus/lanplus_crypt.c | 8 --------
5 files changed, 32 insertions(+), 11 deletions(-)
--- NEW FILE ipmitool-1.8.2-kgkey.patch ---
--- OpenIPMI-1.4.14/ipmitool-1.8.2/lib/ipmi_main.c.kgkey 2006-01-09 16:10:19.000000000 +0100
+++ OpenIPMI-1.4.14/ipmitool-1.8.2/lib/ipmi_main.c 2006-01-09 16:10:43.000000000 +0100
@@ -74,9 +74,9 @@
#endif
#ifdef ENABLE_ALL_OPTIONS
-# define OPTION_STRING "I:hVvcgsEao:H:P:f:U:p:C:L:A:t:m:S:"
+# define OPTION_STRING "I:hVvcgsEao:H:P:f:U:p:k:C:L:A:t:m:S:"
#else
-# define OPTION_STRING "I:hVvcH:f:U:p:"
+# define OPTION_STRING "I:hVvcH:f:U:p:k:"
#endif
extern int verbose;
@@ -236,6 +236,7 @@
lprintf(LOG_NOTICE, " -o oemtype Setup for OEM (use 'list' to see available OEM types)");
lprintf(LOG_NOTICE, " -S sdr Use local file for remote SDR cache");
#endif
+ lprintf(LOG_NOTICE, " -k key Use KG key for IPMI 2.0 authentication");
lprintf(LOG_NOTICE, "");
ipmi_intf_print(intflist);
@@ -274,6 +275,7 @@
char * progname = NULL;
char * oemtype = NULL;
char * sdrcache = NULL;
+ char * kgkey = NULL;
int port = 0;
int cipher_suite_id = 3; /* See table 22-19 of the IPMIv2 spec */
int argflag, i, found;
@@ -359,6 +361,13 @@
}
}
break;
+ case 'k':
+ kgkey = strdup(optarg);
+ if (kgkey == NULL) {
+ lprintf(LOG_ERR, "%s: malloc failure", progname);
+ goto out_free;
+ }
+ break;
case 'U':
username = strdup(optarg);
if (username == NULL) {
@@ -522,6 +531,8 @@
ipmi_intf_session_set_username(intf, username);
if (password != NULL)
ipmi_intf_session_set_password(intf, password);
+ if (kgkey != NULL)
+ ipmi_intf_session_set_kgkey(intf, kgkey);
if (port > 0)
ipmi_intf_session_set_port(intf, port);
if (authtype >= 0)
--- OpenIPMI-1.4.14/ipmitool-1.8.2/src/plugins/lanplus/lanplus_crypt.c.kgkey 2006-01-09 16:09:35.000000000 +0100
+++ OpenIPMI-1.4.14/ipmitool-1.8.2/src/plugins/lanplus/lanplus_crypt.c 2006-01-09 16:10:43.000000000 +0100
@@ -527,14 +527,6 @@
if (session->v2_data.kg[0])
{
/* We will be hashing with Kg */
- /*
- * TODO: Section 13.31 of the IPMI v2 spec describes the SIK creation
- * using Kg. It specifies that Kg should not be truncated, but I
- * do not know what is meant by that.
- */
- lprintf(LOG_ERR, "lanplus_generate_sik: We dont yet support hashing with Kg");
- assert(0);
-
input_key = session->v2_data.kg;
}
else
--- OpenIPMI-1.4.14/ipmitool-1.8.2/src/plugins/lanplus/lanplus.c.kgkey 2006-01-09 16:09:44.000000000 +0100
+++ OpenIPMI-1.4.14/ipmitool-1.8.2/src/plugins/lanplus/lanplus.c 2006-01-09 16:10:43.000000000 +0100
@@ -3113,8 +3113,9 @@
//session->sol_data.last_received_sequence_number = 0;
//session->sol_data.last_received_byte_count = 0;
memset(session->v2_data.sik, 0, IPMI_SIK_BUFFER_SIZE);
- memset(session->v2_data.kg, 0, IPMI_KG_BUFFER_SIZE);
+ /* kg key is now set in ipmi_intf */
+ //memset(session->v2_data.kg, 0, IPMI_KG_BUFFER_SIZE);
/* open port to BMC */
memset(&addr, 0, sizeof(struct sockaddr_in));
--- OpenIPMI-1.4.14/ipmitool-1.8.2/src/plugins/ipmi_intf.c.kgkey 2006-01-09 16:09:56.000000000 +0100
+++ OpenIPMI-1.4.14/ipmitool-1.8.2/src/plugins/ipmi_intf.c 2006-01-09 16:10:43.000000000 +0100
@@ -206,6 +206,22 @@
__min(strlen(password), IPMI_AUTHCODE_BUFFER_SIZE));
}
+
+void
+ipmi_intf_session_set_kgkey(struct ipmi_intf * intf, char * kgkey)
+{
+ if (intf->session == NULL)
+ return;
+
+ memset(intf->session->v2_data.kg, 0, IPMI_KG_BUFFER_SIZE);
+
+ if (kgkey == NULL)
+ return;
+
+ memcpy(intf->session->v2_data.kg, kgkey,
+ __min(strlen(kgkey), IPMI_KG_BUFFER_SIZE));
+}
+
void
ipmi_intf_session_set_privlvl(struct ipmi_intf * intf, uint8_t level)
{
--- OpenIPMI-1.4.14/ipmitool-1.8.2/include/ipmitool/ipmi_intf.h.kgkey 2006-01-09 16:10:08.000000000 +0100
+++ OpenIPMI-1.4.14/ipmitool-1.8.2/include/ipmitool/ipmi_intf.h 2006-01-09 16:10:43.000000000 +0100
@@ -190,6 +190,7 @@
void ipmi_intf_session_set_hostname(struct ipmi_intf * intf, char * hostname);
void ipmi_intf_session_set_username(struct ipmi_intf * intf, char * username);
void ipmi_intf_session_set_password(struct ipmi_intf * intf, char * password);
+void ipmi_intf_session_set_kgkey(struct ipmi_intf * intf, char * kgkey);
void ipmi_intf_session_set_privlvl(struct ipmi_intf * intf, uint8_t privlvl);
void ipmi_intf_session_set_cipher_suite_id(struct ipmi_intf * intf, uint8_t cipher_suite_id);
void ipmi_intf_session_set_port(struct ipmi_intf * intf, int port);
Index: OpenIPMI.spec
===================================================================
RCS file: /cvs/dist/rpms/OpenIPMI/devel/OpenIPMI.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- OpenIPMI.spec 3 Jan 2006 08:58:00 -0000 1.21
+++ OpenIPMI.spec 9 Jan 2006 15:46:28 -0000 1.22
@@ -14,6 +14,8 @@
Patch2: OpenIPMI-1.4.14-oob.patch
Patch3: OpenIPMI-1.4.14-warnings.patch
Patch4: OpenIPMI-1.4.14-lanplus-session-privset.patch
+Patch20: ipmitool-1.8.2-fru.patch
+Patch21: ipmitool-1.8.2-kgkey.patch
BuildRoot: /var/tmp/%{name}-%{version}-root
BuildPrereq: gdbm-devel swig glib2-devel net-snmp-devel ncurses-devel openssl-devel
@@ -53,6 +55,8 @@
%patch2 -p1 -b .oob
%patch3 -p1 -b .warnings
%patch4 -p1 -b .lanplus-session-privset
+%patch20 -p1 -b .fru
+%patch21 -p1 -b .kgkey
%build
%configure
@@ -104,7 +108,10 @@
%{_bindir}/ipmicmd
%{_bindir}/ipmilan
%{_bindir}/ipmish
-%{_mandir}/man[18]/*
+%{_mandir}/man1/ipmi_ui*
+%{_mandir}/man1/ipmicmd*
+%{_mandir}/man1/ipmish*
+%{_mandir}/man8/ipmilan*
%{_libdir}/perl5/site_perl/*/*-linux-thread-multi/OpenIPMI.pm
%dir %{_libdir}/perl5/site_perl/*/*-linux-thread-multi/auto/OpenIPMI
%{_libdir}/perl5/site_perl/*/*-linux-thread-multi/auto/OpenIPMI/*
@@ -113,6 +120,8 @@
%defattr(-,root,root)
%{_datadir}/ipmitool/
%{_bindir}/ipmitool
+%{_mandir}/man1/ipmitool*
+%{_mandir}/man8/ipmievd*
/usr/sbin/ipmievd
%files libs
@@ -128,6 +137,10 @@
%{_libdir}/*.a
%changelog
+* Mon Jan 09 2006 Phil Knirsch <pknirsch at redhat.com> 1.4.14-15
+- Included FRU fix for displaying FRUs with ipmitool
+- Included patch for new option to specify a BMC password for IPMI 2.0 sessions
+
* Tue Jan 03 2006 Radek Vokal <rvokal at redhat.com> 1.4.14-15
- Rebuilt against new libnetsnmp
More information about the fedora-cvs-commits
mailing list