[Bug 684244] Re: Multiple issues with pam_motd update-motd code

Marius Gedminas marius at gedmin.as
Wed Oct 16 14:41:05 UTC 2013


> > 3. I don't see any locking around the updates of /var/run/motd.new,
so it seems that multiple parallel logins could easily case corruption

> Confirmed, that appears to be a bug. Patches welcome of course. It's
not the highest priority for fixing, given that a corrupted motd isn't
particularly fatal.

Speaking of "patches welcome", I provided a bzr branch for a similar
motd corruption caused by a different script in
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1146170
seven months ago.   As of today, nobody responded.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to pam in Ubuntu.
https://bugs.launchpad.net/bugs/684244

Title:
  Multiple issues with pam_motd update-motd code

Status in “pam” package in Ubuntu:
  Triaged

Bug description:
  Package: libpam-modules
  Version: 1.1.1-2ubuntu5

  Running Lucid on a Beagleboard, wondering why logins take so long.
  Horrified to find that the problem is pam_motd... Several issues:

   1. Why on earth is *every* login updating a global file (/etc/motd -> /var/run/motd)?
      a. Why spam every user?
      b. Why even write to the file every time? It's being generated on all logins, so there doesn't seem to be any useful caching go on.
   2. This is adding ~5 seconds of startup lag to every login, which is annoying
   3. I don't see any locking around the updates of /var/run/motd.new, so it seems that multiple parallel logins could easily case corruption
   4. No documentation of any of this in pam_motd(8)

  If you must update motd automatically, then surely running something
  via cron would be better than this messy hack?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pam/+bug/684244/+subscriptions



More information about the foundations-bugs mailing list