1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-26 10:03:40 +03:00

13370 Commits

Author SHA1 Message Date
Lennart Poettering
5d6cf65f09 bus: when connecting to a container's system bus, double fork after joining the container's namespace
setns(CLONE_NEWPID) only applies to child processes, hence let's fork
once after joining the container's namespace.
2013-12-17 01:57:27 +01:00
Lennart Poettering
cd49e2f664 build-sys: build bus-driverd if kdbus support is enabled 2013-12-17 01:36:59 +01:00
Lennart Poettering
a4475f577b bus: when entering an existing namespace to connect to a container's system bus also switch over PID namespace
This is necessary to ensure that kdbus can collect creds of the
destination namespace when connecting.
2013-12-17 01:05:37 +01:00
Lennart Poettering
d003f514da core: always create /dev/kdbus/ns (and make it private 0700) after setting up the kdbus system bus 2013-12-17 01:05:37 +01:00
Thomas Hindoe Paaboel Andersen
4faa70046c journal-file: protect against alloca(0) 2013-12-16 23:37:38 +01:00
Kay Sievers
eca7a27add bus: fix typo in systemd-bus-proxyd 2013-12-16 23:25:32 +01:00
Daniel Mack
294c866023 Add bus-driverd
systemd-bus-driverd is a small daemon that connects to kdbus and
implements the org.freedesktop.DBus interface. IOW, it provides the bus
functions  traditionally taken care for by dbus-daemon.

Calls are proxied to kdbus, either via libsystemd-bus (were applicable)
or with the open-coded use of ioctl().

Note that the implementation is not yet finished as the functions to
add and remove matches and to start services by name are still missing.
2013-12-16 22:34:48 +01:00
Lennart Poettering
16ac401407 bus: when a busname unit refuses to activate a service it should flush the queue 2013-12-16 21:26:21 +01:00
Lennart Poettering
010b2b8d7a bus: also mask dbus.service in generator if kdbus is found 2013-12-16 21:06:57 +01:00
Lennart Poettering
77e96a6247 units: properly make bus proxy socket of type Accept=yes 2013-12-16 21:06:57 +01:00
Lennart Poettering
999b600390 systemctl: properly initialize and free sd_bus_error in "systemctl cat"
We need to properly initialize all error structs before use and free
them after use.

Also, there's no point in flushing stdout if we output a \n anyway...
2013-12-16 21:06:57 +01:00
Lennart Poettering
1c5f57c5a7 bus: fix symlink to bus proxy socket 2013-12-16 21:06:57 +01:00
Lennart Poettering
821e0756c6 bus: use GREEDY_REALLOC() when allocating message queues 2013-12-16 20:34:46 +01:00
Lennart Poettering
306f07be2f bus: let's use GREEDY_REALLOC() when allocating space for containers 2013-12-16 20:34:46 +01:00
Lennart Poettering
531dca789e execute: also set SO_SNDBUF when spawning a service with stdout/stderr connected to journald 2013-12-16 20:34:46 +01:00
Tom Gundersen
2a700de472 loopback-setup: remove stray hunk 2013-12-16 19:45:17 +01:00
Thomas Hindoe Paaboel Andersen
bf1bc67015 network: more asserts to shut up scan-build 2013-12-16 18:55:59 +01:00
Kay Sievers
e0d4864438 kdbus.h: add alignment requirements 2013-12-16 17:47:28 +01:00
Tom Gundersen
0f49a5f751 network: use SETLINK to bring up interfaces 2013-12-16 17:28:19 +01:00
Tom Gundersen
0a0dc69b65 rtnl: replace message_append by typesafe versions 2013-12-16 17:28:18 +01:00
Tom Gundersen
0fc7531b40 rtnl: support interleaved reading and writing, and rewind 2013-12-16 17:28:18 +01:00
Tom Gundersen
1f01fb4f29 rtnl: simplify route_new()
Drop most of the arguments and instead introduce set_dst_prefixlen().
2013-12-16 17:28:18 +01:00
Tom Gundersen
fc25d7f805 rtnl: simplify link_new()
Drop most of the arguments and instead introduce link_set_{flags,type}.
2013-12-16 17:28:18 +01:00
Tom Gundersen
23a7f0f721 rtnl: match - only match on one type at a time 2013-12-16 17:28:18 +01:00
Tom Gundersen
9d0db17836 rtnl: clean up/add asserts 2013-12-16 17:28:18 +01:00
Tom Gundersen
3e10a9f410 rtnl: add support for receiving route messages 2013-12-16 17:28:18 +01:00
Lennart Poettering
aec6d91fb7 bus: increase the bus socket buffer to 8 MB similar, to the log socket buffers 2013-12-16 17:05:51 +01:00
Lennart Poettering
10e4e52be8 update TODO 2013-12-16 17:05:42 +01:00
Lennart Poettering
92d75ca419 util: try harder to increase the send/recv buffers of sockets
If we have the priviliges we will try SO_SNDBUFFORCE/SO_RCVBUFFORCE and
only fall back to SO_SNDBUF/SO_RCVBUF if that fails.
2013-12-16 17:04:36 +01:00
Zbigniew Jędrzejewski-Szmek
4b8268f843 catalog: fix language detection
Detection would fail if language was not specified in the filename
but a dot appeared somewhere higher in the path.
2013-12-15 23:36:36 -05:00
Lennart Poettering
2cfbd749af core: refuse doing %h, %s, %U specifier resolving in PID 1
These specifiers require NSS lookups to work, and we really shouldn't do
them from PID 1 hence. With this change they are now only supported for
user systemd instance, or when the configured user for a unit is root.
2013-12-16 04:59:31 +01:00
Lennart Poettering
213298fb82 build-sys: warn if builds are not byte-by-byte reproducible due to usage of __DATE__ and suchlike 2013-12-16 04:58:20 +01:00
Colin Walters
8e050193e1 Fix segv introduced by 2fd069b18e525860514a70d3ea08410ca122d3e2
n->path is pointing to the value now, we set s = NULL above.
2013-12-15 20:23:23 -05:00
Lennart Poettering
16f4efb415 build-sys: add cppcheck target
This uses --enable=all mode. Should be taken with a grain of salt
though. While many recommendations make sense we should probably keep
"int r" always on function scope, and many of the portability warnings
really don't matter to us because we only care for Linux/glibc.
2013-12-16 00:06:07 +01:00
Zbigniew Jędrzejewski-Szmek
b5dd814873 Fix a few signed/unsigned format string issues
Since numbers involved are all small, behaviour was correct already.

https://bugzilla.redhat.com/show_bug.cgi?id=1043304
2013-12-15 17:49:28 -05:00
Zbigniew Jędrzejewski-Szmek
2fd069b18e Fix a few resource leaks in error paths
https://bugzilla.redhat.com/show_bug.cgi?id=1043304
2013-12-15 17:49:28 -05:00
Lennart Poettering
9bfa2c029d bus: _printf_ attributes should be on prototypes not function definitions for non-static functions 2013-12-15 23:43:47 +01:00
Kay Sievers
b6c631f378 bus: update kdbus monitoring interface 2013-12-15 16:56:28 +01:00
Zbigniew Jędrzejewski-Szmek
d9de321f78 udev-builtin-path: fix printf specifiers 2013-12-14 23:10:03 -05:00
Zbigniew Jędrzejewski-Szmek
5958d08962 bus: return negative errno on error
https://bugs.freedesktop.org/show_bug.cgi?id=72688
2013-12-14 22:45:14 -05:00
Thomas Hindoe Paaboel Andersen
899839b9f8 test-journal-syslog: use streq_ptr since we pass in NULL 2013-12-15 02:31:01 +01:00
Djalal Harouni
815ebc540d systemctl: add the --plain option to the help message 2013-12-14 18:13:24 -05:00
Zbigniew Jędrzejewski-Szmek
6baf995c17 man: remove advice to avoid setting the same var more than once
So far the compatibility with .desktop settings hasn't been imporant
at all, and we do not want people to write convoluted unit
files.
2013-12-14 17:33:10 -05:00
Zbigniew Jędrzejewski-Szmek
ec6039bc08 man: beef up ExecStart description
We have lots of questions from people who assume that shell syntax works
here, so let's be very explicit what is allowed and what is not. A few
examples should also help.

http://bugs.debian.org/732156
2013-12-14 17:33:10 -05:00
Shawn Landden
5d5f8ffa07 build: use -ftrapv for development
We want to find these bugs if they exist.
2013-12-14 17:33:10 -05:00
Thomas Hindoe Paaboel Andersen
9091e686f4 Add more _printf_'s for format-nonliterals
Clang is a bit more strict wrt format-nonliterals:
http://clang.llvm.org/docs/LanguageExtensions.html#format-string-checking

Adding these extra printf attributes also makes gcc able to find more
problems. E.g. this patch uncovers a format issue in udev-builtin-path_id.c

Some parts looked intetional about breaking the format-nonliteral check.
I added some supression for warnings there.
2013-12-14 13:32:22 +01:00
Lennart Poettering
8d35dae708 event: some snake-oil to speed up impossible error checks 2013-12-14 05:10:25 +01:00
Lennart Poettering
9a800b5622 event: instead of reset the revents field when we get new revents data from epoll, OR it in 2013-12-14 05:10:25 +01:00
Lennart Poettering
15b38f936e event: dynamically adjust size of events array instead of pre-allocating it possibly too large or too small 2013-12-14 05:10:25 +01:00
Lennart Poettering
e04b0cdb90 util: port last code over to new namespace utility calls 2013-12-14 05:10:25 +01:00