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

« back to all changes in this revision

Viewing changes to src/shutdownd.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:
29
29
#include <unistd.h>
30
30
#include <fcntl.h>
31
31
 
 
32
#include <systemd/sd-daemon.h>
 
33
 
32
34
#include "shutdownd.h"
33
35
#include "log.h"
34
36
#include "macro.h"
35
37
#include "util.h"
36
 
#include "sd-daemon.h"
37
38
#include "utmp-wtmp.h"
38
39
 
39
40
static int read_packet(int fd, struct shutdownd_command *_c) {
173
174
        };
174
175
 
175
176
        int r = EXIT_FAILURE, n_fds;
176
 
        int one = 1;
177
177
        struct shutdownd_command c;
178
178
        struct pollfd pollfd[_FD_MAX];
179
179
        bool exec_shutdown = false, unlink_nologin = false, failed = false;
189
189
                return EXIT_FAILURE;
190
190
        }
191
191
 
192
 
        log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
 
192
        log_set_target(LOG_TARGET_AUTO);
193
193
        log_parse_environment();
194
194
        log_open();
195
195
 
205
205
                return EXIT_FAILURE;
206
206
        }
207
207
 
208
 
        if (setsockopt(SD_LISTEN_FDS_START, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)) < 0) {
209
 
                log_error("SO_PASSCRED failed: %m");
210
 
                return EXIT_FAILURE;
211
 
        }
212
 
 
213
208
        zero(c);
214
209
        zero(pollfd);
215
210