Comment 30 for bug 659738

Revision history for this message
Barry Warsaw (barry) wrote :

For the Lucid SRU:

Impact of bug: upon ssh'ing in or otherwise logging into a machine and being presented with the motd banner, you will see a double banner. One comes from /etc/motd symlinked to /var/run/motd, which is normal. The other comes from a bogus copy put into /etc/motd.tail.

Package uploaded to lucid-proposed fixes this in two ways. First, it does not copy /etc/motd into /etc/motd.tail if the former is a symlink. Second, it backports a stanza from the oneiric debian/initscripts.postinst file to remove the bogus /etc/motd.tail when it recognizes it contains the double banner.

For the patch, see the diff in comment #28 above.

TEST CASE:
* If you already have a Lucid machine that exhibits the double banner, install 2.87dsf-4ubuntu17.4 from lucid-proposed and you should see /etc/motd.tail being removed.
* If you do not see the double banner, consider yourself lucky! But to reproduce it just execute this as root:
$ sed 1d /etc/motd > /etc/motd.tail
then install the new version and you should see /etc/motd.tail removed
* To verify that /etc/motd.tail does not return after it's been removed either:
** before you install 2.87dsf-4ubuntu17.4, manually rm -f /etc/motd.tail, then upgrade, and motd.tail will not return
** if you've already installed the new version, just `apt-get install --reinstall` and see that motd.tail does not return

Regression potential:
* Someone with a valid /etc/motd.tail could get it accidentally removed.