/etc/sudoers: remove old programs and add ufw to SYSADM_CMD (to fix mambatray enable/disable) [release 1.8.9p5-2mamba;Thu Jul 03 2014]

This commit is contained in:
Silvan Calarco 2024-01-05 18:11:17 +01:00
parent 5fa94b316f
commit 4df0d396e3
2 changed files with 15 additions and 11 deletions

View File

@ -10,10 +10,9 @@
# User alias specification # User alias specification
# Cmnd alias specification # Cmnd alias specification
Cmnd_Alias DISTRO_CMD = /usr/bin/apt-get, /usr/bin/rpm, /usr/sbin/synaptic, /usr/bin/apt-cdrom, /opt/kde3/bin/mambapt, /usr/bin/smart Cmnd_Alias DISTRO_CMD = /usr/bin/rpm, /usr/bin/smart
Cmnd_Alias EXTRA_CMD = /usr/bin/updatechecker, /usr/sbin/activate # Cmnd_Alias EXTRA_CMD =
Cmnd_Alias SYSADM_CMD = /usr/bin/kdesu_stub, /sbin/service, /sbin/chkconfig, \ Cmnd_Alias SYSADM_CMD = /sbin/service, /sbin/chkconfig, /usr/sbin/ufw
/opt/kde3/bin/guarddog
Cmnd_Alias SYSADM_CMD_PASSWD = /sbin/*, /usr/sbin/*, /bin/*, /usr/bin/*, /opt/kde/bin/*, /opt/kde3/bin/* Cmnd_Alias SYSADM_CMD_PASSWD = /sbin/*, /usr/sbin/*, /bin/*, /usr/bin/*, /opt/kde/bin/*, /opt/kde3/bin/*
# Defaults specification # Defaults specification
@ -31,6 +30,6 @@ root ALL=(ALL) ALL
%packager ALL = NOPASSWD: DISTRO_CMD %packager ALL = NOPASSWD: DISTRO_CMD
%sysadmin ALL = NOPASSWD: DISTRO_CMD %sysadmin ALL = NOPASSWD: DISTRO_CMD
%sysadmin ALL = NOPASSWD: SYSADM_CMD %sysadmin ALL = NOPASSWD: SYSADM_CMD
%sysadmin ALL = NOPASSWD: EXTRA_CMD # %sysadmin ALL = NOPASSWD: EXTRA_CMD
#includedir /etc/sudoers.d #includedir /etc/sudoers.d

View File

@ -5,7 +5,7 @@
Name: sudo Name: sudo
Version: 1.8.9p5 Version: 1.8.9p5
Release: 1mamba Release: 2mamba
Summary: Allows restricted root access for specified users Summary: Allows restricted root access for specified users
Group: System/Tools Group: System/Tools
Vendor: openmamba Vendor: openmamba
@ -114,11 +114,13 @@ groupadd sysadmin -g %{sysadmin_groupid} 2>/dev/null || :
exit 0 exit 0
%post %post
/bin/chmod 0440 %{_sysconfdir}/sudoers || : if [ $1 -gt 1 ]; then
grep mambapt %{_sysconfdir}/sudoers >/dev/null || \ /bin/chmod 0440 %{_sysconfdir}/sudoers || :
sed -i "s|\(Cmnd_Alias DISTRO_CMD = .*\)|\1, /opt/kde3/bin/mambapt|" %{_sysconfdir}/sudoers grep guarddog %{_sysconfdir}/sudoers >/dev/null && \
grep "/etc/sudoers\.d" %{_sysconfdir}/sudoers >/dev/null || \ sed -i "s|/opt/kde3/bin/guarddog|/usr/sbin/ufw|" %{_sysconfdir}/sudoers
echo "#includedir /etc/sudoers.d" >> %{_sysconfdir}/sudoers #grep "/etc/sudoers\.d" %{_sysconfdir}/sudoers >/dev/null || \
# echo "#includedir /etc/sudoers.d" >> %{_sysconfdir}/sudoers
fi
exit 0 exit 0
%files -f %{name}.lang %files -f %{name}.lang
@ -151,6 +153,9 @@ exit 0
%doc ChangeLog README README.LDAP %doc ChangeLog README README.LDAP
%changelog %changelog
* Thu Jul 03 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.8.9p5-2mamba
- /etc/sudoers: remove old programs and add ufw to SYSADM_CMD (to fix mambatray enable/disable)
* Wed May 28 2014 Automatic Build System <autodist@mambasoft.it> 1.8.9p5-1mamba * Wed May 28 2014 Automatic Build System <autodist@mambasoft.it> 1.8.9p5-1mamba
- automatic update by autodist - automatic update by autodist