handle move of state directory better in upgrades
authorBdale Garbee <bdale@gag.com>
Fri, 11 Jun 2010 17:09:15 +0000 (11:09 -0600)
committerBdale Garbee <bdale@gag.com>
Fri, 11 Jun 2010 17:09:15 +0000 (11:09 -0600)
debian/README.Debian
debian/changelog
debian/sudo-ldap.postinst
debian/sudo.postinst

index a07d3d4a8b12c1c10a7c599d5507f63c16f997e8..a81d9e366f8e53617024c341e87e357c296b17e0 100644 (file)
@@ -47,8 +47,3 @@ about, here's a succinct and humorous take on it...
 
        http://www.xkcd.com/c149.html
 
-        - - - - -
-
-If you choose to run with the RAMRUN option set in /etc/default/rcS, you may
-grow weary of being lectured after each reboot.  If so, adding 'lecture never'
-to sudoers may make you happier.  See the sudoers(5) man page for more info.
index 9e1cccac9f6a6fde6b0c410bee805a7b5040aa66..64425317c79fe0ad35d625c77dcfd4caaec84529 100644 (file)
@@ -1,3 +1,12 @@
+sudo (1.7.2p7-2) UNRELEASED; urgency=low
+
+  * handle transition of /var/run/sudo to /var/lib/sudo better, to avoid
+    re-lecturing existing users, and to clean up after ourselves on upgrade,
+    and remove the RAMRUN section from README.Debian since the new state dir
+    should fix the original problem, closes: #585514
+
+ -- Bdale Garbee <bdale@gag.com>  Thu, 10 Jun 2010 15:42:14 -0600
+
 sudo (1.7.2p7-1) unstable; urgency=high
 
   * new upstream release with security fix for secure path (CVE-2010-1646),
index 59d46a0efdbca3ce6e84a7c0c8e903439076fb8f..9a539d90285f60d636ef72d40c98fcfb210f721a 100644 (file)
@@ -30,6 +30,14 @@ if ( ! -f "/etc/sudoers") {
 
 }
 
+# handle state directory transition from /var/run/sudo to /var/lib/sudo,
+# moving any existing content over to avoid re-lecturing existing users
+if ( -d "/var/run/sudo") {
+       system ('mkdir -p /var/lib/sudo');
+       system ('mv /var/run/sudo/* /var/lib/sudo/');
+       system ('rmdir /var/run/sudo');
+}
+
 # make sure sudoers has the correct permissions and owner/group
 system ('chown root:root /etc/sudoers');
 system ('chmod 440 /etc/sudoers');
index 2f4e54a8996756e5842f455cb16ff935cb5a9204..10dc14a8bc0cd8c8ace37b1dc662b7d15e911978 100644 (file)
@@ -30,6 +30,14 @@ if ( ! -f "/etc/sudoers") {
 
 }
 
+# handle state directory transition from /var/run/sudo to /var/lib/sudo,
+# moving any existing content over to avoid re-lecturing existing users
+if ( -d "/var/run/sudo") {
+       system ('mkdir -p /var/lib/sudo');
+       system ('mv /var/run/sudo/* /var/lib/sudo/');
+       system ('rmdir /var/run/sudo');
+}
+
 # make sure sudoers has the correct permissions and owner/group
 system ('chown root:root /etc/sudoers');
 system ('chmod 440 /etc/sudoers');