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