[systemd-commits] stable Branch 'v216-stable' - 15 commits - hwdb/20-bluetooth-vendor-product.hwdb src/analyze src/core src/cryptsetup src/firstboot src/journal src/libsystemd src/login src/notify src/shared src/sleep src/systemctl src/system-update-generator TODO units/systemd-backlight at .service.in units/systemd-journal-catalog-update.service.in units/systemd-journal-flush.service.in

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Thu Feb 5 11:50:42 PST 2015


 TODO                                                  |    3 +
 hwdb/20-bluetooth-vendor-product.hwdb                 |   48 ++++++++++++++++++
 src/analyze/analyze.c                                 |   17 ++----
 src/core/main.c                                       |    2 
 src/cryptsetup/cryptsetup.c                           |    2 
 src/firstboot/firstboot.c                             |    2 
 src/journal/journalctl.c                              |   24 ++++-----
 src/libsystemd/sd-bus/bus-message.c                   |   11 +++-
 src/libsystemd/sd-bus/test-bus-marshal.c              |   13 ++++
 src/login/logind-user.c                               |   11 +++-
 src/notify/notify.c                                   |   12 ++--
 src/shared/util.h                                     |    2 
 src/sleep/sleep.c                                     |    4 +
 src/system-update-generator/system-update-generator.c |    2 
 src/systemctl/systemctl.c                             |   17 +++++-
 units/systemd-backlight at .service.in                   |    1 
 units/systemd-journal-catalog-update.service.in       |    1 
 units/systemd-journal-flush.service.in                |    1 
 18 files changed, 134 insertions(+), 39 deletions(-)

New commits:
commit b4b97da0106315071a5adc829d5df65f8858d3ed
Author: Ivan Shapovalov <intelfx100 at gmail.com>
Date:   Thu Feb 5 01:56:58 2015 +0300

    systemctl: cat: fix error handling
    
    - correctly check for local vs. remote transport
    - return after receiving error from expand_names()
    
    (cherry picked from commit 3e7eed8497098d1b09fd4ae1260c5242e16a8127)
    
    Conflicts:
    	src/systemctl/systemctl.c

diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index c25417a..eef0f44 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4544,14 +4544,16 @@ static int cat(sd_bus *bus, char **args) {
         assert(bus);
         assert(args);
 
-        if (arg_host) {
-                log_error("Option --host cannot be used with 'cat'");
+        if (arg_transport != BUS_TRANSPORT_LOCAL) {
+                log_error("Cannot remotely cat units");
                 return -EINVAL;
         }
 
         r = expand_names(bus, args + 1, NULL, &names);
-        if (r < 0)
+        if (r < 0) {
                 log_error("Failed to expand names: %s", strerror(-r));
+                return r;
+        }
 
         pager_open_if_enabled();
 

commit 795fcf13d2664623a5ac174dee30b142dd7a5fb1
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Wed Jan 28 21:30:06 2015 -0500

    systemctl: refuse --host with cat
    
    This might be fixed one day, but for now it's better to fail.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1186952
    (cherry picked from commit 3e495a6651609d0a45b62aab5c3ed5a3b40e11ab)
    
    Conflicts:
    	src/systemctl/systemctl.c

diff --git a/TODO b/TODO
index 6850667..a1448ff 100644
--- a/TODO
+++ b/TODO
@@ -22,6 +22,9 @@ Bugfixes:
   str_split_quoted() should return a real return code, so spawn_child can
   report the failure properly.
 
+* When systemctl --host is used, underlying ssh connection can remain open.
+  bus_close does not kill children?
+
 External:
 * Fedora: add an rpmlint check that verifies that all unit files in the RPM are listed in %systemd_post macros.
 
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 161f76f..c25417a 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4544,6 +4544,11 @@ static int cat(sd_bus *bus, char **args) {
         assert(bus);
         assert(args);
 
+        if (arg_host) {
+                log_error("Option --host cannot be used with 'cat'");
+                return -EINVAL;
+        }
+
         r = expand_names(bus, args + 1, NULL, &names);
         if (r < 0)
                 log_error("Failed to expand names: %s", strerror(-r));

commit 76b8ed804201fbccc19e8611c3c433d1c087d8ff
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Tue Jan 27 21:22:57 2015 -0500

    notify,firstboot,analyze,run: trim --help output to 80 lines
    
    (cherry picked from commit b57b06258e0b1894edb6d1fc52a80b3c33164892)
    
    Conflicts:
    	src/notify/notify.c
    	src/run/run.c

diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index 5e55988..d9d0242 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -1195,18 +1195,15 @@ static void help(void) {
                "     --user               Operate on user systemd instance\n"
                "  -H --host=[USER@]HOST   Operate on remote host\n"
                "  -M --machine=CONTAINER  Operate on local container\n"
-               "     --order              When generating a dependency graph, show only order\n"
-               "     --require            When generating a dependency graph, show only requirement\n"
-               "     --from-pattern=GLOB, --to-pattern=GLOB\n"
-               "                          When generating a dependency graph, filter only origins\n"
-               "                          or destinations, respectively\n"
-               "     --fuzz=TIMESPAN      When printing the tree of the critical chain, print also\n"
-               "                          services, which finished TIMESPAN earlier, than the\n"
-               "                          latest in the branch. The unit of TIMESPAN is seconds\n"
-               "                          unless specified with a different unit, i.e. 50ms\n"
+               "     --order              Show only order in the graph\n"
+               "     --require            Show only requirement in the graph\n"
+               "     --from-pattern=GLOB  Show only origins in the graph\n"
+               "     --to-pattern=GLOB    Show only destinations in the graph\n"
+               "     --fuzz=SECONDS       Also print also services which finished SECONDS\n"
+               "                          earlier than the latest in the branch\n"
                "     --man[=BOOL]         Do [not] check for existence of man pages\n\n"
                "Commands:\n"
-               "  time                    Print time spent in the kernel before reaching userspace\n"
+               "  time                    Print time spent in the kernel\n"
                "  blame                   Print list of running units ordered by time to init\n"
                "  critical-chain          Print a tree of the time critical chain of units\n"
                "  plot                    Output SVG graphic showing service initialization\n"
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index 93273d9..66dda45 100644
--- a/src/firstboot/firstboot.c
+++ b/src/firstboot/firstboot.c
@@ -661,7 +661,7 @@ static void help(void) {
                "     --prompt-timezone         Prompt the user for timezone\n"
                "     --prompt-hostname         Prompt the user for hostname\n"
                "     --prompt-root-password    Prompt the user for root password\n"
-               "     --prompt                  Prompt for locale, timezone, hostname, root password\n"
+               "     --prompt                  Prompt for all of the above\n"
                "     --copy-locale             Copy locale from host\n"
                "     --copy-timezone           Copy timezone from host\n"
                "     --copy-root-password      Copy root password from host\n"
diff --git a/src/notify/notify.c b/src/notify/notify.c
index 33933e4..5cf7ab9 100644
--- a/src/notify/notify.c
+++ b/src/notify/notify.c
@@ -44,12 +44,12 @@ static const char *arg_readahead = NULL;
 static void help(void) {
         printf("%s [OPTIONS...] [VARIABLE=VALUE...]\n\n"
                "Notify the init system about service status updates.\n\n"
-               "  -h --help             Show this help\n"
-               "     --version          Show package version\n"
-               "     --ready            Inform the init system about service start-up completion\n"
-               "     --pid[=PID]        Set main pid of daemon\n"
-               "     --status=TEXT      Set status text\n"
-               "     --booted           Returns 0 if the system was booted up with systemd, non-zero otherwise\n"
+               "  -h --help            Show this help\n"
+               "     --version         Show package version\n"
+               "     --ready           Inform the init system about service start-up completion\n"
+               "     --pid[=PID]       Set main pid of daemon\n"
+               "     --status=TEXT     Set status text\n"
+               "     --booted          Check if the system was booted up with systemd\n"
                "     --readahead=ACTION Controls read-ahead operations\n",
                program_invocation_short_name);
 }

commit f7b7a2c937e8da2102328fa9ee17ebac80a3a325
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Mon Jan 19 13:42:34 2015 -0500

    journalctl: trim --help to fit in 80 columns
    
    Terminals tend to be 80 columns wide by default, and the help
    text is only supposed to be a terse reminder anyway.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1183771
    (cherry picked from commit 40f0b71b063da6a36b8d7ec75ef20103abd18243)
    
    Conflicts:
    	src/journal/journalctl.c

diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 1ade4ed..4759c9f 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -193,19 +193,19 @@ static void help(void) {
                "     --system              Show the system journal\n"
                "     --user                Show the user journal for the current user\n"
                "  -M --machine=CONTAINER   Operate on local container\n"
-               "     --since=DATE          Start showing entries on or newer than the specified date\n"
-               "     --until=DATE          Stop showing entries on or newer than the specified date\n"
-               "  -c --cursor=CURSOR       Start showing entries from the specified cursor\n"
-               "     --after-cursor=CURSOR Start showing entries from after the specified cursor\n"
+               "     --since=DATE          Show entries not older than the specified date\n"
+               "     --until=DATE          Show entries not newer than the specified date\n"
+               "  -c --cursor=CURSOR       Show entries starting at the specified cursor\n"
+               "     --after-cursor=CURSOR Show entries after the specified cursor\n"
                "     --show-cursor         Print the cursor after all the entries\n"
-               "  -b --boot[=ID]           Show data only from ID or, if unspecified, the current boot\n"
+               "  -b --boot[=ID]           Show current boot or the specified boot\n"
                "     --list-boots          Show terse information about recorded boots\n"
                "  -k --dmesg               Show kernel message log from the current boot\n"
-               "  -u --unit=UNIT           Show data only from the specified unit\n"
-               "     --user-unit=UNIT      Show data only from the specified user session unit\n"
-               "  -t --identifier=STRING   Show only messages with the specified syslog identifier\n"
-               "  -p --priority=RANGE      Show only messages within the specified priority range\n"
-               "  -e --pager-end           Immediately jump to end of the journal in the pager\n"
+               "  -u --unit=UNIT           Show logs from the specified unit\n"
+               "     --user-unit=UNIT      Show logs from the specified user unit\n"
+               "  -t --identifier=STRING   Show entries with the specified syslog identifier\n"
+               "  -p --priority=RANGE      Show entries with the specified priority\n"
+               "  -e --pager-end           Immediately jump to the end in the pager\n"
                "  -f --follow              Follow the journal\n"
                "  -n --lines[=INTEGER]     Number of journal entries to show\n"
                "     --no-tail             Show all lines, even in follow mode\n"
@@ -226,7 +226,7 @@ static void help(void) {
 #ifdef HAVE_GCRYPT
                "     --interval=TIME       Time interval for changing the FSS sealing key\n"
                "     --verify-key=KEY      Specify FSS verification key\n"
-               "     --force               Force overriding of the FSS key pair with --setup-keys\n"
+               "     --force               Override the FSS key pair with --setup-keys\n"
 #endif
                "\nCommands:\n"
                "  -h --help                Show this help text\n"
@@ -235,7 +235,7 @@ static void help(void) {
                "     --header              Show journal header information\n"
                "     --disk-usage          Show total disk usage of all journal files\n"
                "  -F --field=FIELD         List all values that a specified field takes\n"
-               "     --list-catalog        Show message IDs of all entries in the message catalog\n"
+               "     --list-catalog        Show all message IDs in the catalog\n"
                "     --dump-catalog        Show entries in the message catalog\n"
                "     --update-catalog      Update the message catalog database\n"
                "     --flush               Flush all journal data from /run into /var\n"

commit 097e69a5fa7e58a71e4d482ce032c1773cae311c
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Thu Feb 5 14:09:00 2015 -0500

    sleep: do not use strappenda in var declaration
    
    Based on e2cc6eca73cd1df8be552d7c23f9ff3d69c06f1e.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1147610

diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index ca00eea..f4c5817 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -91,7 +91,9 @@ static int execute(char **modes, char **states) {
         char* arguments[4];
         int r;
         _cleanup_fclose_ FILE *f = NULL;
-        const char* note = strappenda("SLEEP=", arg_verb);
+        const char* note;
+
+        note = strappenda("SLEEP=", arg_verb);
 
         /* This file is opened first, so that if we hit an error,
          * we can abort before modifying any state. */

commit 838ec2a9a6448c8defef353ddd44a32fa7de2750
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Feb 2 21:34:32 2015 +0100

    units: so far we defaulted to 90s as default timeout for most things, let's do so for our oneshot services too
    
    Fewer surprises, and stuff...
    
    (cherry picked from commit 75f709fbf284041d951717cfb3bf6304db0fa7c9)

diff --git a/units/systemd-backlight at .service.in b/units/systemd-backlight at .service.in
index 82d0868..b146e30 100644
--- a/units/systemd-backlight at .service.in
+++ b/units/systemd-backlight at .service.in
@@ -19,4 +19,4 @@ Type=oneshot
 RemainAfterExit=yes
 ExecStart=@rootlibexecdir@/systemd-backlight load %i
 ExecStop=@rootlibexecdir@/systemd-backlight save %i
-TimeoutSec=2min
+TimeoutSec=90s
diff --git a/units/systemd-journal-catalog-update.service.in b/units/systemd-journal-catalog-update.service.in
index 98b546e..5b85889 100644
--- a/units/systemd-journal-catalog-update.service.in
+++ b/units/systemd-journal-catalog-update.service.in
@@ -18,4 +18,4 @@ ConditionNeedsUpdate=/etc
 Type=oneshot
 RemainAfterExit=yes
 ExecStart=@rootbindir@/journalctl --update-catalog
-TimeoutSec=2min
+TimeoutSec=90s
diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in
index 53a6f30..a0a2e3f 100644
--- a/units/systemd-journal-flush.service.in
+++ b/units/systemd-journal-flush.service.in
@@ -19,4 +19,4 @@ RequiresMountsFor=/var/log/journal
 ExecStart=@rootbindir@/journalctl --flush
 Type=oneshot
 RemainAfterExit=yes
-TimeoutSec=2min
+TimeoutSec=90s

commit 66eb624c2216aa0a1e667acb39706d6f8b2e84c0
Author: Martin Pitt <martin.pitt at ubuntu.com>
Date:   Mon Feb 2 16:53:39 2015 +0100

    cryptsetup: only warn on real key files
    
    Simplify the check from commit 05f73ad to only apply the warning to regular
    files instead of enumerating device nodes.
    
    (cherry picked from commit 3f4d56a069d8aedc0a784b6f4a2c049db76289b7)

diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index 1c1feb5..a0f58c8 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -596,10 +596,8 @@ int main(int argc, char *argv[]) {
 
                         /* Ideally we'd do this on the open fd, but since this is just a
                          * warning it's OK to do this in two steps. */
-                        if (stat(key_file, &st) >= 0 && (st.st_mode & 0005)) {
-                                if(!STR_IN_SET(key_file, "/dev/urandom", "/dev/random", "/dev/hw_random"))
-                                    log_warning("Key file %s is world-readable. This is not a good idea!", key_file);
-                        }
+                        if (stat(key_file, &st) >= 0 && S_ISREG(st.st_mode) && (st.st_mode & 0005))
+                                log_warning("Key file %s is world-readable. This is not a good idea!", key_file);
                 }
 
                 for (tries = 0; arg_tries == 0 || tries < arg_tries; tries++) {

commit 71e27642c3661572502a7d18f4d55fe4f6d70a64
Author: Cristian Rodríguez <crrodriguez at opensuse.org>
Date:   Mon Feb 2 12:06:05 2015 -0300

    cryptsetup: Do not warn If the key is /dev/*random
    
    Using /dev/urandom as a key is valid for swap, do not
    warn if this devices are world readable.
    
    (cherry picked from commit 05f73ad22b85270c7db4ff7cbb6da852ad71d4c1)

diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index 94570eb..1c1feb5 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -596,8 +596,10 @@ int main(int argc, char *argv[]) {
 
                         /* Ideally we'd do this on the open fd, but since this is just a
                          * warning it's OK to do this in two steps. */
-                        if (stat(key_file, &st) >= 0 && (st.st_mode & 0005))
-                                log_warning("Key file %s is world-readable. This is not a good idea!", key_file);
+                        if (stat(key_file, &st) >= 0 && (st.st_mode & 0005)) {
+                                if(!STR_IN_SET(key_file, "/dev/urandom", "/dev/random", "/dev/hw_random"))
+                                    log_warning("Key file %s is world-readable. This is not a good idea!", key_file);
+                        }
                 }
 
                 for (tries = 0; arg_tries == 0 || tries < arg_tries; tries++) {

commit ef51af0c9e0e17fe8643ad4cfbfa4980cd136b2d
Author: Marcel Holtmann <marcel at holtmann.org>
Date:   Mon Feb 2 09:18:28 2015 +0100

    hwdb: Update database of Bluetooth company identifiers
    
    (cherry picked from commit 3cc711193df8f11daf30c918ec2dc4c0bfe04715)

diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb
index d3aea5f..1dd1fee 100644
--- a/hwdb/20-bluetooth-vendor-product.hwdb
+++ b/hwdb/20-bluetooth-vendor-product.hwdb
@@ -1325,3 +1325,51 @@ bluetooth:v01B6*
 
 bluetooth:v01B7*
  ID_VENDOR_FROM_DATABASE=General Electric Company
+
+bluetooth:v01B8*
+ ID_VENDOR_FROM_DATABASE=i+D3 S.L.
+
+bluetooth:v01B9*
+ ID_VENDOR_FROM_DATABASE=HANA Micron
+
+bluetooth:v01BA*
+ ID_VENDOR_FROM_DATABASE=Stages Cycling LLC
+
+bluetooth:v01BB*
+ ID_VENDOR_FROM_DATABASE=Cochlear Bone Anchored Solutions AB
+
+bluetooth:v01BC*
+ ID_VENDOR_FROM_DATABASE=SenionLab AB
+
+bluetooth:v01BD*
+ ID_VENDOR_FROM_DATABASE=Syszone Co., Ltd
+
+bluetooth:v01BE*
+ ID_VENDOR_FROM_DATABASE=Pulsate Mobile Ltd.
+
+bluetooth:v01BF*
+ ID_VENDOR_FROM_DATABASE=Hong Kong HunterSun Electronic Limited
+
+bluetooth:v01C0*
+ ID_VENDOR_FROM_DATABASE=pironex GmbH
+
+bluetooth:v01C1*
+ ID_VENDOR_FROM_DATABASE=BRADATECH Corp.
+
+bluetooth:v01C2*
+ ID_VENDOR_FROM_DATABASE=Transenergooil AG
+
+bluetooth:v01C3*
+ ID_VENDOR_FROM_DATABASE=Bunch
+
+bluetooth:v01C4*
+ ID_VENDOR_FROM_DATABASE=DME Microelectronics
+
+bluetooth:v01C5*
+ ID_VENDOR_FROM_DATABASE=Bitcraze AB
+
+bluetooth:v01C6*
+ ID_VENDOR_FROM_DATABASE=HASWARE Inc.
+
+bluetooth:v01C7*
+ ID_VENDOR_FROM_DATABASE=Abiogenix Inc.

commit 7f7f58a080285d4f3c95ebb8c11bf15938f0692c
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Fri Jan 30 23:54:21 2015 -0500

    units: set TimeoutSec on some oneshot services
    
    Services which are not crucial to system bootup, and have Type=oneshot
    can effectively "hang" the system if they fail to complete for whatever
    reason. To allow the boot to continue, kill them after a timeout.
    
    In case of systemd-journal-flush the flush will continue in the background,
    and in the other two cases the job will be aborted, but this should not
    result in any permanent problem.
    
    (cherry picked from commit 0775b9b61120f8be99cd45a7df907b828188cb47)

diff --git a/units/systemd-backlight at .service.in b/units/systemd-backlight at .service.in
index e945d87..82d0868 100644
--- a/units/systemd-backlight at .service.in
+++ b/units/systemd-backlight at .service.in
@@ -19,3 +19,4 @@ Type=oneshot
 RemainAfterExit=yes
 ExecStart=@rootlibexecdir@/systemd-backlight load %i
 ExecStop=@rootlibexecdir@/systemd-backlight save %i
+TimeoutSec=2min
diff --git a/units/systemd-journal-catalog-update.service.in b/units/systemd-journal-catalog-update.service.in
index 0cb7076..98b546e 100644
--- a/units/systemd-journal-catalog-update.service.in
+++ b/units/systemd-journal-catalog-update.service.in
@@ -18,3 +18,4 @@ ConditionNeedsUpdate=/etc
 Type=oneshot
 RemainAfterExit=yes
 ExecStart=@rootbindir@/journalctl --update-catalog
+TimeoutSec=2min
diff --git a/units/systemd-journal-flush.service.in b/units/systemd-journal-flush.service.in
index 98c91b4..53a6f30 100644
--- a/units/systemd-journal-flush.service.in
+++ b/units/systemd-journal-flush.service.in
@@ -19,3 +19,4 @@ RequiresMountsFor=/var/log/journal
 ExecStart=@rootbindir@/journalctl --flush
 Type=oneshot
 RemainAfterExit=yes
+TimeoutSec=2min

commit de879b0c3136e84a07eb5322828a8dd6481d45f1
Author: Maxim Mikityanskiy <maxtram95 at gmail.com>
Date:   Thu Jan 29 01:23:07 2015 +0100

    core: make setting the shutdown watchdog configuration via dbus work
    
    https://bugs.freedesktop.org/show_bug.cgi?id=88284
    (cherry picked from commit 81f5fc2d43800c23a4440ed94cfe38d579e896fe)
    
    Conflicts:
    	src/core/main.c

diff --git a/src/core/main.c b/src/core/main.c
index face753..f0dd0c9 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1839,6 +1839,8 @@ finish:
         pager_close();
 
         if (m) {
+                arg_shutdown_watchdog = m->shutdown_watchdog;
+
                 manager_free(m);
                 m = NULL;
         }

commit 8ce77d0b80b835d337f61bd24c05b586ef059062
Author: Christian Seiler <christian at iwakd.de>
Date:   Fri Jan 23 15:26:18 2015 +0100

    logind: remove per-user runtime dir again if setup fails
    
    If setup of per-user runtime dir fails, clean up afterwards by removing
    the directory before returning from the function, so we don't leave the
    directory behind.
    
    If this is not done, the second time the user logs in logind would
    assume that the directory is already set up, even though it isn't.
    
    (cherry picked from commit 4d858e7d9f39038713f760d7acc64acf7bba2aa7)
    
    Conflicts:
    	src/login/logind-user.c

diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 1205b48..093eaad 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -330,7 +330,6 @@ static int user_mkdir_runtime_path(User *u) {
                         r = asprintf(&t, "mode=0700,smackfsroot=*,uid=" UID_FMT ",gid=" GID_FMT ",size=%zu", u->uid, u->gid, u->manager->runtime_dir_size);
                 else
                         r = asprintf(&t, "mode=0700,uid=" UID_FMT ",gid=" GID_FMT ",size=%zu", u->uid, u->gid, u->manager->runtime_dir_size);
-
                 if (r < 0) {
                         r = log_oom();
                         goto fail;
@@ -338,7 +337,8 @@ static int user_mkdir_runtime_path(User *u) {
 
                 r = mount("tmpfs", p, "tmpfs", MS_NODEV|MS_NOSUID, t);
                 if (r < 0) {
-                        log_error("Failed to mount per-user tmpfs directory %s: %s", p, strerror(-r));
+                        log_error("Failed to mount per-user tmpfs directory %s: %m", p);
+                        r = -errno;
                         goto fail;
                 }
         }
@@ -347,7 +347,12 @@ static int user_mkdir_runtime_path(User *u) {
         return 0;
 
 fail:
-        free(p);
+        if (p) {
+                /* Try to clean up, but ignore errors */
+                (void) rmdir(p);
+                free(p);
+        }
+
         u->runtime_path = NULL;
         return r;
 }

commit f0e9c36257cb2be566dac427124c4abd111fa7ea
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Mon Jan 26 07:34:32 2015 +0100

    system-update-generator: accept a dangling symlink
    
    The offline update mechanism is explicitly designed to work with a
    separate /var. systemd-update-generator is supposed to run early,
    before filesystems are mounted, so it cannot check if the
    /system-update symlink actually points to anything.
    
    The update is run *after* filesystems are mounted, so it should be
    able to access the target of the symlink without trouble.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1178978
    (cherry picked from commit 6b321a790142449e0cf3685ffa5294e147d692f7)

diff --git a/src/shared/util.h b/src/shared/util.h
index 6b595d5..e4fb542 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -999,3 +999,5 @@ int free_and_strdup(char **p, const char *s);
 int sethostname_idempotent(const char *s);
 
 #define RLIMIT_MAKE_CONST(lim) ((struct rlimit) { lim, lim })
+
+#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)
diff --git a/src/system-update-generator/system-update-generator.c b/src/system-update-generator/system-update-generator.c
index 4f22c9c..e1be3f2 100644
--- a/src/system-update-generator/system-update-generator.c
+++ b/src/system-update-generator/system-update-generator.c
@@ -37,7 +37,7 @@ static const char *arg_dest = "/tmp";
 static int generate_symlink(void) {
         const char *p = NULL;
 
-        if (access("/system-update", F_OK) < 0) {
+        if (laccess("/system-update", F_OK) < 0) {
                 if (errno == ENOENT)
                         return 0;
 

commit c0008e613b88b2e117a0876d1055ef5628092718
Author: Sangjung Woo <sangjung.woo at samsung.com>
Date:   Fri Jan 23 20:21:57 2015 +0900

    systemctl: bugfix for systemctl reboot command with argument
    
    According to systemctl man page, 'systemctl reboot [arg]' should work
    without any errors. However, it does not work because of 'Invalid number
    of arguments' error, except for 'reboot [arg]'. This patch fixes the bug
    so that both of commands work in exactly the same way.
    
    (cherry picked from commit b986229efe2cc96157aa14c37bab7843311bbef1)

diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 251eeb4..161f76f 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3031,6 +3031,12 @@ static int start_special(sd_bus *bus, char **args) {
                 return -EPERM;
         }
 
+        if (a == ACTION_REBOOT) {
+                r = update_reboot_param_file(args[1]);
+                if (r < 0)
+                        return r;
+        }
+
         if (arg_force >= 2 &&
             (a == ACTION_HALT ||
              a == ACTION_POWEROFF ||
@@ -6749,7 +6755,7 @@ static int systemctl_main(sd_bus *bus, int argc, char *argv[], int bus_error) {
                 { "import-environment",    MORE,  1, import_environment},
                 { "halt",                  EQUAL, 1, start_special,    FORCE },
                 { "poweroff",              EQUAL, 1, start_special,    FORCE },
-                { "reboot",                EQUAL, 1, start_special,    FORCE },
+                { "reboot",                MORE,  1, start_special,    FORCE },
                 { "kexec",                 EQUAL, 1, start_special     },
                 { "suspend",               EQUAL, 1, start_special     },
                 { "hibernate",             EQUAL, 1, start_special     },

commit 93d88c5b4dcf3ba2289b100608412c774436fa67
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Jan 23 01:13:09 2015 +0100

    sd-bus: fix handling of double parameters in sd_bus_message_append()
    
    We really need to use va_arg() with the right type here as uint64_t and
    double might have the same size, but are passed differently as
    arguments.
    
    (cherry picked from commit 6cd37a5e59e01f4a2b3f02d9746b3e7417d424e6)

diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index 1362a60..ce2b3bc 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -2308,8 +2308,7 @@ int bus_message_append_ap(
                 }
 
                 case SD_BUS_TYPE_INT64:
-                case SD_BUS_TYPE_UINT64:
-                case SD_BUS_TYPE_DOUBLE: {
+                case SD_BUS_TYPE_UINT64: {
                         uint64_t x;
 
                         x = va_arg(ap, uint64_t);
@@ -2317,6 +2316,14 @@ int bus_message_append_ap(
                         break;
                 }
 
+                case SD_BUS_TYPE_DOUBLE: {
+                        double x;
+
+                        x = va_arg(ap, double);
+                        r = sd_bus_message_append_basic(m, *t, &x);
+                        break;
+                }
+
                 case SD_BUS_TYPE_STRING:
                 case SD_BUS_TYPE_OBJECT_PATH:
                 case SD_BUS_TYPE_SIGNATURE: {
diff --git a/src/libsystemd/sd-bus/test-bus-marshal.c b/src/libsystemd/sd-bus/test-bus-marshal.c
index 9532112..7200d8c 100644
--- a/src/libsystemd/sd-bus/test-bus-marshal.c
+++ b/src/libsystemd/sd-bus/test-bus-marshal.c
@@ -22,6 +22,7 @@
 #include <assert.h>
 #include <stdlib.h>
 #include <byteswap.h>
+#include <math.h>
 
 #ifdef HAVE_GLIB
 #include <gio/gio.h>
@@ -94,6 +95,8 @@ int main(int argc, char *argv[]) {
         _cleanup_fclose_ FILE *ms = NULL;
         size_t first_size = 0, second_size = 0, third_size = 0;
         _cleanup_bus_unref_ sd_bus *bus = NULL;
+        double dbl;
+        uint64_t u64;
 
         r = sd_bus_default_system(&bus);
         if (r < 0)
@@ -145,6 +148,9 @@ int main(int argc, char *argv[]) {
         r = sd_bus_message_append_array(m, 'u', NULL, 0);
         assert_se(r >= 0);
 
+        r = sd_bus_message_append(m, "a(stdo)", 1, "foo", 815ULL, 47.0, "/");
+        assert_se(r >= 0);
+
         r = bus_message_seal(m, 4711, 0);
         assert_se(r >= 0);
 
@@ -268,6 +274,13 @@ int main(int argc, char *argv[]) {
         assert_se(r > 0);
         assert_se(sz == 0);
 
+        r = sd_bus_message_read(m, "a(stdo)", 1, &x, &u64, &dbl, &y);
+        assert_se(r > 0);
+        assert_se(streq(x, "foo"));
+        assert_se(u64 == 815ULL);
+        assert_se(fabs(dbl - 47.0) < 0.1);
+        assert_se(streq(y, "/"));
+
         r = sd_bus_message_peek_type(m, NULL, NULL);
         assert_se(r == 0);
 



More information about the systemd-commits mailing list