Hello community, here is the log from the commit of package nvme-cli for openSUSE:Factory checked in at 2018-04-05 15:33:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nvme-cli (Old) and /work/SRC/openSUSE:Factory/.nvme-cli.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nvme-cli" Thu Apr 5 15:33:47 2018 rev:24 rq:593537 version:1.5 Changes: -------- --- /work/SRC/openSUSE:Factory/nvme-cli/nvme-cli.changes 2018-02-14 10:51:44.169437338 +0100 +++ /work/SRC/openSUSE:Factory/.nvme-cli.new/nvme-cli.changes 2018-04-05 15:33:50.927367984 +0200 @@ -1,0 +2,6 @@ +Wed Apr 4 09:56:54 UTC 2018 - [email protected] + +- Make log identifier a required parameter (bsc#1086240) + + 0003-get-log-Make-log-identifier-a-required-parameter.patch + +------------------------------------------------------------------- New: ---- 0003-get-log-Make-log-identifier-a-required-parameter.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nvme-cli.spec ++++++ --- /var/tmp/diff_new_pack.6YMl0E/_old 2018-04-05 15:33:52.175322881 +0200 +++ /var/tmp/diff_new_pack.6YMl0E/_new 2018-04-05 15:33:52.175322881 +0200 @@ -20,7 +20,7 @@ Version: 1.5 Release: 0 Summary: NVM Express user space tools -License: GPL-2.0 +License: GPL-2.0-only Group: Hardware/Other Url: https://github.com/linux-nvme/nvme-cli Source: %{name}-v%{version}.tar.gz @@ -31,6 +31,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Patch1: 0001-nvme-cli-add-NetApp-plugin.patch Patch2: 0002-nvme-cli-add-netapp-smdevices-man-page.patch +Patch3: 0003-get-log-Make-log-identifier-a-required-parameter.patch %description NVM Express (NVMe) is a direct attached storage interface. The @@ -41,6 +42,7 @@ %setup -q -n %{name}-v%{version} %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build echo %{version} > version ++++++ 0003-get-log-Make-log-identifier-a-required-parameter.patch ++++++ From: Keith Busch <[email protected]> Date: Mon, 19 Mar 2018 16:55:34 -0600 Subject: get-log: Make log identifier a required parameter Git-commit: 44044e6c3c6fc1d4813163d5054c0750ef88ee06 References: bsc#1086240 Patch-mainline: v1.6 If you're using the generic get-log, make sure the user specifies the log parameter. It would be a user error if they don't as they should never be counting on a default parameter. Link: https://github.com/linux-nvme/nvme-cli/pull/320 Signed-off-by: Keith Busch <[email protected]> --- nvme.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) --- a/nvme.c +++ b/nvme.c @@ -409,7 +409,7 @@ static int get_log(int argc, char **argv struct config cfg = { .namespace_id = NVME_NSID_ALL, - .log_id = 0, + .log_id = 0xffffffff, .log_len = 0, }; @@ -431,9 +431,16 @@ static int get_log(int argc, char **argv cfg.log_id = (cfg.aen >> 16) & 0xff; } + if (cfg.log_id > 0xff) { + fprintf(stderr, "Invalid log identifier: %d. Valid range: 0-255\n", cfg.log_id); + err = EINVAL; + goto close_fd; + } + if (!cfg.log_len) { fprintf(stderr, "non-zero log-len is required param\n"); - return EINVAL; + err = EINVAL; + goto close_fd; } else { unsigned char *log; @@ -457,9 +464,14 @@ static int get_log(int argc, char **argv nvme_status_to_string(err), err); else perror("log page"); + close(fd); free(log); return err; } + +close_fd: + close(fd); + return err; } static const char * sanitize_mon_status_to_string(__u16 status)
