On Fri, 05 Jun 2015 11:35:57 -0400 Marc Deslauriers <[email protected]> wrote: > Package: sudo > Version: 1.8.12-1 > Followup-For: Bug #786555 > User: [email protected] > Usertags: origin-ubuntu wily ubuntu-patch > > > > *** /tmp/tmp8y8IwQ/bug_body > > In Ubuntu, the attached patch was applied to achieve the following: > > * Use tmpfs location to store timestamp files (LP: #1458031) > - debian/rules: change --with-rundir to /var/run/sudo > - debian/rules, debian/sudo.service, debian/sudo.sudo.init: stop > shipping init script and service file, as they are no longer > necessary. > - debian/*.preinst, debian/*.postinst, debian/*.postrm: remove old init > script with dpkg-maintscript-helper. > - debian/*.postinst: remove old /var/run/sudo to /var/lib/sudo > transition code, remove old /var/lib/sudo/ts timestamp directory.
It seems, sudo was originally using /var/run/sudo, but switched to
/var/lib/sudo because of #581393.
Moving back everything to /var/run/sudo will reopen this issue, i.e. the
users will get the lecture again upon reboots.
Imo, the best solution would be, if the "lectured" dir was on /var/lib
and the timestamp "ts" dir on /run. This way no init script / service
would be needed on reboots to clean up the timestamps and the lectured
messages would be preserved.
Building with
--with-rundir=/run/sudo \
--with-vardir=/var/lib/sudo \
seems to achieve that.
sudo creates /run/sudo/ts on demand, but it fails to apply the correct
selinux context. So if you care about selinux we should keep the
sysvinit script to run mkdir and restorecon. For systemd, a tmpfile
snippet could achieve that.
Bdale, would you be ok with that change? If so, I could prepare a patch
depending on whether you want to support selinux or not.
Regards,
Michael
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature

