Re: [systemd-devel] pam: Don't use loginuid [was: Re: Fix PAM module to not clobber XDG_RUNTIME_DIR with su]

2013-11-25 Thread Martin Pitt
Hey Lennart, Lennart Poettering [2013-11-26 5:12 +0100]: > I implemented this now, using a different approach than Martin's > original patch (i.e. I don't think it is a good idea to involve stat() > here, instead let's just let logind pass all information to > pam_systemd). Thanks! Lennart Poet

Re: [systemd-devel] [PATCH] core/socket: we only want one event on standard sockets

2013-11-25 Thread David Timothy Strauss
On Tue, Nov 26, 2013 at 2:35 PM, Lennart Poettering wrote: > Not following here. What precisely does this fix, can you elaborate? > > We currently turn off the poll for the socket fds as soon as we queued > the service socket, so that we don't get woken up anymore. What would > EPOLLET do good her

Re: [systemd-devel] [PATCH] core/socket: we only want one event on standard sockets

2013-11-25 Thread Lennart Poettering
On Fri, 22.11.13 18:56, Shawn Landden (sh...@churchofgit.com) wrote: > With EPOLLONESHOT we are guaranteed to only recieve one event > until we reload with socket_enter_listening(s), otherwise > multiple events can be generated upon receipt of multiple chunks of > data. Not following here. What p

Re: [systemd-devel] [PATCH v2 19/26] dhcp: Add timeout and main loop support

2013-11-25 Thread Zbigniew Jędrzejewski-Szmek
On Mon, Nov 25, 2013 at 09:13:35AM +0200, Patrik Flykt wrote: > Require a main loop to be set when creating a DHCP client. Set up > a timer to resend DHCP Discover messages and add a 0-2 second > delay to the timeout value. Move to state Selecting after successful > sending of a Discover message. >

Re: [systemd-devel] Fix PAM module to not clobber XDG_RUNTIME_DIR with su

2013-11-25 Thread Lennart Poettering
On Thu, 21.11.13 07:55, Martin Pitt (martin.p...@ubuntu.com) wrote: > > So, what's the intention here? That XDG_RUNTIME_DIR is entirely unset > > after "su"? That sounds kinda acceptable to me. > Yes, for "su -" and pkexec. It might not work for "su" as that is > likely configured to not run PAM,

Re: [systemd-devel] pam: Don't use loginuid [was: Re: Fix PAM module to not clobber XDG_RUNTIME_DIR with su]

2013-11-25 Thread Lennart Poettering
On Wed, 20.11.13 19:19, Colin Walters (walt...@verbum.org) wrote: > > So yeah, there your mix > > and match is broken: > > I'm proposing a simple goal: XDG_RUNTIME_DIR should always be that > matching the current uid. I can't think of any case where you'd > want it otherwise. That can't work.

Re: [systemd-devel] pam: Don't use loginuid [was: Re: Fix PAM module to not clobber XDG_RUNTIME_DIR with su]

2013-11-25 Thread Lennart Poettering
On Thu, 21.11.13 00:36, Lennart Poettering (lenn...@poettering.net) wrote: > I do like Martin's original patch, since by unsetting XDG_RUNTIME_DIR it > basically tells apps "Hey, all bets are off, you are fucked", and > doesn't pretend XDG_RUNTIME_DIR would still work. Because it doesn't. I imple

Re: [systemd-devel] Restart instantiated services after suspend

2013-11-25 Thread Lennart Poettering
On Sat, 23.11.13 18:51, Marcos Felipe Rasia de Mello (marcos...@gmail.com) wrote: > > 2013/11/20 Lennart Poettering : > > On Tue, 19.11.13 14:18, Marcos Felipe Rasia de Mello (marcos...@gmail.com) > > wrote: > > > >> Hi folks, > >> > >> I am trying to disable HDDs power management in a systemd

Re: [systemd-devel] Improving the results shown with systemd-analyze blame

2013-11-25 Thread Lennart Poettering
On Sun, 24.11.13 12:44, Umut Tezduyar Lindskog (umut.tezdu...@axis.com) wrote: > Hi, > > I think we can make the output of systemd-analyze blame more useful with cpu > accounting information. > > The output of systemd-analyze blame is not making so much sense when > lots of programs are tried t

Re: [systemd-devel] Thread level resource management

2013-11-25 Thread David Timothy Strauss
On Tue, Nov 26, 2013 at 2:28 AM, Umut Tezduyar Lindskog wrote: > Any plans to support existing applications that are making use of thread > level resource management? If not, what are we left with then, posix thread > priorities? Kay is right; there is no direct replacement. However, it's possi

Re: [systemd-devel] [PATCH] nspawn: Give a more helpful error message when -D argument is bogus.

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 16:01, Shawn Landden (sh...@churchofgit.com) wrote: > --- > src/nspawn/nspawn.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c > index 0973a00..1ee4ab3 100644 > --- a/src/nspawn/nspawn.c > +++ b/src/nspawn/nspawn.c > @@ -2

Re: [systemd-devel] [systemd-commits] src/network

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 19:12, Dave Reisner (d...@falconindy.com) wrote: > > On Tue, Nov 26, 2013 at 12:40:05AM +0100, Lennart Poettering wrote: > > On Mon, 25.11.13 15:20, Dave Reisner (dreis...@kemper.freedesktop.org) > > wrote: > > > > > uint64_t can be formatted correctly with %ju, rather than

Re: [systemd-devel] syslog makes impossible to enter emergency mode

2013-11-25 Thread Lennart Poettering
On Tue, 26.11.13 01:00, Lennart Poettering (lenn...@poettering.net) wrote: > > On Sun, 24.11.13 22:36, Andrey Borzenkov (arvidj...@gmail.com) wrote: > > > Interesting case (https://bugzilla.novell.com/show_bug.cgi?id=852021). > > Systemd enters emergency due to failed mount. At the same time sys

Re: [systemd-devel] [systemd-commits] src/network

2013-11-25 Thread Tom Gundersen
On Tue, Nov 26, 2013 at 1:05 AM, Tom Gundersen wrote: > On Tue, Nov 26, 2013 at 12:40 AM, Lennart Poettering > wrote: >> On Mon, 25.11.13 15:20, Dave Reisner (dreis...@kemper.freedesktop.org) wrote: >> >>> uint64_t can be formatted correctly with %ju, rather than casting to >>> unsigned a

Re: [systemd-devel] [PATCH] nspawn: Give a more helpful error message when -D argument is bogus.

2013-11-25 Thread Michael Biebl
2013/11/26 Shawn Landden : > +log_error("Root directory %s is not > accessable: %m", optarg); s/accessable/accessible/ -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? __

Re: [systemd-devel] [systemd-commits] src/network

2013-11-25 Thread Dave Reisner
On Tue, Nov 26, 2013 at 12:40:05AM +0100, Lennart Poettering wrote: > On Mon, 25.11.13 15:20, Dave Reisner (dreis...@kemper.freedesktop.org) wrote: > > > uint64_t can be formatted correctly with %ju, rather than casting to > > unsigned and potentially losing accuracy. > > Oh, shouldn't we

[systemd-devel] [PATCH] nspawn: Give a more helpful error message when -D argument is bogus.

2013-11-25 Thread Shawn Landden
--- src/nspawn/nspawn.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 0973a00..1ee4ab3 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -200,6 +200,11 @@ static int parse_argv(int argc, char *argv[]) { case

Re: [systemd-devel] [systemd-commits] src/network

2013-11-25 Thread Tom Gundersen
On Tue, Nov 26, 2013 at 12:40 AM, Lennart Poettering wrote: > On Mon, 25.11.13 15:20, Dave Reisner (dreis...@kemper.freedesktop.org) wrote: > >> uint64_t can be formatted correctly with %ju, rather than casting to >> unsigned and potentially losing accuracy. > > Oh, shouldn't we be careful

Re: [systemd-devel] syslog makes impossible to enter emergency mode

2013-11-25 Thread Lennart Poettering
On Sun, 24.11.13 22:36, Andrey Borzenkov (arvidj...@gmail.com) wrote: > Interesting case (https://bugzilla.novell.com/show_bug.cgi?id=852021). > Systemd enters emergency due to failed mount. At the same time syslog > socket triggers syslog.service. Due to implicit Requires on > basic.target which

Re: [systemd-devel] [systemd-commits] src/network

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 15:20, Dave Reisner (dreis...@kemper.freedesktop.org) wrote: > uint64_t can be formatted correctly with %ju, rather than casting to > unsigned and potentially losing accuracy. Oh, shouldn't we be careful with that? %j is for intmax_t. Which might or might not be int64_t.

Re: [systemd-devel] [PATCH v2 23/26] dhcp: Process DHCP Ack/Nak message

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: > -static int client_receive_offer(DHCPClient *client, > -DHCPPacket *offer, int len) > +static int client_verify_headers(DHCPClient *client, > + DHCPPacket *m

Re: [systemd-devel] [PATCH v2 20/26] dhcp: Handle received DHCP Offer message

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: > +static int client_receive_raw_message(sd_event_source *s, int fd, > + uint32_t revents, void *userdata) > +{ > +DHCPClient *client = userdata; > +int len, buflen; > +

Re: [systemd-devel] [PATCH v2 19/26] dhcp: Add timeout and main loop support

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: > -DHCPClient *sd_dhcp_client_new(void) > +DHCPClient *sd_dhcp_client_new(sd_event *event) > { > DHCPClient *client; > > +assert_return(event, NULL); > + > client = new0(DHCPClient, 1); >

Re: [systemd-devel] [PATCH v2 12/26] dhcp: Add function for sending a raw packet

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: > +int dhcp_network_send_raw_packet(int index, void *packet, int len); Should be "const void* packet", no? And "size_t len", no? Lennart -- Lennart Poettering, Red Hat ___ sy

Re: [systemd-devel] [PATCH v2 05/26] dhcp: Add option appending and parsing

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: > +#include > + > +#include "protocol.h" > + > +int dhcp_option_append(uint8_t **buf, int *buflen, uint8_t code, This is a memory size, right? It should be size_t rather than

Re: [systemd-devel] [PATCH v2 02/26] dhcp: Add DHCP client initialization

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: > + > +DHCPClient *sd_dhcp_client_new(void) > +{ > +DHCPClient *client; > + > +client = new0(DHCPClient, 1); > +if (!client) > +return NULL; > + > +client->state = DHCP_STATE_

Re: [systemd-devel] [PATCH v2 00/26] Initial DHCP v4 library implementation

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 09:13, Patrik Flykt (patrik.fl...@linux.intel.com) wrote: > After that I noticed someting interesting when setting a monotonic timer > event to go off at time 0. It seems to repeatedly call the timer event > without stopping, either due to the next timer computation going wrong in

Re: [systemd-devel] [PATCH] conf-parser: fix memory realloc error

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 23:14, Yin Kangkai (kangkai@intel.com) wrote: > Otherwise there is some memory corruption and undefined behavior, > e.g., in my case systemd-udev was always aborted at the > _cleanup_freep_ around that code blocks. Thanks! Applied! > Signed-off-by: Yin Kangkai We don't do

Re: [systemd-devel] [PATCH v2] build: fix problems with undefined references in tests

2013-11-25 Thread Lennart Poettering
On Mon, 25.11.13 18:26, Lukasz Skalski (l.skal...@partner.samsung.com) wrote: > Now code form src/shared don't use code of shared libs directly. > It solves cyclic dependencies in the same way as sd_utf_is_valid() > from src/libsystemd-bus/sd-utf8.c and src/shared/utf8.c. Hmm, I'd prefer just mov

[systemd-devel] [PATCH v2] build: fix problems with undefined references in tests

2013-11-25 Thread Lukasz Skalski
Now code form src/shared don't use code of shared libs directly. It solves cyclic dependencies in the same way as sd_utf_is_valid() from src/libsystemd-bus/sd-utf8.c and src/shared/utf8.c. --- src/libsystemd-bus/sd-bus.c | 64 + src/libsystemd-bus/test-bus-m

Re: [systemd-devel] Thread level resource management

2013-11-25 Thread Kay Sievers
On Mon, Nov 25, 2013 at 5:28 PM, Umut Tezduyar Lindskog wrote: > On Nov 24, 2013, at 4:39 PM, Kay Sievers wrote: >> On Sun, Nov 24, 2013 at 12:33 PM, Umut Tezduyar Lindskog >> wrote: >>> How do we support thread level resource management with the new cgroup >>> abstraction? > How do we do it in

Re: [systemd-devel] Thread level resource management

2013-11-25 Thread Umut Tezduyar Lindskog
Hi, On Nov 24, 2013, at 4:39 PM, Kay Sievers wrote: > On Sun, Nov 24, 2013 at 12:33 PM, Umut Tezduyar Lindskog > wrote: >> How do we support thread level resource management with the new cgroup >> abstraction? How do we do it in the process level then. Lets say a service has 5 processes unde

[systemd-devel] [PATCH] conf-parser: fix memory realloc error

2013-11-25 Thread Yin Kangkai
Otherwise there is some memory corruption and undefined behavior, e.g., in my case systemd-udev was always aborted at the _cleanup_freep_ around that code blocks. Signed-off-by: Yin Kangkai --- src/shared/conf-parser.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/share

Re: [systemd-devel] [PATCH] build: fix problems with undefined references in tests

2013-11-25 Thread Kay Sievers
On Mon, Nov 25, 2013 at 2:08 PM, Lukasz Skalski wrote: > On 11/25/2013 02:03 PM, Kay Sievers wrote: >> >> On Mon, Nov 25, 2013 at 1:56 PM, Lukasz Skalski >> wrote: >>> >>> Please find patch in attachement for review - it fix problem >>> with undefined references in some test-libsystemd-*-sym.c te

Re: [systemd-devel] [PATCH] build: fix problems with undefined references in tests

2013-11-25 Thread Lukasz Skalski
On 11/25/2013 02:03 PM, Kay Sievers wrote: On Mon, Nov 25, 2013 at 1:56 PM, Lukasz Skalski wrote: Please find patch in attachement for review - it fix problem with undefined references in some test-libsystemd-*-sym.c tests. It looks a bit weird to add library requirements, theses libs should

Re: [systemd-devel] [PATCH] build: fix problems with undefined references in tests

2013-11-25 Thread Kay Sievers
On Mon, Nov 25, 2013 at 1:56 PM, Lukasz Skalski wrote: > Please find patch in attachement for review - it fix problem > with undefined references in some test-libsystemd-*-sym.c tests. It looks a bit weird to add library requirements, theses libs should not need the other libraries. What exactly

[systemd-devel] [PATCH] build: fix problems with undefined references in tests

2013-11-25 Thread Lukasz Skalski
Please find patch in attachement for review - it fix problem with undefined references in some test-libsystemd-*-sym.c tests. --- Makefile.am |5 + 1 file changed, 5 insertions(+) diff --git a/Makefile.am b/Makefile.am index 728b860..9e03f0a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -

[systemd-devel] Italian translation + revision proposals (wording) on english labels

2013-11-25 Thread Daniele Medri
Dear systemd maintainers, I've made a pull request on github with some patches: - Add new po/it.po (Italian translation) - Revision proposals (wording) on english labels http://github.com/systemd/systemd/pull/7 Best Regards -- Daniele Medri ___ sys

Re: [systemd-devel] systemd-networkd with 802.1x

2013-11-25 Thread Tomasz Torcz
On Mon, Nov 25, 2013 at 06:20:09PM +1000, David Timothy Strauss wrote: > On Mon, Nov 25, 2013 at 5:38 PM, Umut Tezduyar Lindskog > wrote: > > I would think port access protocols would be needed for servers even before > > sending a single IP package. > > I've never used a server that required 80

Re: [systemd-devel] systemd-networkd with 802.1x

2013-11-25 Thread David Timothy Strauss
On Mon, Nov 25, 2013 at 5:38 PM, Umut Tezduyar Lindskog wrote: > I would think port access protocols would be needed for servers even before > sending a single IP package. I've never used a server that required 802.1x. I've only encountered it in places where physical network access is widesprea