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

« back to all changes in this revision

Viewing changes to src/initctl.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:
34
34
#include <ctype.h>
35
35
 
36
36
#include <dbus/dbus.h>
 
37
#include <systemd/sd-daemon.h>
37
38
 
38
39
#include "util.h"
39
40
#include "log.h"
40
41
#include "list.h"
41
42
#include "initreq.h"
42
43
#include "special.h"
43
 
#include "sd-daemon.h"
44
44
#include "dbus-common.h"
45
45
#include "def.h"
46
46
 
56
56
        unsigned n_fifos;
57
57
 
58
58
        DBusConnection *bus;
 
59
 
 
60
        bool quit;
59
61
} Server;
60
62
 
61
63
struct Fifo {
174
176
                        case 'U':
175
177
                                if (kill(1, SIGTERM) < 0)
176
178
                                        log_error("kill() failed: %m");
 
179
 
 
180
                                /* The bus connection will be
 
181
                                 * terminated if PID 1 is reexecuted,
 
182
                                 * hence let's just exit here, and
 
183
                                 * rely on that we'll be restarted on
 
184
                                 * the next request */
 
185
                                s->quit = true;
177
186
                                break;
178
187
 
179
188
                        case 'q':
379
388
                return EXIT_FAILURE;
380
389
        }
381
390
 
382
 
        log_set_target(LOG_TARGET_SYSLOG_OR_KMSG);
 
391
        log_set_target(LOG_TARGET_AUTO);
383
392
        log_parse_environment();
384
393
        log_open();
385
394
 
404
413
                  "READY=1\n"
405
414
                  "STATUS=Processing requests...");
406
415
 
407
 
        for (;;) {
 
416
        while (!server.quit) {
408
417
                struct epoll_event event;
409
418
                int k;
410
419