Fix abort on unknown argument
Resolves: #2087066 Signed-off-by: Robbie Harwood <rharwood@redhat.com>
This commit is contained in:
parent
d983f1b2ef
commit
2e88844273
31
0001-Show-usage-instead-of-aborting-on-bad-flags.patch
Normal file
31
0001-Show-usage-instead-of-aborting-on-bad-flags.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Robbie Harwood <rharwood@redhat.com>
|
||||||
|
Date: Tue, 17 May 2022 11:23:28 -0400
|
||||||
|
Subject: [PATCH] Show usage instead of aborting on bad flags
|
||||||
|
|
||||||
|
Aborting here just confuses users and is sufficiently unexpected to
|
||||||
|
cause the filing of bugs.
|
||||||
|
|
||||||
|
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2087066
|
||||||
|
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
|
||||||
|
(cherry picked from commit 82694cb1ce3b29c3705c25ae4cea3d07fe57b558)
|
||||||
|
---
|
||||||
|
src/mokutil.c | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/mokutil.c b/src/mokutil.c
|
||||||
|
index 5d725c9..e8228af 100644
|
||||||
|
--- a/src/mokutil.c
|
||||||
|
+++ b/src/mokutil.c
|
||||||
|
@@ -2087,10 +2087,9 @@ main (int argc, char *argv[])
|
||||||
|
goto out;
|
||||||
|
case 'h':
|
||||||
|
case '?':
|
||||||
|
+ default:
|
||||||
|
command |= HELP;
|
||||||
|
break;
|
||||||
|
- default:
|
||||||
|
- abort ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
1
mokutil.patches
Normal file
1
mokutil.patches
Normal file
@ -0,0 +1 @@
|
|||||||
|
Patch0001: 0001-Show-usage-instead-of-aborting-on-bad-flags.patch
|
@ -1,11 +1,12 @@
|
|||||||
Name: mokutil
|
Name: mokutil
|
||||||
Version: 0.6.0
|
Version: 0.6.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Epoch: 2
|
Epoch: 2
|
||||||
Summary: Tool to manage UEFI Secure Boot MoK Keys
|
Summary: Tool to manage UEFI Secure Boot MoK Keys
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: https://github.com/lcp/mokutil
|
URL: https://github.com/lcp/mokutil
|
||||||
Source0: https://github.com/lcp/mokutil/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
Source0: https://github.com/lcp/mokutil/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
Source1: mokutil.patches
|
||||||
ExclusiveArch: %{ix86} x86_64 aarch64 %{arm}
|
ExclusiveArch: %{ix86} x86_64 aarch64 %{arm}
|
||||||
|
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
@ -43,6 +44,10 @@ mokutil provides a tool to manage keys for Secure Boot through the MoK
|
|||||||
%{_datadir}/bash-completion/completions/mokutil
|
%{_datadir}/bash-completion/completions/mokutil
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 23 2022 Robbie Harwood <rharwood@redhat.com> - 2:0.6.0-2
|
||||||
|
- Fix abort on unknown argument
|
||||||
|
- Resolves: #2087066
|
||||||
|
|
||||||
* Sat May 07 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2:0.6.0-1
|
* Sat May 07 2022 Peter Robinson <pbrobinson@fedoraproject.org> - 2:0.6.0-1
|
||||||
- Update to 0.6.0 release
|
- Update to 0.6.0 release
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user