Your message dated Tue, 24 May 2016 22:30:07 +0000
with message-id <[email protected]>
and subject line Bug#822160: fixed in tgt 1:1.0.64-1
has caused the Debian Bug report #822160,
regarding tgtd fails to parse numbers (like -d1 or -t1)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
822160: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822160
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: tgt
Version: 1:1.0.63-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu  ubuntu-patch

Dear Maintainer,

When attempting to use parameters with numbers, tgtd fails to parse them.

# ./tgtd -d 1
-d argument value '1' invalid
Try `tgtd --help' for more information.

This is due to improper use of errno after calling strtoull which
only sets errno when value is out of range (see man strtoull).


In Ubuntu, the attached patch was applied to achieve the following:

  * debian/patches/util_strtoull_errno.patch by Stas Sergeev
    - Fix errno handling for number * parsing (LP: #1547060)


Thanks for considering the patch.


-- System Information:
Debian Release: stretch/sid
  APT prefers xenial-updates
  APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 
'xenial'), (100, 'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-18-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru tgt-1.0.63/debian/patches/series tgt-1.0.63/debian/patches/series
--- tgt-1.0.63/debian/patches/series	2016-03-30 01:20:59.000000000 -0500
+++ tgt-1.0.63/debian/patches/series	2016-04-21 09:13:03.000000000 -0500
@@ -3,3 +3,4 @@
 use-dpkg-buildflags.patch
 do-not-build-html-manpages.patch
 fix-aio-detection.patch
+util_strtoull_errno.patch
diff -Nru tgt-1.0.63/debian/patches/util_strtoull_errno.patch tgt-1.0.63/debian/patches/util_strtoull_errno.patch
--- tgt-1.0.63/debian/patches/util_strtoull_errno.patch	1969-12-31 18:00:00.000000000 -0600
+++ tgt-1.0.63/debian/patches/util_strtoull_errno.patch	2016-04-21 09:28:19.000000000 -0500
@@ -0,0 +1,37 @@
+Description: fix errno check in util.h preventing numeric arg parsing
+ From 3f3991ee3345f9728928711f6be7a0020568faf6 Mon Sep 17 00:00:00 2001
+ From: Stas Sergeev <[email protected]>
+ Date: Thu, 18 Feb 2016 18:35:23 +0300
+ Subject: [PATCH] fix errno check
+
+ errno can only be checked if the return value indicates an error.
+ The result of this bug is the following:
+
+  ./tgtd -d 1
+  -d argument value '1' invalid
+  Try `tgtd --help' for more information.
+
+  As can be seen, it rejects the valid parameter because errno just
+  happens to be non-zero.
+Author: Stas Sergeev <[email protected]>
+Origin: https://github.com/fujita/tgt/pull/18/commits/3f3991ee3345f9728928711f6be7a0020568faf6
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/tgt/+bug/1547060
+Last-Update: 20160421
+
+---
+ usr/util.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usr/util.h b/usr/util.h
+index 0e34c35..019ff1c 100644
+--- a/usr/util.h
++++ b/usr/util.h
+@@ -148,7 +148,7 @@ struct signalfd_siginfo {
+ 	unsigned long long ull_val;     		\
+ 	ull_val = strtoull(str, &ptr, 0);       	\
+ 	val = (typeof(val)) ull_val;    		\
+-	if (errno || ptr == str)			\
++	if (ull_val == ULONG_MAX || ptr == str)		\
+ 		ret = EINVAL;   			\
+ 	else if (val != ull_val)			\
+ 		ret = ERANGE;   			\

--- End Message ---
--- Begin Message ---
Source: tgt
Source-Version: 1:1.0.64-1

We believe that the bug you reported is fixed in the latest version of
tgt, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Apollon Oikonomopoulos <[email protected]> (supplier of updated tgt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Tue, 24 May 2016 12:04:40 +0300
Source: tgt
Binary: tgt tgt-rbd tgt-glusterfs tgt-dbg
Architecture: source
Version: 1:1.0.64-1
Distribution: unstable
Urgency: medium
Maintainer: Apollon Oikonomopoulos <[email protected]>
Changed-By: Apollon Oikonomopoulos <[email protected]>
Description:
 tgt        - Linux SCSI target user-space daemon and tools
 tgt-dbg    - Linux SCSI target user-space daemon and tools - debug symbols
 tgt-glusterfs - Linux SCSI target user-space daemon and tools - GlusterFS 
support
 tgt-rbd    - Linux SCSI target user-space daemon and tools - RBD support
Closes: 822160
Changes:
 tgt (1:1.0.64-1) unstable; urgency=medium
 .
   * New upstream release:
     + Enable tgt-admin to bring up Gluster backing stores
     + Fix argument conversion for command line options with integer arguments
       (closes: #822160)
     + timerfd support fixes
   * Bump standards version to 3.9.8; no changes needed
   * Enable all hardening flags
     + Add d/patches/fix-pie-build to patch upstream's Makefile to allow -fPIE
       builds
Checksums-Sha1:
 60aea156fd35afb7c9baa77d0850b87cd5809452 2161 tgt_1.0.64-1.dsc
 0310634f86ac60b0d2cd8a7c52eb2e189c2b4908 295247 tgt_1.0.64.orig.tar.gz
 51a45bf5621c7ddaf4ed3421c18d68858f883a69 10808 tgt_1.0.64-1.debian.tar.xz
Checksums-Sha256:
 7bd20b1da7412eef7b95b27aea6327ef502940626dcc1348228126cdf839d4be 2161 
tgt_1.0.64-1.dsc
 fd47340040308984edf50a7910121f4a17d13d296b1c5eaa6e7f4bad4d3b3fc0 295247 
tgt_1.0.64.orig.tar.gz
 c071c841820609e80c5d0d94157dad8713b01b7aa0420e84b66724842eed9625 10808 
tgt_1.0.64-1.debian.tar.xz
Files:
 d855bddfeb03dbd1f63fb32f3ac6f5fb 2161 net optional tgt_1.0.64-1.dsc
 c01c668f9aed0a3aa91d287f5afec037 295247 net optional tgt_1.0.64.orig.tar.gz
 6f382d8d3a5857eac946aac2a3a8c54f 10808 net optional tgt_1.0.64-1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJXRLgKAAoJENutyevup8YOP+kP/iTXJf7Z0/X3486n+bWrYGx6
g5Bc/1n4FGk1snUnhp8I0e1nNOftYELeZfaufxtwWCcWrzTq3XgHF01RVYdNFSOl
4uvMOJ5xIdhjgGln341quSkNDadCGzdb00oMGnFNQRphFAyxuzAokdCxgBAhbUvN
YRJXXZHDcWTo9+gtkx6h5aO05nnRRf46uh0iKe5Jon5ASjvzdFPekCmbxn6e6LRc
TIKbA8LTRTP3/1HYCbKKdqq8Nm1Z90tjoDX4M42ocbrcbi5sQhhoDBsRgzJOJ9hW
BWH8QbznVpvJCe4n1wH4z4x0M0eg3QqAHBtiwvzLSTnkEdI85Dacziq/0/LXprBR
1fvKzd9nZ310w+saFn2v/lmp7QEPU/na3F65lkEMk631B3GXs4cdLHJy+Z56CcHA
Gtzp576ScfoeBWHxdnHvJEN7a1gFQKhFY4mAjE4d+JWSca/yDFgTjWFRTvnbj6ac
hk/Y3EMDREYudv7khaf2SZDIfQ2X0OQJlhmgdnlooLjcnPkJIByM+Ni4i9j969qX
pVNYwCmkXXPMfaT4BWx3QKBKqFNaDy3QbE0wnd7IvU3FZzx1y+G1dSgZfjQqf1UM
gTQ6IwxS9yPnoiaTzdx1wLzUD9OcQ960s/pL4Ge6dr4ljqCGTkpOoMm7VDJQMolX
gysxvXEvNsgND3F9RBV6
=gRTi
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to