Re: [systemd-devel] cdrom_id opens device with O_EXCL, why?

2014-09-18 Thread Hoyer, Marko (ADITG/SW2)
> -Original Message- > From: Hoyer, Marko (ADITG/SW2) > Sent: Thursday, September 18, 2014 8:22 AM > To: systemd-devel@lists.freedesktop.org > Subject: cdrom_id opens device with O_EXCL, why? > > Hello together, > > I recently stumbled over cdrom_id opening the device with the O_EXCL flag

Re: [systemd-devel] [PATCH] sysctl: don't replace dots with slashes in prefix

2014-09-18 Thread Jan Synacek
David Herrmann writes: > Hi > > On Mon, Sep 15, 2014 at 2:00 PM, Jan Synacek wrote: >> David Herrmann writes: >>> Your original patch is right, too. But I'm not sure which one to >>> prefer. Given that we export systemd-sysctl as rpm macro, I guess we >>> have to go with your patch. Otherwise, w

Re: [systemd-devel] [PATCH] Fix resource leak (coverity CID 1237760)

2014-09-18 Thread Daniel Mack
On 09/17/2014 11:10 PM, Cristian Rodríguez wrote: > --- > src/libsystemd/sd-bus/bus-kernel.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/src/libsystemd/sd-bus/bus-kernel.c > b/src/libsystemd/sd-bus/bus-kernel.c > index 505f335..b3cc996 100644 > --- a/src/libsys

Re: [systemd-devel] [PATCH] systemctl: fix resource leak CID #1237747

2014-09-18 Thread Daniel Mack
On 09/18/2014 02:56 AM, Cristian Rodríguez wrote: > ..by simply moving the declaration of "unit" into the STRV_FOREACH > loop as suggested by Andreas. > --- > src/systemctl/systemctl.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/systemctl/systemctl.c b/src/syste

Re: [systemd-devel] cdrom_id opens device with O_EXCL, why?

2014-09-18 Thread David Herrmann
Hi On Thu, Sep 18, 2014 at 8:22 AM, Hoyer, Marko (ADITG/SW2) wrote: > Hello together, > > I recently stumbled over cdrom_id opening the device with the O_EXCL flag > set, if it is not currently mounted: > > "fd = open(node, O_RDONLY|O_NONBLOCK|(is_mounted(node) ? 0 : O_EXCL));" > > The effect of

[systemd-devel] [PATCH] Big endian and the size of the gcc builtin type bool from stdbool.h

2014-09-18 Thread Werner Fink
On s390 the big endianness and cast from pointers of integers to the type of bool leads to the funny status messages that e.g. all targets are set to AllowIsolate=no even for multi-user.target. The gcc builtin type bool or _Bool has the size of one byte which should be taken into account in sd_bus

Re: [systemd-devel] [PATCH] Big endian and the size of the gcc builtin type bool from stdbool.h

2014-09-18 Thread David Herrmann
Hi On Thu, Sep 18, 2014 at 11:16 AM, Werner Fink wrote: > On s390 the big endianness and cast from pointers of integers to > the type of bool leads to the funny status messages that e.g. > all targets are set to AllowIsolate=no even for multi-user.target. > > The gcc builtin type bool or _Bool ha

Re: [systemd-devel] [PATCH] Big endian and the size of the gcc builtin type bool from stdbool.h

2014-09-18 Thread Dr. Werner Fink
On Thu, Sep 18, 2014 at 12:43:00PM +0200, David Herrmann wrote: > Hi > > On Thu, Sep 18, 2014 at 11:16 AM, Werner Fink wrote: > > On s390 the big endianness and cast from pointers of integers to > > the type of bool leads to the funny status messages that e.g. > > all targets are set to AllowIsol

Re: [systemd-devel] cdrom_id opens device with O_EXCL, why?

2014-09-18 Thread Hoyer, Marko (ADITG/SW2)
> -Original Message- > From: David Herrmann [mailto:dh.herrm...@gmail.com] > Sent: Thursday, September 18, 2014 10:31 AM > To: Hoyer, Marko (ADITG/SW2) > Cc: systemd-devel@lists.freedesktop.org > Subject: Re: [systemd-devel] cdrom_id opens device with O_EXCL, why? > > Hi > > On Thu, Sep 1

Re: [systemd-devel] [PATCH] Big endian and the size of the gcc builtin type bool from stdbool.h

2014-09-18 Thread David Herrmann
Hi On Thu, Sep 18, 2014 at 12:57 PM, Dr. Werner Fink wrote: > On Thu, Sep 18, 2014 at 12:43:00PM +0200, David Herrmann wrote: >> Hi >> >> On Thu, Sep 18, 2014 at 11:16 AM, Werner Fink wrote: >> > On s390 the big endianness and cast from pointers of integers to >> > the type of bool leads to the

Re: [systemd-devel] [PATCH] Big endian and the size of the gcc builtin type bool from stdbool.h

2014-09-18 Thread David Herrmann
Hi On Thu, Sep 18, 2014 at 12:57 PM, Dr. Werner Fink wrote: > linuxadmin:~ # uname -m > s390x > linuxadmin:~ # systemctl show multi-user.target | grep -E '=(yes|no)' > CanStart=no > CanStop=no > CanReload=no > CanIsolate=no > StopWhenUnneeded=no > RefuseManualStart=no > Refuse

Re: [systemd-devel] cdrom_id opens device with O_EXCL, why?

2014-09-18 Thread David Herrmann
Hi On Thu, Sep 18, 2014 at 1:02 PM, Hoyer, Marko (ADITG/SW2) wrote: > Thx for the answer. > > The automounter is listening to the udev socket so it is actually waiting for > the > event to be processed completely. But unfortunately, it appears that sequences > of change events might come in a sh

Re: [systemd-devel] [PATCH] Big endian and the size of the gcc builtin type bool from stdbool.h

2014-09-18 Thread Dr. Werner Fink
On Thu, Sep 18, 2014 at 01:20:47PM +0200, David Herrmann wrote: > Hi > > On Thu, Sep 18, 2014 at 12:57 PM, Dr. Werner Fink wrote: > > On Thu, Sep 18, 2014 at 12:43:00PM +0200, David Herrmann wrote: > >> Hi > >> > >> On Thu, Sep 18, 2014 at 11:16 AM, Werner Fink wrote: > >> > On s390 the big endi

Re: [systemd-devel] [PATCH] Big endian and the size of the gcc builtin type bool from stdbool.h

2014-09-18 Thread Dr. Werner Fink
On Thu, Sep 18, 2014 at 01:29:26PM +0200, David Herrmann wrote: > Hi > > On Thu, Sep 18, 2014 at 12:57 PM, Dr. Werner Fink wrote: > > linuxadmin:~ # uname -m > > s390x > > linuxadmin:~ # systemctl show multi-user.target | grep -E '=(yes|no)' > > CanStart=no > > CanStop=no > > CanReloa

Re: [systemd-devel] cdrom_id opens device with O_EXCL, why?

2014-09-18 Thread David Herrmann
Hi again On Thu, Sep 18, 2014 at 1:34 PM, David Herrmann wrote: > I'm putting Harald and Kay on CC, as they added O_EXCL to protect > against parallel burning-sessions. Maybe they can tell you whether > that is still needed today and whether we can drop it. So my conception of O_EXCL was kinda w

Re: [systemd-devel] [PATCH] ask-password: Add --do-echo to enable echoing the user input

2014-09-18 Thread David Sommerseth
On 17/09/14 17:52, "Jóhann B. Guðmundsson" wrote: > > On 09/17/2014 12:26 PM, David Sommerseth wrote: >> Hi, >> >> I've been playing with the systemd feature enabled in OpenVPN. And I >> propose this change to systemd-ask-password to avoid masking usernames. >> I tried looking for alternative w

[systemd-devel] [RFC 00/25] Compile against the musl libc

2014-09-18 Thread Emil Renner Berthing
Hi, Around the internet one can read statements such as "systemd is designed with glibc in mind" and "the systemd developers' idea of a standard libc is one that has bug-for-bug compatibility with glibc". So in a fit of naivety I decided to test this out and see how much work it would take to make

[systemd-devel] [RFC 09/25] shared/socket-util: don't fail if libc doesn't support IDN

2014-09-18 Thread Emil Renner Berthing
--- src/shared/socket-util.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c index e3e54e8..d4a1679 100644 --- a/src/shared/socket-util.c +++ b/src/shared/socket-util.c @@ -41,6 +41,16 @@ #include "missing.h" #include "fileio.h"

[systemd-devel] [RFC 08/25] don't fail if GLOB_BRACE is not defined

2014-09-18 Thread Emil Renner Berthing
If the standard library doesn't provide brace expansion users just won't get it. --- src/shared/util.c | 6 ++ src/tmpfiles/tmpfiles.c | 6 ++ 2 files changed, 12 insertions(+) diff --git a/src/shared/util.c b/src/shared/util.c index 9157b2f..76899f5 100644 --- a/src/shared/util.c +

[systemd-devel] [RFC 10/25] shared/pty: fall back to kernel header for TIOCSIG

2014-09-18 Thread Emil Renner Berthing
--- src/shared/pty.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/shared/pty.c b/src/shared/pty.c index 2863da4..21a87e5 100644 --- a/src/shared/pty.c +++ b/src/shared/pty.c @@ -61,6 +61,11 @@ #include #include +/* If sys/ioctl.h doesn't provide TIOCSIG use the kernel header

[systemd-devel] [RFC 15/25] shared/utmp-wtmp: don't fail if libc doesn't support utmpx/wtmpx

2014-09-18 Thread Emil Renner Berthing
I'd like to make utmp/wtmp handling a configure option, but for now this is the minimal change needed to make it compile with musl. The musl utmp/wtmp functions doesn't do anything anyway. --- src/shared/utmp-wtmp.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/shared/utmp-wtmp.c b

[systemd-devel] [RFC 04/25] sd-rtnl: rtnl-message: remove unneeded linux includes

2014-09-18 Thread Emil Renner Berthing
--- src/libsystemd/sd-rtnl/rtnl-message.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c index 30e3358..b501a52 100644 --- a/src/libsystemd/sd-rtnl/rtnl-message.c +++ b/src/libsystemd/sd-rtnl/rtnl-message.c @@

[systemd-devel] [RFC 02/25] include fcntl.h rather than sys/fcntl.h

2014-09-18 Thread Emil Renner Berthing
--- src/socket-proxy/socket-proxyd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c index 81d8457..ff2b24f 100644 --- a/src/socket-proxy/socket-proxyd.c +++ b/src/socket-proxy/socket-proxyd.c @@ -26,7 +26,7 @@

[systemd-devel] [RFC 13/25] shared/missing.h: check for missing strndupa

2014-09-18 Thread Emil Renner Berthing
--- configure.ac | 3 ++- src/shared/missing.h | 11 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 1f2bbd0..3db0e24 100644 --- a/configure.ac +++ b/configure.ac @@ -301,9 +301,10 @@ LIBS="$save_LIBS" AC_CHECK_FUNCS([fanotif

[systemd-devel] [RFC 01/25] include poll.h rather than sys/poll.h

2014-09-18 Thread Emil Renner Berthing
--- man/sd_journal_get_fd.xml | 2 +- src/ask-password/ask-password.c | 2 +- src/bus-proxyd/bus-proxyd.c | 2 +- src/core/execute.c | 2 +- src/core/manager.c |

[systemd-devel] [RFC 06/25] shared/label.h: add missing stdio.h include

2014-09-18 Thread Emil Renner Berthing
--- src/shared/label.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/label.h b/src/shared/label.h index 7294820..cb2ec79 100644 --- a/src/shared/label.h +++ b/src/shared/label.h @@ -24,6 +24,7 @@ #include #include #include +#include int label_init(const char *prefix); v

[systemd-devel] [RFC 05/25] shared/util.h: include sys/reg.h for __WORDSIZE

2014-09-18 Thread Emil Renner Berthing
--- src/shared/util.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/util.h b/src/shared/util.h index 08d556f..32e5090 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include -- 2.1.0 __

[systemd-devel] [RFC 11/25] shared/missing.h: fall pack to insecure getenv

2014-09-18 Thread Emil Renner Berthing
--- src/shared/missing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/missing.h b/src/shared/missing.h index b441149..8389c28 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h @@ -353,7 +353,7 @@ static inline int name_to_handle_at(int fd, const char *

[systemd-devel] [RFC 14/25] shared/missing.h: check for missing __compar_fn_t typedef

2014-09-18 Thread Emil Renner Berthing
--- src/shared/missing.h | 5 + 1 file changed, 5 insertions(+) diff --git a/src/shared/missing.h b/src/shared/missing.h index 55e61f6..be099c5 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h @@ -147,6 +147,11 @@ static inline char *canonicalize_file_name(const char *path) {

[systemd-devel] [RFC 12/25] shared/missing.h: check for missing canonicalize_file_name

2014-09-18 Thread Emil Renner Berthing
--- configure.ac | 3 ++- src/shared/missing.h | 6 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index fb16904..1f2bbd0 100644 --- a/configure.ac +++ b/configure.ac @@ -301,8 +301,9 @@ LIBS="$save_LIBS" AC_CHECK_FUNCS([fanotify_init fa

[systemd-devel] [RFC 03/25] udev: link-config: remove unneded linux/netdevice.h include

2014-09-18 Thread Emil Renner Berthing
--- src/udev/net/link-config.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c index ee2865a..25e3cc8 100644 --- a/src/udev/net/link-config.c +++ b/src/udev/net/link-config.c @@ -20,7 +20,6 @@ ***/ #include -#include #include "sd-

[systemd-devel] [RFC 07/25] shared/sparse-endian.h: add missing byteswap.h include

2014-09-18 Thread Emil Renner Berthing
--- src/shared/sparse-endian.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/sparse-endian.h b/src/shared/sparse-endian.h index eb4dbf3..c913fda 100644 --- a/src/shared/sparse-endian.h +++ b/src/shared/sparse-endian.h @@ -21,6 +21,7 @@ #ifndef SPARSE_ENDIAN_H #define SPARSE_ENDI

[systemd-devel] [RFC 17/25] dhcp-internal.h: add fallback IPTOS_CLASS_CS6 definition

2014-09-18 Thread Emil Renner Berthing
--- src/libsystemd-network/dhcp-internal.h | 4 1 file changed, 4 insertions(+) diff --git a/src/libsystemd-network/dhcp-internal.h b/src/libsystemd-network/dhcp-internal.h index 1069c8a..f6d15c3 100644 --- a/src/libsystemd-network/dhcp-internal.h +++ b/src/libsystemd-network/dhcp-internal.

[systemd-devel] [RFC 19/25] mount-setup: skip relabelling when SELinux and SMACK not supported

2014-09-18 Thread Emil Renner Berthing
This is also the only place where FTW_ACTIONRETVAL is used, so this makes systemd compile without SELinux or SMACK support when the standard library doesn't support this extension. --- src/core/mount-setup.c | 4 1 file changed, 4 insertions(+) diff --git a/src/core/mount-setup.c b/src/core/

[systemd-devel] [RFC 20/25] udevadm-hwdb: don't use glibc-specific qsort_r

2014-09-18 Thread Emil Renner Berthing
--- src/udev/udevadm-hwdb.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index 65cbf61..3f31662 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -123,13 +123,13 @@ static void trie_node_

[systemd-devel] [RFC 21/25] make sure basename that doesn't alter it's argument

2014-09-18 Thread Emil Renner Berthing
--- src/core/execute.c | 6 +++--- src/core/load-fragment.c| 2 +- src/core/manager.c | 2 +- src/core/unit.c | 4 ++-- src/delta/delta.c | 14 +++--- src/journal/journalctl.c| 2 +- src/lo

[systemd-devel] [RFC 18/25] sd-ipv4all: fall back to random if no random_r

2014-09-18 Thread Emil Renner Berthing
--- configure.ac | 1 + src/libsystemd-network/sd-ipv4ll.c | 25 + 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 397521e..9cd4c05 100644 --- a/configure.ac +++ b/configure.ac @@ -301,6 +301,7 @@ RT_L

[systemd-devel] [RFC 23/25] mount: order options before other arguments to mount

2014-09-18 Thread Emil Renner Berthing
--- src/core/mount.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/mount.c b/src/core/mount.c index e284357..f3ec736 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -903,10 +903,10 @@ static void mount_enter_mounting(Mount *m) {

[systemd-devel] [RFC 25/25] add -z muldefs to linker flags

2014-09-18 Thread Emil Renner Berthing
In case we don't have the new gold linker, linking with ld fails without this option. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index 3f17833..4be6e08 100644 --- a/configure.ac +++ b/configure.ac @@ -216,6 +216,7 @@ CC_CHECK_FLAGS_APPEND([with

[systemd-devel] [RFC 16/25] add fallback parse_printf_format implementation

2014-09-18 Thread Emil Renner Berthing
--- Makefile.am | 4 + configure.ac | 2 + src/journal/journal-send.c | 2 +- src/shared/log.c | 2 +- src/shared/parse-printf-format.c | 273 +++ src/shared/parse-printf-format.h | 57 +

[systemd-devel] [RFC 24/25] units: order options before other arguments

2014-09-18 Thread Emil Renner Berthing
--- units/initrd-udevadm-cleanup-db.service.in | 2 +- units/kmod-static-nodes.service.in | 2 +- units/systemd-journal-flush.service.in | 2 +- units/systemd-udev-hwdb-update.service.in | 2 +- units/systemd-udev-trigger.service.in | 2 +- 5 files changed, 5 insertions(+), 5 del

[systemd-devel] [RFC 22/25] support POSIX strerror_r returning int

2014-09-18 Thread Emil Renner Berthing
--- configure.ac | 2 ++ src/journal/journal-send.c| 36 +++- src/libsystemd/sd-bus/bus-error.c | 14 +- 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 9cd4c05..3f17833 100

Re: [systemd-devel] [PATCH] udev: always resolve correctly database names on 'change' event

2014-09-18 Thread David Herrmann
Hi On Mon, Sep 15, 2014 at 2:03 PM, Robert Milasan wrote: > On Sat, 13 Sep 2014 15:29:23 +0200 > "Robert Milasan" wrote: > >> Hello, I've found a lingering bug in udev since udev changed it's >> database name from long names to short names 'ex: b9:1'. >> >> The bug is more visible or reproducibl

Re: [systemd-devel] [PATCH] man: use the escape for "-" in example instead of space.

2014-09-18 Thread David Herrmann
Hi On Mon, Sep 15, 2014 at 11:07 PM, Michael Marineau wrote: > This sentence can be misread to mean that "\x20" is the escape code for > "-" which is the only character explicitly mentioned. This lead to at > least one user loosing hair over why a mount unit for "/foo/bar-baz" > didn't work. The

Re: [systemd-devel] [PATCH 1/3] journal: Do not count on the compiler initializing found_last to false

2014-09-18 Thread David Herrmann
Hi On Tue, Sep 16, 2014 at 11:27 PM, wrote: > From: Philippe De Swert > > There is a very unlikely case where this can happen since gcc usually > does the sane thing. But let's make sure found_last is initialized anyway. Applied. Thanks David > > Fixes: CID#996386 > --- > src/journal/journa

Re: [systemd-devel] [RFC 11/25] shared/missing.h: fall pack to insecure getenv

2014-09-18 Thread Karol Lewandowski
On 2014-09-18 15:24, Emil Renner Berthing wrote: > --- > src/shared/missing.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/shared/missing.h b/src/shared/missing.h > index b441149..8389c28 100644 > --- a/src/shared/missing.h > +++ b/src/shared/missing.h > @@ -353,7

Re: [systemd-devel] cdrom_id opens device with O_EXCL, why?

2014-09-18 Thread Hoyer, Marko (ADITG/SW2)
> -Original Message- > From: David Herrmann [mailto:dh.herrm...@gmail.com] > Sent: Thursday, September 18, 2014 1:57 PM > To: Hoyer, Marko (ADITG/SW2) > Cc: systemd-devel@lists.freedesktop.org; Harald Hoyer; Kay Sievers > Subject: Re: [systemd-devel] cdrom_id opens device with O_EXCL, why?

Re: [systemd-devel] [RFC 11/25] shared/missing.h: fall pack to insecure getenv

2014-09-18 Thread Emil Renner Berthing
On 18 September 2014 15:56, Karol Lewandowski wrote:> > I think it would be way better (and easy) to reimplement original > secure_getenv() rather than falling back to function with different > semantics. secure_ is there for a reason. Agreed. Added to my TODO, thanks. /Emil ___

Re: [systemd-devel] [RFC 00/25] Compile against the musl libc

2014-09-18 Thread Jóhann B. Guðmundsson
On 09/18/2014 01:24 PM, Emil Renner Berthing wrote: The real reason is of course that I'd like to see systemd running on my router and other small devices that usually run some OpenWRT derivative. The openwrt community is still going forward with their (re)-invention of init system called pro

Re: [systemd-devel] [RFC 00/25] Compile against the musl libc

2014-09-18 Thread Emil Renner Berthing
On 18 September 2014 16:10, "Jóhann B. Guðmundsson" wrote: > On 09/18/2014 01:24 PM, Emil Renner Berthing wrote: >> The real reason is of course that I'd like to see systemd running >> on my router and other small devices that usually run some OpenWRT >> derivative. > > The openwrt community is st

Re: [systemd-devel] [RFC 00/25] Compile against the musl libc

2014-09-18 Thread Philippe De Swert
Hi, On 18/09/14 17:13, Emil Renner Berthing wrote: > On 18 September 2014 16:10, "Jóhann B. Guðmundsson" > wrote: >> On 09/18/2014 01:24 PM, Emil Renner Berthing wrote: >>> The real reason is of course that I'd like to see systemd running >>> on my router and other small devices that usually run

Re: [systemd-devel] [RFC 11/25] shared/missing.h: fall pack to insecure getenv

2014-09-18 Thread Cristian Rodríguez
El 18/09/14 a las #4, Emil Renner Berthing escribió: --- src/shared/missing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/missing.h b/src/shared/missing.h index b441149..8389c28 100644 --- a/src/shared/missing.h +++ b/src/shared/missing.h @@ -353,7 +353,7 @@

Re: [systemd-devel] [RFC 12/25] shared/missing.h: check for missing canonicalize_file_name

2014-09-18 Thread Cristian Rodríguez
El 18/09/14 a las #4, Emil Renner Berthing escribió: +#if !HAVE_DECL_CANONICALIZE_FILE_NAME +static inline char *canonicalize_file_name(const char *path) { +return realpath(path, NULL); +} +#endif No, no reimplementations of library functions here, only wrappers for syscalls which gl

Re: [systemd-devel] [RFC 13/25] shared/missing.h: check for missing strndupa

2014-09-18 Thread Cristian Rodríguez
El 18/09/14 a las #4, Emil Renner Berthing escribió: +#if !HAVE_DECL_STRNDUPA +#define strndupa(s, n) \ + ({ \ +const char *__old = (s); \ +size_t __len = strnlen(__old, (n)); \ +char *__new = (char *)alloca(__len + 1); \ +__new[__len] = '\0'; \ +(char *)memcpy(__new, __old,

Re: [systemd-devel] [RFC 00/25] Compile against the musl libc

2014-09-18 Thread Jóhann B. Guðmundsson
On 09/18/2014 02:20 PM, Philippe De Swert wrote: Hi, On 18/09/14 17:13, Emil Renner Berthing wrote: On 18 September 2014 16:10, "Jóhann B. Guðmundsson" wrote: On 09/18/2014 01:24 PM, Emil Renner Berthing wrote: The real reason is of course that I'd like to see systemd running on my router a

Re: [systemd-devel] [RFC 15/25] shared/utmp-wtmp: don't fail if libc doesn't support utmpx/wtmpx

2014-09-18 Thread Tom Gundersen
On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > I'd like to make utmp/wtmp handling a configure option, I think that would make more sense (and serve the same purpose), so I suggest doing that instead. > but for > now this is the minimal change needed to make it compile with musl.

Re: [systemd-devel] [RFC 03/25] udev: link-config: remove unneded linux/netdevice.h include

2014-09-18 Thread Tom Gundersen
Applied. Thanks! Tom On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > src/udev/net/link-config.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c > index ee2865a..25e3cc8 100644 > --- a/src/udev/net/link-config.c

Re: [systemd-devel] [RFC 04/25] sd-rtnl: rtnl-message: remove unneeded linux includes

2014-09-18 Thread Tom Gundersen
Applied. Thanks! Tom On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > src/libsystemd/sd-rtnl/rtnl-message.c | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c > b/src/libsystemd/sd-rtnl/rtnl-message.c > index 30e3358..b501a52

Re: [systemd-devel] [RFC 08/25] don't fail if GLOB_BRACE is not defined

2014-09-18 Thread Tom Gundersen
On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > If the standard library doesn't provide brace > expansion users just won't get it. I don't think we should do this, it would mean implicitly providing a subtly different feature-set to users, which surely would lead to confusion. I'd

Re: [systemd-devel] [RFC 16/25] add fallback parse_printf_format implementation

2014-09-18 Thread Tom Gundersen
This sholud definitely go in your libc instead. Cheers, Tom On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > Makefile.am | 4 + > configure.ac | 2 + > src/journal/journal-send.c | 2 +- > src/shared/log.c

Re: [systemd-devel] [RFC 18/25] sd-ipv4all: fall back to random if no random_r

2014-09-18 Thread Tom Gundersen
No, this actually breaks the behaviour, so we absolutely cannot do this. Again, I suggest adding the missing features to your libc. Cheers, Tom On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > configure.ac | 1 + > src/libsystemd-network/sd-ipv4ll.c |

Re: [systemd-devel] [RFC 00/25] Compile against the musl libc

2014-09-18 Thread Cristian Rodríguez
El 18/09/14 a las #4, Emil Renner Berthing escribió: Hi, Around the internet one can read statements such as "systemd is designed with glibc in mind" and "the systemd developers' idea of a standard libc is one that has bug-for-bug compatibility with glibc". For all practical purposes this is c

[systemd-devel] [PATCH] journal-remote: check return code of sd_event_default

2014-09-18 Thread Andreas Henriksson
Handle sd_event_default returning error and bail out properly as done in every other caller of this function. Found by coverity. Fixes: CID#1238957 --- src/journal-remote/journal-remote.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/journal-remote/journal-remote.c

Re: [systemd-devel] [RFC 20/25] udevadm-hwdb: don't use glibc-specific qsort_r

2014-09-18 Thread Tom Gundersen
It does not make sense for us to work around this. Please add it to your libc instead. On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > src/udev/udevadm-hwdb.c | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-) > > diff --git a/src/udev/udevadm-hwdb.c b

[systemd-devel] [PATCH 0/3] Minor patches for gcc warnings

2014-09-18 Thread philippedeswert
From: Philippe De Swert Hi, While compiling systemd I came across these warnings. And as I recompile a lot these days for Coverity they started to bug me and I just decided to fix them as they are quite trivial issues. Cheers! Philippe De Swert (3): journal-upload: Remove compilation warnin

[systemd-devel] [PATCH 3/3] sysusers: Remove some gcc warnings about uninitialized variables

2014-09-18 Thread philippedeswert
From: Philippe De Swert Gcc is spewing some warnings about uninitialized variables. Let's get rid of the noise. --- src/sysusers/sysusers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c index ba20d94..4203b3e 100644 ---

[systemd-devel] [PATCH 2/3] core: Remove uninitialized warnings from bus-endpoint.c

2014-09-18 Thread philippedeswert
From: Philippe De Swert Gcc is spewing some warnings about uninitialized variables. Let's get rid of the noise. --- src/core/bus-endpoint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/bus-endpoint.c b/src/core/bus-endpoint.c index 1e8f07e..aac540d 100644 ---

[systemd-devel] [PATCH 1/3] journal-upload: Remove compilation warning

2014-09-18 Thread philippedeswert
From: Philippe De Swert When compiling we see this curl warning popping up: src/journal-remote/journal-upload.c:194:17: warning: call to ‘_curl_easy_setopt_err_error_buffer’ declared with attribute warning: curl_easy_setopt expects a char buffer of CURL_ERROR_SIZE as argument for this option [ena

Re: [systemd-devel] [RFC 02/25] include fcntl.h rather than sys/fcntl.h

2014-09-18 Thread Tom Gundersen
Applied. Thanks! Tom On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > src/socket-proxy/socket-proxyd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/socket-proxy/socket-proxyd.c > b/src/socket-proxy/socket-proxyd.c > index 81d8457..ff2b24f 100

Re: [systemd-devel] [PATCH] ask-password: Add --do-echo to enable echoing the user input

2014-09-18 Thread Colin Guthrie
David Sommerseth wrote on 17/09/14 13:26: > If there are better ways how to solve this, please let me know and I'll > go that path instead. I asked much the same question a looong time back on this list regarding a generic API to ask for more than just passwords although it was hidden in a comment

Re: [systemd-devel] [RFC 01/25] include poll.h rather than sys/poll.h

2014-09-18 Thread Tom Gundersen
Hm, this one doesn't apply for me. If you rebase and resend I'll apply. Thanks! Tom On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > man/sd_journal_get_fd.xml | 2 +- > src/ask-password/ask-password.c | 2 +- > src/bus-proxyd/bu

Re: [systemd-devel] [RFC 01/25] include poll.h rather than sys/poll.h

2014-09-18 Thread David Herrmann
Hi On Thu, Sep 18, 2014 at 6:03 PM, Tom Gundersen wrote: > Hm, this one doesn't apply for me. If you rebase and resend I'll apply. And, please, where applicable, keep alphabetical order. Thanks David ___ systemd-devel mailing list systemd-devel@lists.

Re: [systemd-devel] [RFC 24/25] units: order options before other arguments

2014-09-18 Thread Tom Gundersen
For kmod and systemctl this is fine (so I'd be happy to take a patch to make that change), but for udevadm it feels weird as the documentation there says the format should be "udevadm trigger". Maybe something to fix in the libc (assuming the problem is that it enforces an order). On Thu, Sep 18,

Re: [systemd-devel] [RFC 23/25] mount: order options before other arguments to mount

2014-09-18 Thread Tom Gundersen
Applied. Thanks! Tom On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > src/core/mount.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/src/core/mount.c b/src/core/mount.c > index e284357..f3ec736 100644 > --- a/src/core/mount.c > +++ b/src/co

Re: [systemd-devel] [RFC 21/25] make sure basename that doesn't alter it's argument

2014-09-18 Thread Tom Gundersen
This needs a bit more explanation. Why this change? Cheers, Tom On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > src/core/execute.c | 6 +++--- > src/core/load-fragment.c| 2 +- > src/core/manager.c | 2 +- > src/core/unit.c

Re: [systemd-devel] [RFC 11/25] shared/missing.h: fall pack to insecure getenv

2014-09-18 Thread Tom Gundersen
On Thu, Sep 18, 2014 at 4:01 PM, Emil Renner Berthing wrote: > On 18 September 2014 15:56, Karol Lewandowski > wrote:> >> I think it would be way better (and easy) to reimplement original >> secure_getenv() rather than falling back to function with different >> semantics. secure_ is there for a

Re: [systemd-devel] [RFC 00/25] Compile against the musl libc

2014-09-18 Thread Tom Gundersen
On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > Around the internet one can read statements such as "systemd > is designed with glibc in mind" and "the systemd developers' idea > of a standard libc is one that has bug-for-bug compatibility with > glibc". So in a fit of naivety I dec

Re: [systemd-devel] [PATCH 0/3] Minor patches for gcc warnings

2014-09-18 Thread Tom Gundersen
Applied all three. Thanks! Tom On Thu, Sep 18, 2014 at 5:56 PM, wrote: > From: Philippe De Swert > > Hi, > > While compiling systemd I came across these warnings. And as I recompile > a lot these days for Coverity they started to bug me and I just decided > to fix them as they are quite trivia

Re: [systemd-devel] [PATCH] journal-remote: check return code of sd_event_default

2014-09-18 Thread Tom Gundersen
Applied. Thanks! Tom On Thu, Sep 18, 2014 at 5:52 PM, Andreas Henriksson wrote: > Handle sd_event_default returning error and bail out properly > as done in every other caller of this function. > > Found by coverity. Fixes: CID#1238957 > --- > src/journal-remote/journal-remote.c | 6 +- > 1

Re: [systemd-devel] [RFC 24/25] units: order options before other arguments

2014-09-18 Thread Dave Reisner
On Thu, Sep 18, 2014 at 06:10:06PM +0200, Tom Gundersen wrote: > For kmod and systemctl this is fine (so I'd be happy to take a patch > to make that change), but for udevadm it feels weird as the > documentation there says the format should be "udevadm trigger". Maybe > something to fix in the libc

Re: [systemd-devel] [RFC 21/25] make sure basename that doesn't alter it's argument

2014-09-18 Thread Cristian Rodríguez
El 18/09/14 a las #4, Emil Renner Berthing escribió: > --- And all of this because the POSIX versions of basename modify the argument .. see the problem ? it is the standard versions that are wrong. what about implementing a gnu_basename in the C library and using that instead ? -- Cristian "I

Re: [systemd-devel] [RFC 00/25] Compile against the musl libc

2014-09-18 Thread Emil Renner Berthing
Hi Tom, On 18 September 2014 18:29, Tom Gundersen wrote: > In general, I don't think we should add patches for the sole purpose > of non-glibc compatibility. You would in most cases be much better > served by adding the missing functionality to your libc, rather than > to each of the project requ

Re: [systemd-devel] [RFC 10/25] shared/pty: fall back to kernel header for TIOCSIG

2014-09-18 Thread David Herrmann
Hi On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > src/shared/pty.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/src/shared/pty.c b/src/shared/pty.c > index 2863da4..21a87e5 100644 > --- a/src/shared/pty.c > +++ b/src/shared/pty.c > @@ -61,6 +61,11 @@ > #in

Re: [systemd-devel] [RFC 06/25] shared/label.h: add missing stdio.h include

2014-09-18 Thread David Herrmann
Hi On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > src/shared/label.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/shared/label.h b/src/shared/label.h > index 7294820..cb2ec79 100644 > --- a/src/shared/label.h > +++ b/src/shared/label.h > @@ -24,6 +24,7 @@ >

Re: [systemd-devel] [RFC 07/25] shared/sparse-endian.h: add missing byteswap.h include

2014-09-18 Thread David Herrmann
Hi On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > src/shared/sparse-endian.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/shared/sparse-endian.h b/src/shared/sparse-endian.h > index eb4dbf3..c913fda 100644 > --- a/src/shared/sparse-endian.h > +++ b/src/share

Re: [systemd-devel] [RFC 05/25] shared/util.h: include sys/reg.h for __WORDSIZE

2014-09-18 Thread David Herrmann
Hi On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > src/shared/util.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/shared/util.h b/src/shared/util.h > index 08d556f..32e5090 100644 > --- a/src/shared/util.h > +++ b/src/shared/util.h > @@ -24,6 +24,7 @@ > #inc

Re: [systemd-devel] [RFC 25/25] add -z muldefs to linker flags

2014-09-18 Thread David Herrmann
Hi On Thu, Sep 18, 2014 at 3:25 PM, Emil Renner Berthing wrote: > In case we don't have the new gold linker, > linking with ld fails without this option. > --- > configure.ac | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/configure.ac b/configure.ac > index 3f17833..4be6e08 100644 > --

Re: [systemd-devel] [RFC 14/25] shared/missing.h: check for missing __compar_fn_t typedef

2014-09-18 Thread David Herrmann
Hi On Thu, Sep 18, 2014 at 3:24 PM, Emil Renner Berthing wrote: > --- > src/shared/missing.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/src/shared/missing.h b/src/shared/missing.h > index 55e61f6..be099c5 100644 > --- a/src/shared/missing.h > +++ b/src/shared/missing.h > @@ -1

Re: [systemd-devel] [RFC 25/25] add -z muldefs to linker flags

2014-09-18 Thread Michael Biebl
2014-09-19 0:34 GMT+02:00 David Herrmann : >> -Wl,-fuse-ld=gold]) The reason to use gold was that the compat libraries require the ifunc functionality. This is no longer the case, so I'd suggest to not override the default linker and simply use the system default one. __