Re: [systemd-devel] [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-10 Thread Tom Gundersen
On Tue, Sep 9, 2014 at 10:45 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: On Tue, Sep 9, 2014 at 12:35 PM, James Bottomley james.bottom...@hansenpartnership.com wrote: On Tue, 2014-09-09 at 12:16 -0700, Luis R. Rodriguez wrote: On Mon, Sep 8, 2014 at 10:38 PM, James Bottomley

Re: [systemd-devel] [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-10 Thread Alexander E. Patrakov
10.09.2014 12:46, Tom Gundersen пишет: On Tue, Sep 9, 2014 at 10:45 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: On Tue, Sep 9, 2014 at 12:35 PM, James Bottomley james.bottom...@hansenpartnership.com wrote: On Tue, 2014-09-09 at 12:16 -0700, Luis R. Rodriguez wrote: On Mon, Sep 8,

Re: [systemd-devel] [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-10 Thread Tom Gundersen
On Wed, Sep 10, 2014 at 8:53 AM, Alexander E. Patrakov patra...@gmail.com wrote: 10.09.2014 12:46, Tom Gundersen пишет: On Tue, Sep 9, 2014 at 10:45 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: On Tue, Sep 9, 2014 at 12:35 PM, James Bottomley james.bottom...@hansenpartnership.com

Re: [systemd-devel] [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-10 Thread Alexander E. Patrakov
10.09.2014 12:58, Tom Gundersen пишет: On Wed, Sep 10, 2014 at 8:53 AM, Alexander E. Patrakov patra...@gmail.com wrote: 10.09.2014 12:46, Tom Gundersen пишет: On Tue, Sep 9, 2014 at 10:45 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: On Tue, Sep 9, 2014 at 12:35 PM, James Bottomley

[systemd-devel] [PATCH 2/5] [use after free] pattern is already freed, so do not dereference it in the error print

2014-09-10 Thread philippedeswert
From: Philippe De Swert philippedesw...@gmail.com In case set_consume goes wrong, the pattern name has already been freed. So we do not try to print it in the logs, assuming the pattern addition print will be printed just before the failure anyway. Found with coverity. Fixes: CID#1237798

[systemd-devel] [PATCH 0/5] Coverity fixes

2014-09-10 Thread philippedeswert
From: Philippe De Swert philippedesw...@gmail.com Hi, Yesterday I finally got to revive the systemd Coverity project on scan.coverity.org Unfortunately to see the errors reported you need to sign up, but I will make sure to approve requests for seeing the bugs whenever they show up. Also I

[systemd-devel] [PATCH 4/5] [memleak] Do not leak mmapped area when other memory allocations fail.

2014-09-10 Thread philippedeswert
From: Philippe De Swert philippedesw...@gmail.com After a section of memory is succesfully allocated, some of the following actions can still fail due to lack of memory. In this case -ENOMEM is returned without actually freeing the already mapped memory. Found with coverity. Fixes: CID#1237762

[systemd-devel] [PATCH 5/5] [memleak] Actually unref the buscreds on failure.

2014-09-10 Thread philippedeswert
From: Philippe De Swert philippedesw...@gmail.com Actually unref the buscreds when we are not going to return a pointer to them. As when bus_creds_add_more fails we immediately return the error code otherwise and leak the new buscreds. Found with coverity. Fixes: CID#1237761 Signed-off-by:

[systemd-devel] [PATCH 1/5] [use after free] Avoid using m-kdbus after freeing it.

2014-09-10 Thread philippedeswert
From: Philippe De Swert philippedesw...@gmail.com m-kdbus could be freed before it is released. Changing the order fixes the issue. Found with Coverity. Fixes: CID#1237798 Signed-off-by: Philippe De Swert philippedesw...@gmail.com --- src/libsystemd/sd-bus/bus-message.c | 6 +++--- 1 file

[systemd-devel] [PATCH 3/5] [uninitialized] No need to check if num is 0

2014-09-10 Thread philippedeswert
From: Philippe De Swert philippedesw...@gmail.com When num is 0 we jump to the error handling. However at that time r is not set yet by keyboard_fill so we most likely get a nonsensical error. However the num check is not needed as the xkb_state_key_get_syms will not return negative values. From

Re: [systemd-devel] [PATCH 1/3] sd-dhcp6-client: Implement Elapsed Time option

2014-09-10 Thread Patrik Flykt
On Tue, 2014-09-09 at 13:39 +0200, Tom Gundersen wrote: Hi Patrik, These all look good. Please push! Done that. Cheers, Patrik ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org

Re: [systemd-devel] [PATCH 0/5] Coverity fixes

2014-09-10 Thread Thomas H.P. Andersen
On Wed, Sep 10, 2014 at 11:20 AM, philippedesw...@gmail.com wrote: From: Philippe De Swert philippedesw...@gmail.com Hi, Yesterday I finally got to revive the systemd Coverity project on scan.coverity.org Unfortunately to see the errors reported you need to sign up, but I will make sure to

Re: [systemd-devel] [PATCH 0/5] Coverity fixes

2014-09-10 Thread Philippe De Swert
Hi, On 10/09/14 13:12, Thomas H.P. Andersen wrote: On Wed, Sep 10, 2014 at 11:20 AM, philippedesw...@gmail.com wrote: Yesterday I finally got to revive the systemd Coverity project on scan.coverity.org Unfortunately to see the errors reported you need to sign up, but I will make sure to

Re: [systemd-devel] [PATCH 0/5] Coverity fixes

2014-09-10 Thread Mantas Mikulėnas
On Wed, Sep 10, 2014 at 1:20 PM, Philippe De Swert philippedesw...@gmail.com wrote: Hi, On 10/09/14 13:12, Thomas H.P. Andersen wrote: On Wed, Sep 10, 2014 at 11:20 AM, philippedesw...@gmail.com wrote: Yesterday I finally got to revive the systemd Coverity project on scan.coverity.org

Re: [systemd-devel] Preventing automatic seat assignments

2014-09-10 Thread David Herrmann
Hi On Tue, Sep 9, 2014 at 10:49 AM, Tanu Kaskinen tanu.kaski...@linux.intel.com wrote: On Wed, 2014-08-27 at 11:47 +0300, Tanu Kaskinen wrote: On Tue, 2014-08-26 at 14:00 +0200, Lennart Poettering wrote: On Tue, 26.08.14 12:17, Tanu Kaskinen (tanu.kaski...@linux.intel.com) wrote: Hi,

Re: [systemd-devel] Non-Stop Services in an Embedded Environment

2014-09-10 Thread Spence, Richard (EXT-Other - DE/Ulm)
Tobias et al., It turns out that ExecStopPost already provides the hook that we need to be able to handle all terminations with a common procedure. I had made a false assumption about the meaning of ExecStopPost but a closer reading of the manpage entry and a quick test corrected that. Sorry

Re: [systemd-devel] [PATCH 0/5] Coverity fixes

2014-09-10 Thread Philippe De Swert
Hi, On 10/09/14 13:30, Mantas Mikulėnas wrote: On Wed, Sep 10, 2014 at 1:20 PM, Philippe De Swert On a side note I noticed this mail : http://permalink.gmane.org/gmane.comp.sysutils.systemd.devel/6248 Talking about some freeing macros. I noticed there seem to be some here and there. So it

Re: [systemd-devel] [PATCH 0/5] Coverity fixes

2014-09-10 Thread Tom Gundersen
On Wed, Sep 10, 2014 at 12:51 PM, Philippe De Swert philippedesw...@gmail.com wrote: Hi, On 10/09/14 13:30, Mantas Mikulėnas wrote: On Wed, Sep 10, 2014 at 1:20 PM, Philippe De Swert On a side note I noticed this mail : http://permalink.gmane.org/gmane.comp.sysutils.systemd.devel/6248

[systemd-devel] Unprivileged poweroff

2014-09-10 Thread Michal Witanowski
Hi, I was wondering if there is a possibility to call systemctl poweroff as non-root user in this scenario: 1.I have no PolicyKit on my system, so I get access denied. 2. Calling with -f parameter also fails, with Must be root error. 3. I'd like to avoid using sudo.

Re: [systemd-devel] Unprivileged poweroff

2014-09-10 Thread Simon McVittie
On 10/09/14 15:03, Michal Witanowski wrote: I was wondering if there is a possibility to call “systemctl poweroff” as non-root user [without PolicyKit or sudo] ... Theoretically there is no other way, am I right? If you want to escalate privileges in a controlled way, you need a controlled

Re: [systemd-devel] Unprivileged poweroff

2014-09-10 Thread Simon McVittie
On 10/09/14 16:10, Simon McVittie wrote: If you want to escalate privileges in a controlled way, you need a controlled privilege-escalation tool. PolicyKit is one such tool; systemctl is another; a setuid binary written by you [...] is another possibility. Sorry, that should read sudo is

Re: [systemd-devel] Unprivileged poweroff

2014-09-10 Thread Tom Gundersen
On Wed, Sep 10, 2014 at 4:03 PM, Michal Witanowski m.witanow...@samsung.com wrote: I was wondering if there is a possibility to call “systemctl poweroff” as non-root user in this scenario: 1.I have no PolicyKit on my system, so I get access denied. 2. Calling with “-f”

Re: [systemd-devel] So how am I supposed to put together my Linux system?

2014-09-10 Thread Colin Guthrie
Simon McVittie wrote on 09/09/14 19:02: Inside there would be a: /usr/lib/kernel/kernel-version/modules/ folder containing the actual modules (same as /lib/modules/kernel-version/kernel/) This seems like moving things around for the sake of moving things around. If Fedora, Debian and

[systemd-devel] [PATCH 0/3] More coverity error fixes

2014-09-10 Thread philippedeswert
From: Philippe De Swert philippedesw...@gmail.com Hi all, Here are some more Coverity fixes. More in line with what I learned today on the mailing list about the use of gcc macros. Cheers, Philippe Philippe De Swert (3): [file handle leak] Close file handle when we're done with it [fd

[systemd-devel] [PATCH 3/3] [fd leak] Stop leaking fd in do_accept()

2014-09-10 Thread philippedeswert
From: Philippe De Swert philippedesw...@gmail.com Found with Coverity. Signed-off-by: Philippe De Swert philippedesw...@gmail.com --- src/activate/activate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activate/activate.c b/src/activate/activate.c index

[systemd-devel] [PATCH 2/3] [fd leak] Stop leaking an fd in sd_journal_sendv

2014-09-10 Thread philippedeswert
From: Philippe De Swert philippedesw...@gmail.com Found with Coverity. Fixes: CID#996435 Signed-off-by: Philippe De Swert philippedesw...@gmail.com --- src/journal/journal-send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/journal/journal-send.c

[systemd-devel] [PATCH 1/3] [file handle leak] Close file handle when we're done with it

2014-09-10 Thread philippedeswert
From: Philippe De Swert philippedesw...@gmail.com In test_read_one_char the filehandle does not get its fclose at the end of the function, thus we are leaking fd's. Found with Coverity. Fixes: CID#1237749 Signed-off-by: Philippe De Swert philippedesw...@gmail.com --- src/test/test-util.c | 1 +

Re: [systemd-devel] Suppressing automounting

2014-09-10 Thread Dale R. Worley
From: Mantas Mikulėnas graw...@gmail.com What I was thinking of is, what is the program that reads (directly or indirectly) the Store.mount file and from that decides exactly how to call mount(8), and when to call it? It's systemd itself (pid 1). My guess was that the name of this

Re: [systemd-devel] [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-10 Thread Luis R. Rodriguez
Tom, thanks for reviewing this! My reply below! On Tue, Sep 9, 2014 at 11:46 PM, Tom Gundersen t...@jklm.no wrote: On Tue, Sep 9, 2014 at 10:45 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: On Tue, Sep 9, 2014 at 12:35 PM, James Bottomley james.bottom...@hansenpartnership.com wrote:

Re: [systemd-devel] User systemd unit files

2014-09-10 Thread Zbigniew Jędrzejewski-Szmek
On Tue, Sep 09, 2014 at 07:39:17PM -0400, Chris Morgan wrote: Specifically, running `systemd --user` directly is not supported anymore. The user mode still works, but only for one user instance per UID, launched through user@uid.service (recent releases start this automatically upon

Re: [systemd-devel] User systemd unit files

2014-09-10 Thread Chris Morgan
On Sep 10, 2014 5:46 PM, Zbigniew Jędrzejewski-Szmek zbys...@in.waw.pl wrote: On Tue, Sep 09, 2014 at 07:39:17PM -0400, Chris Morgan wrote: Specifically, running `systemd --user` directly is not supported anymore. The user mode still works, but only for one user instance per UID,

Re: [systemd-devel] [RFC v2 3/6] kthread: warn on kill signal if not OOM

2014-09-10 Thread Alexander E. Patrakov
11.09.2014 03:10, Luis R. Rodriguez wrote: Tom, thanks for reviewing this! My reply below! On Tue, Sep 9, 2014 at 11:46 PM, Tom Gundersen t...@jklm.no wrote: On Tue, Sep 9, 2014 at 10:45 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: On Tue, Sep 9, 2014 at 12:35 PM, James Bottomley