[systemd-devel] [PATCH 7/7] logind: do not call session_jobs_reply() on CLOSING

2014-02-06 Thread Djalal Harouni
match_job_removed() signal is triggered when queued jobs finish during session opening or closing. Calling session_jobs_reply() during opening is valid, but during session closing does not make sense. The session_send_create_reply() function which is called by session_jobs_reply() is able to

Re: [systemd-devel] Allow stop jobs to be killed during shutdown

2014-02-05 Thread Djalal Harouni
SIGHUP after the SIGKILL... Not sure, I'll try to test it tomorrow. Thanks! -- Djalal Harouni http://opendz.org ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] [Patch 0/2] logind: make sure that closed sessions will be cleaned

2014-01-30 Thread Djalal Harouni
Hi list, On Wed, Jan 22, 2014 at 10:24:24AM +0100, Djalal Harouni wrote: On Thu, Jan 16, 2014 at 11:19:08AM +0100, Djalal Harouni wrote: On Thu, Jan 16, 2014 at 06:01:58AM +0100, Zbigniew Jędrzejewski-Szmek wrote: Indeed, in a container (without your patches), sessions remain in closing

Re: [systemd-devel] logind and sessions tracking questions -

2014-01-23 Thread Djalal Harouni
On Wed, Jan 22, 2014 at 09:33:37AM +, Colin Guthrie wrote: 'Twas brillig, and Djalal Harouni at 20/01/14 12:18 did gyre and gimble: Hi Coling, Coling please I've some questions regarding what you have posted, see below. I'm trying to debug another bug in logind logic: http

Re: [systemd-devel] [Patch 0/2] logind: make sure that closed sessions will be cleaned

2014-01-23 Thread Djalal Harouni
On Wed, Jan 22, 2014 at 09:51:05AM +, Colin Guthrie wrote: 'Twas brillig, and Djalal Harouni at 22/01/14 09:24 did gyre and gimble: On Thu, Jan 16, 2014 at 11:19:08AM +0100, Djalal Harouni wrote: On Thu, Jan 16, 2014 at 06:01:58AM +0100, Zbigniew Jędrzejewski-Szmek wrote: Indeed

Re: [systemd-devel] [Patch 0/2] logind: make sure that closed sessions will be cleaned

2014-01-22 Thread Djalal Harouni
On Thu, Jan 16, 2014 at 11:19:08AM +0100, Djalal Harouni wrote: On Thu, Jan 16, 2014 at 06:01:58AM +0100, Zbigniew Jędrzejewski-Szmek wrote: Indeed, in a container (without your patches), sessions remain in closing state. But with your patches, systemd --user instance is started and killed

[systemd-devel] [PATCH 1/3] logind: make the user and session states more stable

2014-01-22 Thread Djalal Harouni
Currently the user and session states are not stable: 1) session state: To get the session state the function session_get_state() is used. Opening state: At login the D-Bus CreateSession() method will call session_start() which calls user_start() and session_start_scope() to queue

[systemd-devel] [PATCH 2/3] logind: differentiate between session scope opening and closing

2014-01-22 Thread Djalal Harouni
To get the state of the session, the session_get_state() is used. This function will check if the session-scope_job is set then it will automatically return SESSION_OPENING. This is buggy in the context of session closing: At logout or D-Bus TerminateSession() fifo_fd is removed: =

[systemd-devel] [PATCH 3/3] logind: differentiate between user state opening and closing

2014-01-22 Thread Djalal Harouni
To get the state of the user, the user_get_state() is used. This function will check if the user-slice_job or the user-service_job are set then it will automatically return USER_OPENING. This is buggy in the context of user closing: At logout or D-Bus TerminateUser() calls user_stop() user_stop()

Re: [systemd-devel] logind and sessions tracking questions - (was: Debugging acl settings)

2014-01-20 Thread Djalal Harouni
are not killed after logout then the session and user state files should not be removed and the state would be closing! I've some notes about logind logic, I'll post them with the patches and Cc'you Thank you in advance Colin, I will Cc'you for pathes! -- Djalal Harouni http://opendz.org

Re: [systemd-devel] [Patch 0/2] logind: make sure that closed sessions will be cleaned

2014-01-16 Thread Djalal Harouni
On Thu, Jan 16, 2014 at 06:01:58AM +0100, Zbigniew Jędrzejewski-Szmek wrote: On Sun, Jan 12, 2014 at 02:07:32AM +0100, Djalal Harouni wrote: On Sat, Jan 11, 2014 at 10:26:13PM +0100, Zbigniew Jędrzejewski-Szmek wrote: On Fri, Jan 03, 2014 at 02:19:19PM +0100, Djalal Harouni wrote

Re: [systemd-devel] [Patch 0/2] logind: make sure that closed sessions will be cleaned

2014-01-11 Thread Djalal Harouni
On Sat, Jan 11, 2014 at 10:26:13PM +0100, Zbigniew Jędrzejewski-Szmek wrote: On Fri, Jan 03, 2014 at 02:19:19PM +0100, Djalal Harouni wrote: On logout pam_systemd should ensures the following: If the last concurrent session of a user ends, the $XDG_RUNTIME_DIR directory and all its contents

Re: [systemd-devel] [Patch 0/2] logind: make sure that closed sessions will be cleaned

2014-01-08 Thread Djalal Harouni
ping? (Please if I'm missing something let me know) On Fri, Jan 03, 2014 at 02:19:19PM +0100, Djalal Harouni wrote: On logout pam_systemd should ensures the following: If the last concurrent session of a user ends, the $XDG_RUNTIME_DIR directory and all its contents are removed, too. from

Re: [systemd-devel] [Patch 0/2] logind: make sure that closed sessions will be cleaned

2014-01-08 Thread Djalal Harouni
On Wed, Jan 08, 2014 at 05:29:05PM +0100, Zbigniew Jędrzejewski-Szmek wrote: On Wed, Jan 08, 2014 at 05:12:23PM +0100, Djalal Harouni wrote: ping? (Please if I'm missing something let me know) No. I think that nobody had time to review this. Zbyszek Ok, thank you Zbyszek! -- Djalal

Re: [systemd-devel] [WIP][RFC][PATCH] networkd: generate resolv.conf

2014-01-06 Thread Djalal Harouni
On Mon, Jan 06, 2014 at 12:50:23AM +0100, Tom Gundersen wrote: Hi Djalal, On Mon, Jan 6, 2014 at 12:17 AM, Djalal Harouni tix...@opendz.org wrote: 1) nameservers receieved over DHCP 2) nameservers statically configured in a currently active .network file 3) nameservers statically

Re: [systemd-devel] [WIP][RFC][PATCH] networkd: generate resolv.conf

2014-01-05 Thread Djalal Harouni
first question: do you agree with adding this functionality? Second question: do you agree with the order of precedence I listed above? I'll comment on this: IMO by default try to not be so intrusive unless *told* so, some configs need their prefered/trusted nameservers. Thanks -- Djalal

[systemd-devel] [Patch 0/2] logind: make sure that closed sessions will be cleaned

2014-01-03 Thread Djalal Harouni
On logout pam_systemd should ensures the following: If the last concurrent session of a user ends, the $XDG_RUNTIME_DIR directory and all its contents are removed, too. from manpage. Using git HEAD, and a simple systemd-nspawn test will show that the above is not ensured and the sessions will

[systemd-devel] [PATCH 1/2] logind: make the manager able to collect closed sessions

2014-01-03 Thread Djalal Harouni
Currently on logout, session and user state files might stay and will not be cleaned up, this is true on systems where dbus TerminateSession() is not called on logouts. The manager garbage-collector will miss them due to the session_gc_queue being empty. A call to dbus TerminateSession() which

[systemd-devel] [PATCH 2/2] logind: Don't stop a running session manager from collecting a session

2014-01-03 Thread Djalal Harouni
As in commit 63966da86, the session manager will always be around, so make sure that in function session_check_gc() we don't check it. This gives the manager a chance to garbage-collect sessions. --- src/login/logind-session.c | 3 --- 1 file changed, 3 deletions(-) diff --git

Re: [systemd-devel] [PATCH 00/11] *** SUBJECT HERE ***

2013-12-21 Thread Djalal Harouni
, accesses to the /proc/pid/ are in the context of that PID namespace. -- Djalal Harouni http://opendz.org ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] [PATCH] loginctl: corretly show session IDs on session-status

2013-12-21 Thread Djalal Harouni
Commit f8f14b3654bcd introduced a regression that makes loginctl session-status to not show the correct session ID(s) In print_session_status_info() the map[] array, element Seat receives the offset of the id in SessionStatusInfo struct instead of the offset of the seat member. This will cause

[systemd-devel] [PATCH] localectl: log error if bus_map_all_properties() fails

2013-12-19 Thread Djalal Harouni
--- src/locale/localectl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/locale/localectl.c b/src/locale/localectl.c index b0abe7b..5929169 100644 --- a/src/locale/localectl.c +++ b/src/locale/localectl.c @@ -128,8 +128,10 @@ static int show_status(sd_bus *bus, char

[systemd-devel] [PATCH 3/4] loginctl: use show_properties() to get login1 properties

2013-12-17 Thread Djalal Harouni
Commit f8f14b3654bcd introduced a regression that makes loginctl ignore the --property option. This patch fixes the bug, it uses the new show_properties() function to query and filter properties. --- src/login/loginctl.c | 48 ++-- 1 file changed, 18

[systemd-devel] [PATCH 2/4] loginctl: add show_properties() to get login1 properties

2013-12-17 Thread Djalal Harouni
Commit f8f14b3654bcd introduced a regression that makes loginctl ignore the --property option. Fix this in two patches. This patch is just preparation, it introduces the show_properties() function that will be used in the next patch to query properties. --- src/login/loginctl.c | 15

[systemd-devel] [PATCH 0/4] loginctl --property option fixes

2013-12-17 Thread Djalal Harouni
The following patches try to fix a regression in the loginctl --property logic and improve the code. [Patch 1/4] loginctl: replace strv_append() by strv_extend() [Patch 2/4] loginctl: add show_properties() to get login1 properties [Patch 3/4] loginctl: use show_properties() to get login1

[systemd-devel] [PATCH 1/4] loginctl: replace strv_append() by strv_extend()

2013-12-17 Thread Djalal Harouni
--- src/login/loginctl.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/login/loginctl.c b/src/login/loginctl.c index f96a568..e03b0b9 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -1089,7 +1089,7 @@ static int parse_argv(int argc, char

[systemd-devel] [PATCH] systemctl: add the --plain option to the help message

2013-12-14 Thread Djalal Harouni
--- src/systemctl/systemctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 24a74c3..9a76349 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -4834,7 +4834,8 @@ static int

[systemd-devel] [PATCH] journal: pipe journalctl help output into a pager

2013-12-11 Thread Djalal Harouni
journalctl help output might run off the screen, so be consistent as other systemd tools do and pipe it into a pager. --- src/journal/journalctl.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index

Re: [systemd-devel] [PATCH 0/1] bus: make sure we always return valid error messages

2013-12-01 Thread Djalal Harouni
-- Djalal Harouni http://opendz.org ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] [PATCH 0/1] bus: make sure we always return valid error messages

2013-11-30 Thread Djalal Harouni
Hi list, The sd_bus_error_copy() is used by bus clients to copy sd_bus_error containt. If the 'need_free' field of the sd_bus_error struct of the source is false, then strdup() will be avoided and the 'name' and 'message' pointer fields of the destination are set to the sources's fields. This

[systemd-devel] [PATCH] nspawn: log out of memory errors

2013-11-05 Thread Djalal Harouni
--- src/nspawn/nspawn.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 1477456..80903a7 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -224,6 +224,9 @@ static int parse_argv(int argc, char *argv[]) {

Re: [systemd-devel] [PATCH 0/1] systemd will fail to compile if libgcrypt is missing

2013-11-05 Thread Djalal Harouni
On Mon, Nov 04, 2013 at 10:28:20PM +0100, Jan Engelhardt wrote: On Monday 2013-11-04 13:01, Lennart Poettering wrote: On Sat, 02.11.13 02:11, Djalal Harouni (tix...@opendz.org) wrote: I'm building from git tree, and I've noticed that systemd autogen.sh will fail if the libgcrypt and its

[systemd-devel] [PATCH 0/1] systemd will fail to compile if libgcrypt is missing

2013-11-01 Thread Djalal Harouni
Hi list, I'm doing some systemd testing on clean machines. I'm building from git tree, and I've noticed that systemd autogen.sh will fail if the libgcrypt and its headers are missing, this will produce a buggy configure script. The error messages were not clear, I did lost time debugging... :-/

[systemd-devel] [PATCH 1/1] configure.ac: make libgcrypt dependency optional

2013-11-01 Thread Djalal Harouni
Currently systemd will fail to build if libgcrypt headers are not installed: autoge.sh output: ... libtoolize: linking file `m4/lt~obsolete.m4' configure.ac:547: warning: macro 'AM_PATH_LIBGCRYPT' not found in library configure.ac:47: error: possibly undefined macro: AC_MSG_ERROR If this token

Re: [systemd-devel] [PATCH 0/1] systemd will fail to compile if libgcrypt is missing

2013-11-01 Thread Djalal Harouni
to pkg-config... On Sat, Nov 02, 2013 at 02:11:48AM +0100, Djalal Harouni wrote: Hi list, I'm doing some systemd testing on clean machines. I'm building from git tree, and I've noticed that systemd autogen.sh will fail if the libgcrypt and its headers are missing, this will produce a buggy

Re: [systemd-devel] [PATCH] nspawn: use the mode_t of the source file for copy_file()

2013-10-26 Thread Djalal Harouni
On Sat, Oct 26, 2013 at 09:17:10PM +0200, Zbigniew Jędrzejewski-Szmek wrote: On Sat, Oct 26, 2013 at 12:59:40AM +0100, Djalal Harouni wrote: Instead of hard-coding the permission mode, stat() the source file and use its mode to create the destination file. Hi, Is this patch trying to fix

[systemd-devel] [PATCH] nspawn: use the mode_t of the source file for copy_file()

2013-10-25 Thread Djalal Harouni
Instead of hard-coding the permission mode, stat() the source file and use its mode to create the destination file. Signed-off-by: Djalal Harouni tix...@opendz.org --- src/shared/util.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shared/util.c b/src/shared/util.c

<    1   2   3