[systemd-commits] 64 commits - configure.ac hwdb/60-keyboard.hwdb hwdb/70-mouse.hwdb Makefile.am man/systemd.link.xml man/systemd.network.xml README.md rules/60-block.rules rules/60-persistent-storage.rules src/activate src/bootchart src/core src/cryptsetup src/delta src/fsck src/import src/journal src/journal-remote src/libsystemd src/libsystemd-network src/login src/network src/nspawn src/nss-resolve src/quotacheck src/remount-fs src/shared src/systemctl src/systemd src/test src/udev src/vconsole

David Herrmann dvdhrm at kemper.freedesktop.org
Wed Jun 10 07:29:30 PDT 2015


 Makefile.am                             |   12 +-
 README.md                               |    9 +
 configure.ac                            |   10 -
 hwdb/60-keyboard.hwdb                   |    2 
 hwdb/70-mouse.hwdb                      |    9 +
 man/systemd.link.xml                    |    4 
 man/systemd.network.xml                 |    7 -
 rules/60-block.rules                    |    2 
 rules/60-persistent-storage.rules       |    2 
 src/activate/activate.c                 |    5 
 src/bootchart/bootchart.c               |    2 
 src/core/busname.c                      |    6 -
 src/core/execute.c                      |    9 +
 src/core/killall.c                      |    8 +
 src/core/kmod-setup.c                   |   20 ++-
 src/core/main.c                         |    9 -
 src/core/manager.c                      |    2 
 src/core/socket.c                       |    8 -
 src/cryptsetup/cryptsetup.c             |   90 ++++++++++------
 src/delta/delta.c                       |    9 +
 src/fsck/fsck.c                         |    4 
 src/import/export.c                     |    2 
 src/import/import-common.c              |    8 -
 src/import/import.c                     |    2 
 src/import/importd.c                    |    4 
 src/import/pull-common.c                |    4 
 src/import/pull.c                       |    2 
 src/journal-remote/journal-remote.c     |    4 
 src/journal/coredumpctl.c               |    3 
 src/libsystemd-network/lldp-tlv.c       |    2 
 src/libsystemd/libsystemd.sym.m4        |    1 
 src/libsystemd/sd-bus/bus-convenience.c |   37 ++++++
 src/libsystemd/sd-bus/bus-kernel.c      |    9 -
 src/libsystemd/sd-bus/bus-socket.c      |    3 
 src/libsystemd/sd-bus/sd-bus.c          |   26 ++--
 src/libsystemd/sd-event/sd-event.c      |    1 
 src/login/inhibit.c                     |    4 
 src/login/logind-user.c                 |   88 +++++++++-------
 src/network/networkctl.c                |    2 
 src/network/networkd-dhcp4.c            |    2 
 src/network/networkd-ipv4ll.c           |    4 
 src/network/networkd-link.c             |   38 ++-----
 src/network/networkd-manager.c          |    4 
 src/network/networkd-netdev-bond.c      |  173 ++++++++------------------------
 src/network/networkd-netdev-veth.c      |   24 +---
 src/network/networkd-netdev-vxlan.c     |  112 +++++---------------
 src/network/networkd.h                  |    1 
 src/nspawn/nspawn.c                     |    7 -
 src/nss-resolve/nss-resolve.c           |   14 +-
 src/quotacheck/quotacheck.c             |    8 +
 src/remount-fs/remount-fs.c             |    3 
 src/shared/efivars.c                    |    2 
 src/shared/machine-pool.c               |    4 
 src/shared/pager.c                      |    8 +
 src/shared/path-util.c                  |   16 ++
 src/shared/pty.c                        |    2 
 src/shared/signal-util.c                |  104 +++++++++++++------
 src/shared/signal-util.h                |    2 
 src/shared/util.c                       |   10 -
 src/systemctl/systemctl.c               |    6 +
 src/systemd/sd-bus.h                    |    1 
 src/test/test-path-util.c               |   81 ++++++++++++++
 src/udev/udev-event.c                   |    6 -
 src/udev/udev-rules.c                   |    2 
 src/udev/udevd.c                        |    2 
 src/vconsole/vconsole-setup.c           |    9 +
 66 files changed, 600 insertions(+), 476 deletions(-)

New commits:
commit 0748385cc44824fee281f9de7547c4d91ab0f473
Merge: 521446d a668086
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 10 15:10:47 2015 +0200

    Merge pull request #132 from ssahani/bond
    
    networkd: bond  improve logging


commit 521446dbff601603a8d41774eca8866a5613b04c
Merge: 251811f 9c34154
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 10 15:09:03 2015 +0200

    Merge pull request #138 from utezduyar/use-async-convenience-function-on-setting-hostname
    
    networkd: use async convenience call to set hostname


commit 251811f69b5e21f2405665452dd01a9085dea229
Merge: d16b35b 7676666
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 10 15:08:48 2015 +0200

    Merge pull request #133 from ssahani/net
    
    networkd: vxlan improve logging


commit d16b35b43d686de8c9e88552fb373b88b35aa943
Merge: f6f6d4b 348d8cc
Author: Daniel Mack <github at zonque.org>
Date:   Wed Jun 10 14:21:26 2015 +0200

    Merge pull request #137 from torstehu/correct-typo
    
    sd-bus: Correct typo


commit 9c34154a2b4adddf0ef81bb732e78289f7a87f06
Author: Umut Tezduyar Lindskog <umuttl at axis.com>
Date:   Wed Jun 10 13:15:39 2015 +0200

    networkd: use async convenience call to set hostname

diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 127bc12..7841f69 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -749,7 +749,6 @@ static int set_hostname_handler(sd_bus_message *m, void *userdata, sd_bus_error
 }
 
 int link_set_hostname(Link *link, const char *hostname) {
-        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
         int r = 0;
 
         assert(link);
@@ -764,22 +763,19 @@ int link_set_hostname(Link *link, const char *hostname) {
                 return 0;
         }
 
-        r = sd_bus_message_new_method_call(
+        r = sd_bus_call_method_async(
                         link->manager->bus,
-                        &m,
+                        NULL,
                         "org.freedesktop.hostname1",
                         "/org/freedesktop/hostname1",
                         "org.freedesktop.hostname1",
-                        "SetHostname");
-        if (r < 0)
-                return r;
-
-        r = sd_bus_message_append(m, "sb", hostname, false);
-        if (r < 0)
-                return r;
+                        "SetHostname",
+                        set_hostname_handler,
+                        link,
+                        "sb",
+                        hostname,
+                        false);
 
-        r = sd_bus_call_async(link->manager->bus, NULL, m, set_hostname_handler,
-                              link, 0);
         if (r < 0)
                 return log_link_error_errno(link, r, "Could not set transient hostname: %m");
 

commit 348d8cc8d7e47d877505f90c5135f101f13f2711
Author: Torstein Husebø <torstein at huseboe.net>
Date:   Wed Jun 10 13:08:31 2015 +0200

    sd-bus: Correct typo

diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index 147e6f0..f3df1c1 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -51,7 +51,7 @@
 
 #define log_debug_bus_message(m) do { \
                   sd_bus_message *_m = (m); \
-                  log_debug("1Got message type=%s sender=%s destination=%s object=%s interface=%s member=%s cookie=%" PRIu64 " reply_cookie=%" PRIu64 " error=%s", \
+                  log_debug("Got message type=%s sender=%s destination=%s object=%s interface=%s member=%s cookie=%" PRIu64 " reply_cookie=%" PRIu64 " error=%s", \
                   bus_message_type_to_string(_m->header->type), \
                   strna(sd_bus_message_get_sender(_m)), \
                   strna(sd_bus_message_get_destination(_m)), \

commit f6f6d4b6e76723ff412c2d246ce23cc2ae455cb3
Merge: 9eb2125 ff48c77
Author: Martin Pitt <martin.pitt at ubuntu.com>
Date:   Wed Jun 10 12:50:35 2015 +0200

    Merge pull request #136 from dslul/master
    
    keymap: Add Samsung NP350V and NP670Z


commit ff48c774236967273732a7ee154b4b8e834b4409
Author: dslul <laudanidaniele at gmail.com>
Date:   Wed Jun 10 12:18:22 2015 +0200

    keymap: Add Samsung NP350V and NP670Z
    
    typo
    
    keymap: Add Samsung NP350V and NP670Z

diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index 9c7e553..007c6a8 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -980,6 +980,8 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*550P*:pvr*
  KEYBOARD_KEY_a9=!                                      # Fn Lock - Function lock off
 
 # Series 7 / 9
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*350V*:pvr*
+evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*670Z*:pvr*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700Z*:pvr*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*700G*:pvr*
 evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:pn*900X[34]*:pvr*

commit 9eb212568fb01021bd4592a0ae15ad05629bea47
Merge: 0117db1 f9f97ca
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 10 11:38:12 2015 +0200

    Merge pull request #117 from utezduyar/feat/dump-sync-dbus-message-with-logging-on
    
    sd-bus: dump sync messages in debug mode


commit 0117db19b69f89e8e0a91be01097fe6de30c7c07
Merge: 229d17c 8dc31a6
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 10 11:27:33 2015 +0200

    Merge pull request #135 from zonque/buildsys
    
    build-sys: turn some warnings into errors


commit 8dc31a63981267f257583ef82ceb79859ff243f8
Author: Daniel Mack <daniel at zonque.org>
Date:   Wed Jun 10 10:54:59 2015 +0200

    build-sys: turn some warnings into errors
    
    Make the build sys error out on missing function prototypes, missing
    variable declarations, implicit function declarations or forgotten return
    statements.
    
    None of these conditions are acceptable, and by making them hard errors, the
    build bots can detect them earlier.

diff --git a/configure.ac b/configure.ac
index 5719075..b767175 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,10 +159,12 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -Wdeclaration-after-statement \
         -Wfloat-equal \
         -Wsuggest-attribute=noreturn \
-        -Wmissing-prototypes \
+        -Werror=missing-prototypes \
+        -Werror=implicit-function-declaration \
+        -Werror=missing-declarations \
+        -Werror=return-type \
         -Wstrict-prototypes \
         -Wredundant-decls \
-        -Wmissing-declarations \
         -Wmissing-noreturn \
         -Wshadow \
         -Wendif-labels \

commit 229d17cf12d46dd6aa3dc1011277c9ff71f5cc4c
Merge: cde40ac 7a37956
Author: Daniel Mack <github at zonque.org>
Date:   Wed Jun 10 09:43:56 2015 +0200

    Merge pull request #130 from whot/hwdb-updates
    
    Hwdb updates


commit f9f97ca6927af3a23d9c27e4edf65532ebf23e1e
Author: Umut Tezduyar Lindskog <umut.tezduyar at axis.com>
Date:   Fri May 29 09:48:11 2015 +0200

    sd-bus: dump sync messages in debug mode

diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index edc27ae..147e6f0 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -49,6 +49,20 @@
 #include "bus-track.h"
 #include "bus-slot.h"
 
+#define log_debug_bus_message(m) do { \
+                  sd_bus_message *_m = (m); \
+                  log_debug("1Got message type=%s sender=%s destination=%s object=%s interface=%s member=%s cookie=%" PRIu64 " reply_cookie=%" PRIu64 " error=%s", \
+                  bus_message_type_to_string(_m->header->type), \
+                  strna(sd_bus_message_get_sender(_m)), \
+                  strna(sd_bus_message_get_destination(_m)), \
+                  strna(sd_bus_message_get_path(_m)), \
+                  strna(sd_bus_message_get_interface(_m)), \
+                  strna(sd_bus_message_get_member(_m)), \
+                  BUS_MESSAGE_COOKIE(_m), \
+                  _m->reply_cookie, \
+                  strna(_m->error.message)); \
+                  } while (false)
+
 static int bus_poll(sd_bus *bus, bool need_more, uint64_t timeout_usec);
 static int attach_io_events(sd_bus *b);
 static void detach_io_events(sd_bus *b);
@@ -1992,6 +2006,7 @@ _public_ int sd_bus_call(
 
                                 memmove(bus->rqueue + i, bus->rqueue + i + 1, sizeof(sd_bus_message*) * (bus->rqueue_size - i - 1));
                                 bus->rqueue_size--;
+                                log_debug_bus_message(incoming);
 
                                 if (incoming->header->type == SD_BUS_MESSAGE_METHOD_RETURN) {
 
@@ -2480,16 +2495,7 @@ static int process_message(sd_bus *bus, sd_bus_message *m) {
         bus->current_message = m;
         bus->iteration_counter++;
 
-        log_debug("Got message type=%s sender=%s destination=%s object=%s interface=%s member=%s cookie=%" PRIu64 " reply_cookie=%" PRIu64 " error=%s",
-                  bus_message_type_to_string(m->header->type),
-                  strna(sd_bus_message_get_sender(m)),
-                  strna(sd_bus_message_get_destination(m)),
-                  strna(sd_bus_message_get_path(m)),
-                  strna(sd_bus_message_get_interface(m)),
-                  strna(sd_bus_message_get_member(m)),
-                  BUS_MESSAGE_COOKIE(m),
-                  m->reply_cookie,
-                  strna(m->error.message));
+        log_debug_bus_message(m);
 
         r = process_hello(bus, m);
         if (r != 0)

commit 7676666c6a4e0c49ce56ae600854d01a14b2338f
Author: Susant Sahani <susant at redhat.com>
Date:   Wed Jun 10 12:20:45 2015 +0530

    network: veth imprve logging
    
    Replaces a lof of strerror() usage with log_netdev_error_errno()

diff --git a/src/network/networkd-netdev-veth.c b/src/network/networkd-netdev-veth.c
index 9e9e122..7bb02d1 100644
--- a/src/network/networkd-netdev-veth.c
+++ b/src/network/networkd-netdev-veth.c
@@ -35,12 +35,8 @@ static int netdev_veth_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m
         assert(m);
 
         r = sd_rtnl_message_open_container(m, VETH_INFO_PEER);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append VETH_INFO_PEER attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append VETH_INFO_PEER attribute: %m");
 
         if (v->ifname_peer) {
                 r = sd_rtnl_message_append_string(m, IFLA_IFNAME, v->ifname_peer);
@@ -50,21 +46,13 @@ static int netdev_veth_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m
 
         if (v->mac_peer) {
                 r = sd_rtnl_message_append_ether_addr(m, IFLA_ADDRESS, v->mac_peer);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_ADDRESS attribute: %s",
-                                         strerror(-r));
-                    return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_ADDRESS attribute: %m");
         }
 
         r = sd_rtnl_message_close_container(m);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append IFLA_INFO_DATA attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append IFLA_INFO_DATA attribute: %m");
 
         return r;
 }

commit f545680e3d4fd84931704406a352f14d66716572
Author: Susant Sahani <susant at redhat.com>
Date:   Wed Jun 10 11:55:54 2015 +0530

    networkd: vxlan improve logging
    
    Replaces a lof of strerror() usage with log_netdev_error_errno()

diff --git a/src/network/networkd-netdev-vxlan.c b/src/network/networkd-netdev-vxlan.c
index e2c2b10..01a1e50 100644
--- a/src/network/networkd-netdev-vxlan.c
+++ b/src/network/networkd-netdev-vxlan.c
@@ -39,123 +39,67 @@ static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_
 
         if (v->id <= VXLAN_VID_MAX) {
                 r = sd_rtnl_message_append_u32(m, IFLA_VXLAN_ID, v->id);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_VXLAN_ID attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_ID attribute: %m");
         }
 
         r = sd_rtnl_message_append_in_addr(m, IFLA_VXLAN_GROUP, &v->group.in);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append IFLA_VXLAN_GROUP attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_GROUP attribute: %m");
 
         r = sd_rtnl_message_append_u32(m, IFLA_VXLAN_LINK, link->ifindex);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append IFLA_VXLAN_LINK attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_LINK attribute: %m");
 
         if(v->ttl) {
                 r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_TTL, v->ttl);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_VXLAN_TTL attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_TTL attribute: %m");
         }
 
         if(v->tos) {
                 r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_TOS, v->tos);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_VXLAN_TOS attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_TOS attribute: %m");
         }
 
         r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_LEARNING, v->learning);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append IFLA_VXLAN_LEARNING attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_LEARNING attribute: %m");
 
         r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_RSC, v->route_short_circuit);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append IFLA_VXLAN_RSC attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_RSC attribute: %m");
 
         r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_PROXY, v->arp_proxy);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append IFLA_VXLAN_PROXY attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_PROXY attribute: %m");
 
         r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_L2MISS, v->l2miss);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append IFLA_VXLAN_L2MISS attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_L2MISS attribute: %m");
 
         r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_L3MISS, v->l3miss);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append IFLA_VXLAN_L3MISS attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_L3MISS attribute: %m");
 
         if(v->fdb_ageing) {
                 r = sd_rtnl_message_append_u32(m, IFLA_VXLAN_AGEING, v->fdb_ageing / USEC_PER_SEC);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_VXLAN_AGEING attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_AGEING attribute: %m");
         }
 
         r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_UDP_CSUM, v->udpcsum);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append IFLA_VXLAN_UDP_CSUM attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_UDP_CSUM attribute: %m");
 
         r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_UDP_ZERO_CSUM6_TX, v->udp6zerocsumtx);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append IFLA_VXLAN_UDP_ZERO_CSUM6_TX attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_UDP_ZERO_CSUM6_TX attribute: %m");
 
         r = sd_rtnl_message_append_u8(m, IFLA_VXLAN_UDP_ZERO_CSUM6_RX, v->udp6zerocsumrx);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append IFLA_VXLAN_UDP_ZERO_CSUM6_RX attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_UDP_ZERO_CSUM6_RX attribute: %m");
 
         return r;
 }

commit a668086ec7d27171eb3ed6bb49119b1c7602d337
Author: Susant Sahani <susant at redhat.com>
Date:   Wed Jun 10 11:39:26 2015 +0530

    networkd: bond  improve logging
    
    Replaces a lof of strerror() usage with log_netdev_error_errno()

diff --git a/src/network/networkd-netdev-bond.c b/src/network/networkd-netdev-bond.c
index 70df08a..9919955 100644
--- a/src/network/networkd-netdev-bond.c
+++ b/src/network/networkd-netdev-bond.c
@@ -191,215 +191,132 @@ static int netdev_bond_fill_message_create(NetDev *netdev, Link *link, sd_rtnl_m
         if (b->mode != _NETDEV_BOND_MODE_INVALID) {
                 r = sd_rtnl_message_append_u8(m, IFLA_BOND_MODE,
                                               bond_mode_to_kernel(b->mode));
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_MODE attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_MODE attribute: %m");
         }
 
         if (b->xmit_hash_policy != _NETDEV_BOND_XMIT_HASH_POLICY_INVALID) {
                 r = sd_rtnl_message_append_u8(m, IFLA_BOND_XMIT_HASH_POLICY,
                                               bond_xmit_hash_policy_to_kernel(b->xmit_hash_policy));
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_XMIT_HASH_POLICY attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_XMIT_HASH_POLICY attribute: %m");
         }
 
         if (b->lacp_rate != _NETDEV_BOND_LACP_RATE_INVALID &&
             b->mode == NETDEV_BOND_MODE_802_3AD) {
                 r = sd_rtnl_message_append_u8(m, IFLA_BOND_AD_LACP_RATE, b->lacp_rate );
                 if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_AD_LACP_RATE attribute: %s",
-                                         strerror(-r));
-                        return r;
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_AD_LACP_RATE attribute: %m");
                 }
         }
 
         if (b->miimon != 0) {
                 r = sd_rtnl_message_append_u32(m, IFLA_BOND_MIIMON, b->miimon / USEC_PER_MSEC);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_BOND_MIIMON attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_BOND_MIIMON attribute: %m");
         }
 
         if (b->downdelay != 0) {
                 r = sd_rtnl_message_append_u32(m, IFLA_BOND_DOWNDELAY, b->downdelay / USEC_PER_MSEC);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_DOWNDELAY attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_DOWNDELAY attribute: %m");
         }
 
         if (b->updelay != 0) {
                 r = sd_rtnl_message_append_u32(m, IFLA_BOND_UPDELAY, b->updelay / USEC_PER_MSEC);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_UPDELAY attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_UPDELAY attribute: %m");
         }
 
         if (b->arp_interval != 0) {
                 r = sd_rtnl_message_append_u32(m, IFLA_BOND_ARP_INTERVAL, b->arp_interval / USEC_PER_MSEC);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_ARP_INTERVAL attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
-        }
-
-        if ((b->lp_interval >= LEARNING_PACKETS_INTERVAL_MIN_SEC) &&
-            (b->lp_interval <= LEARNING_PACKETS_INTERVAL_MAX_SEC)) {
-                r = sd_rtnl_message_append_u32(m, IFLA_BOND_LP_INTERVAL, b->lp_interval / USEC_PER_SEC);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_LP_INTERVAL attribute: %s",
-                                         strerror(-r));
-                        return r;
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_ARP_INTERVAL attribute: %m");
+
+                if ((b->lp_interval >= LEARNING_PACKETS_INTERVAL_MIN_SEC) &&
+                    (b->lp_interval <= LEARNING_PACKETS_INTERVAL_MAX_SEC)) {
+                        r = sd_rtnl_message_append_u32(m, IFLA_BOND_LP_INTERVAL, b->lp_interval / USEC_PER_SEC);
+                        if (r < 0)
+                                return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_LP_INTERVAL attribute: %m");
                 }
         }
 
         if (b->ad_select != _NETDEV_BOND_AD_SELECT_INVALID &&
             b->mode == BOND_MODE_8023AD) {
                 r = sd_rtnl_message_append_u8(m, IFLA_BOND_AD_SELECT, b->ad_select);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_AD_SELECT attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_AD_SELECT attribute: %m");
         }
 
         if (b->fail_over_mac != _NETDEV_BOND_FAIL_OVER_MAC_INVALID &&
             b->mode == NETDEV_BOND_MODE_ACTIVE_BACKUP) {
                 r = sd_rtnl_message_append_u8(m, IFLA_BOND_FAIL_OVER_MAC, b->fail_over_mac);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_FAIL_OVER_MAC attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_FAIL_OVER_MAC attribute: %m");
         }
 
         if (b->arp_validate != _NETDEV_BOND_ARP_VALIDATE_INVALID) {
                 r = sd_rtnl_message_append_u32(m, IFLA_BOND_ARP_VALIDATE, b->arp_validate);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_ARP_VALIDATE attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_ARP_VALIDATE attribute: %m");
         }
 
         if (b->arp_all_targets != _NETDEV_BOND_ARP_ALL_TARGETS_INVALID) {
                 r = sd_rtnl_message_append_u32(m, IFLA_BOND_ARP_ALL_TARGETS, b->arp_all_targets);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_ARP_VALIDATE attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_ARP_VALIDATE attribute: %m");
         }
 
         if (b->primary_reselect != _NETDEV_BOND_PRIMARY_RESELECT_INVALID) {
                 r = sd_rtnl_message_append_u32(m, IFLA_BOND_ARP_ALL_TARGETS, b->primary_reselect);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_ARP_ALL_TARGETS attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_ARP_ALL_TARGETS attribute: %m");
         }
 
         if (b->resend_igmp <= RESEND_IGMP_MAX) {
                 r = sd_rtnl_message_append_u32(m, IFLA_BOND_RESEND_IGMP, b->resend_igmp);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_RESEND_IGMP attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_RESEND_IGMP attribute: %m");
         }
 
         if (b->packets_per_slave <= PACKETS_PER_SLAVE_MAX) {
                 r = sd_rtnl_message_append_u32(m, IFLA_BOND_PACKETS_PER_SLAVE, b->packets_per_slave);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_PACKETS_PER_SLAVE attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_PACKETS_PER_SLAVE attribute: %m");
         }
 
         if (b->num_grat_arp <= GRATUITOUS_ARP_MAX) {
                 r = sd_rtnl_message_append_u8(m, IFLA_BOND_NUM_PEER_NOTIF, b->num_grat_arp);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_NUM_PEER_NOTIF attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_NUM_PEER_NOTIF attribute: %m");
         }
 
         if (b->min_links != 0) {
                 r = sd_rtnl_message_append_u32(m, IFLA_BOND_MIN_LINKS, b->min_links);
-                if (r < 0) {
-                        log_netdev_error(netdev,
-                                         "Could not append IFLA_BOND_MIN_LINKS attribute: %s",
-                                         strerror(-r));
-                        return r;
-                }
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_MIN_LINKS attribute: %m");
         }
 
         r = sd_rtnl_message_append_u8(m, IFLA_BOND_ALL_SLAVES_ACTIVE, b->all_slaves_active);
-        if (r < 0) {
-                log_netdev_error(netdev,
-                                 "Could not append IFLA_BOND_ALL_SLAVES_ACTIVE attribute: %s",
-                                 strerror(-r));
-                return r;
-        }
+        if (r < 0)
+                return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_ALL_SLAVES_ACTIVE attribute: %m");
 
         if (b->arp_interval > 0)  {
                 if (b->n_arp_ip_targets > 0) {
 
                         r = sd_rtnl_message_open_container(m, IFLA_BOND_ARP_IP_TARGET);
-                        if (r < 0) {
-                                log_netdev_error(netdev,
-                                                 "Could not open contaniner IFLA_BOND_ARP_IP_TARGET : %s",
-                                                 strerror(-r));
-                                return r;
-                        }
+                        if (r < 0)
+                                return log_netdev_error_errno(netdev, r, "Could not open contaniner IFLA_BOND_ARP_IP_TARGET : %m");
 
                         LIST_FOREACH(arp_ip_target, target, b->arp_ip_targets) {
                                 r = sd_rtnl_message_append_u32(m, i++, target->ip.in.s_addr);
-                                if (r < 0) {
-                                        log_netdev_error(netdev,
-                                                         "Could not append IFLA_BOND_ARP_ALL_TARGETS attribute: %s",
-                                                         strerror(-r));
-                                        return r;
-                                }
+                                if (r < 0)
+                                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_BOND_ARP_ALL_TARGETS attribute: %m");
                         }
 
                         r = sd_rtnl_message_close_container(m);
-                        if (r < 0) {
-                                log_netdev_error(netdev,
-                                                 "Could not close contaniner IFLA_BOND_ARP_IP_TARGET : %s",
-                                                 strerror(-r));
-                                return r;
-                        }
+                        if (r < 0)
+                                return log_netdev_error_errno(netdev, r, "Could not close contaniner IFLA_BOND_ARP_IP_TARGET : %m");
                 }
         }
 

commit 7a37956eac10c727f562ddcce00d1179d22a67f9
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Wed Jun 10 13:53:51 2015 +1000

    hwdb: update Logitech's unifying receiver devices
    
    Since 3.19, the devices have the proper vid/pid and the model number in the
    name.
    
    Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

diff --git a/hwdb/70-mouse.hwdb b/hwdb/70-mouse.hwdb
index cfe3579..6c77b74 100644
--- a/hwdb/70-mouse.hwdb
+++ b/hwdb/70-mouse.hwdb
@@ -182,6 +182,7 @@ mouse:usb:v046dpc045:name:Logitech USB-PS/2 Optical Mouse:
  MOUSE_DPI=600 at 125
 
 # Logitech Wireless Mouse M325
+mouse:usb:v046dp400a:name:Logitech M325:
 mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:400a:
  MOUSE_DPI=600 at 166
  MOUSE_WHEEL_CLICK_ANGLE=20
@@ -215,8 +216,10 @@ mouse:usb:v046dp1028:name:Logitech M570:
  MOUSE_DPI=540 at 167
 
 # Logitech Wireless Mouse M185
+mouse:usb:v046dp4008:name:Logitech M185:
 mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4008:
 # Logitech M705 (marathon mouse)
+mouse:usb:v046dp101b:name:Logitech M705:
 mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:101b:
  MOUSE_DPI=800 at 166
 
@@ -227,6 +230,8 @@ mouse:usb:v046dpc24e:name:Logitech G500s Laser Gaming Mouse:
  MOUSE_DPI=400 at 500 *800 at 500 2000 at 500
 
 # Logitech B605 Wireless Mouse (also M505)
+mouse:usb:v046dp101d:name:Logitech B605:
+mouse:usb:v046dp101d:name:Logitech M505:
 mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:101d:
  MOUSE_DPI=900 at 166
 
@@ -255,10 +260,12 @@ mouse:usb:v046dpc069:name:Logitech USB Laser Mouse:
  MOUSE_DPI=1200 at 125
 
 # Logitech T620 (or, the soap)
+mouse:usb:v046dp4027:name:Logitech T620:
 mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4027:
  MOUSE_DPI=1200 at 250
 
 # Logitech ZoneTouch Mouse T400
+mouse:usb:v046dp4026:name:Logitech T400:
 mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4026:
  MOUSE_DPI=1300 at 166
 

commit cde40acc805b855909b95f15fd9a3111e40be672
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Jun 10 01:27:32 2015 +0200

    logind,sd-event: drop spurious new-lines

diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 2b8d1b8..00880c9 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -2384,7 +2384,6 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) {
                 }
 
                 r = -errno;
-
                 goto finish;
         }
 
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 373c993..c0b4739 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -738,8 +738,7 @@ int user_kill(User *u, int signo) {
         return manager_kill_unit(u->manager, u->slice, KILL_ALL, signo, NULL);
 }
 
-static bool
-elect_display_filter(Session *s) {
+static bool elect_display_filter(Session *s) {
         /* Return true if the session is a candidate for the user’s ‘primary
          * session’ or ‘display’. */
         assert(s);
@@ -747,8 +746,7 @@ elect_display_filter(Session *s) {
         return (s->class == SESSION_USER && !s->stopping);
 }
 
-static int
-elect_display_compare(Session *s1, Session *s2) {
+static int elect_display_compare(Session *s1, Session *s2) {
         /* Indexed by SessionType. Lower numbers mean more preferred. */
         const int type_ranks[_SESSION_TYPE_MAX] = {
                 [SESSION_UNSPECIFIED] = 0,

commit ce30c8dcb41dfe9264f79f30c7f51c0e74576638
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun May 31 23:55:55 2015 +0200

    tree-wide: whenever we fork off a foreign child process reset signal mask/handlers
    
    Also, when the child is potentially long-running make sure to set a
    death signal.
    
    Also, ignore the result of the reset operations explicitly by casting
    them to (void).

diff --git a/src/activate/activate.c b/src/activate/activate.c
index d345e28..5318829 100644
--- a/src/activate/activate.c
+++ b/src/activate/activate.c
@@ -33,6 +33,7 @@
 #include "log.h"
 #include "strv.h"
 #include "macro.h"
+#include "signal-util.h"
 
 static char** arg_listen = NULL;
 static bool arg_accept = false;
@@ -192,6 +193,10 @@ static int launch1(const char* child, char** argv, char **env, int fd) {
 
         /* In the child */
         if (child_pid == 0) {
+
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
+
                 r = dup2(fd, STDIN_FILENO);
                 if (r < 0) {
                         log_error_errno(errno, "Failed to dup connection to stdin: %m");
diff --git a/src/core/busname.c b/src/core/busname.c
index 3f5abbc..2085721 100644
--- a/src/core/busname.c
+++ b/src/core/busname.c
@@ -408,8 +408,8 @@ static int busname_make_starter(BusName *n, pid_t *_pid) {
         if (pid == 0) {
                 int ret;
 
-                default_signals(SIGNALS_CRASH_HANDLER, SIGNALS_IGNORE, -1);
-                ignore_signals(SIGPIPE, -1);
+                (void) default_signals(SIGNALS_CRASH_HANDLER, SIGNALS_IGNORE, -1);
+                (void) ignore_signals(SIGPIPE, -1);
                 log_forget_fds();
 
                 r = bus_kernel_make_starter(n->starter_fd, n->name, n->activating, n->accept_fd, n->policy, n->policy_world);
diff --git a/src/core/execute.c b/src/core/execute.c
index 4120493..f13c693 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -823,6 +823,7 @@ static int setup_pam(
 
         /* Block SIGTERM, so that we know that it won't get lost in
          * the child */
+
         if (sigemptyset(&ss) < 0 ||
             sigaddset(&ss, SIGTERM) < 0 ||
             sigprocmask(SIG_BLOCK, &ss, &old_ss) < 0)
@@ -857,6 +858,8 @@ static int setup_pam(
                 if (setresuid(uid, uid, uid) < 0)
                         log_error_errno(r, "Error: Failed to setresuid() in sd-pam: %m");
 
+                (void) ignore_signals(SIGPIPE, -1);
+
                 /* Wait until our parent died. This will only work if
                  * the above setresuid() succeeds, otherwise the kernel
                  * will not allow unprivileged parents kill their privileged
@@ -1324,11 +1327,11 @@ static int exec_child(
          * others we leave untouched because we set them to
          * SIG_DFL or a valid handler initially, both of which
          * will be demoted to SIG_DFL. */
-        default_signals(SIGNALS_CRASH_HANDLER,
-                        SIGNALS_IGNORE, -1);
+        (void) default_signals(SIGNALS_CRASH_HANDLER,
+                               SIGNALS_IGNORE, -1);
 
         if (context->ignore_sigpipe)
-                ignore_signals(SIGPIPE, -1);
+                (void) ignore_signals(SIGPIPE, -1);
 
         r = reset_signal_mask();
         if (r < 0) {
diff --git a/src/core/main.c b/src/core/main.c
index 29ccff7..332453a 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1405,9 +1405,8 @@ int main(int argc, char *argv[]) {
         }
 
         /* Reset all signal handlers. */
-        assert_se(reset_all_signal_handlers() == 0);
-
-        ignore_signals(SIGNALS_IGNORE, -1);
+        (void) reset_all_signal_handlers();
+        (void) ignore_signals(SIGNALS_IGNORE, -1);
 
         if (parse_config_file() < 0) {
                 error_message = "Failed to parse config file";
@@ -1931,8 +1930,8 @@ finish:
 
                 /* Reenable any blocked signals, especially important
                  * if we switch from initial ramdisk to init=... */
-                reset_all_signal_handlers();
-                reset_signal_mask();
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
 
                 if (switch_root_init) {
                         args[0] = switch_root_init;
diff --git a/src/core/socket.c b/src/core/socket.c
index 0239962..d3178e6 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -1473,8 +1473,8 @@ static int socket_chown(Socket *s, pid_t *_pid) {
                 gid_t gid = GID_INVALID;
                 int ret;
 
-                default_signals(SIGNALS_CRASH_HANDLER, SIGNALS_IGNORE, -1);
-                ignore_signals(SIGPIPE, -1);
+                (void) default_signals(SIGNALS_CRASH_HANDLER, SIGNALS_IGNORE, -1);
+                (void) ignore_signals(SIGPIPE, -1);
                 log_forget_fds();
 
                 if (!isempty(s->user)) {
diff --git a/src/delta/delta.c b/src/delta/delta.c
index c764bb4..b60aaef 100644
--- a/src/delta/delta.c
+++ b/src/delta/delta.c
@@ -24,6 +24,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <getopt.h>
+#include <sys/prctl.h>
 
 #include "hashmap.h"
 #include "util.h"
@@ -34,6 +35,7 @@
 #include "strv.h"
 #include "process-util.h"
 #include "terminal-util.h"
+#include "signal-util.h"
 
 static const char prefixes[] =
         "/etc\0"
@@ -189,9 +191,14 @@ static int found_override(const char *top, const char *bottom) {
         if (pid < 0)
                 return log_error_errno(errno, "Failed to fork off diff: %m");
         else if (pid == 0) {
+
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
+                assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
+
                 execlp("diff", "diff", "-us", "--", bottom, top, NULL);
                 log_error_errno(errno, "Failed to execute diff: %m");
-                _exit(1);
+                _exit(EXIT_FAILURE);
         }
 
         wait_for_terminate_and_warn("diff", pid, false);
diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index f0e5c5f..30254b6 100644
--- a/src/fsck/fsck.c
+++ b/src/fsck/fsck.c
@@ -394,8 +394,8 @@ int main(int argc, char *argv[]) {
 
                 /* Child */
 
-                reset_all_signal_handlers();
-                reset_signal_mask();
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
                 assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
 
                 /* Close the reading side of the progress pipe */
diff --git a/src/import/export.c b/src/import/export.c
index d4bc88e..e563bee 100644
--- a/src/import/export.c
+++ b/src/import/export.c
@@ -311,7 +311,7 @@ int main(int argc, char *argv[]) {
         if (r <= 0)
                 goto finish;
 
-        ignore_signals(SIGPIPE, -1);
+        (void) ignore_signals(SIGPIPE, -1);
 
         r = export_main(argc, argv);
 
diff --git a/src/import/import-common.c b/src/import/import-common.c
index 9711614..950c7b4 100644
--- a/src/import/import-common.c
+++ b/src/import/import-common.c
@@ -97,8 +97,8 @@ int import_fork_tar_x(const char *path, pid_t *ret) {
 
                 /* Child */
 
-                reset_all_signal_handlers();
-                reset_signal_mask();
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
                 assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
 
                 pipefd[1] = safe_close(pipefd[1]);
@@ -171,8 +171,8 @@ int import_fork_tar_c(const char *path, pid_t *ret) {
 
                 /* Child */
 
-                reset_all_signal_handlers();
-                reset_signal_mask();
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
                 assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
 
                 pipefd[0] = safe_close(pipefd[0]);
diff --git a/src/import/import.c b/src/import/import.c
index fff5a10..3091ed1 100644
--- a/src/import/import.c
+++ b/src/import/import.c
@@ -328,7 +328,7 @@ int main(int argc, char *argv[]) {
         if (r <= 0)
                 goto finish;
 
-        ignore_signals(SIGPIPE, -1);
+        (void) ignore_signals(SIGPIPE, -1);
 
         r = import_main(argc, argv);
 
diff --git a/src/import/importd.c b/src/import/importd.c
index 50566a6..e2df44a 100644
--- a/src/import/importd.c
+++ b/src/import/importd.c
@@ -390,8 +390,8 @@ static int transfer_start(Transfer *t) {
 
                 /* Child */
 
-                reset_all_signal_handlers();
-                reset_signal_mask();
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
                 assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
 
                 pipefd[0] = safe_close(pipefd[0]);
diff --git a/src/import/pull-common.c b/src/import/pull-common.c
index d2588d4..652277e 100644
--- a/src/import/pull-common.c
+++ b/src/import/pull-common.c
@@ -339,8 +339,8 @@ int pull_verify(
 
                 /* Child */
 
-                reset_all_signal_handlers();
-                reset_signal_mask();
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
                 assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
 
                 gpg_pipe[1] = safe_close(gpg_pipe[1]);
diff --git a/src/import/pull.c b/src/import/pull.c
index eec4583..03fe3dc 100644
--- a/src/import/pull.c
+++ b/src/import/pull.c
@@ -440,7 +440,7 @@ int main(int argc, char *argv[]) {
         if (r <= 0)
                 goto finish;
 
-        ignore_signals(SIGPIPE, -1);
+        (void) ignore_signals(SIGPIPE, -1);
 
         r = pull_main(argc, argv);
 
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
index 911e2a1..ae332d8 100644
--- a/src/journal-remote/journal-remote.c
+++ b/src/journal-remote/journal-remote.c
@@ -96,6 +96,10 @@ static int spawn_child(const char* child, char** argv) {
 
         /* In the child */
         if (child_pid == 0) {
+
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
+
                 r = dup2(fd[1], STDOUT_FILENO);
                 if (r < 0) {
                         log_error_errno(errno, "Failed to dup pipe to stdout: %m");
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 381bf72..fc49b2e 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -757,6 +757,9 @@ static int run_gdb(sd_journal *j) {
                 goto finish;
         }
         if (pid == 0) {
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
+
                 execlp("gdb", "gdb", exe, path, NULL);
 
                 log_error_errno(errno, "Failed to invoke gdb: %m");
diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
index 4fffc65..93ebe80 100644
--- a/src/libsystemd/sd-bus/bus-socket.c
+++ b/src/libsystemd/sd-bus/bus-socket.c
@@ -738,7 +738,8 @@ int bus_socket_exec(sd_bus *b) {
         if (pid == 0) {
                 /* Child */
 
-                reset_all_signal_handlers();
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
 
                 close_all_fds(s+1, 1);
 
diff --git a/src/login/inhibit.c b/src/login/inhibit.c
index 57cfb5d..0e5dce5 100644
--- a/src/login/inhibit.c
+++ b/src/login/inhibit.c
@@ -33,6 +33,7 @@
 #include "strv.h"
 #include "formats-util.h"
 #include "process-util.h"
+#include "signal-util.h"
 
 static const char* arg_what = "idle:sleep:shutdown";
 static const char* arg_who = NULL;
@@ -274,6 +275,9 @@ int main(int argc, char *argv[]) {
                 if (pid == 0) {
                         /* Child */
 
+                        (void) reset_all_signal_handlers();
+                        (void) reset_signal_mask();
+
                         close_all_fds(NULL, 0);
 
                         execvp(argv[optind], argv + optind);
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 4211a3d..251af4a 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -3656,7 +3656,8 @@ static int spawn_getent(const char *database, const char *key, pid_t *rpid) {
                 if (nullfd > 2)
                         safe_close(nullfd);
 
-                reset_all_signal_handlers();
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
                 close_all_fds(NULL, 0);
 
                 execle("/usr/bin/getent", "getent", database, key, NULL, &empty_env);
@@ -4739,8 +4740,8 @@ int main(int argc, char *argv[]) {
                         rtnl_socket_pair[0] = safe_close(rtnl_socket_pair[0]);
                         pid_socket_pair[0] = safe_close(pid_socket_pair[0]);
 
-                        reset_all_signal_handlers();
-                        reset_signal_mask();
+                        (void) reset_all_signal_handlers();
+                        (void) reset_signal_mask();
 
                         r = outer_child(&barrier,
                                         arg_directory,
diff --git a/src/quotacheck/quotacheck.c b/src/quotacheck/quotacheck.c
index a729f59..cf6a239 100644
--- a/src/quotacheck/quotacheck.c
+++ b/src/quotacheck/quotacheck.c
@@ -23,9 +23,11 @@
 #include <stdbool.h>
 #include <errno.h>
 #include <unistd.h>
+#include <sys/prctl.h>
 
 #include "util.h"
 #include "process-util.h"
+#include "signal-util.h"
 
 static bool arg_skip = false;
 static bool arg_force = false;
@@ -105,7 +107,13 @@ int main(int argc, char *argv[]) {
                 log_error_errno(errno, "fork(): %m");
                 return EXIT_FAILURE;
         } else if (pid == 0) {
+
                 /* Child */
+
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
+                assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
+
                 execv(cmdline[0], (char**) cmdline);
                 _exit(1); /* Operational error */
         }
diff --git a/src/remount-fs/remount-fs.c b/src/remount-fs/remount-fs.c
index e701fc9..f904e48 100644
--- a/src/remount-fs/remount-fs.c
+++ b/src/remount-fs/remount-fs.c
@@ -95,6 +95,9 @@ int main(int argc, char *argv[]) {
                         const char *arguments[5];
                         /* Child */
 
+                        (void) reset_all_signal_handlers();
+                        (void) reset_signal_mask();
+
                         arguments[0] = MOUNT_PATH;
                         arguments[1] = me->mnt_dir;
                         arguments[2] = "-o";
diff --git a/src/shared/machine-pool.c b/src/shared/machine-pool.c
index d27931c..8c64908 100644
--- a/src/shared/machine-pool.c
+++ b/src/shared/machine-pool.c
@@ -109,8 +109,8 @@ static int setup_machine_raw(uint64_t size, sd_bus_error *error) {
 
                 /* Child */
 
-                reset_all_signal_handlers();
-                reset_signal_mask();
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
                 assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
 
                 fd = safe_close(fd);
diff --git a/src/shared/pager.c b/src/shared/pager.c
index 58b62fd..13f03e7 100644
--- a/src/shared/pager.c
+++ b/src/shared/pager.c
@@ -30,6 +30,7 @@
 #include "process-util.h"
 #include "macro.h"
 #include "terminal-util.h"
+#include "signal-util.h"
 
 static pid_t pager_pid = 0;
 
@@ -85,6 +86,9 @@ int pager_open(bool jump_to_end) {
         if (pager_pid == 0) {
                 const char* less_opts;
 
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
+
                 dup2(fd[0], STDIN_FILENO);
                 safe_close_pair(fd);
 
@@ -178,6 +182,10 @@ int show_man_page(const char *desc, bool null_stdio) {
 
         if (pid == 0) {
                 /* Child */
+
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
+
                 if (null_stdio) {
                         r = make_null_stdio();
                         if (r < 0) {
diff --git a/src/shared/pty.c b/src/shared/pty.c
index 119d66e..a87b3ce 100644
--- a/src/shared/pty.c
+++ b/src/shared/pty.c
@@ -239,7 +239,7 @@ int pty_setup_child(Pty *pty) {
         assert_return(pty_is_child(pty), -EINVAL);
         assert_return(pty_is_open(pty), -EALREADY);
 
-        r = sigprocmask_many(SIG_SETMASK, -1);
+        r = reset_signal_mask();
         if (r < 0)
                 return r;
 
diff --git a/src/shared/util.c b/src/shared/util.c
index dc5e938..a20e7bb 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -2301,8 +2301,8 @@ static int do_execute(char **directories, usec_t timeout, char *argv[]) {
         /* We fork this all off from a child process so that we can
          * somewhat cleanly make use of SIGALRM to set a time limit */
 
-        reset_all_signal_handlers();
-        reset_signal_mask();
+        (void) reset_all_signal_handlers();
+        (void) reset_signal_mask();
 
         assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
 
@@ -3344,8 +3344,8 @@ int fork_agent(pid_t *pid, const int except[], unsigned n_except, const char *pa
         /* Make sure we actually can kill the agent, if we need to, in
          * case somebody invoked us from a shell script that trapped
          * SIGTERM or so... */
-        reset_all_signal_handlers();
-        reset_signal_mask();
+        (void) reset_all_signal_handlers();
+        (void) reset_signal_mask();
 
         /* Check whether our parent died before we were able
          * to set the death signal and unblock the signals */
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index b3d90d2..5075e4e 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -5189,6 +5189,9 @@ static int enable_sysv_units(const char *verb, char **args) {
                 else if (pid == 0) {
                         /* Child */
 
+                        (void) reset_all_signal_handlers();
+                        (void) reset_signal_mask();
+
                         execv(argv[0], (char**) argv);
                         log_error("Failed to execute %s: %m", argv[0]);
                         _exit(EXIT_FAILURE);
@@ -5854,6 +5857,9 @@ static int run_editor(char **paths) {
                 unsigned i = 1;
                 size_t argc;
 
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
+
                 argc = strv_length(paths)/2 + 1;
                 args = newa(const char*, argc + 1);
 
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
index 6c782b3..f7728dc 100644
--- a/src/vconsole/vconsole-setup.c
+++ b/src/vconsole/vconsole-setup.c
@@ -37,6 +37,7 @@
 #include "fileio.h"
 #include "process-util.h"
 #include "terminal-util.h"
+#include "signal-util.h"
 
 static bool is_vconsole(int fd) {
         unsigned char data[1];
@@ -122,6 +123,10 @@ static int keyboard_load_and_wait(const char *vc, const char *map, const char *m
         if (pid < 0)
                 return log_error_errno(errno, "Failed to fork: %m");
         else if (pid == 0) {
+
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
+
                 execv(args[0], (char **) args);
                 _exit(EXIT_FAILURE);
         }
@@ -160,6 +165,10 @@ static int font_load_and_wait(const char *vc, const char *font, const char *map,
         if (pid < 0)
                 return log_error_errno(errno, "Failed to fork: %m");
         else if (pid == 0) {
+
+                (void) reset_all_signal_handlers();
+                (void) reset_signal_mask();
+
                 execv(args[0], (char **) args);
                 _exit(EXIT_FAILURE);
         }

commit 0c2c2a3aeb4c348e41d5d634c397faa3aa35cba7
Author: Lennart Poettering <lennart at poettering.net>
Date:   Sun May 31 23:21:48 2015 +0200

    signal-util: modernize and share more code

diff --git a/src/shared/signal-util.c b/src/shared/signal-util.c
index 9a2973b..84cf42b 100644
--- a/src/shared/signal-util.c
+++ b/src/shared/signal-util.c
@@ -23,13 +23,13 @@
 #include "signal-util.h"
 
 int reset_all_signal_handlers(void) {
+        static const struct sigaction sa = {
+                .sa_handler = SIG_DFL,
+                .sa_flags = SA_RESTART,
+        };
         int sig, r = 0;
 
         for (sig = 1; sig < _NSIG; sig++) {
-                static const struct sigaction sa = {
-                        .sa_handler = SIG_DFL,
-                        .sa_flags = SA_RESTART,
-                };
 
                 /* These two cannot be caught... */
                 if (sig == SIGKILL || sig == SIGSTOP)
@@ -38,7 +38,7 @@ int reset_all_signal_handlers(void) {
                 /* On Linux the first two RT signals are reserved by
                  * glibc, and sigaction() will return EINVAL for them. */
                 if ((sigaction(sig, &sa, NULL) < 0))
-                        if (errno != EINVAL && r == 0)
+                        if (errno != EINVAL && r >= 0)
                                 r = -errno;
         }
 
@@ -57,83 +57,123 @@ int reset_signal_mask(void) {
         return 0;
 }
 
+static int sigaction_many_ap(const struct sigaction *sa, int sig, va_list ap) {
+        int r = 0;
+
+        /* negative signal ends the list. 0 signal is skipped. */
+
+        if (sig < 0)
+                return 0;
+
+        if (sig > 0) {
+                if (sigaction(sig, sa, NULL) < 0)
+                        r = -errno;
+        }
+
+        while ((sig = va_arg(ap, int)) >= 0) {
+
+                if (sig == 0)
+                        continue;
+
+                if (sigaction(sig, sa, NULL) < 0) {
+                        if (r >= 0)
+                                r = -errno;
+                }
+        }
+
+        return r;
+}
+
 int sigaction_many(const struct sigaction *sa, ...) {
         va_list ap;
-        int r = 0, sig;
+        int r;
 
         va_start(ap, sa);
-        while ((sig = va_arg(ap, int)) > 0)
-                if (sigaction(sig, sa, NULL) < 0)
-                        r = -errno;
+        r = sigaction_many_ap(sa, 0, ap);
         va_end(ap);
 
         return r;
 }
 
 int ignore_signals(int sig, ...) {
+
         static const struct sigaction sa = {
                 .sa_handler = SIG_IGN,
                 .sa_flags = SA_RESTART,
         };
-        va_list ap;
-        int r = 0;
 
-        if (sigaction(sig, &sa, NULL) < 0)
-                r = -errno;
+        va_list ap;
+        int r;
 
         va_start(ap, sig);
-        while ((sig = va_arg(ap, int)) > 0)
-                if (sigaction(sig, &sa, NULL) < 0)
-                        r = -errno;
+        r = sigaction_many_ap(&sa, sig, ap);
         va_end(ap);
 
         return r;
 }
 
 int default_signals(int sig, ...) {
+
         static const struct sigaction sa = {
                 .sa_handler = SIG_DFL,
                 .sa_flags = SA_RESTART,
         };
-        va_list ap;
-        int r = 0;
 
-        if (sigaction(sig, &sa, NULL) < 0)
-                r = -errno;
+        va_list ap;
+        int r;
 
         va_start(ap, sig);
-        while ((sig = va_arg(ap, int)) > 0)
-                if (sigaction(sig, &sa, NULL) < 0)
-                        r = -errno;
+        r = sigaction_many_ap(&sa, sig, ap);
         va_end(ap);
 
         return r;
 }
 
-void sigset_add_many(sigset_t *ss, ...) {
-        va_list ap;
-        int sig;
+static int sigset_add_many_ap(sigset_t *ss, va_list ap) {
+        int sig, r = 0;
 
         assert(ss);
 
+        while ((sig = va_arg(ap, int)) >= 0) {
+
+                if (sig == 0)
+                        continue;
+
+                if (sigaddset(ss, sig) < 0) {
+                        if (r >= 0)
+                                r = -errno;
+                }
+        }
+
+        return r;
+}
+
+int sigset_add_many(sigset_t *ss, ...) {
+        va_list ap;
+        int r;
+
         va_start(ap, ss);
-        while ((sig = va_arg(ap, int)) > 0)
-                assert_se(sigaddset(ss, sig) == 0);
+        r = sigset_add_many_ap(ss, ap);
         va_end(ap);
+
+        return r;
 }
 
 int sigprocmask_many(int how, ...) {
         va_list ap;
         sigset_t ss;
-        int sig;
+        int r;
 
-        assert_se(sigemptyset(&ss) == 0);
+        if (sigemptyset(&ss) < 0)
+                return -errno;
 
         va_start(ap, how);
-        while ((sig = va_arg(ap, int)) > 0)
-                assert_se(sigaddset(&ss, sig) == 0);
+        r = sigset_add_many_ap(&ss, ap);
         va_end(ap);
 
+        if (r < 0)
+                return r;
+
         if (sigprocmask(how, &ss, NULL) < 0)
                 return -errno;
 
diff --git a/src/shared/signal-util.h b/src/shared/signal-util.h
index ddf64cd..9dc8a28 100644
--- a/src/shared/signal-util.h
+++ b/src/shared/signal-util.h
@@ -32,7 +32,7 @@ int ignore_signals(int sig, ...);
 int default_signals(int sig, ...);
 int sigaction_many(const struct sigaction *sa, ...);
 
-void sigset_add_many(sigset_t *ss, ...);
+int sigset_add_many(sigset_t *ss, ...);
 int sigprocmask_many(int how, ...);
 
 const char *signal_to_string(int i) _const_;

commit d93bcf29b82ee424ee9ec452c8b667fdd818a06b
Merge: 135d5bf 60053ef
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 9 23:51:57 2015 +0200

    Merge pull request #126 from phomes/master
    
    core: log oom during killing spree


commit 60053efbbaabf084e1ecd61474fdc7235fe3da64
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Tue Jun 9 22:03:05 2015 +0200

    core: log oom during killing spree
    
    but don't do anything else. We still want to kill as much as
    possible.
    
    Coverity CID#996306

diff --git a/src/core/killall.c b/src/core/killall.c
index 6e85923..2a9d72c 100644
--- a/src/core/killall.c
+++ b/src/core/killall.c
@@ -158,6 +158,7 @@ static int killall(int sig, Set *pids, bool send_sighup) {
 
         while ((d = readdir(dir))) {
                 pid_t pid;
+                int r;
 
                 if (d->d_type != DT_DIR &&
                     d->d_type != DT_UNKNOWN)
@@ -177,8 +178,11 @@ static int killall(int sig, Set *pids, bool send_sighup) {
                 }
 
                 if (kill(pid, sig) >= 0) {
-                        if (pids)
-                                set_put(pids, ULONG_TO_PTR(pid));
+                        if (pids) {
+                                r = set_put(pids, ULONG_TO_PTR(pid));
+                                if (r < 0)
+                                        log_oom();
+                        }
                 } else if (errno != ENOENT)
                         log_warning_errno(errno, "Could not kill %d: %m", pid);
 

commit 135d5bfcaee87d5133f73333aaf4906499529d8f
Merge: 4f7cd56 36908eb
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 9 20:06:02 2015 +0200

    Merge pull request #122 from martinpitt/master
    
    path-util: Fix path_is_mount_point for parent mount points in symlink mode


commit 36908eb87de06267c8cc824aa9dccb1b428419aa
Author: Martin Pitt <martin.pitt at ubuntu.com>
Date:   Tue Jun 9 16:16:56 2015 +0200

    path-util: Fix path_is_mount_point for parent mount points in symlink mode
    
    When we have a structure like this:
    
      /bin -> /usr/bin
      /usr is a mount point
    
    Then path_is_mount_point("/bin", AT_SYMLINK_FOLLOW) needs to look at the pair
    /usr/bin and /usr, not at the pair / and /usr/bin, as the latter have different
    mount IDs. But we only want to consider the base name, not any parent.
    
    Thus we have to resolve the given path first to get the real parent when
    allowing symlinks.
    
    Bug: https://github.com/systemd/systemd/issues/61

diff --git a/src/shared/path-util.c b/src/shared/path-util.c
index be50a18..5377054 100644
--- a/src/shared/path-util.c
+++ b/src/shared/path-util.c
@@ -640,7 +640,7 @@ fallback_fstat:
 /* flags can be AT_SYMLINK_FOLLOW or 0 */
 int path_is_mount_point(const char *t, int flags) {
         _cleanup_close_ int fd = -1;
-        _cleanup_free_ char *parent = NULL;
+        _cleanup_free_ char *canonical = NULL, *parent = NULL;
         int r;
 
         assert(t);
@@ -648,7 +648,17 @@ int path_is_mount_point(const char *t, int flags) {
         if (path_equal(t, "/"))
                 return 1;
 
-        r = path_get_parent(t, &parent);
+        /* we need to resolve symlinks manually, we can't just rely on
+         * fd_is_mount_point() to do that for us; if we have a structure like
+         * /bin -> /usr/bin/ and /usr is a mount point, then the parent that we
+         * look at needs to be /usr, not /. */
+        if (flags & AT_SYMLINK_FOLLOW) {
+                canonical = canonicalize_file_name(t);
+                if (!canonical)
+                        return -errno;
+        }
+
+        r = path_get_parent(canonical ?: t, &parent);
         if (r < 0)
                 return r;
 
@@ -656,7 +666,7 @@ int path_is_mount_point(const char *t, int flags) {
         if (fd < 0)
                 return -errno;
 
-        return fd_is_mount_point(fd, basename(t), flags);
+        return fd_is_mount_point(fd, basename(canonical ?: t), flags);
 }
 
 int path_is_read_only_fs(const char *path) {
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index 0045ae6..fce4e81 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -312,9 +312,11 @@ static void test_prefix_root(void) {
 }
 
 static void test_path_is_mount_point(void) {
-        int fd, rt, rf, rlt, rlf;
+        int fd;
         char tmp_dir[] = "/tmp/test-path-is-mount-point-XXXXXX";
         _cleanup_free_ char *file1 = NULL, *file2 = NULL, *link1 = NULL, *link2 = NULL;
+        _cleanup_free_ char *dir1 = NULL, *dir1file = NULL, *dirlink1 = NULL, *dirlink1file = NULL;
+        _cleanup_free_ char *dir2 = NULL, *dir2file = NULL;
 
         assert_se(path_is_mount_point("/", AT_SYMLINK_FOLLOW) > 0);
         assert_se(path_is_mount_point("/", 0) > 0);
@@ -328,6 +330,19 @@ static void test_path_is_mount_point(void) {
         assert_se(path_is_mount_point("/sys", AT_SYMLINK_FOLLOW) > 0);
         assert_se(path_is_mount_point("/sys", 0) > 0);
 
+        /* we'll create a hierarchy of different kinds of dir/file/link
+         * layouts:
+         *
+         * <tmp>/file1, <tmp>/file2
+         * <tmp>/link1 -> file1, <tmp>/link2 -> file2
+         * <tmp>/dir1/
+         * <tmp>/dir1/file
+         * <tmp>/dirlink1 -> dir1
+         * <tmp>/dirlink1file -> dirlink1/file
+         * <tmp>/dir2/
+         * <tmp>/dir2/file
+         */
+
         /* file mountpoints */
         assert_se(mkdtemp(tmp_dir) != NULL);
         file1 = path_join(NULL, tmp_dir, "file1");
@@ -352,8 +367,43 @@ static void test_path_is_mount_point(void) {
         assert_se(path_is_mount_point(link1, AT_SYMLINK_FOLLOW) == 0);
         assert_se(path_is_mount_point(link1, 0) == 0);
 
-        /* this test will only work as root */
+        /* directory mountpoints */
+        dir1 = path_join(NULL, tmp_dir, "dir1");
+        assert_se(dir1);
+        assert_se(mkdir(dir1, 0755) == 0);
+        dirlink1 = path_join(NULL, tmp_dir, "dirlink1");
+        assert_se(dirlink1);
+        assert_se(symlink("dir1", dirlink1) == 0);
+        dirlink1file = path_join(NULL, tmp_dir, "dirlink1file");
+        assert_se(dirlink1file);
+        assert_se(symlink("dirlink1/file", dirlink1file) == 0);
+        dir2 = path_join(NULL, tmp_dir, "dir2");
+        assert_se(dir2);
+        assert_se(mkdir(dir2, 0755) == 0);
+
+        assert_se(path_is_mount_point(dir1, AT_SYMLINK_FOLLOW) == 0);
+        assert_se(path_is_mount_point(dir1, 0) == 0);
+        assert_se(path_is_mount_point(dirlink1, AT_SYMLINK_FOLLOW) == 0);
+        assert_se(path_is_mount_point(dirlink1, 0) == 0);
+
+        /* file in subdirectory mountpoints */
+        dir1file = path_join(NULL, dir1, "file");
+        assert_se(dir1file);
+        fd = open(dir1file, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0664);
+        assert_se(fd > 0);
+        close(fd);
+
+        assert_se(path_is_mount_point(dir1file, AT_SYMLINK_FOLLOW) == 0);
+        assert_se(path_is_mount_point(dir1file, 0) == 0);
+        assert_se(path_is_mount_point(dirlink1file, AT_SYMLINK_FOLLOW) == 0);
+        assert_se(path_is_mount_point(dirlink1file, 0) == 0);
+
+        /* these tests will only work as root */
         if (mount(file1, file2, NULL, MS_BIND, NULL) >= 0) {
+                int rt, rf, rlt, rlf, rl1t, rl1f;
+
+                /* files */
+                /* capture results in vars, to avoid dangling mounts on failure */
                 rf = path_is_mount_point(file2, 0);
                 rt = path_is_mount_point(file2, AT_SYMLINK_FOLLOW);
                 rlf = path_is_mount_point(link2, 0);
@@ -365,6 +415,33 @@ static void test_path_is_mount_point(void) {
                 assert_se(rt == 1);
                 assert_se(rlf == 0);
                 assert_se(rlt == 1);
+
+                /* dirs */
+                dir2file = path_join(NULL, dir2, "file");
+                assert_se(dir2file);
+                fd = open(dir2file, O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0664);
+                assert_se(fd > 0);
+                close(fd);
+
+                assert_se(mount(dir2, dir1, NULL, MS_BIND, NULL) >= 0);
+
+                rf = path_is_mount_point(dir1, 0);
+                rt = path_is_mount_point(dir1, AT_SYMLINK_FOLLOW);
+                rlf = path_is_mount_point(dirlink1, 0);
+                rlt = path_is_mount_point(dirlink1, AT_SYMLINK_FOLLOW);
+                /* its parent is a mount point, but not /file itself */
+                rl1f = path_is_mount_point(dirlink1file, 0);
+                rl1t = path_is_mount_point(dirlink1file, AT_SYMLINK_FOLLOW);
+
+                assert_se(umount(dir1) == 0);
+
+                assert_se(rf == 1);
+                assert_se(rt == 1);
+                assert_se(rlf == 0);
+                assert_se(rlt == 1);
+                assert_se(rl1f == 0);
+                assert_se(rl1t == 0);
+
         } else
                 printf("Skipping bind mount file test: %m\n");
 

commit 4f7cd56ef270ec2614f2efc916551b5e3c5acc50
Merge: edee1cf 3712e12
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 9 14:31:12 2015 +0200

    Merge pull request #121 from martinpitt/master
    
    build-sys: always dist *.policy.in files


commit 3712e1249b4ae46e0cf7ce96d1c48509d1662d53
Author: Martin Pitt <martin.pitt at ubuntu.com>
Date:   Tue Jun 9 14:01:06 2015 +0200

    build-sys: always dist *.policy.in files
    
    Unconditionally dist org.freedesktop.{import1,machine1}.policy.in, like all the
    other *.policy.in files. This avoids missing policy files in the tarball.
    
    Spotted by "make distcheck" failure with --disable-importd.

diff --git a/Makefile.am b/Makefile.am
index 7603b2c..5d30d7d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5176,9 +5176,6 @@ dist_dbuspolicy_DATA += \
 polkitpolicy_files += \
 	src/machine/org.freedesktop.machine1.policy
 
-polkitpolicy_in_files += \
-	src/machine/org.freedesktop.machine1.policy.in
-
 dist_zshcompletion_DATA += \
 	shell-completion/zsh/_machinectl \
 	shell-completion/zsh/_sd_machines
@@ -5211,6 +5208,9 @@ lib_LTLIBRARIES += \
 
 endif
 
+polkitpolicy_in_files += \
+	src/machine/org.freedesktop.machine1.policy.in
+
 EXTRA_DIST += \
 	units/systemd-machined.service.in
 
@@ -5359,9 +5359,6 @@ dist_dbuspolicy_DATA += \
 polkitpolicy_files += \
 	src/import/org.freedesktop.import1.policy
 
-polkitpolicy_in_files += \
-	src/import/org.freedesktop.import1.policy.in
-
 manual_tests += \
 	test-qcow2
 
@@ -5387,6 +5384,9 @@ endif
 
 endif
 
+polkitpolicy_in_files += \
+	src/import/org.freedesktop.import1.policy.in
+
 EXTRA_DIST += \
 	units/systemd-importd.service.in \
 	src/resolve/resolved.conf.in

commit edee1cf62636f54431c1d6f3468caacea2e6077c
Merge: d7684c0 00c11bc
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 9 11:53:53 2015 +0200

    Merge pull request #111 from phomes/cleanup_warning_suppression
    
    build-sys: don't suppress irrelevant warnings


commit d7684c0f07283a6d8c8258447e6fb93763aeb8f1
Merge: 4b955cb efbea94
Author: Kay Sievers <kay at vrfy.org>
Date:   Tue Jun 9 11:35:59 2015 +0200

    Merge pull request #120 from systemd/revert-115-master
    
    Revert "hwdb: actually search /run/udev/hwdb.d"


commit efbea947980544574c66fa812edc5ebdcc8add04
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 9 11:26:06 2015 +0200

    Revert "hwdb: actually search /run/udev/hwdb.d"

diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
index 62b76c9..446de3a 100644
--- a/src/hwdb/hwdb.c
+++ b/src/hwdb/hwdb.c
@@ -43,7 +43,6 @@ static const char *arg_root = "";
 
 static const char * const conf_file_dirs[] = {
         "/etc/udev/hwdb.d",
-        "/run/udev/hwdb.d",
         UDEVLIBEXECDIR "/hwdb.d",
         NULL
 };
diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
index 4c933de..00609e3 100644
--- a/src/udev/udevadm-hwdb.c
+++ b/src/udev/udevadm-hwdb.c
@@ -37,7 +37,6 @@
 
 static const char * const conf_file_dirs[] = {
         "/etc/udev/hwdb.d",
-        "/run/udev/hwdb.d",
         UDEVLIBEXECDIR "/hwdb.d",
         NULL
 };
diff --git a/units/systemd-hwdb-update.service.in b/units/systemd-hwdb-update.service.in
index d13383d..7135cff 100644
--- a/units/systemd-hwdb-update.service.in
+++ b/units/systemd-hwdb-update.service.in
@@ -16,7 +16,6 @@ ConditionNeedsUpdate=/etc
 ConditionPathExists=|!@udevlibexecdir@/hwdb.bin
 ConditionPathExists=|/etc/udev/hwdb.bin
 ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d/
-ConditionDirectoryNotEmpty=|/run/udev/hwdb.d/
 
 [Service]
 Type=oneshot

commit 4b955cb9bc40b508b1eef0b7751f26526a598743
Merge: fd31024 85d834a
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 9 11:04:41 2015 +0200

    Merge pull request #118 from haraldh/set_consume2
    
    util:bind_remount_recursive() fix "use after free" - 2


commit fd3102491f6c031abefbe74f99a9f18fc3e35328
Merge: 02e5536 e51b948
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 9 11:00:31 2015 +0200

    Merge pull request #77 from haraldh/cryptsetup
    
    cryptsetup: craft a unique ID with the source device


commit 02e55363f17065375823cc71f73799d0ceb6764c
Merge: e941c27 5d941c9
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 9 10:48:32 2015 +0200

    Merge pull request #116 from utezduyar/feat/async-api-for-method-call
    
    sd-bus: add async convenience method call API


commit e941c27331c5536642f3b88acec8c0b3f7e14a62
Merge: fba3d90 e0ee46f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 9 10:47:04 2015 +0200

    Merge pull request #113 from mezcalero/address-family
    
    networkd: actually always use AddressFamilyBoolean as the bit mask it is


commit 85d834ae8e7d9e2c28ef8c1388e2913ed8fd0e3b
Author: Harald Hoyer <harald at redhat.com>
Date:   Tue Jun 9 10:32:28 2015 +0200

    util:bind_remount_recursive(): handle return 0 of set_consume()
    
    set_consume() does not return -EEXIST, but 0, in case the key is already
    in the Set.

diff --git a/src/shared/util.c b/src/shared/util.c
index 311acbb..dc5e938 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -4932,7 +4932,7 @@ int bind_remount_recursive(const char *prefix, bool ro) {
                 while ((x = set_steal_first(todo))) {
 
                         r = set_consume(done, x);
-                        if (r == -EEXIST)
+                        if (r == -EEXIST || r == 0)
                                 continue;
                         if (r < 0)
                                 return r;

commit f871aeed8bc45158f9e63d06153a236eb9376fd7
Author: Harald Hoyer <harald at redhat.com>
Date:   Tue Jun 9 10:31:14 2015 +0200

    Revert "util:bind_remount_recursive() fix "use after free""
    
    This reverts commit 46be6129d3e52556eb0f2ae4d07818f9f3f7af7a.

diff --git a/src/shared/util.c b/src/shared/util.c
index 1442301..311acbb 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -4931,15 +4931,11 @@ int bind_remount_recursive(const char *prefix, bool ro) {
 
                 while ((x = set_steal_first(todo))) {
 
-                        r = set_put(done, x);
-                        if (r == -EEXIST) {
-                                free(x);
+                        r = set_consume(done, x);
+                        if (r == -EEXIST)
                                 continue;
-                        }
-                        if (r < 0) {
-                                free(x);
+                        if (r < 0)
                                 return r;
-                        }
 
                         /* Try to reuse the original flag set, but
                          * don't care for errors, in case of
@@ -4949,15 +4945,14 @@ int bind_remount_recursive(const char *prefix, bool ro) {
                         orig_flags &= ~MS_RDONLY;
 
                         if (mount(NULL, x, NULL, orig_flags|MS_BIND|MS_REMOUNT|(ro ? MS_RDONLY : 0), NULL) < 0) {
+
                                 /* Deal with mount points that are
                                  * obstructed by a later mount */
 
-                                if (errno != ENOENT) {
-                                        free(x);
+                                if (errno != ENOENT)
                                         return -errno;
-                                }
                         }
-                        free(x);
+
                 }
         }
 }

commit e51b9486d1b59e72c293028fed1384f4e4ef09aa
Author: Harald Hoyer <harald at redhat.com>
Date:   Mon Jun 1 17:26:27 2015 +0200

    cryptsetup: craft a unique ID with the source device
    
    If cryptsetup is called with a source device as argv[3], then craft the
    ID for the password agent with a unique device path.
    
    If possible "/dev/block/<maj>:<min>" is used, otherwise the original
    argv[3] is used.
    
    This enables password agents like petera [1] to provide a password
    according to the source device. The original ID did not carry enough
    information and was more targeted for a human readable string, which
    is specified in the "Message" field anyway.
    
    With this patch the ID of the ask.XXX ini file looks like this:
    ID=cryptsetup:/dev/block/<maj>:<min>
    
    [1] https://github.com/npmccallum/petera

diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
index a5018f1..5c6c7c0 100644
--- a/src/cryptsetup/cryptsetup.c
+++ b/src/cryptsetup/cryptsetup.c
@@ -238,6 +238,23 @@ static void log_glue(int level, const char *msg, void *usrptr) {
         log_debug("%s", msg);
 }
 
+static int disk_major_minor(const char *path, char **ret) {
+        struct stat st;
+
+        assert(path);
+
+        if (stat(path, &st) < 0)
+                return -errno;
+
+        if (!S_ISBLK(st.st_mode))
+                return -EINVAL;
+
+        if (asprintf(ret, "/dev/block/%d:%d", major(st.st_rdev), minor(st.st_rdev)) < 0)
+                return -errno;
+
+        return 0;
+}
+
 static char* disk_description(const char *path) {
 
         static const char name_fields[] =
@@ -295,20 +312,55 @@ static char *disk_mount_point(const char *label) {
         return NULL;
 }
 
-static int get_password(const char *name, usec_t until, bool accept_cached, char ***passwords) {
-        int r;
+static int get_password(const char *vol, const char *src, usec_t until, bool accept_cached, char ***passwords) {
+        int r = 0;
         char **p;
         _cleanup_free_ char *text = NULL;
         _cleanup_free_ char *escaped_name = NULL;
         char *id;
+        const char *name = NULL;
+        _cleanup_free_ char *description = NULL, *name_buffer = NULL,
+                *mount_point = NULL, *maj_min = NULL;
 
-        assert(name);
+        assert(vol);
+        assert(src);
         assert(passwords);
 
+        description = disk_description(src);
+        mount_point = disk_mount_point(vol);
+
+        if (description && streq(vol, description)) {
+                /* If the description string is simply the
+                 * volume name, then let's not show this
+                 * twice */
+                free(description);
+                description = NULL;
+        }
+
+        if (mount_point && description)
+                r = asprintf(&name_buffer, "%s (%s) on %s", description, vol, mount_point);
+        else if (mount_point)
+                r = asprintf(&name_buffer, "%s on %s", vol, mount_point);
+        else if (description)
+                r = asprintf(&name_buffer, "%s (%s)", description, vol);
+
+        if (r < 0)
+                return log_oom();
+
+        name = name_buffer ? name_buffer : vol;
+
         if (asprintf(&text, "Please enter passphrase for disk %s!", name) < 0)
                 return log_oom();
 
-        escaped_name = cescape(name);
+        if (src)
+                (void) disk_major_minor(src, &maj_min);
+
+        if (maj_min) {
+                escaped_name = maj_min;
+                maj_min = NULL;
+        } else
+                escaped_name = cescape(name);
+
         if (!escaped_name)
                 return log_oom();
 
@@ -552,8 +604,7 @@ int main(int argc, char *argv[]) {
                 unsigned tries;
                 usec_t until;
                 crypt_status_info status;
-                const char *key_file = NULL, *name = NULL;
-                _cleanup_free_ char *description = NULL, *name_buffer = NULL, *mount_point = NULL;
+                const char *key_file = NULL;
 
                 /* Arguments: systemd-cryptsetup attach VOLUME SOURCE-DEVICE [PASSWORD] [OPTIONS] */
 
@@ -581,31 +632,6 @@ int main(int argc, char *argv[]) {
                 /* A delicious drop of snake oil */
                 mlockall(MCL_FUTURE);
 
-                description = disk_description(argv[3]);
-                mount_point = disk_mount_point(argv[2]);
-
-                if (description && streq(argv[2], description)) {
-                        /* If the description string is simply the
-                         * volume name, then let's not show this
-                         * twice */
-                        free(description);
-                        description = NULL;
-                }
-
-                k = 0;
-                if (mount_point && description)
-                        k = asprintf(&name_buffer, "%s (%s) on %s", description, argv[2], mount_point);
-                else if (mount_point)
-                        k = asprintf(&name_buffer, "%s on %s", argv[2], mount_point);
-                else if (description)
-                        k = asprintf(&name_buffer, "%s (%s)", description, argv[2]);
-
-                if (k < 0) {
-                        log_oom();
-                        goto finish;
-                }
-                name = name_buffer ? name_buffer : argv[2];
-
                 if (arg_header) {
                         log_debug("LUKS header: %s", arg_header);
                         k = crypt_init(&cd, arg_header);
@@ -652,7 +678,7 @@ int main(int argc, char *argv[]) {
                         _cleanup_strv_free_ char **passwords = NULL;
 
                         if (!key_file) {
-                                k = get_password(name, until, tries == 0 && !arg_verify, &passwords);
+                                k = get_password(argv[2], argv[3], until, tries == 0 && !arg_verify, &passwords);
                                 if (k == -EAGAIN)
                                         continue;
                                 else if (k < 0)

commit 5d941c92bd0209abdfbc171d588b84df45222706
Author: Umut Tezduyar Lindskog <umut.tezduyar at axis.com>
Date:   Mon Jun 8 10:00:17 2015 +0200

    sd-bus: add async convenience method call API

diff --git a/src/libsystemd/libsystemd.sym.m4 b/src/libsystemd/libsystemd.sym.m4
index 0b94a87..3121e71 100644
--- a/src/libsystemd/libsystemd.sym.m4
+++ b/src/libsystemd/libsystemd.sym.m4
@@ -320,6 +320,7 @@ global:
         sd_bus_get_name_creds;
         sd_bus_get_name_machine_id;
         sd_bus_call_method;
+        sd_bus_call_method_async;
         sd_bus_get_property;
         sd_bus_get_property_trivial;
         sd_bus_get_property_string;
diff --git a/src/libsystemd/sd-bus/bus-convenience.c b/src/libsystemd/sd-bus/bus-convenience.c
index 28bc8d2..dfd82e7 100644
--- a/src/libsystemd/sd-bus/bus-convenience.c
+++ b/src/libsystemd/sd-bus/bus-convenience.c
@@ -58,6 +58,43 @@ _public_ int sd_bus_emit_signal(
         return sd_bus_send(bus, m, NULL);
 }
 
+_public_ int sd_bus_call_method_async(
+                sd_bus *bus,
+                sd_bus_slot **slot,
+                const char *destination,
+                const char *path,
+                const char *interface,
+                const char *member,
+                sd_bus_message_handler_t callback,
+                void *userdata,
+                const char *types, ...) {
+
+        _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+        int r;
+
+        assert_return(bus, -EINVAL);
+        assert_return(!bus_pid_changed(bus), -ECHILD);
+
+        if (!BUS_IS_OPEN(bus->state))
+                return -ENOTCONN;
+
+        r = sd_bus_message_new_method_call(bus, &m, destination, path, interface, member);
+        if (r < 0)
+                return r;
+
+        if (!isempty(types)) {
+                va_list ap;
+
+                va_start(ap, types);
+                r = bus_message_append_ap(m, types, ap);
+                va_end(ap);
+                if (r < 0)
+                        return r;
+        }
+
+        return sd_bus_call_async(bus, slot, m, callback, userdata, 0);
+}
+
 _public_ int sd_bus_call_method(
                 sd_bus *bus,
                 const char *destination,
diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h
index e6e2ecd..57e46ce 100644
--- a/src/systemd/sd-bus.h
+++ b/src/systemd/sd-bus.h
@@ -299,6 +299,7 @@ int sd_bus_get_name_machine_id(sd_bus *bus, const char *name, sd_id128_t *machin
 /* Convenience calls */
 
 int sd_bus_call_method(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *types, ...);
+int sd_bus_call_method_async(sd_bus *bus, sd_bus_slot **slot, const char *destination, const char *path, const char *interface, const char *member, sd_bus_message_handler_t callback, void *userdata, const char *types, ...);
 int sd_bus_get_property(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, sd_bus_message **reply, const char *type);
 int sd_bus_get_property_trivial(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char type, void *ret_ptr);
 int sd_bus_get_property_string(sd_bus *bus, const char *destination, const char *path, const char *interface, const char *member, sd_bus_error *ret_error, char **ret); /* free the result! */

commit fba3d902b49e1f4654b36c9d4311def4a084c3a7
Merge: 6f90fe6 03dfe7b
Author: Martin Pitt <martin.pitt at ubuntu.com>
Date:   Tue Jun 9 07:19:49 2015 +0200

    Merge pull request #115 from whot/master
    
    hwdb: actually search /run/udev/hwdb.d


commit 6f90fe6de6c1086502d300bfc54b8b19c59a22a9
Merge: 02776da bb5c512
Author: Martin Pitt <martin.pitt at ubuntu.com>
Date:   Tue Jun 9 07:15:59 2015 +0200

    Merge pull request #114 from crawford/xen
    
    rules: whitelist xvd* devices


commit 5967bda0bc9849bceeda393e3cd2ab04f2f25a03
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Jun 9 14:32:19 2015 +1000

    hwdb: add Logitech TrackMan Marble Wheel USB
    
    DPI is guesswork, no specs found on the web and calculating DPIs on a
    trackball is tedious.

diff --git a/hwdb/70-mouse.hwdb b/hwdb/70-mouse.hwdb
index 2784b94..cfe3579 100644
--- a/hwdb/70-mouse.hwdb
+++ b/hwdb/70-mouse.hwdb
@@ -169,6 +169,8 @@ mouse:usb:v046dpc00e:name:Logitech USB-PS/2 Optical Mouse:
 mouse:usb:v046dpc01b:name:Logitech USB-PS/2 Optical Mouse:
 # Logitech USB-PS/2 M-BT58
 mouse:usb:v046dpc03e:name:Logitech USB-PS/2 Optical Mouse:
+# Logitech TrackMan Marble Wheel USB
+mouse:usb:v046dpc401:name:Logitech USB-PS/2 Trackball:
  MOUSE_DPI=400 at 125
 
 # Lenovo USB mouse model MO28UOL

commit 03dfe7b749796c10074b5ebc5e9c3f947d726104
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date:   Tue Jun 9 10:58:06 2015 +1000

    hwdb: actually search /run/udev/hwdb.d
    
    The documentation claims hwdb entries may be placed in the volatile
    /run/udev/hwdb.d directory but nothing actually looked at it.

diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c
index 446de3a..62b76c9 100644
--- a/src/hwdb/hwdb.c
+++ b/src/hwdb/hwdb.c
@@ -43,6 +43,7 @@ static const char *arg_root = "";
 
 static const char * const conf_file_dirs[] = {
         "/etc/udev/hwdb.d",
+        "/run/udev/hwdb.d",
         UDEVLIBEXECDIR "/hwdb.d",
         NULL
 };
diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c
index 00609e3..4c933de 100644
--- a/src/udev/udevadm-hwdb.c
+++ b/src/udev/udevadm-hwdb.c
@@ -37,6 +37,7 @@
 
 static const char * const conf_file_dirs[] = {
         "/etc/udev/hwdb.d",
+        "/run/udev/hwdb.d",
         UDEVLIBEXECDIR "/hwdb.d",
         NULL
 };
diff --git a/units/systemd-hwdb-update.service.in b/units/systemd-hwdb-update.service.in
index 7135cff..d13383d 100644
--- a/units/systemd-hwdb-update.service.in
+++ b/units/systemd-hwdb-update.service.in
@@ -16,6 +16,7 @@ ConditionNeedsUpdate=/etc
 ConditionPathExists=|!@udevlibexecdir@/hwdb.bin
 ConditionPathExists=|/etc/udev/hwdb.bin
 ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d/
+ConditionDirectoryNotEmpty=|/run/udev/hwdb.d/
 
 [Service]
 Type=oneshot

commit bb5c512de22eeb7464f120a01fd1d59e7a4bbb7b
Author: Alex Crawford <alex.crawford at coreos.com>
Date:   Thu Jun 4 15:54:35 2015 -0700

    rules: whitelist xvd* devices
    
    Xen disks need to be whitelisted as well.

diff --git a/rules/60-block.rules b/rules/60-block.rules
index a69d648..c74caca 100644
--- a/rules/60-block.rules
+++ b/rules/60-block.rules
@@ -8,4 +8,4 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_
 ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"
 
 # watch metadata changes, caused by tools closing the device node which was opened for writing
-ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*", OPTIONS+="watch"
+ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*", OPTIONS+="watch"
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
index 64c5f1c..2daeb6d 100644
--- a/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules
@@ -6,7 +6,7 @@
 ACTION=="remove", GOTO="persistent_storage_end"
 
 SUBSYSTEM!="block", GOTO="persistent_storage_end"
-KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|bcache*|xvd*", GOTO="persistent_storage_end"
+KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*", GOTO="persistent_storage_end"
 
 # ignore partitions that span the entire disk
 TEST=="whole_disk", GOTO="persistent_storage_end"

commit e0ee46f29028e291eb67f435aff1b6202d75d9d6
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Jun 9 01:05:34 2015 +0200

    networkd: actually always use AddressFamilyBoolean as the bit mask it is

diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 20aee53..71cc722 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -561,7 +561,7 @@ int dhcp4_configure(Link *link) {
 
         assert(link);
         assert(link->network);
-        assert(IN_SET(link->network->dhcp, ADDRESS_FAMILY_YES, ADDRESS_FAMILY_IPV4));
+        assert(link->network->dhcp & ADDRESS_FAMILY_IPV4);
 
         r = sd_dhcp_client_new(&link->dhcp_client);
         if (r < 0)
diff --git a/src/network/networkd-ipv4ll.c b/src/network/networkd-ipv4ll.c
index 8050801..cfc0d90 100644
--- a/src/network/networkd-ipv4ll.c
+++ b/src/network/networkd-ipv4ll.c
@@ -209,7 +209,7 @@ int ipv4ll_configure(Link *link) {
 
         assert(link);
         assert(link->network);
-        assert(IN_SET(link->network->link_local, ADDRESS_FAMILY_IPV4, ADDRESS_FAMILY_YES));
+        assert(link->network->link_local & ADDRESS_FAMILY_IPV4);
 
         r = sd_ipv4ll_new(&link->ipv4ll);
         if (r < 0)
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index b30fd7a..5c62300 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -40,7 +40,7 @@ bool link_dhcp6_enabled(Link *link) {
         if (!link->network)
                 return false;
 
-        return IN_SET(link->network->dhcp, ADDRESS_FAMILY_IPV6, ADDRESS_FAMILY_YES);
+        return link->network->dhcp & ADDRESS_FAMILY_IPV6;
 }
 
 bool link_dhcp4_enabled(Link *link) {
@@ -50,7 +50,7 @@ bool link_dhcp4_enabled(Link *link) {
         if (!link->network)
                 return false;
 
-        return IN_SET(link->network->dhcp, ADDRESS_FAMILY_IPV4, ADDRESS_FAMILY_YES);
+        return link->network->dhcp & ADDRESS_FAMILY_IPV4;
 }
 
 bool link_dhcp4_server_enabled(Link *link) {
@@ -70,7 +70,7 @@ bool link_ipv4ll_enabled(Link *link) {
         if (!link->network)
                 return false;
 
-        return IN_SET(link->network->link_local, ADDRESS_FAMILY_IPV4, ADDRESS_FAMILY_YES);
+        return link->network->link_local & ADDRESS_FAMILY_IPV4;
 }
 
 bool link_ipv6ll_enabled(Link *link) {
@@ -80,7 +80,7 @@ bool link_ipv6ll_enabled(Link *link) {
         if (!link->network)
                 return false;
 
-        return IN_SET(link->network->link_local, ADDRESS_FAMILY_IPV6, ADDRESS_FAMILY_YES);
+        return link->network->link_local & ADDRESS_FAMILY_IPV6;
 }
 
 bool link_lldp_enabled(Link *link) {
@@ -103,7 +103,7 @@ static bool link_ipv4_forward_enabled(Link *link) {
         if (!link->network)
                 return false;
 
-        return IN_SET(link->network->ip_forward, ADDRESS_FAMILY_IPV4, ADDRESS_FAMILY_YES);
+        return link->network->ip_forward & ADDRESS_FAMILY_IPV4;
 }
 
 static bool link_ipv6_forward_enabled(Link *link) {
@@ -113,7 +113,7 @@ static bool link_ipv6_forward_enabled(Link *link) {
         if (!link->network)
                 return false;
 
-        return IN_SET(link->network->ip_forward, ADDRESS_FAMILY_IPV6, ADDRESS_FAMILY_YES);
+        return link->network->ip_forward & ADDRESS_FAMILY_IPV6;
 }
 
 #define FLAG_STRING(string, flag, old, new) \

commit 00c11bc53a1d379b0d6cf8efc5306a8cb0833b43
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Tue Jun 2 22:39:07 2015 +0200

    build-sys: don't suppress irrelevant warnings
    
    We do not trigger these warnings so no need to suppress them.

diff --git a/configure.ac b/configure.ac
index 2625e0d..5719075 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,7 +149,6 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -pipe \
         -Wall \
         -Wextra \
-        -Wno-inline \
         -Wundef \
         "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
         -Wlogical-op \
@@ -169,11 +168,8 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -Wendif-labels \
         -Wstrict-aliasing=2 \
         -Wwrite-strings \
-        -Wno-long-long \
-        -Wno-overlength-strings \
         -Wno-unused-parameter \
         -Wno-missing-field-initializers \
-        -Wno-unused-result \
         -Wno-format-signedness \
         -Werror=overflow \
         -Wdate-time \

commit 02776da6ec90d28799561407d8a07f76d1c2c120
Merge: 4d1f002 920b52e
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 8 23:38:27 2015 +0200

    Merge pull request #108 from phomes/master
    
    tree-wide: remove spurious space


commit 4d1f0021d341925fe13eccbf006c6e65c816c1d1
Merge: 3edf035 ee0eb1d
Author: Tom Gundersen <teg at jklm.no>
Date:   Mon Jun 8 23:34:11 2015 +0200

    Merge pull request #110 from systemd/revert-41-ipforwarding
    
    Revert "networkd: create "kernel" setting for IPForwarding"


commit ee0eb1d891eb0a41fb63368bff264f59cb2bb851
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 8 23:24:32 2015 +0200

    Revert "networkd: create "kernel" setting for IPForwarding"

diff --git a/man/systemd.network.xml b/man/systemd.network.xml
index 54fef4c..bd061c2 100644
--- a/man/systemd.network.xml
+++ b/man/systemd.network.xml
@@ -366,8 +366,7 @@
           the routing table. Takes either a boolean argument, or the
           values <literal>ipv4</literal> or <literal>ipv6</literal>,
           which only enables IP forwarding for the specified address
-          family, or <literal>kernel</literal>, which preserves existing sysctl settings.
-          This controls the
+          family. This controls the
           <filename>net.ipv4.conf.<interface>.forwarding</filename>
           and
           <filename>net.ipv6.conf.<interface>.forwarding</filename>
@@ -376,8 +375,8 @@
           for details about sysctl options). Defaults to
           <literal>no</literal>.</para>
 
-         <para>Note: unless this option is turned on, or set to <literal>kernel</literal>,
-          no IP forwarding is done on this interface, even if this is
+          <para>Note: unless this option is turned on, no IP
+          forwarding is done on this interface, even if this is
           globally turned on in the kernel, with the
           <filename>net.ipv4.ip_forward</filename> and
           <filename>net.ipv4.ip_forward</filename> sysctl
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index b30fd7a..f039a2d 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1481,9 +1481,6 @@ static int link_set_ipv4_forward(Link *link) {
         const char *p = NULL;
         int r;
 
-        if (link->network->ip_forward == ADDRESS_FAMILY_KERNEL)
-                return 0;
-
         p = strjoina("/proc/sys/net/ipv4/conf/", link->ifname, "/forwarding");
         r = write_string_file_no_create(p, one_zero(link_ipv4_forward_enabled(link)));
         if (r < 0)
@@ -1500,9 +1497,6 @@ static int link_set_ipv6_forward(Link *link) {
         if (!socket_ipv6_is_supported())
                 return 0;
 
-        if (link->network->ip_forward == ADDRESS_FAMILY_KERNEL)
-                return 0;
-
         p = strjoina("/proc/sys/net/ipv6/conf/", link->ifname, "/forwarding");
         r = write_string_file_no_create(p, one_zero(link_ipv6_forward_enabled(link)));
         if (r < 0)
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index 2cc53df..db737ad 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -853,8 +853,6 @@ const char *address_family_boolean_to_string(AddressFamilyBoolean b) {
                 return "ipv4";
         if (b == ADDRESS_FAMILY_IPV6)
                 return "ipv6";
-        if (b == ADDRESS_FAMILY_KERNEL)
-                return "kernel";
 
         return NULL;
 }
@@ -874,8 +872,6 @@ AddressFamilyBoolean address_family_boolean_from_string(const char *s) {
                 return ADDRESS_FAMILY_IPV4;
         if (streq(s, "ipv6"))
                 return ADDRESS_FAMILY_IPV6;
-        if (streq(s, "kernel"))
-                return ADDRESS_FAMILY_KERNEL;
 
         return _ADDRESS_FAMILY_BOOLEAN_INVALID;
 }
diff --git a/src/network/networkd.h b/src/network/networkd.h
index 49afeff..4b13d4a 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -60,7 +60,6 @@ typedef enum AddressFamilyBoolean {
         ADDRESS_FAMILY_IPV4 = 1,
         ADDRESS_FAMILY_IPV6 = 2,
         ADDRESS_FAMILY_YES = 3,
-        ADDRESS_FAMILY_KERNEL = 4,
         _ADDRESS_FAMILY_BOOLEAN_MAX,
         _ADDRESS_FAMILY_BOOLEAN_INVALID = -1,
 } AddressFamilyBoolean;

commit 920b52e4909d9dc812817fd8b82f83ca23a11c91
Author: Thomas Hindoe Paaboel Andersen <phomes at gmail.com>
Date:   Mon Jun 8 20:53:16 2015 +0200

    tree-wide: remove spurious space

diff --git a/src/core/busname.c b/src/core/busname.c
index 11f3b98..3f5abbc 100644
--- a/src/core/busname.c
+++ b/src/core/busname.c
@@ -125,7 +125,7 @@ static int busname_arm_timer(BusName *n) {
                 return sd_event_source_set_enabled(n->timer_event_source, SD_EVENT_ONESHOT);
         }
 
-        r =  sd_event_add_time(
+        r = sd_event_add_time(
                         UNIT(n)->manager->event,
                         &n->timer_event_source,
                         CLOCK_MONOTONIC,
diff --git a/src/core/manager.c b/src/core/manager.c
index a1c5433..564fb5d 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -665,7 +665,7 @@ static int manager_setup_notify(Manager *m) {
 
         if (m->notify_fd < 0) {
                 _cleanup_close_ int fd = -1;
-                union sockaddr_union sa =  {
+                union sockaddr_union sa = {
                         .sa.sa_family = AF_UNIX,
                 };
                 static const int one = 1;
diff --git a/src/core/socket.c b/src/core/socket.c
index fc5eb14..0239962 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -832,7 +832,7 @@ static void socket_apply_socket_options(Socket *s, int fd) {
         }
 
         if (s->keep_alive_interval) {
-                int value =  s->keep_alive_interval / USEC_PER_SEC;
+                int value = s->keep_alive_interval / USEC_PER_SEC;
                 if (setsockopt(fd, SOL_TCP, TCP_KEEPINTVL, &value, sizeof(value)) < 0)
                         log_unit_warning_errno(UNIT(s), errno, "TCP_KEEPINTVL failed: %m");
         }
@@ -2589,7 +2589,7 @@ static void socket_trigger_notify(Unit *u, Unit *other) {
 
         /* Don't propagate state changes from the service if we are
            already down or accepting connections */
-        if ((s->state !=  SOCKET_RUNNING &&
+        if ((s->state != SOCKET_RUNNING &&
             s->state != SOCKET_LISTENING) ||
             s->accept)
                 return;
diff --git a/src/libsystemd-network/lldp-tlv.c b/src/libsystemd-network/lldp-tlv.c
index e32783f..0cea5b1 100644
--- a/src/libsystemd-network/lldp-tlv.c
+++ b/src/libsystemd-network/lldp-tlv.c
@@ -221,7 +221,7 @@ int tlv_packet_read_string(tlv_packet *m, char **data, uint16_t *data_length) {
                 return r;
 
         *data = (char *) val;
-        *data_length =  m->container->length;
+        *data_length = m->container->length;
 
         m->container->read_pos += m->container->length;
 
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index 3454394..68925de 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -814,7 +814,7 @@ static char *lldp_system_caps(uint16_t cap) {
         }
 
         if (cap & LLDP_SYSTEM_CAPABILITIES_ROUTER) {
-                s =  strjoin(t, lldp_system_capability_to_string(LLDP_SYSTEM_CAPABILITIES_ROUTER), " ", NULL);
+                s = strjoin(t, lldp_system_capability_to_string(LLDP_SYSTEM_CAPABILITIES_ROUTER), " ", NULL);
                 if (!s)
                         return NULL;
 
diff --git a/src/network/networkd-ipv4ll.c b/src/network/networkd-ipv4ll.c
index 8050801..74b3dea 100644
--- a/src/network/networkd-ipv4ll.c
+++ b/src/network/networkd-ipv4ll.c
@@ -34,7 +34,7 @@ static int ipv4ll_address_lost(Link *link) {
         assert(link);
 
         link->ipv4ll_route = false;
-        link->ipv4ll_address =  false;
+        link->ipv4ll_address = false;
 
         r = sd_ipv4ll_get_address(link->ipv4ll, &addr);
         if (r < 0)
diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c
index bc6c5dc..8f181a6 100644
--- a/src/nss-resolve/nss-resolve.c
+++ b/src/nss-resolve/nss-resolve.c
@@ -365,13 +365,13 @@ enum nss_status _nss_resolve_gethostbyname3_r(
                                         int32_t *ttlp,
                                         char **canonp);
 
-                        fallback =  (enum nss_status (*)(const char *name,
-                                                         int af,
-                                                         struct hostent *result,
-                                                         char *buffer, size_t buflen,
-                                                         int *errnop, int *h_errnop,
-                                                         int32_t *ttlp,
-                                                         char **canonp))
+                        fallback = (enum nss_status (*)(const char *name,
+                                                        int af,
+                                                        struct hostent *result,
+                                                        char *buffer, size_t buflen,
+                                                        int *errnop, int *h_errnop,
+                                                        int32_t *ttlp,
+                                                        char **canonp))
                                 find_fallback("libnss_dns.so.2", "_nss_dns_gethostbyname3_r");
                         if (fallback)
                                 return fallback(name, af, result, buffer, buflen, errnop, h_errnop, ttlp, canonp);
diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index d34d977..0d6ecf5 100644
--- a/src/shared/efivars.c
+++ b/src/shared/efivars.c
@@ -483,7 +483,7 @@ int efi_add_boot_option(uint16_t id, const char *title,
         devicep->length = offsetof(struct device_path, drive) + sizeof(struct drive_path);
         devicep->drive.part_nr = part;
         devicep->drive.part_start = pstart;
-        devicep->drive.part_size =  psize;
+        devicep->drive.part_size = psize;
         devicep->drive.signature_type = SIGNATURE_TYPE_GUID;
         devicep->drive.mbr_type = MBR_TYPE_EFI_PARTITION_TABLE_HEADER;
         id128_to_efi_guid(part_uuid, devicep->drive.signature);
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 4dcf8f2..8d17c5e 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -631,9 +631,9 @@ static int spawn_wait(struct udev_event *event,
                         if (timeout_warn_usec > 0 && timeout_warn_usec < timeout_usec && age_usec < timeout_warn_usec) {
                                 spawn.timeout_warn = timeout_warn_usec - age_usec;
 
-                                r =  sd_event_add_time(e, NULL, clock_boottime_or_monotonic(),
-                                                       usec + spawn.timeout_warn, USEC_PER_SEC,
-                                                       on_spawn_timeout_warning, &spawn);
+                                r = sd_event_add_time(e, NULL, clock_boottime_or_monotonic(),
+                                                      usec + spawn.timeout_warn, USEC_PER_SEC,
+                                                      on_spawn_timeout_warning, &spawn);
                                 if (r < 0)
                                         return r;
                         }
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index 9153715..7be9a23 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -1941,7 +1941,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules,
                         udev_list_entry_foreach(list_entry, udev_device_get_devlinks_list_entry(event->dev)) {
                                 const char *devlink;
 
-                                devlink =  udev_list_entry_get_name(list_entry) + strlen("/dev/");
+                                devlink = udev_list_entry_get_name(list_entry) + strlen("/dev/");
                                 if (match_key(rules, cur, devlink) == 0) {
                                         match = true;
                                         break;
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index eb43091..26aae89 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1638,7 +1638,7 @@ int main(int argc, char *argv[]) {
                 arg_children_max = 8;
 
                 if (sched_getaffinity(0, sizeof (cpu_set), &cpu_set) == 0) {
-                        arg_children_max +=  CPU_COUNT(&cpu_set) * 2;
+                        arg_children_max += CPU_COUNT(&cpu_set) * 2;
                 }
 
                 log_debug("set children_max to %u", arg_children_max);

commit 3edf03546d707369ce4ab62968640a6f01bc8972
Merge: 8e20f93 2e229e0
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 8 22:44:39 2015 +0200

    Merge pull request #106 from teg/man-mac-random
    
    man: systemd.link - explain random MAC addresses


commit 2e229e0c4c29e8a827be9ffe361741cf5e9aa7af
Author: Tom Gundersen <teg at jklm.no>
Date:   Mon Jun 8 22:30:59 2015 +0200

    man: systemd.link - explain random MAC addresses
    
    Two of the bits in the MAC address are set unconditioanlly, and the rest is randomized,
    make this clear in the documentation (as it currently read as if it was all random).

diff --git a/man/systemd.link.xml b/man/systemd.link.xml
index 5db0684..723364f 100644
--- a/man/systemd.link.xml
+++ b/man/systemd.link.xml
@@ -232,7 +232,9 @@
                 <para>If the kernel is using a random MAC address,
                 nothing is done. Otherwise, a new address is randomly
                 generated each time the device appears, typically at
-                boot.</para>
+                boot. Either way the random address will have the
+                <literal>unicast</literal> and
+                <literal>locally administered</literal> bits set.</para>
               </listitem>
             </varlistentry>
           </variablelist>

commit 8e20f93488e2fba871e28adc1453976c4c41f2f5
Merge: ca41b67 85c6755
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 8 20:51:08 2015 +0200

    Merge pull request #101 from zonque/kmod
    
    kmod-setup: split warn flags


commit 85c675538fd18eefe0bbfd6fc87d9e0f38f3207a
Author: Daniel Mack <daniel at zonque.org>
Date:   Mon Jun 8 18:52:25 2015 +0200

    kmod-setup: split warn flags
    
    Traditionally, we used to warn about ipv6 being a module or being
    unavailable. This was changed in b4aa82f16 ("kmod-setup: don't warn
    when ipv6 can't be loaded") in a way that neither of the two conditions
    will cause a log message.
    
    Now, while running a setup without any IPv6 is completely fine and
    shouldn't cause any warning, we should still warn about ipv6 being a
    module instead of built-in.
    
    To achieve this, split the boolean warn flag into two: one for a
    feature not being built-in but shipped as a module, and one to
    print an error when a module is entirely unavailable.
    
    We will, however, still warn if kmod returns anything else than
    -ENOENT in the attempt of loading the module, and at the very least,
    turn the message into a debug log.

diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
index 9637905..cf543c8 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -53,26 +53,27 @@ int kmod_setup(void) {
         static const struct {
                 const char *module;
                 const char *path;
-                bool warn;
+                bool warn_if_unavailable:1;
+                bool warn_if_module:1;
                 bool (*condition_fn)(void);
         } kmod_table[] = {
                 /* auto-loading on use doesn't work before udev is up */
-                { "autofs4",   "/sys/class/misc/autofs",    true,  NULL                },
+                { "autofs4",   "/sys/class/misc/autofs",    true,   false,   NULL      },
 
                 /* early configure of ::1 on the loopback device */
-                { "ipv6",      "/sys/module/ipv6",          false,  NULL               },
+                { "ipv6",      "/sys/module/ipv6",          false,  true,    NULL      },
 
                 /* this should never be a module */
-                { "unix",      "/proc/net/unix",            true,  NULL                },
+                { "unix",      "/proc/net/unix",            true,   true,    NULL      },
 
 #ifdef ENABLE_KDBUS
                 /* IPC is needed before we bring up any other services */
-                { "kdbus",     "/sys/fs/kdbus",             false, is_kdbus_wanted     },
+                { "kdbus",     "/sys/fs/kdbus",             false,  false,   is_kdbus_wanted },
 #endif
 
 #ifdef HAVE_LIBIPTC
                 /* netfilter is needed by networkd, nspawn among others, and cannot be autoloaded */
-                { "ip_tables", "/proc/net/ip_tables_names", false, NULL                },
+                { "ip_tables", "/proc/net/ip_tables_names", false,  false,   NULL      },
 #endif
         };
         struct kmod_ctx *ctx = NULL;
@@ -91,7 +92,7 @@ int kmod_setup(void) {
                 if (kmod_table[i].condition_fn && !kmod_table[i].condition_fn())
                         continue;
 
-                if (kmod_table[i].warn)
+                if (kmod_table[i].warn_if_module)
                         log_debug("Your kernel apparently lacks built-in %s support. Might be "
                                   "a good idea to compile it in. We'll now try to work around "
                                   "this by loading the module...", kmod_table[i].module);
@@ -116,8 +117,9 @@ int kmod_setup(void) {
                         log_info("Inserted module '%s'", kmod_module_get_name(mod));
                 else if (r == KMOD_PROBE_APPLY_BLACKLIST)
                         log_info("Module '%s' is blacklisted", kmod_module_get_name(mod));
-                else if (kmod_table[i].warn)
-                        log_error("Failed to insert module '%s'", kmod_module_get_name(mod));
+                else
+                        log_full((kmod_table[i].warn_if_unavailable || (r < 0 && r != -ENOENT)) ? LOG_ERR : LOG_DEBUG,
+                                 "Failed to insert module '%s'", kmod_module_get_name(mod));
 
                 kmod_module_unref(mod);
         }

commit ca41b679c675eef0f5dde496aa71099c75a30d6b
Merge: 1472e65 46be612
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 8 19:43:30 2015 +0200

    Merge pull request #96 from haraldh/set_consume
    
    util:bind_remount_recursive() fix "use after free"


commit 46be6129d3e52556eb0f2ae4d07818f9f3f7af7a
Author: Harald Hoyer <harald at redhat.com>
Date:   Mon Jun 8 15:14:26 2015 +0200

    util:bind_remount_recursive() fix "use after free"
    
    set_consume(done, x) consumes x with free(x)
    but
    mount(…, x, …) uses it afterwards.
    
    coverity CID 1299006

diff --git a/src/shared/util.c b/src/shared/util.c
index 311acbb..1442301 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -4931,11 +4931,15 @@ int bind_remount_recursive(const char *prefix, bool ro) {
 
                 while ((x = set_steal_first(todo))) {
 
-                        r = set_consume(done, x);
-                        if (r == -EEXIST)
+                        r = set_put(done, x);
+                        if (r == -EEXIST) {
+                                free(x);
                                 continue;
-                        if (r < 0)
+                        }
+                        if (r < 0) {
+                                free(x);
                                 return r;
+                        }
 
                         /* Try to reuse the original flag set, but
                          * don't care for errors, in case of
@@ -4945,14 +4949,15 @@ int bind_remount_recursive(const char *prefix, bool ro) {
                         orig_flags &= ~MS_RDONLY;
 
                         if (mount(NULL, x, NULL, orig_flags|MS_BIND|MS_REMOUNT|(ro ? MS_RDONLY : 0), NULL) < 0) {
-
                                 /* Deal with mount points that are
                                  * obstructed by a later mount */
 
-                                if (errno != ENOENT)
+                                if (errno != ENOENT) {
+                                        free(x);
                                         return -errno;
+                                }
                         }
-
+                        free(x);
                 }
         }
 }

commit 1472e6579944531908a21f850d2fabc99b8cc65d
Merge: 7437e0f 609e4fe
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Jun 8 14:06:32 2015 +0200

    Merge pull request #92 from zonque/README
    
    README.md: add Coverity scan status badge


commit 609e4fe3af3d851c053bc905197f30e6b1035c8a
Author: Daniel Mack <daniel at zonque.org>
Date:   Mon Jun 8 13:19:09 2015 +0200

    README.md: add Coverity scan status badge

diff --git a/README.md b/README.md
index 313a920..5abe207 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
 # systemd - System and Service Manager
 
-[![Build Status](https://semaphoreci.com/api/v1/projects/28a5a3ca-3c56-4078-8b5e-7ed6ef912e14/443470/shields_badge.svg)](https://semaphoreci.com/systemd/systemd)
+[![Build Status](https://semaphoreci.com/api/v1/projects/28a5a3ca-3c56-4078-8b5e-7ed6ef912e14/443470/shields_badge.svg)](https://semaphoreci.com/systemd/systemd)<br/>
+[![Coverity Scan Status](https://scan.coverity.com/projects/350/badge.svg)](https://scan.coverity.com/projects/350)
 
 ## Details
 

commit 7437e0f53a8ec85d7f0596a352503d178d890c68
Merge: b34fb27 b4aa82f
Author: Kay Sievers <kay at vrfy.org>
Date:   Fri Jun 5 21:02:47 2015 +0200

    Merge pull request #79 from zonque/fdo-87475
    
    kmod-setup: don't warn when ipv6 can't be loaded (FDO bug #87475)


commit b34fb276c023fe5612986db0c36722a11c774904
Merge: 4754345 6aec835
Author: Daniel Mack <github at zonque.org>
Date:   Fri Jun 5 21:00:41 2015 +0200

    Merge pull request #82 from gmacario/bootchart-fix-typo
    
    systemd-bootchart: Trivial typo fix in warning


commit 6aec8359b04ca4aac18f73184cc6a3daec9a3271
Author: Gianpaolo Macario <gmacario at gmail.com>
Date:   Fri Jun 5 18:42:36 2015 +0200

    systemd-bootchart: Trivial typo fix in warning
    
    Signed-off-by: Gianpaolo Macario <gmacario at gmail.com>

diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
index 45fab92..3360bc8 100644
--- a/src/bootchart/bootchart.c
+++ b/src/bootchart/bootchart.c
@@ -531,7 +531,7 @@ int main(int argc, char *argv[]) {
 
         /* don't complain when overrun once, happens most commonly on 1st sample */
         if (overrun > 1)
-                log_warning("systemd-boochart: sample time overrun %i times\n", overrun);
+                log_warning("systemd-bootchart: sample time overrun %i times\n", overrun);
 
         return 0;
 }

commit 4754345e0f556e96dabe6cffffb0dae7806d9472
Merge: ed47f63 7188bb0
Author: Harald Hoyer <harald at redhat.com>
Date:   Fri Jun 5 16:09:45 2015 +0200

    Merge pull request #80 from zonque/README.md
    
    Add README.md


commit 7188bb07e3067ea91540d5fc3c6c4a72c594379a
Author: Daniel Mack <daniel at zonque.org>
Date:   Fri Jun 5 14:11:26 2015 +0200

    Add README.md
    
    A README.md allows us to include a badge for the current build status of
    Semaphore CI. Keep other information in this file minimal, and avoid
    information duplication but point readers to the official README.

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..313a920
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+# systemd - System and Service Manager
+
+[![Build Status](https://semaphoreci.com/api/v1/projects/28a5a3ca-3c56-4078-8b5e-7ed6ef912e14/443470/shields_badge.svg)](https://semaphoreci.com/systemd/systemd)
+
+## Details
+
+ * General information about systemd can be found in the [systemd Wiki](http://www.freedesktop.org/wiki/Software/systemd)
+ * Information about build requirements are provided in the [README file](../master/README)

commit ed47f6397d19f05933c27689a74a26d9aeacd06f
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Fri Jun 5 15:23:03 2015 +0200

    bus: don't force send-masks on kdbus buses
    
    Right now we always pass KDBUS_ITEM_ATTACH_FLAGS_RECV to
    KDBUS_CMD_BUS_MAKE, effectively forcing every bus connection to do the
    same during KDBUS_CMD_HELLO. This used to be a workaround to make sure all
    metadata is always present. However, we refrained from that approach and
    intend to make all metadata collection solely rely on /proc access
    restrictions. Therefore, there is no need to force the send-flags mask on
    newly created buses.

diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index 417e4d5..572a9c6 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -1574,7 +1574,6 @@ int bus_kernel_create_bus(const char *name, bool world, char **s) {
         make = alloca0_align(offsetof(struct kdbus_cmd, items) +
                              ALIGN8(offsetof(struct kdbus_item, bloom_parameter) + sizeof(struct kdbus_bloom_parameter)) +
                              ALIGN8(offsetof(struct kdbus_item, data64) + sizeof(uint64_t)) +
-                             ALIGN8(offsetof(struct kdbus_item, data64) + sizeof(uint64_t)) +
                              ALIGN8(offsetof(struct kdbus_item, str) + DECIMAL_STR_MAX(uid_t) + 1 + l + 1),
                              8);
 
@@ -1593,14 +1592,6 @@ int bus_kernel_create_bus(const char *name, bool world, char **s) {
 
         make->size += ALIGN8(n->size);
 
-        /* The buses we create make no restrictions on what metadata
-         * peers can read from incoming messages. */
-        n = KDBUS_ITEM_NEXT(n);
-        n->type = KDBUS_ITEM_ATTACH_FLAGS_RECV;
-        n->size = offsetof(struct kdbus_item, data64) + sizeof(uint64_t);
-        n->data64[0] = _KDBUS_ATTACH_ANY;
-        make->size += ALIGN8(n->size);
-
         /* Provide all metadata via bus-owner queries */
         n = KDBUS_ITEM_NEXT(n);
         n->type = KDBUS_ITEM_ATTACH_FLAGS_SEND;

commit b4aa82f168913b7bff42017023b43933b3aa0d24
Author: Daniel Mack <daniel at zonque.org>
Date:   Fri Jun 5 14:59:36 2015 +0200

    kmod-setup: don't warn when ipv6 can't be loaded
    
    Not having IPv6 is a valid setup. Let's not print a warning in that
    case.
    
    Addresses:
    
      https://bugs.freedesktop.org/show_bug.cgi?id=87475

diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
index 6cc5951..9637905 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -60,7 +60,7 @@ int kmod_setup(void) {
                 { "autofs4",   "/sys/class/misc/autofs",    true,  NULL                },
 
                 /* early configure of ::1 on the loopback device */
-                { "ipv6",      "/sys/module/ipv6",          true,  NULL                },
+                { "ipv6",      "/sys/module/ipv6",          false,  NULL               },
 
                 /* this should never be a module */
                 { "unix",      "/proc/net/unix",            true,  NULL                },

commit 7ffeb45cc63e1326690fd9461b7a4719a3d4f85c
Author: Philip Withnall <philip.withnall at collabora.co.uk>
Date:   Fri May 29 10:49:21 2015 +0100

    logind: Fix user_elect_display() to be more stable
    
    The previous implementation of user_elect_display() could easily end up
    overwriting the user’s valid graphical session with a new TTY session.
    For example, consider the situation where there is one session:
       c1, type = SESSION_X11, !stopping, class = SESSION_USER
    it is initially elected as the user’s display (i.e. u->display = c1).
    
    If another session is started, on a different VT, the sessions_by_user
    list becomes:
       c1, type = SESSION_X11, !stopping, class = SESSION_USER
       c2, type = SESSION_TTY, !stopping, class = SESSION_USER
    
    In the previous code, graphical = c1 and text = c2, as expected.
    However, neither graphical nor text fulfil the conditions for setting
    u->display = graphical (because neither is better than u->display), so
    the code falls through to check the text variable. The conditions for
    this match, as u->display->type != SESSION_TTY (it’s actually
    SESSION_X11). Hence u->display is set to c2, which is incorrect, because
    session c1 is still valid.
    
    Refactor user_elect_display() to use a more explicit filter and
    pre-order comparison over the sessions. This can be demonstrated to be
    stable and only ever ‘upgrade’ the session to a more graphical one.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=90769

diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index dc3db9a..373c993 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -738,54 +738,72 @@ int user_kill(User *u, int signo) {
         return manager_kill_unit(u->manager, u->slice, KILL_ALL, signo, NULL);
 }
 
+static bool
+elect_display_filter(Session *s) {
+        /* Return true if the session is a candidate for the user’s ‘primary
+         * session’ or ‘display’. */
+        assert(s);
+
+        return (s->class == SESSION_USER && !s->stopping);
+}
+
+static int
+elect_display_compare(Session *s1, Session *s2) {
+        /* Indexed by SessionType. Lower numbers mean more preferred. */
+        const int type_ranks[_SESSION_TYPE_MAX] = {
+                [SESSION_UNSPECIFIED] = 0,
+                [SESSION_TTY] = -2,
+                [SESSION_X11] = -3,
+                [SESSION_WAYLAND] = -3,
+                [SESSION_MIR] = -3,
+                [SESSION_WEB] = -1,
+        };
+
+        /* Calculate the partial order relationship between s1 and s2,
+         * returning < 0 if s1 is preferred as the user’s ‘primary session’,
+         * 0 if s1 and s2 are equally preferred or incomparable, or > 0 if s2
+         * is preferred.
+         *
+         * s1 or s2 may be NULL. */
+        if ((s1 == NULL) != (s2 == NULL))
+                return (s1 == NULL) - (s2 == NULL);
+
+        if (s1->stopping != s2->stopping)
+                return s1->stopping - s2->stopping;
+
+        if ((s1->class != SESSION_USER) != (s2->class != SESSION_USER))
+                return (s1->class != SESSION_USER) - (s2->class != SESSION_USER);
+
+        if ((s1->type == _SESSION_TYPE_INVALID) != (s2->type == _SESSION_TYPE_INVALID))
+                return (s1->type == _SESSION_TYPE_INVALID) - (s2->type == _SESSION_TYPE_INVALID);
+
+        if (s1->type != s2->type)
+                return type_ranks[s1->type] - type_ranks[s2->type];
+
+        return 0;
+}
+
 void user_elect_display(User *u) {
-        Session *graphical = NULL, *text = NULL, *other = NULL, *s;
+        Session *s;
 
         assert(u);
 
         /* This elects a primary session for each user, which we call
          * the "display". We try to keep the assignment stable, but we
          * "upgrade" to better choices. */
+        log_debug("Electing new display for user %s", u->name);
 
         LIST_FOREACH(sessions_by_user, s, u->sessions) {
-
-                if (s->class != SESSION_USER)
-                        continue;
-
-                if (s->stopping)
+                if (!elect_display_filter(s)) {
+                        log_debug("Ignoring session %s", s->id);
                         continue;
+                }
 
-                if (SESSION_TYPE_IS_GRAPHICAL(s->type))
-                        graphical = s;
-                else if (s->type == SESSION_TTY)
-                        text = s;
-                else
-                        other = s;
-        }
-
-        if (graphical &&
-            (!u->display ||
-             u->display->class != SESSION_USER ||
-             u->display->stopping ||
-             !SESSION_TYPE_IS_GRAPHICAL(u->display->type))) {
-                u->display = graphical;
-                return;
-        }
-
-        if (text &&
-            (!u->display ||
-             u->display->class != SESSION_USER ||
-             u->display->stopping ||
-             u->display->type != SESSION_TTY)) {
-                u->display = text;
-                return;
+                if (elect_display_compare(s, u->display) < 0) {
+                        log_debug("Choosing session %s in preference to %s", s->id, u->display ? u->display->id : "-");
+                        u->display = s;
+                }
         }
-
-        if (other &&
-            (!u->display ||
-             u->display->class != SESSION_USER ||
-             u->display->stopping))
-                u->display = other;
 }
 
 static const char* const user_state_table[_USER_STATE_MAX] = {



More information about the systemd-commits mailing list