[26786] in Source-Commits
/svn/athena r25755 - trunk/debathena/config/reactivate/debian
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Fri Sep 7 14:30:25 2012
Date: Fri, 7 Sep 2012 14:30:18 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201209071830.q87IUINe008435@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jdreed
Date: 2012-09-07 14:30:18 -0400 (Fri, 07 Sep 2012)
New Revision: 25755
Added:
trunk/debathena/config/reactivate/debian/debathena-reactivate-sudoers
Modified:
trunk/debathena/config/reactivate/debian/changelog
trunk/debathena/config/reactivate/debian/control.in
trunk/debathena/config/reactivate/debian/debathena-reactivate.install
trunk/debathena/config/reactivate/debian/debathena-reactivate.postinst
Log:
In reactivate:
* Stop scribbling over sudoers and use sudoers.d (Trac: #1219)
Modified: trunk/debathena/config/reactivate/debian/changelog
===================================================================
--- trunk/debathena/config/reactivate/debian/changelog 2012-09-07 18:26:20 UTC (rev 25754)
+++ trunk/debathena/config/reactivate/debian/changelog 2012-09-07 18:30:18 UTC (rev 25755)
@@ -5,8 +5,9 @@
way
* Add a trailing NUL to the end of sudo-warning to workaround a bug
in sudo 1.8.3p1 (fixed upstream, but not in Precise)
+ * Stop scribbling over sudoers and use sudoers.d (Trac: #1219)
- -- Jonathan Reed <jdreed@mit.edu> Thu, 16 Aug 2012 13:23:17 -0400
+ -- Jonathan Reed <jdreed@mit.edu> Fri, 07 Sep 2012 14:29:52 -0400
debathena-reactivate (2.0.39) unstable; urgency=low
Modified: trunk/debathena/config/reactivate/debian/control.in
===================================================================
--- trunk/debathena/config/reactivate/debian/control.in 2012-09-07 18:26:20 UTC (rev 25754)
+++ trunk/debathena/config/reactivate/debian/control.in 2012-09-07 18:30:18 UTC (rev 25755)
@@ -12,7 +12,7 @@
gdm,
alsa-utils,
debathena-gdm-config (>= 1.14~),
- sudo,
+ sudo (>= 1.7.2p1-1~),
debathena-cupsys-config (>= 1.9~),
${misc:Depends},
${shlibs:Depends}
Added: trunk/debathena/config/reactivate/debian/debathena-reactivate-sudoers
===================================================================
--- trunk/debathena/config/reactivate/debian/debathena-reactivate-sudoers (rev 0)
+++ trunk/debathena/config/reactivate/debian/debathena-reactivate-sudoers 2012-09-07 18:30:18 UTC (rev 25755)
@@ -0,0 +1,3 @@
+# Ensure people get lectured about sudo'ing in a chroot
+Defaults:%admin lecture_file=/etc/athena/sudo-warning, lecture=once
+Defaults:%sudo lecture_file=/etc/athena/sudo-warning, lecture=once
Modified: trunk/debathena/config/reactivate/debian/debathena-reactivate.install
===================================================================
--- trunk/debathena/config/reactivate/debian/debathena-reactivate.install 2012-09-07 18:26:20 UTC (rev 25754)
+++ trunk/debathena/config/reactivate/debian/debathena-reactivate.install 2012-09-07 18:30:18 UTC (rev 25755)
@@ -17,3 +17,4 @@
debian/90debathena-reactivate etc/schroot/setup.d
debian/16killprocs-no-really etc/schroot/setup.d
debian/dbus-daemon-launch-helper-blacklist usr/share/debathena-reactivate
+debian/debathena-reactivate-sudoers etc/sudoers.d
Modified: trunk/debathena/config/reactivate/debian/debathena-reactivate.postinst
===================================================================
--- trunk/debathena/config/reactivate/debian/debathena-reactivate.postinst 2012-09-07 18:26:20 UTC (rev 25754)
+++ trunk/debathena/config/reactivate/debian/debathena-reactivate.postinst 2012-09-07 18:30:18 UTC (rev 25755)
@@ -96,12 +96,8 @@
for group in $(sed -ne 's/^addgroups="\(.*\)"/\1/p' /etc/gdm/Xsession.debathena); do
getent group "$group" >/dev/null || addgroup --system "$group"
done
- cat >>/etc/sudoers <<EOF
-### BEGIN debathena-reactivate
-Defaults:%admin lecture_file=/etc/athena/sudo-warning, lecture=once
-Defaults:%sudo lecture_file=/etc/athena/sudo-warning, lecture=once
-### END debathena-reactivate
-EOF
+ # Files in sudoers.d need to be chmod 0440
+ chmod 0440 /etc/sudoers.d/debathena-reactivate-sudoers
if dpkg --compare-versions "$2" lt 1.25.5~ && \
dpkg --compare-versions "$2" ge 1.25.2; then