do not crash when missing action argument (RHEL-102581)
Resolves: RHEL-102581
This commit is contained in:
parent
0f941becb2
commit
cbdf9c8e3a
16
usermode-1.114-fixnoargs.patch
Normal file
16
usermode-1.114-fixnoargs.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
diff -up usermode-1.114-build/usermode-1.114/userhelper.c.fixnoargs usermode-1.114-build/usermode-1.114/userhelper.c
|
||||||
|
--- usermode-1.114-build/usermode-1.114/userhelper.c.fixnoargs 2025-07-09 00:13:58.800352637 +0200
|
||||||
|
+++ usermode-1.114-build/usermode-1.114/userhelper.c 2025-07-09 00:13:58.814677097 +0200
|
||||||
|
@@ -2397,6 +2397,12 @@ main(int argc, char **argv)
|
||||||
|
exit(ERR_INVALID_CALL);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (!SHELL_FLAGS && !c_flag && !w_flag) {
|
||||||
|
+ debug_msg("userhelper: invalid call: "
|
||||||
|
+ "missing action argument\n");
|
||||||
|
+ exit(ERR_INVALID_CALL);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* Determine which conversation function to use. */
|
||||||
|
if (t_flag) {
|
||||||
|
/* We were told to use text mode. */
|
@ -9,13 +9,16 @@
|
|||||||
Summary: Tools for certain user account management tasks
|
Summary: Tools for certain user account management tasks
|
||||||
Name: usermode
|
Name: usermode
|
||||||
Version: 1.114
|
Version: 1.114
|
||||||
Release: 12%{?dist}
|
Release: 13%{?dist}
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
URL: https://pagure.io/%{name}/
|
URL: https://pagure.io/%{name}/
|
||||||
Source: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.xz
|
Source: https://releases.pagure.org/%{name}/%{name}-%{version}.tar.xz
|
||||||
Source1: config-util
|
Source1: config-util
|
||||||
# do not free environ as glibc may want to do that, RHEL-73769
|
# do not free environ as glibc may want to do that, RHEL-73769
|
||||||
Patch2: usermode-1.114-fixfree.patch
|
Patch2: usermode-1.114-fixfree.patch
|
||||||
|
|
||||||
|
# sent upstream, for <= 1.114, RHEL-90414
|
||||||
|
Patch3: usermode-1.114-fixnoargs.patch
|
||||||
Requires: pam, passwd, util-linux
|
Requires: pam, passwd, util-linux
|
||||||
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/IJFYI5Q2BYZKIGDFS2WLOBDUSEGWHIKV/
|
# https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/IJFYI5Q2BYZKIGDFS2WLOBDUSEGWHIKV/
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
@ -56,6 +59,7 @@ graphical tools for certain account management tasks.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch -P 2 -p1 -b .fixfree
|
%patch -P 2 -p1 -b .fixfree
|
||||||
|
%patch -P 3 -p2 -b .fixnoargs
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --with-selinux --without-fexecve %{!?with_gtk:--without-gtk}
|
%configure --with-selinux --without-fexecve %{!?with_gtk:--without-gtk}
|
||||||
@ -116,6 +120,9 @@ done
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 15 2025 Michal Hlavinka <mhlavink@redhat.com> - 1.114-13
|
||||||
|
- do not crash when missing action argument (RHEL-102581)
|
||||||
|
|
||||||
* Wed Jan 22 2025 Michal Hlavinka <mhlavink@redhat.com> - 1.114-12
|
* Wed Jan 22 2025 Michal Hlavinka <mhlavink@redhat.com> - 1.114-12
|
||||||
- do not (double) free environ as glibc may want to do that (RHEL-73769)
|
- do not (double) free environ as glibc may want to do that (RHEL-73769)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user