Remove conflicting ownership of motd.d directories

They are owned by the `setup` package [1], which `pam` requires, so
owning these directories by `pam` is wrong and unnecessary.

Also remove the /run/motd.d line from pamtmp.conf, which is also already
present in the `setup` package's tmpfiles config file.

Should fix warnings like this during package updates:
```
  Running scriptlet: libsepol-3.3-2.fc35.x86_64                                                  16/16
/usr/lib/tmpfiles.d/pam.conf:4: Duplicate line for path "/run/motd.d", ignoring.
/usr/lib/tmpfiles.d/setup.conf:2: Duplicate line for path "/run/motd.d", ignoring.
```

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
This commit is contained in:
Ondrej Mosnacek 2022-01-10 20:56:52 +01:00 committed by Iker Pedrosa
parent e5cf2946fd
commit f86a932e22
2 changed files with 4 additions and 6 deletions

View File

@ -3,7 +3,7 @@
Summary: An extensible library which provides authentication for applications
Name: pam
Version: 1.5.1
Release: 7%{?dist}
Release: 8%{?dist}
# The library is BSD licensed with option to relicense as GPLv2+
# - this option is redundant as the BSD license allows that anyway.
# pam_timestamp, pam_loginuid, and pam_console modules are GPLv2+.
@ -167,8 +167,6 @@ install -m 644 %{SOURCE16} $RPM_BUILD_ROOT%{_pamconfdir}/postlogin
install -m 600 /dev/null $RPM_BUILD_ROOT%{_secconfdir}/opasswd
install -d -m 755 $RPM_BUILD_ROOT/var/log
install -d -m 755 $RPM_BUILD_ROOT/var/run/faillock
install -d -m 755 $RPM_BUILD_ROOT/usr/lib/motd.d
install -d -m 755 $RPM_BUILD_ROOT/run/motd.d
# Install man pages.
install -m 644 %{SOURCE12} %{SOURCE13} %{SOURCE17} $RPM_BUILD_ROOT%{_mandir}/man5/
@ -343,8 +341,6 @@ done
%dir /var/run/sepermit
%endif
%dir /var/run/faillock
%dir /run/motd.d
%dir /usr/lib/motd.d
%{_prefix}/lib/tmpfiles.d/pam.conf
%{_mandir}/man5/*
%{_mandir}/man8/*
@ -379,6 +375,9 @@ test "$FILE" != %{_sysconfdir}/authselect/fingerprint-auth && \
exit 0
%changelog
* Mon Jan 10 2022 Ondrej Mosnacek <omosnace@redhat.com> - 1.5.2-8
- Remove conflicting ownership of motd.d directories
* Fri Oct 8 2021 Iker Pedrosa <ipedrosa@redhat.com> - 1.5.1-7
- Remove the /etc/motd.d directory to exclude its ownership from pam (#1968131)

View File

@ -1,5 +1,4 @@
d /run/console 0755 root root -
d /run/faillock 0755 root root -
d /run/sepermit 0755 root root -
d /run/motd.d 0755 root root -
f /var/log/tallylog 0600 root root -