Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices

2014-01-03 Thread Marcel Holtmann
Hi Tom, >> we can easily update ConnMan to handle DEVTYPE= and DEVTYPE=ethernet. That >> is an easy change and will keep things working. As I explained in the other >> reply, the main reason for DEVTYPE= is to detect that it is a >> network device that needs a management entity before it become

Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices

2014-01-03 Thread Tom Gundersen
On Sat, Jan 4, 2014 at 3:15 AM, Marcel Holtmann wrote: > we can easily update ConnMan to handle DEVTYPE= and DEVTYPE=ethernet. That is > an easy change and will keep things working. As I explained in the other > reply, the main reason for DEVTYPE= is to detect that it is a > network device that

Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices

2014-01-03 Thread Marcel Holtmann
Hi Tom, > I just pushed a change[0] which allows the match syntax > "Type=ethernet" to match on network devices without a DEVTYPE. > > We had a discussion on IRC whether we should call it Type=wired or > Type=ethernet. I think the former may be more intuitive, but the > la

Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices

2014-01-03 Thread Tom Gundersen
On Sat, Jan 4, 2014 at 2:00 AM, Greg KH wrote: > On Sat, Jan 04, 2014 at 01:44:08AM +0100, Tom Gundersen wrote: >> On Sat, Jan 4, 2014 at 1:22 AM, Greg KH wrote: >> > On Fri, Jan 03, 2014 at 08:54:17PM +0100, Tom Gundersen wrote: >> >> Hi, >> >> >> >> I just pushed a change[0] which allows the ma

Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices

2014-01-03 Thread Marcel Holtmann
Hi Greg, I just pushed a change[0] which allows the match syntax "Type=ethernet" to match on network devices without a DEVTYPE. We had a discussion on IRC whether we should call it Type=wired or Type=ethernet. I think the former may be more intuitive, but the latter

[systemd-devel] [PATCH 3/5] shared: util.c: unify split and split_quoted

2014-01-03 Thread Simon Peeters
--- src/shared/util.c | 88 --- src/shared/util.h | 15 ++ 2 files changed, 36 insertions(+), 67 deletions(-) diff --git a/src/shared/util.c b/src/shared/util.c index 2350204..db3051d 100644 --- a/src/shared/util.c +++ b/src/shared/util.

[systemd-devel] [PATCH 2/5] util: CACHED_METHOD macro

2014-01-03 Thread Simon Peeters
the CACHED_METHOD macro is used to cache the return value of a method. example: CACHED_METHOD(bool, a_cached_method) { return some_dificult_and_slow_stuff(); } --- src/shared/apparmor-util.c | 16 - src/shared/ima-util.c | 11 +++-- src/shared/macro.h | 16 ++

[systemd-devel] [PATCH 4/5] util.c: use read_one_line_file where possible

2014-01-03 Thread Simon Peeters
--- src/shared/util.c | 48 +++- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/src/shared/util.c b/src/shared/util.c index db3051d..354d7eb 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -404,8 +404,7 @@ char *split(const cha

[systemd-devel] [PATCH 5/5] strv: multiple cleanups

2014-01-03 Thread Simon Peeters
- turn strv_merge into strv_extend_strv. appending strv b to the end of strv a instead of creating a new strv - strv_append: remove in favor of strv_extend and strv_push. - strv_remove: write slightly more elegant - strv_remove_prefix: remove unused function - strv_overlap: use strv_contains - s

[systemd-devel] [PATCH 1/5] shared: procfs_file_alloca: handle pid==0

2014-01-03 Thread Simon Peeters
when pid is set to 0 use /proc/self --- src/shared/audit.c | 10 ++ src/shared/cgroup-util.c | 5 + src/shared/util.c| 35 +++ src/shared/util.h| 8 ++-- 4 files changed, 16 insertions(+), 42 deletions(-) diff --git a/src/sha

[systemd-devel] various cleanups

2014-01-03 Thread Simon Peeters
Hello, I have tried to do some cleanups in src/shared The "CACHED_METHOD" one might be going a bit to far, so feel free to drop it if you don't like it. [PATCH 1/5] shared: procfs_file_alloca: handle pid==0 [PATCH 2/5] util: CACHED_METHOD macro [PATCH 3/5] shared: util.c: unify split and split_

Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices

2014-01-03 Thread Greg KH
On Sat, Jan 04, 2014 at 01:44:08AM +0100, Tom Gundersen wrote: > On Sat, Jan 4, 2014 at 1:22 AM, Greg KH wrote: > > On Fri, Jan 03, 2014 at 08:54:17PM +0100, Tom Gundersen wrote: > >> Hi, > >> > >> I just pushed a change[0] which allows the match syntax > >> "Type=ethernet" to match on network dev

Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices

2014-01-03 Thread Tom Gundersen
On Sat, Jan 4, 2014 at 1:22 AM, Greg KH wrote: > On Fri, Jan 03, 2014 at 08:54:17PM +0100, Tom Gundersen wrote: >> Hi, >> >> I just pushed a change[0] which allows the match syntax >> "Type=ethernet" to match on network devices without a DEVTYPE. >> >> We had a discussion on IRC whether we should

Re: [systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices

2014-01-03 Thread Greg KH
On Fri, Jan 03, 2014 at 08:54:17PM +0100, Tom Gundersen wrote: > Hi, > > I just pushed a change[0] which allows the match syntax > "Type=ethernet" to match on network devices without a DEVTYPE. > > We had a discussion on IRC whether we should call it Type=wired or > Type=ethernet. I think the for

Re: [systemd-devel] [PATCH v2] systemctl: improve readability on failed commands

2014-01-03 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Jan 03, 2014 at 11:59:08PM +0100, Thomas H.P. Andersen wrote: > From: Thomas Hindoe Paaboel Andersen > > Not long ago a failed command would print: > "Failed to start something.service: ..." > regardless of whether the command was to start/stop/restart/etc. > > With e3e0314 this was impr

[systemd-devel] [PATCH v2] systemctl: improve readability on failed commands

2014-01-03 Thread Thomas H.P. Andersen
From: Thomas Hindoe Paaboel Andersen Not long ago a failed command would print: "Failed to start something.service: ..." regardless of whether the command was to start/stop/restart/etc. With e3e0314 this was improved to print the method used. E.g. for stopping: "Failed to StopUnit something.serv

Re: [systemd-devel] Multiseat session creation fail, VT number not 0

2014-01-03 Thread Matthew Monaco
On 01/03/2014 07:51 AM, David Herrmann wrote: > Hi > > On Fri, Jan 3, 2014 at 3:24 PM, Matthew Monaco wrote: >> I was having trouble getting a session on seat1 with v208, so I moved to git >> which has a nicer error message than EINVAL: >> >> pam_systemd(lightdm:session): Asking logind to create

Re: [systemd-devel] [PATCH] Add SELinuxContext configuration item

2014-01-03 Thread Kay Sievers
On Fri, Jan 3, 2014 at 6:21 PM, Zbigniew Jędrzejewski-Szmek wrote: >> And not make it SELinux specific. Maybe the field could be SecurityLabel: >> >> That would allow smack to also use the field and any other LSM that used a >> labeling system. > This would make it impossible to use the same uni

Re: [systemd-devel] [PATCH] Add SELinuxContext configuration item

2014-01-03 Thread Michael Scherer
Le vendredi 03 janvier 2014 à 18:21 +0100, Zbigniew Jędrzejewski-Szmek a écrit : > On Fri, Jan 03, 2014 at 11:48:49AM -0500, Daniel J Walsh wrote: > > >> Should systemd warn users if selinux is not installed,enabled and fail > > >> or? > > > > > > It all depend. Either we are consistent with the o

[systemd-devel] [RFC] networkd/udev: match on 'ethernet' devices

2014-01-03 Thread Tom Gundersen
Hi, I just pushed a change[0] which allows the match syntax "Type=ethernet" to match on network devices without a DEVTYPE. We had a discussion on IRC whether we should call it Type=wired or Type=ethernet. I think the former may be more intuitive, but the latter seems to be more in line with what

[systemd-devel] [PATCH 1/2] swap: remove if/else with the same data path

2014-01-03 Thread Stefan Beller
This was introduced in e1770af812 (2012-02-03, swap: replace failure boolean by result enum). This just removes unneeded lines of code, no functional change. --- src/core/swap.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/core/swap.c b/src/core/swap.c index e0627db

[systemd-devel] [PATCH 2/2] Update .mailmap file

2014-01-03 Thread Stefan Beller
This commit updates email addresses of people, who are already in the .mailmap file, so I'd assume they have sorted out their viewpoint on privacy within the .mailmap file. The entries for this commit have been produced using: # Finding out duplicates by comparing email addresses:

Re: [systemd-devel] [PATCH] Add SELinuxContext configuration item

2014-01-03 Thread Michael Scherer
Le vendredi 03 janvier 2014 à 11:48 -0500, Daniel J Walsh a écrit : > On 01/03/2014 09:16 AM, Michael Scherer wrote: > Well thinking about this again, I think still to the single label. Lets not > break the field up into multiple labels. > > And not make it SELinux specific. Maybe the field cou

Re: [systemd-devel] [PATCH] Add SELinuxContext configuration item

2014-01-03 Thread Zbigniew Jędrzejewski-Szmek
On Fri, Jan 03, 2014 at 11:48:49AM -0500, Daniel J Walsh wrote: > >> Should systemd warn users if selinux is not installed,enabled and fail > >> or? > > > > It all depend. Either we are consistent with the other settings ( ie, > > setting a syscall filter will fail if not supported on the kernel

Re: [systemd-devel] Apparmor profile switching support

2014-01-03 Thread Michael Scherer
Le vendredi 03 janvier 2014 à 17:22 +0100, [email protected] a écrit : > As discussed on the SELinux thread, this patch attempt to offer the same > level of configuration for Apparmor distributions by permitting to the > sysadmin to set the profile used by a unit. I didn't tested it but would > like t

Re: [systemd-devel] [PATCH] Add SELinuxContext configuration item

2014-01-03 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/03/2014 09:16 AM, Michael Scherer wrote: > Le vendredi 03 janvier 2014 à 12:23 +, "Jóhann B. Guðmundsson" a écrit > : >> On 01/03/2014 10:56 AM, Michael Scherer wrote: >>> Le vendredi 03 janvier 2014 à 00:58 +, "Jóhann B. Guðmundsson" a

[systemd-devel] Apparmor profile switching support

2014-01-03 Thread misc
As discussed on the SELinux thread, this patch attempt to offer the same level of configuration for Apparmor distributions by permitting to the sysadmin to set the profile used by a unit. I didn't tested it but would like to get early feedback on it from openSUSE and Ubuntu users, as they are the

[systemd-devel] [PATCH 1/2] Add switch_apparmor_profile helper, to switch the profile of the next command to run. This can be used to load a custom apparmor profile for a unit.

2014-01-03 Thread misc
From: Michael Scherer --- src/shared/apparmor-util.c | 15 +++ src/shared/apparmor-util.h | 1 + 2 files changed, 16 insertions(+) diff --git a/src/shared/apparmor-util.c b/src/shared/apparmor-util.c index 2b85da1..a75bec4 100644 --- a/src/shared/apparmor-util.c +++ b/src/shared/ap

[systemd-devel] [PATCH 2/2] Add AppArmor profile switching

2014-01-03 Thread misc
From: Michael Scherer This permit to switch to a specific apparmor profile when starting a daemon. This will result in a non operation if apparmor is disabled. --- man/systemd.exec.xml | 12 src/core/dbus-execute.c | 1 + src/core/execute.c

Re: [systemd-devel] [RFC] Initial libsystemd-asyncns commit

2014-01-03 Thread Daniel Buch
Yes im still working on it (Should have been finished days ago. 24 hours a day is again not enough -.-). So far i went for the threaded version, and cleaned up stuff according to this mail thread. And i updated it to match systemd with c99 null initialisation of structs etc. That might be wrong si

Re: [systemd-devel] Multiseat session creation fail, VT number not 0

2014-01-03 Thread David Herrmann
Hi On Fri, Jan 3, 2014 at 3:24 PM, Matthew Monaco wrote: > I was having trouble getting a session on seat1 with v208, so I moved to git > which has a nicer error message than EINVAL: > > pam_systemd(lightdm:session): Asking logind to create session: uid=1000 > pid=637 > service=lightdm type=x11

[systemd-devel] Multiseat session creation fail, VT number not 0

2014-01-03 Thread Matthew Monaco
I was having trouble getting a session on seat1 with v208, so I moved to git which has a nicer error message than EINVAL: pam_systemd(lightdm:session): Asking logind to create session: uid=1000 pid=637 service=lightdm type=x11 class=user seat=seat1 vtnr=2 tty= display=:1 remote=no remote_user= rem

Re: [systemd-devel] [PATCH] Add SELinuxContext configuration item

2014-01-03 Thread Michael Scherer
Le vendredi 03 janvier 2014 à 12:23 +, "Jóhann B. Guðmundsson" a écrit : > On 01/03/2014 10:56 AM, Michael Scherer wrote: > > Le vendredi 03 janvier 2014 à 00:58 +, "Jóhann B. Guðmundsson" a > > écrit : > >> On 12/28/2013 01:30 PM, Lennart Poettering wrote: > >>> On Fri, 27.12.13 23:26,m...

[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 a/src/login/logind-

[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 wil

[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 st

Re: [systemd-devel] [PATCH] Add SELinuxContext configuration item

2014-01-03 Thread Jóhann B. Guðmundsson
On 01/03/2014 10:56 AM, Michael Scherer wrote: Le vendredi 03 janvier 2014 à 00:58 +, "Jóhann B. Guðmundsson" a écrit : On 12/28/2013 01:30 PM, Lennart Poettering wrote: On Fri, 27.12.13 23:26,[email protected] ([email protected]) wrote: From: Michael Scherer This permit to let system administ

Re: [systemd-devel] [PATCH] Add SELinuxContext configuration item

2014-01-03 Thread Michael Scherer
Le vendredi 03 janvier 2014 à 00:58 +, "Jóhann B. Guðmundsson" a écrit : > On 12/28/2013 01:30 PM, Lennart Poettering wrote: > > On Fri, 27.12.13 23:26,[email protected] ([email protected]) wrote: > > > >> >From: Michael Scherer > >> > > >> >This permit to let system administrators decide of the domai

Re: [systemd-devel] [PATCH 4/4] gdbus: Add basic kdbus tests

2014-01-03 Thread Karol Lewandowski
On 12/20/2013 04:23 PM, Yin Kangkai wrote: Hi! Sorry for late response, I've been out of office the last week(s). > On 2013-11-21, 12:33 +0100, Karol Lewandowski wrote: >> +TESTS >> += >> + >> +* Build test binaries: >> + >> + cd gio/tests >> + make >> + >> +* Set variable to use custom li

Re: [systemd-devel] [RFT] DHCPv4 support in networkd

2014-01-03 Thread Patrik Flykt
On Thu, 2014-01-02 at 16:52 +0100, Tom Gundersen wrote: > On Thu, Jan 2, 2014 at 4:48 PM, Reindl Harald wrote: > > > > > > Am 02.01.2014 16:41, schrieb Tom Gundersen: > >> On Thu, Jan 2, 2014 at 4:37 PM, Reindl Harald > >> wrote: > >>> the problems are that if someone comes back with his Apple n

Re: [systemd-devel] [PATCH 00/11] Finalize initial DHCP support

2014-01-03 Thread Patrik Flykt
On Fri, 2013-12-20 at 09:47 -0800, Marcel Holtmann wrote: > Hi Tom, > > >>> The first seven patches fix a few issues with the current code. > >>> > >>> Patch 09 adds DHCP lease renewing support when timer T1 triggers. > Using > >>> the UDP socket sending implementation in patch 08, the DHCP lease