[systemd-commits] 17 commits - catalog/systemd.ru.catalog src/core src/libsystemd src/login src/shared

David Herrmann dvdhrm at kemper.freedesktop.org
Fri Jun 5 03:27:03 PDT 2015


 catalog/systemd.ru.catalog         |    6 +++---
 src/core/main.c                    |    8 ++------
 src/core/mount.c                   |    3 +++
 src/libsystemd/sd-bus/kdbus.h      |    8 ++++----
 src/libsystemd/sd-event/sd-event.c |    6 ++++++
 src/login/71-seat.rules.in         |    1 +
 src/login/logind-dbus.c            |    1 +
 src/shared/generator.c             |   10 ++++++++--
 8 files changed, 28 insertions(+), 15 deletions(-)

New commits:
commit 3a3701f03360f9a292dcab31fda1f6e0e0629c64
Merge: a4d9a30 fa05e97
Author: Daniel Mack <github at zonque.org>
Date:   Fri Jun 5 09:41:27 2015 +0200

    Merge pull request #63 from arvidjaar/issue/50
    
    fstab-generator: cescape device name in root-fsck service


commit a4d9a304f926614f41783e0b5239c99c807da09d
Merge: 5e29ba7 61b9b20
Author: Daniel Mack <github at zonque.org>
Date:   Fri Jun 5 09:25:43 2015 +0200

    Merge pull request #76 from crrodriguez/master
    
    core: Remove "old kernel" warning if PR_SET_CHILD_SUBREAPER fails


commit 61b9b203feee1ff7320e0f38d9b4b2a5e1944409
Author: Cristian Rodríguez <crrodriguez at opensuse.org>
Date:   Fri Jun 5 03:39:02 2015 -0300

    core: Remove "old kernel" warning if PR_SET_CHILD_SUBREAPER fails
    
    This made sense when systemd ran on older kernels, nowdays not so much.

diff --git a/src/core/main.c b/src/core/main.c
index 674e47e..29ccff7 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1606,14 +1606,10 @@ int main(int argc, char *argv[]) {
                 }
         }
 
-        if (arg_running_as == MANAGER_USER) {
+        if (arg_running_as == MANAGER_USER)
                 /* Become reaper of our children */
-                if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0) {
+                if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0)
                         log_warning_errno(errno, "Failed to make us a subreaper: %m");
-                        if (errno == EINVAL)
-                                log_info("Perhaps the kernel version is too old (< 3.4?)");
-                }
-        }
 
         if (arg_running_as == MANAGER_SYSTEM) {
                 bump_rlimit_nofile(&saved_rlimit_nofile);

commit 5e29ba7a5cce2d8479759b60c0079df095d75729
Merge: a34333a 6465fef
Author: Daniel Mack <github at zonque.org>
Date:   Fri Jun 5 01:48:25 2015 +0200

    Merge pull request #74 from systemd-mailing-devs/1432753344-31461-1-git-send-email-jonathan.boulle at coreos.com
    
    fix extraneous space in equality check


commit a34333a1d1553ff99895c8cda293671df720c13b
Author: David Herrmann <dh.herrmann at gmail.com>
Date:   Thu Jun 4 20:26:03 2015 +0200

    bus: update kdbus.h
    
    Sync with upstream.

diff --git a/src/libsystemd/sd-bus/kdbus.h b/src/libsystemd/sd-bus/kdbus.h
index fc1d77d..00a6e14 100644
--- a/src/libsystemd/sd-bus/kdbus.h
+++ b/src/libsystemd/sd-bus/kdbus.h
@@ -5,8 +5,8 @@
  * your option) any later version.
  */
 
-#ifndef _KDBUS_UAPI_H_
-#define _KDBUS_UAPI_H_
+#ifndef _UAPI_KDBUS_H_
+#define _UAPI_KDBUS_H_
 
 #include <linux/ioctl.h>
 #include <linux/types.h>
@@ -544,7 +544,7 @@ struct kdbus_msg_info {
  *				reply to this message. The
  *				KDBUS_CMD_SEND ioctl() will block
  *				until the reply is received, and
- *				offset_reply in struct kdbus_msg will
+ *				reply in struct kdbus_cmd_send will
  *				yield the offset in the sender's pool
  *				where the reply can be found.
  *				This flag is only valid if
@@ -976,4 +976,4 @@ enum kdbus_ioctl_type {
 					     struct kdbus_cmd_match),
 };
 
-#endif /* _KDBUS_UAPI_H_ */
+#endif /* _UAPI_KDBUS_H_ */

commit 72db4d960c187d69d785b25bcf7b45d86d687f3b
Merge: 5c9e74f f680673
Author: David Herrmann <dh.herrmann at googlemail.com>
Date:   Thu Jun 4 19:21:17 2015 +0200

    Merge pull request #72 from teg/event-fork-unref
    
    sd-event: don't touch fd's accross forks


commit 5c9e74f738da3b94f7814e1c19a5aafcaff036f4
Merge: c9876ef c0a7f8d
Author: David Herrmann <dh.herrmann at googlemail.com>
Date:   Thu Jun 4 19:15:20 2015 +0200

    Merge pull request #73 from zonque/mountinfo
    
    core/mount: skip incomplete mountinfo entries


commit f68067348f58cd08d8f4f5325ce22f9a9d2c2140
Author: Tom Gundersen <teg at jklm.no>
Date:   Thu Jun 4 16:54:45 2015 +0200

    sd-event: don't touch fd's accross forks
    
    We protect most of the API from use accross forks, but we still allow both
    sd_event and sd_event_source objects to be unref'ed. This would cause
    problems as it would unregister sources from the underlying eventfd, hence
    also affecting the original instance in the parent process.
    
    This fixes the issue by not touching the fds on unref when done accross a fork,
    but still free the memory.
    
    This fixes a regression introduced by
            "udevd: move main-loop to sd-event": 693d371d30fee
    
    where the worker processes were disabling the inotify event source in the
    main daemon.

diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index cc8bc50..2b8d1b8 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -474,6 +474,9 @@ static int source_io_unregister(sd_event_source *s) {
         assert(s);
         assert(s->type == SOURCE_IO);
 
+        if (event_pid_changed(s->event))
+                return 0;
+
         if (!s->io.registered)
                 return 0;
 
@@ -604,6 +607,9 @@ static int event_update_signal_fd(sd_event *e) {
 
         assert(e);
 
+        if (event_pid_changed(e))
+                return 0;
+
         add_to_epoll = e->signal_fd < 0;
 
         r = signalfd(e->signal_fd, &e->sigset, SFD_NONBLOCK|SFD_CLOEXEC);

commit c0a7f8d3cb757cf750fc6788df0d215f6457c09d
Author: Daniel Mack <daniel at zonque.org>
Date:   Thu Jun 4 15:39:49 2015 +0200

    core/mount: skip incomplete mountinfo entries
    
    Skip /proc/mountinfo entries for which libmount returns a NULL pointer
    for 'source' or 'target'. This happened on Semaphore CI's build servers
    when the test suite is run.

diff --git a/src/core/mount.c b/src/core/mount.c
index ba1dcf1..851b413 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1522,6 +1522,9 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
                 options = mnt_fs_get_options(fs);
                 fstype = mnt_fs_get_fstype(fs);
 
+                if (!device || !path)
+                        continue;
+
                 if (cunescape(device, UNESCAPE_RELAX, &d) < 0)
                         return log_oom();
 

commit c9876eff9bc85c56e5f83c717bda3ba6ee059bee
Merge: df9ae92 fcf3f59
Author: Martin Pitt <martin.pitt at ubuntu.com>
Date:   Thu Jun 4 18:50:03 2015 +0200

    Merge pull request #71 from kloun/patch-1
    
    small fix ru translation


commit df9ae92ba2298e4644db57cfb361caef8dfc6645
Merge: 8604f39 41dfeaa
Author: David Herrmann <dh.herrmann at googlemail.com>
Date:   Thu Jun 4 16:57:28 2015 +0200

    Merge pull request #58 from pwithnall/wip/pwithnall/user-active-on-vt-switch
    
    logind: Save the user’s state when a session enters SESSION_ACTIVE


commit fcf3f5958e0441c9cc00f035ef6c86c278442366
Author: kloun <andrey0bolkonsky at gmail.com>
Date:   Thu Jun 4 17:56:59 2015 +0300

    small fix ru translation

diff --git a/catalog/systemd.ru.catalog b/catalog/systemd.ru.catalog
index f995324..03eea04 100644
--- a/catalog/systemd.ru.catalog
+++ b/catalog/systemd.ru.catalog
@@ -81,7 +81,7 @@ Documentation: man:core(5)
 Записан дамп памяти.
 
 Вероятно, это произошло из-за ошибки, допущенной в коде программы.
-Рекомендуется сообщить ее разработчикам о возникшей проблеме.
+Рекомендуется сообщить её разработчикам о возникшей проблеме.
 
 # Subject: A new session @SESSION_ID@ has been created for user @USER_ID@
 -- 8d45620c1a4348dbb17410da57c60c66
@@ -146,7 +146,7 @@ Defined-By: systemd
 Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
 
 Все системные службы, запуск которых предписан настройками, были запущены.
-Впрочем, это еще не означает, что система в данный момент ничем не занята,
+Впрочем, это ещё не означает, что система в данный момент ничем не занята,
 так как некоторые службы могут продолжать инициализацию даже после того, как
 отчитались о своем запуске.
 
@@ -274,7 +274,7 @@ Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
 столбце файла /etc/fstab, либо в параметре Where= файла конфигурации юнита),
 не является пустым. Это никак не мешает монтированию, однако ранее находившиеся
 в нем файлы будут недоступны. Чтобы получить к ним доступ, вы можете вручную
-перемонтировать нижележащую файловую систему в другую точку.
+перемонтировать эту файловую систему в другую точку.
 
 # Subject: A virtual machine or container has been started
 -- 24d8d4452573402496068381a6312df2

commit 8604f39ccabee30bd710512081c199eb649f3191
Merge: 116b6c8 ed817cd
Author: David Herrmann <dh.herrmann at googlemail.com>
Date:   Thu Jun 4 16:17:24 2015 +0200

    Merge pull request #57 from pwithnall/wip/pwithnall/udev-virtualbox-rules
    
    logind: Add a udev rule to tag all DRM cards with master-of-seat


commit fa05e97257fc54b05e4c272dfc19cea46511b823
Author: Andrei Borzenkov <arvidjaar at gmail.com>
Date:   Wed Jun 3 20:50:59 2015 +0300

    fstab-generator: cescape device name in root-fsck service
    
    We unescape ExecStart line when parsing it, so escape device name
    before adding it to unit file.
    
    fixes #50

diff --git a/src/shared/generator.c b/src/shared/generator.c
index 807569a..e58bbea 100644
--- a/src/shared/generator.c
+++ b/src/shared/generator.c
@@ -34,9 +34,14 @@
 static int write_fsck_sysroot_service(const char *dir, const char *what) {
         const char *unit;
         _cleanup_free_ char *device = NULL;
+        _cleanup_free_ char *escaped;
         _cleanup_fclose_ FILE *f = NULL;
         int r;
 
+        escaped = cescape(what);
+        if (!escaped)
+                return log_oom();
+
         unit = strjoina(dir, "/systemd-fsck-root.service");
         log_debug("Creating %s", unit);
 
@@ -61,11 +66,12 @@ static int write_fsck_sysroot_service(const char *dir, const char *what) {
                 "[Service]\n"
                 "Type=oneshot\n"
                 "RemainAfterExit=yes\n"
-                "ExecStart=" SYSTEMD_FSCK_PATH " %2$s\n"
+                "ExecStart=" SYSTEMD_FSCK_PATH " %4$s\n"
                 "TimeoutSec=0\n",
                 program_invocation_short_name,
                 what,
-                device);
+                device,
+                escaped);
 
         r = fflush_and_check(f);
         if (r < 0)

commit ed817cd4e58c5f5c868d5d9e59a1d7e66b1da165
Author: Philip Withnall <philip.withnall at collabora.co.uk>
Date:   Tue Jun 2 15:24:48 2015 +0100

    logind: Add a udev rule to tag all DRM cards with master-of-seat
    
    This is needed for generic DRM devices like the VirtualBox vboxvideo
    driver, which exposes itself as a generic, ID-less DRM device at
    /dev/dri/card0 (after applying this commit):
       $ udevadm info --query=all --path \
          /sys/devices/pci0000:00/0000:00:02.0/drm/card0
       P: /devices/pci0000:00/0000:00:02.0/drm/card0
       N: dri/card0
       E: DEVNAME=/dev/dri/card0
       E: DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
       E: DEVTYPE=drm_minor
       E: ID_FOR_SEAT=drm-pci-0000_00_02_0
       E: ID_PATH=pci-0000:00:02.0
       E: ID_PATH_TAG=pci-0000_00_02_0
       E: MAJOR=226
       E: MINOR=0
       E: SUBSYSTEM=drm
       E: TAGS=:master-of-seat:seat:uaccess:
       E: USEC_INITIALIZED=59893
    
    Without this patch, the capabilities for a seat on a VirtualBox
    installation of systemd v219 incorrectly show it as non-graphical, even
    though I can type these commands from an xterm:
       $ loginctl show-seat seat0
       Id=seat0
       CanMultiSession=yes
       CanTTY=yes
       CanGraphical=no
       …
    
    https://bugs.freedesktop.org/show_bug.cgi?id=90822

diff --git a/src/login/71-seat.rules.in b/src/login/71-seat.rules.in
index ad26acbb..ab7b66f 100644
--- a/src/login/71-seat.rules.in
+++ b/src/login/71-seat.rules.in
@@ -11,6 +11,7 @@ TAG=="uaccess", SUBSYSTEM!="sound", TAG+="seat"
 SUBSYSTEM=="sound", KERNEL=="card*", TAG+="seat"
 SUBSYSTEM=="input", KERNEL=="input*", TAG+="seat"
 SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", TAG+="seat", TAG+="master-of-seat"
+SUBSYSTEM=="drm", KERNEL=="card[0-9]*", TAG+="seat", TAG+="master-of-seat"
 SUBSYSTEM=="usb", ATTR{bDeviceClass}=="09", TAG+="seat"
 
 # 'Plugable' USB hub, sound, network, graphics adapter

commit 41dfeaa194c18de49706b5cecf4e53accd12b7f6
Author: Philip Withnall <philip.withnall at collabora.co.uk>
Date:   Tue Jun 2 14:17:10 2015 +0100

    logind: Save the user’s state when a session enters SESSION_ACTIVE
    
    When (for example) switching from X11 to a new VT and logging in there,
    creating a new session, the user state file (/run/systemd/users/$uid) is
    not updated after the session becomes active. The latest time it is
    saved is when the session is in SESSION_OPENING.
    
    This results in a /run/systemd/users/$uid file which contains
    STATE=online for the current user on the current active VT, which is
    obviously wrong.
    
    As functions like sd_uid_get_state() use this file to get the user’s
    state, this could result in things like PolicyKit making incorrect
    decisions about the user’s state. (See
    https://bugs.freedesktop.org/show_bug.cgi?id=76358.)
    
    Fix this by re-saving the state for a session’s user after completing
    the state_job for that session.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=90818

diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 10a9df0..b272401 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -2522,6 +2522,7 @@ int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *err
                 session_jobs_reply(session, unit, result);
 
                 session_save(session);
+                user_save(session->user);
                 session_add_to_gc_queue(session);
         }
 

commit 6465fefe3bbbb6444e1515403e4922546f3e4861
Author: Jonathan Boulle <jonathan.boulle at coreos.com>
Date:   Wed May 27 12:02:24 2015 -0700

    fix extraneous space in equality check

diff --git a/src/core/main.c b/src/core/main.c
index c39815b..212ab90 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1496,7 +1496,7 @@ int main(int argc, char *argv[]) {
                 setsid();
 
         /* Move out of the way, so that we won't block unmounts */
-        assert_se(chdir("/")  == 0);
+        assert_se(chdir("/") == 0);
 
         /* Reset the console, but only if this is really init and we
          * are freshly booted */



More information about the systemd-commits mailing list