~ubuntu-branches/debian/jessie/systemd/jessie

« back to all changes in this revision

Viewing changes to src/update-utmp.c

  • Committer: Package Import Robot
  • Author(s): Tollef Fog Heen, Tollef Fog Heen, Michael Biebl
  • Date: 2012-04-03 19:59:17 UTC
  • mfrom: (1.1.10) (6.1.3 experimental)
  • Revision ID: package-import@ubuntu.com-20120403195917-l532urrbg4pkreas
Tags: 44-1
[ Tollef Fog Heen ]
* New upstream version.
  - Backport 3492207: journal: PAGE_SIZE is not known on ppc and other
    archs
  - Backport 5a2a2a1: journal: react with immediate rotation to a couple
    of more errors
  - Backport 693ce21: util: never follow symlinks in rm_rf_children()
    Fixes CVE-2012-1174, closes: #664364
* Drop output message from init-functions hook, it's pointless.
* Only rmdir /lib/init/rw if it exists.
* Explicitly order debian-fixup before sysinit.target to prevent a
  possible race condition with the creation of sockets.  Thanks to
  Michael Biebl for debugging this.
* Always restart the initctl socket on upgrades, to mask sysvinit
  removing it.

[ Michael Biebl ]
* Remove workaround for non-interactive sessions from pam config again.
* Create compat /dev/initctl symlink in case we are upgrading from a system
  running a newer version of sysvinit (using /run/initctl) and sysvinit is
  replaced with systemd-sysv during the upgrade. Closes: #663219
* Install new man pages.
* Build-Depend on valac (>= 0.12) instead of valac-0.12. Closes: #663323

Show diffs side-by-side

added added

removed removed

Lines of Context:
284
284
                }
285
285
#endif
286
286
 
287
 
        if ((q = utmp_put_shutdown(0)) < 0) {
 
287
        if ((q = utmp_put_shutdown()) < 0) {
288
288
                log_error("Failed to write utmp record: %s", strerror(-q));
289
289
                r = q;
290
290
        }
339
339
        }
340
340
#endif
341
341
 
342
 
        if ((q = utmp_put_runlevel(0, runlevel, previous)) < 0) {
 
342
        if ((q = utmp_put_runlevel(runlevel, previous)) < 0) {
343
343
                log_error("Failed to write utmp record: %s", strerror(-q));
344
344
                r = q;
345
345
        }
369
369
                return EXIT_FAILURE;
370
370
        }
371
371
 
372
 
        log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
 
372
        log_set_target(LOG_TARGET_AUTO);
373
373
        log_parse_environment();
374
374
        log_open();
375
375
 
376
376
        umask(0022);
377
377
 
378
378
#ifdef HAVE_AUDIT
379
 
        if ((c.audit_fd = audit_open()) < 0)
 
379
        if ((c.audit_fd = audit_open()) < 0 &&
 
380
            /* If the kernel lacks netlink or audit support,
 
381
             * don't worry about it. */
 
382
            errno != EAFNOSUPPORT && errno != EPROTONOSUPPORT)
380
383
                log_error("Failed to connect to audit log: %m");
381
384
#endif
382
385