[systemd-devel] [PATCH] man: wording and grammar updates

2013-08-25 Thread Jan Engelhardt
This includes regularly-submitted corrections to comma setting and orthographical mishaps that appeared in man/ in recent commits. In this particular commit: - the usual comma fixes - expand contractions (this is prose) --- man/journalctl.xml | 2 +- man/sd_journal_get_cursor.xml

[systemd-devel] [PATCH 00/10] Device Management for systemd-logind

2013-08-25 Thread David Herrmann
Hi This series implements device management for logind. A session can now request device access directly via logind dbus APIs. It extends the org.freedesktop.login1.Session interface. The already existing interface is described at: http://www.freedesktop.org/wiki/Software/systemd/logind/

[systemd-devel] [PATCH 01/10] logind: listen actively for session devices

2013-08-25 Thread David Herrmann
Session compositors need access to fbdev, DRM and evdev devices if they control a session. To make logind pass them to sessions, we need to listen for them actively. However, we avoid creating new seats for non master-of-seat devices. Only once a seat is created, we start remembering all other ses

[systemd-devel] [PATCH 02/10] logind: add infrastructure to watch busnames

2013-08-25 Thread David Herrmann
If we want to track bus-names to allow exclusive resource-access, we need a way to get notified when a bus-name is gone. We make logind watch for NameOwnerChanged dbus events and check whether the name is currently watched. If it is, we remove it from the watch-list (notification for other objects

[systemd-devel] [PATCH 03/10] logind: add session controllers

2013-08-25 Thread David Herrmann
A session usually has only a single compositor or other application that controls graphics and input devices on it. To avoid multiple applications from hijacking each other's devices or even using the devices in parallel, we add session controllers. A session controller is an application that mana

[systemd-devel] [PATCH 04/10] logind: make Session.Activate() lazy

2013-08-25 Thread David Herrmann
Currently, Activate() calls chvt(), which does an ioctl(VT_ACTIVATE) and immediately calls seat_set_active(). However, VTs are allowed to prevent being deactivated. Therefore, logind cannot be sure the VT_ACTIVATE call was actually successful. Furthermore, compositors often need to clean up their

[systemd-devel] [PATCH 05/10] logind: introduce session-devices

2013-08-25 Thread David Herrmann
A session-device is a device that is bound to a seat and used by a session-controller to run the session. This currently includes DRM, fbdev and evdev devices. A session-device can be created via RequestDevice() on the dbus API of the session. You can drop it via ReleaseDevice() again. Once the ses

[systemd-devel] [PATCH 06/10] logind: rename vtconsole to seat0

2013-08-25 Thread David Herrmann
The seat->vtconsole member always points to the default seat seat0. Even if VTs are disabled, it's used as default seat. Therefore, rename it to seat0 to correctly state what it is. This also changes the seat files in /run from IS_VTCONSOLE to IS_SEAT0. It wasn't used by any code, yet, so this see

[systemd-devel] [PATCH 07/10] logind: fix seat_can_tty() to check for VTs

2013-08-25 Thread David Herrmann
A seat provides text-logins if it has VTs. This is always limited to seat0 so the seat_is_seat0() check is correct. However, if VTs are disabled, no seat provides text-logins so we also need to check for the console-fd. This was previously: return seat_is_vtconsole(); It looked right, but was fu

[systemd-devel] [PATCH 08/10] logind: fix session_activate(vtnr = 0)

2013-08-25 Thread David Herrmann
VT numbers start with 1. If a session has vtnr == 0, we must not assume it is running on a VT. Note that this could trigger the assert() below as CreateSession() sets vtnr to 0, not <0. --- src/login/logind-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/login/log

[systemd-devel] [PATCH 09/10] logind: extract has_vts() from can_multi_session()

2013-08-25 Thread David Herrmann
We currently use seat_can_multi_session() to test for two things: * whether the seat can handle session-switching * whether the seat has VTs As both are currently logically equivalent, we didn't care. However, we want to allow session-switching on seats without VTs, so split this helper into: *

[systemd-devel] [PATCH 10/10] logind: implement generic multi-session

2013-08-25 Thread David Herrmann
This enables the multi-session capability for seats that don't have VTs. For legacy seats with VTs, everything stays the same. However, all other seats now also get the multi-session capability. The only feature that was missing was session-switching. As logind can force a session-switch and signa

Re: [systemd-devel] [PATCH 10/10] logind: implement generic multi-session

2013-08-25 Thread Tom Gundersen
Hi David, On Sun, Aug 25, 2013 at 8:46 PM, David Herrmann wrote: > One important note is that delayed session-switching is meant for > backwards compatibility. New compositors or other sessions should really > try to deal correctly with forced session switches! They only need to > handle EACCES/E

Re: [systemd-devel] [PATCH 10/10] logind: implement generic multi-session

2013-08-25 Thread David Herrmann
Hi On Sun, Aug 25, 2013 at 5:17 PM, Tom Gundersen wrote: > Hi David, > > On Sun, Aug 25, 2013 at 8:46 PM, David Herrmann wrote: >> One important note is that delayed session-switching is meant for >> backwards compatibility. New compositors or other sessions should really >> try to deal correctl

Re: [systemd-devel] [PATCH] netns: unix: only allow to find out unix socket in same net namespace

2013-08-25 Thread James Bottomley
On Wed, 2013-08-21 at 11:51 +0200, Kay Sievers wrote: > On Wed, Aug 21, 2013 at 9:22 AM, Gao feng wrote: > > On 08/21/2013 03:06 PM, Eric W. Biederman wrote: > > >> I suspect libvirt should simply not share /run or any other normally > >> writable directory with the host. Sharing /run /var/run o

Re: [systemd-devel] [PATCH] netns: unix: only allow to find out unix socket in same net namespace

2013-08-25 Thread Kay Sievers
On Sun, Aug 25, 2013 at 7:16 PM, James Bottomley wrote: > On Wed, 2013-08-21 at 11:51 +0200, Kay Sievers wrote: >> On Wed, Aug 21, 2013 at 9:22 AM, Gao feng wrote: >> > On 08/21/2013 03:06 PM, Eric W. Biederman wrote: >> >> >> I suspect libvirt should simply not share /run or any other normally >

Re: [systemd-devel] [PATCH] netns: unix: only allow to find out unix socket in same net namespace

2013-08-25 Thread James Bottomley
On Sun, 2013-08-25 at 19:37 +0200, Kay Sievers wrote: > On Sun, Aug 25, 2013 at 7:16 PM, James Bottomley > wrote: > > On Wed, 2013-08-21 at 11:51 +0200, Kay Sievers wrote: > >> On Wed, Aug 21, 2013 at 9:22 AM, Gao feng wrote: > >> > On 08/21/2013 03:06 PM, Eric W. Biederman wrote: > >> > >> >> I

Re: [systemd-devel] [PATCH] netns: unix: only allow to find out unix socket in same net namespace

2013-08-25 Thread Gao feng
On 08/26/2013 02:16 AM, James Bottomley wrote: > On Sun, 2013-08-25 at 19:37 +0200, Kay Sievers wrote: >> On Sun, Aug 25, 2013 at 7:16 PM, James Bottomley >> wrote: >>> On Wed, 2013-08-21 at 11:51 +0200, Kay Sievers wrote: On Wed, Aug 21, 2013 at 9:22 AM, Gao feng wrote: > On 08/21/2013

[systemd-devel] [PATCH] cgroup: only check once when mode is UNIT_CHECK

2013-08-25 Thread Gao feng
If the mode is UNIT_CHECK,it means we only want to check if the paramaters are valid. the first round of cycle already did this check, no need to check again. --- src/core/dbus-unit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c in

Re: [systemd-devel] [PATCH] [RFC] Make reboot to support additional command

2013-08-25 Thread WaLyong Cho
On 08/24/2013 11:38 PM, Zbigniew Jędrzejewski-Szmek wrote: > On Sat, Aug 24, 2013 at 01:12:42PM +0900, WaLyong Cho wrote: >> On 08/24/2013 01:47 AM, Zbigniew Jędrzejewski-Szmek wrote: >>> On Tue, Aug 13, 2013 at 03:01:25AM +0900, WaLyong Cho wrote: From: WaLyong Cho reboot syscall

[systemd-devel] implies "MemoryAccounting=true"

2013-08-25 Thread Gao feng
Hi The SYSTEMD.CGROUP(5) said if MemoryLimit=bytes is set for unit, it implies MemeoryAccounting=true for this unit. But seems systemd didn't implement this hint. CPUShares & BlockIO have the same problem, this is a shortage? patch needed? Thanks ___ s

Re: [systemd-devel] [PATCH] netns: unix: only allow to find out unix socket in same net namespace

2013-08-25 Thread James Bottomley
On Mon, 2013-08-26 at 09:06 +0800, Gao feng wrote: > On 08/26/2013 02:16 AM, James Bottomley wrote: > > On Sun, 2013-08-25 at 19:37 +0200, Kay Sievers wrote: > >> On Sun, Aug 25, 2013 at 7:16 PM, James Bottomley > >> wrote: > >>> On Wed, 2013-08-21 at 11:51 +0200, Kay Sievers wrote: > On Wed,

Re: [systemd-devel] [PATCH] netns: unix: only allow to find out unix socket in same net namespace

2013-08-25 Thread Gao feng
On 08/26/2013 11:19 AM, James Bottomley wrote: > On Mon, 2013-08-26 at 09:06 +0800, Gao feng wrote: >> On 08/26/2013 02:16 AM, James Bottomley wrote: >>> On Sun, 2013-08-25 at 19:37 +0200, Kay Sievers wrote: On Sun, Aug 25, 2013 at 7:16 PM, James Bottomley wrote: > On Wed, 2013-08-21

Re: [systemd-devel] [PATCH] netns: unix: only allow to find out unix socket in same net namespace

2013-08-25 Thread James Bottomley
On Mon, 2013-08-26 at 11:35 +0800, Gao feng wrote: > On 08/26/2013 11:19 AM, James Bottomley wrote: > > Yes, we are discussing this problem in this whole thread. I wasn't really watching that bit, since the problem looks solved to me. I was just reacting against the unfortunate notion that a conta

Re: [systemd-devel] [PATCH 00/10] Device Management for systemd-logind

2013-08-25 Thread Tom Gundersen
On Sun, Aug 25, 2013 at 8:46 PM, David Herrmann wrote: > logind itselfs takes care of revoking device access for inactive sessions > (synchronized with session-switches!). It also tries to resume every device > when a session is activated. But session-devices must not be used to watch > session st

[systemd-devel] [PATCH] Fix build without blkid

2013-08-25 Thread Chengwei Yang
build systemd-gpt-auto-generator only if have blkid, otherwise, it will fail. --- Makefile.am |2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.am b/Makefile.am index fd38e82..5654ad3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1708,6 +1708,7 @@ bin_PROGRAMS += \ bootctl

Re: [systemd-devel] [PATCH] inline static endswith()

2013-08-25 Thread WANG Chao
On 08/23/13 at 05:10pm, Zbigniew Jędrzejewski-Szmek wrote: > On Fri, Aug 23, 2013 at 03:36:51PM +0800, WANG Chao wrote: > > --- > > src/shared/util.c | 21 - > > src/shared/util.h | 9 - > > 2 files changed, 8 insertions(+), 22 deletions(-) > > > > diff --git a/src/sh

[systemd-devel] [PATCH] libsystemd-login.so: fix undefined reference to 'cg_create'

2013-08-25 Thread Chengwei Yang
--- Makefile.am |1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.am b/Makefile.am index 5654ad3..dc5170a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3870,6 +3870,7 @@ libsystemd_login_la_LDFLAGS = \ -Wl,--version-script=$(top_srcdir)/src/login/libsystemd-login.sym libs