From dd659bf840c4cf5f1c6230f426fe1ddda4f5ce13 Mon Sep 17 00:00:00 2001 From: Marek Kulik Date: Mon, 27 Sep 2021 11:43:51 +0200 Subject: [PATCH] Fix setsebool log message with selinux disabled This is cosmetic fix, that's prevent execution of setsebool during ypbind service start when selinux is disabled. As a result invalid boolean message should not occur in logs anymore: systemd[1]: Starting NIS/YP (Network Information Service) Clients to NIS Domain Binder... setsebool[1581714]: Could not change active booleans: Invalid boolean Resolves: #1882069 --- ypbind.service | 2 +- ypbind.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ypbind.service b/ypbind.service index 16a4cf8..2c45afe 100644 --- a/ypbind.service +++ b/ypbind.service @@ -13,7 +13,7 @@ NotifyAccess=all EnvironmentFile=-/etc/sysconfig/network EnvironmentFile=-/etc/sysconfig/ypbind ExecStartPre=/usr/libexec/ypbind-pre-setdomain -ExecStartPre=-/usr/sbin/setsebool allow_ypbind=1 +ExecStartPre=-/bin/bash -c 'selinuxenabled && /usr/sbin/setsebool allow_ypbind=1' ExecStart=/usr/sbin/ypbind -n $OTHER_YPBIND_OPTS ExecStartPost=/usr/libexec/ypbind-post-waitbind PrivateTmp=true diff --git a/ypbind.spec b/ypbind.spec index d82dc7d..434db87 100644 --- a/ypbind.spec +++ b/ypbind.spec @@ -2,7 +2,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain Name: ypbind Epoch: 3 Version: 2.7.2 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv2 Source0: https://github.com/thkukuk/ypbind-mt/archive/v%{version}.tar.gz#/ypbind-mt-%{version}.tar.gz Url: http://www.linux-nis.org/nis/ypbind-mt/index.html @@ -109,6 +109,9 @@ install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-post-waitbind %license COPYING %changelog +* Tue Sep 28 2021 Marek Kulik - 3:2.7.2-6 +- Fix setsebool message in logs, resolves: #1882069 + * Fri Jul 23 2021 Fedora Release Engineering - 3:2.7.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild