Blame SOURCES/kmod-0001-depmod-Don-t-fall-back-to-uname-on-bad-version.patch

ca9082
From 1f5010924500a4fd83047584d1fbdba5517dffa2 Mon Sep 17 00:00:00 2001
ca9082
From: Tony Camuso <tcamuso@redhat.com>
ca9082
Date: Fri, 24 Jun 2016 12:37:48 -0400
ca9082
Subject: [RHEL-7.3 PATCH 1/3] depmod: Don't fall back to uname on bad version
ca9082
ca9082
Cherry-picked without conflicts from the following upstream commit.
ca9082
ca9082
commit f3f62f5ec3b23823b2ce02e37bc707dc85c56461
ca9082
Author: Laura Abbott <labbott@fedoraproject.org>
ca9082
Date:   Mon Sep 28 15:39:14 2015 -0700
ca9082
ca9082
    depmod: Don't fall back to uname on bad version
ca9082
ca9082
    Currently, if a value that doesn't match a kernel version
ca9082
    ("%u.%u") is passed in, depmod silently falls back to
ca9082
    using uname. Rather than try and work around the caller passing
ca9082
    bad data, just exit out instead.
ca9082
ca9082
Signed-off-by: Tony Camuso <tcamuso@redhat.com>
ca9082
---
ca9082
 tools/depmod.c | 6 +++++-
ca9082
 1 file changed, 5 insertions(+), 1 deletion(-)
ca9082
ca9082
diff --git a/tools/depmod.c b/tools/depmod.c
ca9082
index 231b9ab..8d5c671 100644
ca9082
--- a/tools/depmod.c
ca9082
+++ b/tools/depmod.c
ca9082
@@ -2475,7 +2475,11 @@ static int do_depmod(int argc, char *argv[])
ca9082
 		}
ca9082
 	}
ca9082
 
ca9082
-	if (optind < argc && is_version_number(argv[optind])) {
ca9082
+	if (optind < argc) {
ca9082
+		if (!is_version_number(argv[optind])) {
ca9082
+			ERR("Bad version passed %s\n", argv[optind]);
ca9082
+			goto cmdline_failed;
ca9082
+		}
ca9082
 		cfg.kversion = argv[optind];
ca9082
 		optind++;
ca9082
 	} else {
ca9082
-- 
ca9082
1.8.3.1
ca9082