Adds disable_nologin.patch
This commit is contained in:
parent
c5aa870a6e
commit
42e9efbb5f
2 changed files with 26 additions and 14 deletions
22
apcupsd.spec
22
apcupsd.spec
|
|
@ -4,11 +4,10 @@
|
|||
|
||||
Name: apcupsd
|
||||
Version: 3.14.14
|
||||
Release: 33%{?dist}
|
||||
Release: 31%{?dist}
|
||||
Summary: APC UPS Power Control Daemon
|
||||
|
||||
# Automatically converted from old format: GPLv2 - review is highly recommended.
|
||||
License: GPL-2.0-only
|
||||
License: GPLv2
|
||||
URL: http://www.apcupsd.com
|
||||
Source0: https://downloads.sourceforge.net/apcupsd/apcupsd-%version.tar.gz
|
||||
Source1: apcupsd.service
|
||||
|
|
@ -20,9 +19,10 @@ Source5: apcupsd64x64.png
|
|||
# fix crash in gui, rhbz#578276
|
||||
Patch0: apcupsd-3.14.9-fixgui.patch
|
||||
# Halt without powering off, rhbz#1442577
|
||||
Patch1: apcupsd-3.14.4-shutdown.patch
|
||||
#Patch1: apcupsd-3.14.4-shutdown.patch
|
||||
# Fix format-security error so we can enable the checks
|
||||
Patch2: patch-format-security
|
||||
Patch3: disable_nologin.patch
|
||||
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
|
|
@ -167,17 +167,11 @@ rm examples/*.in
|
|||
|
||||
|
||||
%changelog
|
||||
* Mon Jul 29 2024 Miroslav Suchý <msuchy@redhat.com> - 3.14.14-33
|
||||
- convert license to SPDX
|
||||
* Fri Nov 08 2024 Germano Massullo <germano.massullo@gmail.com> - 3.14.14-31
|
||||
- Adds disable_nologin.patch
|
||||
|
||||
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-32
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-31
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-30
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
* Sun Jan 07 2024 Germano Massullo <germano.massullo@gmail.com> - 3.14.14-30
|
||||
- disables apcupsd-3.14.4-shutdown.patch
|
||||
|
||||
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.14.14-29
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
|
|
|||
18
disable_nologin.patch
Normal file
18
disable_nologin.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
diff -urNr apcupsd-3.14.14-orig/src/action.c apcupsd-3.14.14/src/action.c
|
||||
--- apcupsd-3.14.14-orig/src/action.c 2015-03-20 04:59:41.000000000 +0100
|
||||
+++ apcupsd-3.14.14/src/action.c 2024-11-08 16:48:46.095910557 +0100
|
||||
@@ -189,13 +189,7 @@
|
||||
|
||||
static void prohibit_logins(UPSINFO *ups)
|
||||
{
|
||||
- if (ups->nologin_file)
|
||||
- return; /* already done */
|
||||
-
|
||||
- logonfail(ups, 0);
|
||||
- ups->nologin_file = true;
|
||||
-
|
||||
- log_event(ups, LOG_ALERT, "User logins prohibited");
|
||||
+ return;
|
||||
}
|
||||
|
||||
static void do_shutdown(UPSINFO *ups, int cmdtype)
|
||||
Loading…
Add table
Add a link
Reference in a new issue