Re: [systemd-devel] [PATCH v2 0/7] logind: close races on user and session states

2014-02-08 Thread Djalal Harouni
On Sat, Feb 08, 2014 at 12:39:25AM +0100, Zbigniew Jędrzejewski-Szmek wrote: On Thu, Feb 06, 2014 at 09:37:13PM +0100, Djalal Harouni wrote: Summary: Currently logind will not clear sessions on logout. The bug is confirmed for getty and ssh logins. This series is preparation for next

Re: [systemd-devel] [PATCH] systemd crashes if locale.conf contains invalid utf8 string

2014-02-08 Thread Zbigniew Jędrzejewski-Szmek
On Thu, Feb 06, 2014 at 07:09:59PM +0100, Goffredo Baroncelli wrote: In the parse_env_file_push() and load_env_file_push() functions, there are two assert() call to check if the key or value parameters are utf8 valid. If the strings aren't utf8 valid, assert does abort. These function are

[systemd-devel] [PATCH] cryptsetup-generator: auto add deps for device as password

2014-02-08 Thread Dave Reisner
If the password is a device file, we can add Requires/After dependencies on the device rather than requiring the user to do so. --- This is based on a bug filed to Arch: https://bugs.archlinux.org/task/38842 Assuming I'm correct about the race condition, this should be an easy way of closing it

[systemd-devel] [PATCH] logind: just call user_stop() if user_check_gc() returns false

2014-02-08 Thread Djalal Harouni
Currently if the user logs out, the GC may never call user_stop(), this will not terminate the systemd user and (sd-pam) of that user. To fix this, remove the USER_CLOSING state check that is blocking the GC from calling user_stop(). We do not need it since with the current logic we have: 1) if

Re: [systemd-devel] [PATCH] cryptsetup-generator: auto add deps for device as password

2014-02-08 Thread Zbigniew Jędrzejewski-Szmek
On Sat, Feb 08, 2014 at 01:12:14PM -0500, Dave Reisner wrote: If the password is a device file, we can add Requires/After dependencies on the device rather than requiring the user to do so. --- This is based on a bug filed to Arch: https://bugs.archlinux.org/task/38842 Assuming I'm

Re: [systemd-devel] [PATCH] cryptsetup-generator: auto add deps for device as password

2014-02-08 Thread Dave Reisner
On Sat, Feb 08, 2014 at 07:31:28PM +0100, Zbigniew Jędrzejewski-Szmek wrote: On Sat, Feb 08, 2014 at 01:12:14PM -0500, Dave Reisner wrote: If the password is a device file, we can add Requires/After dependencies on the device rather than requiring the user to do so. --- This is based on a

[systemd-devel] [PATCH] logind: use session_get_state() to get sessions state of the user

2014-02-08 Thread Djalal Harouni
In function user_get_state() remove the session_is_active() check, just count on the session_get_state() function to get the correct session state. session_is_active() may return true before starting the session scope and user service, this means it will return true even before the creation of

Re: [systemd-devel] Debian Bug#618862: systemd: ignores keyscript in crypttab - a possible solution

2014-02-08 Thread David Härdeman
On Wed, Feb 05, 2014 at 12:16:00AM +0100, Lennart Poettering wrote: On Thu, 30.01.14 10:40, David Härdeman (da...@hardeman.nu) wrote: This issue is fixable with minor upstream changes, e.g. by extending the PasswordAgent protocol to add Subsystem=cryptsetup and Target=diskname entries to the

Re: [systemd-devel] [PATCH] logind: use session_get_state() to get sessions state of the user

2014-02-08 Thread Zbigniew Jędrzejewski-Szmek
On Sat, Feb 08, 2014 at 08:51:57PM +0100, Djalal Harouni wrote: In function user_get_state() remove the session_is_active() check, just count on the session_get_state() function to get the correct session state. session_is_active() may return true before starting the session scope and user

Re: [systemd-devel] [PATCH] logind: use session_get_state() to get sessions state of the user

2014-02-08 Thread Djalal Harouni
On Sat, Feb 08, 2014 at 10:01:18PM +0100, Zbigniew Jędrzejewski-Szmek wrote: On Sat, Feb 08, 2014 at 08:51:57PM +0100, Djalal Harouni wrote: In function user_get_state() remove the session_is_active() check, just count on the session_get_state() function to get the correct session state.

Re: [systemd-devel] [PATCH v2 0/7] logind: close races on user and session states

2014-02-08 Thread Zbigniew Jędrzejewski-Szmek
On Sat, Feb 08, 2014 at 12:39:25AM +0100, Zbigniew Jędrzejewski-Szmek wrote: systemd-logind[2998]: Failed to process message [type=signal sender=:1.1 path=/org/freedesktop/systemd1/job/3284 interface=org.freedesktop.DBus.Properties member=PropertiesChanged signature=sa{sv}as]: Invalid

Re: [systemd-devel] [PATCH] systemd crashes if locale.conf contains invalid utf8 string

2014-02-08 Thread Goffredo Baroncelli
On 02/08/2014 07:15 PM, Zbigniew Jędrzejewski-Szmek wrote: On Thu, Feb 06, 2014 at 07:09:59PM +0100, Goffredo Baroncelli wrote: [...] Applied. Great ! [...] Zbyszek -- gpg @keyserver.linux.it: Goffredo Baroncelli (kreijackATinwind.it Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA

Re: [systemd-devel] [PATCH] logind: use session_get_state() to get sessions state of the user

2014-02-08 Thread Zbigniew Jędrzejewski-Szmek
On Sat, Feb 08, 2014 at 10:20:53PM +0100, Djalal Harouni wrote: On Sat, Feb 08, 2014 at 10:01:18PM +0100, Zbigniew Jędrzejewski-Szmek wrote: On Sat, Feb 08, 2014 at 08:51:57PM +0100, Djalal Harouni wrote: In function user_get_state() remove the session_is_active() check, just count on the

[systemd-devel] [PATCH] logind: always kill session when termination is requested

2014-02-08 Thread Zbigniew Jędrzejewski-Szmek
KillUserProcesses=yes/no should be ignored when termination is explicitly requested. --- This goes on top of * logind: use session_get_state() to get sessions state of the user * logind: just call user_stop() if user_check_gc() returns false