[scsi-target-utils] update to 1.0.14-2
Andy Grover
grover at fedoraproject.org
Thu Mar 17 21:22:53 UTC 2011
commit 9373fe8c7614cfb4a47cfa4ad13d2c1d08b13cfb
Author: Andy Grover <agrover at redhat.com>
Date: Thu Mar 17 14:21:10 2011 -0700
update to 1.0.14-2
Signed-off-by: Andy Grover <agrover at redhat.com>
scsi-target-utils-git-sync.patch | 152 ++++++++++++++++++++++++++++++++++++++
scsi-target-utils.spec | 17 +++--
2 files changed, 163 insertions(+), 6 deletions(-)
---
diff --git a/scsi-target-utils-git-sync.patch b/scsi-target-utils-git-sync.patch
new file mode 100644
index 0000000..9212152
--- /dev/null
+++ b/scsi-target-utils-git-sync.patch
@@ -0,0 +1,152 @@
+Andy Grover (3):
+ tgt-setup-lun: change manpage bugs reporting addr to stgt at vger
+ tgt-setup-lun: only delete new target on err when one was created
+ tgt-admin: merge duplicate blocks in targets.conf
+
+FUJITA Tomonori (1):
+ iscsi: fix buffer overflow before login
+
+Roland Friedwagner (1):
+ semaphore key clash with Open-iSCSI initiator and FHS correction for ipc socket
+
+Zdenek Kaspar (1):
+ remove README.ibmvstgt entry from doc/Makefile
+
+diff --git a/doc/Makefile b/doc/Makefile
+index 3c6fa08..60ae8e9 100644
+--- a/doc/Makefile
++++ b/doc/Makefile
+@@ -4,7 +4,7 @@ docdir ?= $(PREFIX)/share/doc/tgt
+ MANPAGES = manpages/tgtadm.8 manpages/tgt-admin.8 manpages/tgtimg.8 \
+ manpages/tgt-setup-lun.8 manpages/tgtd.8
+
+-DOCS = README.fcoe README.ibmvstgt README.iscsi README.iser \
++DOCS = README.fcoe README.iscsi README.iser \
+ README.lu_configuration README.mmc tmf.txt
+
+ XSLTPROC = /usr/bin/xsltproc
+diff --git a/doc/manpages/tgt-setup-lun.8 b/doc/manpages/tgt-setup-lun.8
+index 2c7c3b0..c1045e8 100644
+--- a/doc/manpages/tgt-setup-lun.8
++++ b/doc/manpages/tgt-setup-lun.8
+@@ -40,6 +40,7 @@ tgt-setup-lun -h
+ .SH AUTHOR
+ Written by Erez Zilber
+ .SH "REPORTING BUGS"
+-Report bugs to <erezz at voltaire.com>.
++.PP
++Report bugs to <stgt at vger\&.kernel\&.org>
+ .SH COPYRIGHT
+ Copyright \(co Voltaire Ltd. 2008.
+diff --git a/scripts/tgt-admin b/scripts/tgt-admin
+index 2c69e8b..2ffa8cf 100755
+--- a/scripts/tgt-admin
++++ b/scripts/tgt-admin
+@@ -162,7 +162,7 @@ sub parse_configs {
+ # Check if alternative configuration file exists
+ if (-e "$alternate_conf") {
+ execute("# Using $alternate_conf as configuration file\n");
+- %conf = ParseConfig(-ConfigFile => "$alternate_conf", -UseApacheInclude => 1, -IncludeGlob => 1,);
++ %conf = ParseConfig(-ConfigFile => "$alternate_conf", -UseApacheInclude => 1, -IncludeGlob => 1, -MergeDuplicateBlocks => 1);
+ }
+ else {
+ die("Config file $alternate_conf not found. Exiting...\n");
+@@ -170,7 +170,7 @@ sub parse_configs {
+ } else {
+ # Parse the config file with Config::General
+ if (-e "$configfile") {
+- %conf = ParseConfig(-ConfigFile => "$configfile", -UseApacheInclude => 1, -IncludeGlob => 1,);
++ %conf = ParseConfig(-ConfigFile => "$configfile", -UseApacheInclude => 1, -IncludeGlob => 1, -MergeDuplicateBlocks => 1);
+ } else {
+ die("Config file $configfile not found. Exiting...\n");
+ }
+diff --git a/scripts/tgt-setup-lun b/scripts/tgt-setup-lun
+index 2685095..9fef7f9 100755
+--- a/scripts/tgt-setup-lun
++++ b/scripts/tgt-setup-lun
+@@ -120,6 +120,10 @@ find_vacant_lun()
+
+ err_exit()
+ {
++ if ((new_tgt == 0)); then
++ exit 1
++ fi
++
+ echo "Deleting new target, tid=$tid"
+ tgtadm --lld $lld_name --op delete --mode target --tid $tid
+ res=$?
+@@ -196,6 +200,7 @@ if [ $? -eq 1 ]; then
+ fi
+ tid=$(tgtadm --lld $lld_name --op show --mode target | grep $tgt_name | cut -d" " -f2)
+ tid=${tid%:}
++ new_tgt=0
+ else
+ find_vacant_tgt_id
+ tid=$?
+@@ -209,6 +214,7 @@ else
+ echo "Error: failed to create target (name=$tgt_name, tid=$tid)"
+ exit 1
+ fi
++ new_tgt=1
+ fi
+
+ find_vacant_lun $tid
+diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
+index ff3f32b..e8140e0 100644
+--- a/usr/iscsi/iscsid.c
++++ b/usr/iscsi/iscsid.c
+@@ -1987,6 +1987,13 @@ again:
+ conn->req.ahssize = conn->req.bhs.hlength * 4;
+ conn->req.datasize = ntoh24(conn->req.bhs.dlength);
+ conn->rx_size = conn->req.ahssize;
++
++ if (conn->state != STATE_SCSI &&
++ conn->req.ahssize > INCOMING_BUFSIZE) {
++ conn->state = STATE_CLOSE;
++ return;
++ }
++
+ if (conn->rx_size) {
+ conn->rx_buffer = conn->req.ahs;
+ conn->rx_iostate = IOSTATE_RX_AHS;
+@@ -2039,6 +2046,14 @@ again:
+ if (conn->rx_size) {
+ conn->rx_iostate = IOSTATE_RX_DATA;
+ conn->rx_buffer = conn->req.data;
++
++ if (conn->state != STATE_SCSI) {
++ if (conn->req.ahssize + conn->rx_size >
++ INCOMING_BUFSIZE) {
++ conn->state = STATE_CLOSE;
++ return;
++ }
++ }
+ } else {
+ conn->rx_iostate = IOSTATE_RX_END;
+ break;
+diff --git a/usr/log.c b/usr/log.c
+index f2c08a6..06cd8bf 100644
+--- a/usr/log.c
++++ b/usr/log.c
+@@ -33,7 +33,7 @@
+
+ #include "log.h"
+
+-#define SEMKEY 0xA7L
++#define SEMKEY 0x54475444L /* TGTD */
+ #define LOGDBG 0
+
+ #if LOGDBG
+diff --git a/usr/tgtadm.h b/usr/tgtadm.h
+index 53a9608..f53baaa 100644
+--- a/usr/tgtadm.h
++++ b/usr/tgtadm.h
+@@ -1,7 +1,7 @@
+ #ifndef TGTADM_H
+ #define TGTADM_H
+
+-#define TGT_IPC_NAMESPACE "/tmp/.TGT_IPC_ABSTRACT_NAMESPACE"
++#define TGT_IPC_NAMESPACE "/var/run/tgtd.ipc_abstract_namespace"
+ #define TGT_LLD_NAME_LEN 64
+
+ #define GLOBAL_TID (~0U)
diff --git a/scsi-target-utils.spec b/scsi-target-utils.spec
index a28d0fa..ef01b4f 100644
--- a/scsi-target-utils.spec
+++ b/scsi-target-utils.spec
@@ -1,6 +1,6 @@
Name: scsi-target-utils
Version: 1.0.14
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: The SCSI target daemon and utility programs
Group: System Environment/Daemons
@@ -11,8 +11,9 @@ Source1: tgtd.init
Source2: sysconfig.tgtd
Source3: targets.conf
Patch0: scsi-target-utils-redhatify-docs.patch
-Patch1: scsi-target-utils-dynamic-link-iser.patch
-Patch2: scsi-target-utils-hack-check-for-eventfd.patch
+Patch1: scsi-target-utils-git-sync.patch
+Patch2: scsi-target-utils-dynamic-link-iser.patch
+Patch3: scsi-target-utils-hack-check-for-eventfd.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -28,9 +29,10 @@ Currently, software iSCSI targets are supported.
%prep
%setup -q -n tgt-%{version}
-%patch0 -p1 -b .redhatify-docs
-%patch1 -p1 -b .dynamic-link-iser
-%patch2 -p1 -b .hack-check-for-eventfd
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
%build
pushd usr
@@ -94,6 +96,9 @@ fi
%changelog
+* Thu Mar 17 2011 Andy Grover <agrover at redhat.com> - 1.0.14-2
+- Add git-sync patch to get up to 9c1cd78.
+
* Thu Mar 17 2011 Andy Grover <agrover at redhat.com> - 1.0.14-1
- Update to new upstream release
More information about the scm-commits
mailing list