Hello community,

here is the log from the commit of package nvme-cli for openSUSE:Factory 
checked in at 2017-08-31 21:03:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nvme-cli (Old)
 and      /work/SRC/openSUSE:Factory/.nvme-cli.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nvme-cli"

Thu Aug 31 21:03:50 2017 rev:17 rq:519919 version:1.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/nvme-cli/nvme-cli.changes        2017-07-02 
13:38:21.301565607 +0200
+++ /work/SRC/openSUSE:Factory/.nvme-cli.new/nvme-cli.changes   2017-08-31 
21:04:14.649824338 +0200
@@ -1,0 +2,6 @@
+Thu Aug 31 10:21:34 UTC 2017 - jthumsh...@suse.com
+
+- Fix hostid parsing (bsc#1049272)
+  + 0007-nvme-cli-fix-connecting-failure-due-to-invalid-uuid-format.patch
+
+-------------------------------------------------------------------

New:
----
  0007-nvme-cli-fix-connecting-failure-due-to-invalid-uuid-format.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nvme-cli.spec ++++++
--- /var/tmp/diff_new_pack.TUtswx/_old  2017-08-31 21:04:16.429574280 +0200
+++ /var/tmp/diff_new_pack.TUtswx/_new  2017-08-31 21:04:16.473568099 +0200
@@ -36,6 +36,7 @@
 Patch4:         0004-nvme-cli-id-ctrl-display-additional-fields.patch
 Patch5:         0005-nvme-cli-add-ns-descs-subcommand.patch
 Patch6:         0006-fabrics-add-hostid-option-to-connect-command.patch
+Patch7:         
0007-nvme-cli-fix-connecting-failure-due-to-invalid-uuid-format.patch
 
 %description
 NVMe is a fast, scalable, direct attached storage interface. The nvme
@@ -50,6 +51,7 @@
 %patch4 -p1
 %patch5 -p1
 %patch6 -p1
+%patch7 -p1
 
 %build
 echo %{version} > version

++++++ 0007-nvme-cli-fix-connecting-failure-due-to-invalid-uuid-format.patch 
++++++
>From 0832d06cd62d3541489a3b74e6280b6b68522880 Mon Sep 17 00:00:00 2001
From: Guan Junxiong <guanjunxi...@huawei.com>
Date: Thu, 3 Aug 2017 21:38:16 +0800
Subject: [PATCH] nvme-cli: fix connecting failure due to invalid uuid format
 of hostid

When we connect or discover a target with --hostid option via the
/etc/nvme/hostid file, we fails this operation because the hostid
is only 35 not 36 bytes which doesn't pass the uuid checking in the
kernel.The last character is overridden with null bytes because fgets
reads at most one less than sizeof of buffer characters.

Signed-off-by: Guan Junxiong <guanjunxi...@huawei.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Signed-off-by: Keith Busch <keith.bu...@intel.com>
---
 fabrics.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fabrics.c b/fabrics.c
index da4e04e..9ed1127 100644
--- a/fabrics.c
+++ b/fabrics.c
@@ -463,7 +463,7 @@ static int nvmf_hostnqn_file(void)
 static int nvmf_hostid_file(void)
 {
        FILE *f;
-       char hostid[NVMF_HOSTID_SIZE];
+       char hostid[NVMF_HOSTID_SIZE + 1];
        int ret = false;
 
        f = fopen(PATH_NVMF_HOSTID, "r");

Reply via email to