diff -Nru systemd-204/debian/changelog systemd-204/debian/changelog --- systemd-204/debian/changelog 2014-04-11 15:17:33.000000000 +0000 +++ systemd-204/debian/changelog 2014-04-14 16:20:33.000000000 +0000 @@ -1,3 +1,12 @@ +systemd (204-5ubuntu20) trusty; urgency=medium + + * systemd-logind.conf: Don't use the limit stanza which fails the + whole job when failing to set the ulimit. Instead call ulimit itself + from the job and ignore its return code. This allow systemd-logind to + start in unprivileged LXC containers. (LP: #1307595) + + -- Stéphane Graber Mon, 14 Apr 2014 12:20:33 -0400 + systemd (204-5ubuntu19) trusty; urgency=medium * cgmanager: don't call nih_dbus_setup() since we won't use the diff -Nru systemd-204/debian/libpam-systemd.systemd-logind.upstart systemd-204/debian/libpam-systemd.systemd-logind.upstart --- systemd-204/debian/libpam-systemd.systemd-logind.upstart 2014-04-10 13:45:37.000000000 +0000 +++ systemd-204/debian/libpam-systemd.systemd-logind.upstart 2014-04-14 16:16:57.000000000 +0000 @@ -3,8 +3,6 @@ start on started dbus stop on stopping dbus -limit nofile 16384 16384 - respawn env SYSTEMD_LOG_TARGET=syslog @@ -27,4 +25,11 @@ fi end script -exec /lib/systemd/systemd-logind +script + # Don't use the limit stanza as failure to set the limit (unprivileged + # containers for example) causes a complete failure to start the job. + ulimit -S -n 16384 || true + ulimit -H -n 16384 || true + + exec /lib/systemd/systemd-logind +end script