mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 01:49:11 +00:00
Create /usr/lib/tmpfiles.d/sudo.conf when systemd is used.
This commit is contained in:
parent
973286c7ac
commit
8fdc46433c
@ -307,6 +307,7 @@ install-dirs:
|
||||
`echo $(DESTDIR)$(vardir)|$(SED) 's,/[^/]*$$,,'`
|
||||
$(INSTALL) -d $(INSTALL_OWNER) -m 0711 $(DESTDIR)$(rundir)
|
||||
$(INSTALL) -d $(INSTALL_OWNER) -m 0711 $(DESTDIR)$(vardir)
|
||||
$(INSTALL) -d $(INSTALL_OWNER) -m 0700 $(DESTDIR)$(vardir)/lectured
|
||||
|
||||
install-binaries: visudo sudoreplay install-dirs
|
||||
INSTALL_BACKUP='~' $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_OWNER) -m 0755 sudoreplay $(DESTDIR)$(replaydir)/sudoreplay
|
||||
|
17
sudo.pp
17
sudo.pp
@ -272,6 +272,7 @@ still allow people to get their work done."
|
||||
$sudoersdir/sudoers.d/ 0750 $sudoers_uid:$sudoers_gid
|
||||
$rundir/ 0711 root:
|
||||
$vardir/ 0711 root: ignore-others
|
||||
$vardir/lectured/ 0700 root:
|
||||
$docdir/ 0755
|
||||
$docdir/sudoers2ldif 0755 optional,ignore-others
|
||||
%if [deb]
|
||||
@ -398,6 +399,15 @@ still allow people to get their work done."
|
||||
;;
|
||||
esac
|
||||
|
||||
%post [rpm,deb]
|
||||
# Create /usr/lib/tmpfiles.d/sudo.conf if /lib/systemd exists
|
||||
if [ -d /lib/systemd ]; then
|
||||
cat > /usr/lib/tmpfiles.d/sudo.conf <<-EOF
|
||||
d %{rundir} 0711 root root
|
||||
d %{rundir}/ts 0700 root root
|
||||
EOF
|
||||
fi
|
||||
|
||||
%post [aix]
|
||||
# Create /etc/rc.d/rc2.d/S90sudo link if /etc/rc.d exists
|
||||
if [ -d /etc/rc.d ]; then
|
||||
@ -423,6 +433,9 @@ still allow people to get their work done."
|
||||
X"`readlink /etc/sudo-ldap.conf 2>/dev/null`" = X"/etc/ldap/ldap.conf"; then
|
||||
rm -f /etc/sudo-ldap.conf
|
||||
fi
|
||||
|
||||
# Remove systemd tmpfile config
|
||||
rm -f /usr/lib/tmpfiles.d/sudo.conf
|
||||
%endif
|
||||
%if [rpm]
|
||||
case "%{pp_rpm_distro}" in
|
||||
@ -430,6 +443,10 @@ still allow people to get their work done."
|
||||
# Remove /etc/rc.d/rc2.d/S90sudo link
|
||||
rm -f /etc/rc.d/rc2.d/S90sudo
|
||||
;;
|
||||
*)
|
||||
# Remove systemd tmpfile config
|
||||
rm -f /usr/lib/tmpfiles.d/sudo.conf
|
||||
;;
|
||||
esac
|
||||
%endif
|
||||
%if [aix]
|
||||
|
Loading…
x
Reference in New Issue
Block a user