1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 23:51:28 +03:00
Commit Graph

20683 Commits

Author SHA1 Message Date
Werner Fink
de1d4f9b5c core: Let two more booleans survive a daemon-reload
Without the boolean bus_name_good services as well as cgroup_realized
for units a unit of Type=dbus and ExecReload sending SIGHUP to $MAINPID
will be terminated if systemd will be daemon reloaded.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746151
https://bugs.freedesktop.org/show_bug.cgi?id=78311
https://bugzilla.opensuse.org/show_bug.cgi?id=934077
2015-06-11 12:13:57 +02:00
Lennart Poettering
64b8c0d030 Merge pull request #158 from ssahani/net
Net
2015-06-11 11:52:58 +02:00
Lennart Poettering
814acddde1 Merge pull request #157 from filbranden/revert_unused_result
build-sys: suppress warnings of unused results
2015-06-11 11:50:26 +02:00
Daniel Mack
94f1f58d2b Merge pull request #160 from kaysievers/libsplit
build-sys: split internal basic/ library from shared/
2015-06-11 11:50:18 +02:00
Lennart Poettering
ed4dc5bbd1 Merge pull request #150 from poettering/journal-no-recv-loop
journald: don't employ inner loop for reading from incoming sockets
2015-06-11 11:34:38 +02:00
Kay Sievers
a095315b3c build-sys: split internal basic/ library from shared/
basic/      can be used by everything
            cannot use anything outside of basic/

libsystemd/ can use basic/
            cannot use shared/

shared/     can use libsystemd/
2015-06-11 10:52:46 +02:00
Susant Sahani
3de1c8ceab sd-network: fix CID 1306198 2015-06-11 14:08:56 +05:30
Susant Sahani
f6a0ea8568 networkd: improve logging
Replace strerror() usage with log_netdev_error_errno()
2015-06-11 13:11:33 +05:30
Susant Sahani
c8a09ef463 networkd: macvlan improve logging
Replace strerror() usage with log_netdev_error_errno()
2015-06-11 13:08:19 +05:30
Filipe Brandenburger
f73fb7b742 build-sys: suppress warnings of unused results
Unfortunately, gcc keeps warning about those even when we use an
explicit (void) cast to indicate we are not interested in the result.

LLVM's clang does not have that issue and works fine with the casts.

GCC bug being tracked at:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425

Until that GCC bug is fixed (and the version with the fix is in
many/most distributions) or we switch to LLVM as the default compiler,
it looks like we'll have to disable this warning by default...

Tested by building files known to present warnings about unused results
without the suppression, confirmed that the warnings were no longer
present with this patch applied.

This partially reverts commit 00c11bc53a ("build-sys: don't suppress irrelevant warnings").
2015-06-10 22:45:06 -07:00
Lennart Poettering
37c47e5e5b Merge pull request #3 from threatgrid/more_cgtop_enhancements
cgtop enhancements for easier machine-readable output
2015-06-11 01:52:25 +02:00
Charles Duffy
1d84ae050c cgtop: IO readings are valid if any data is available, even if unchanged since last tick
Emit "0" rather than "-" if no change in IO values are seen for a process since
last tick, so long as accounting has registered content at all.
2015-06-10 18:06:28 -05:00
Lennart Poettering
96490500cf Merge pull request #6 from xnox/drop-name
shared: Drop 'name=' prefix from SYSTEMD_CGROUP_CONTROLLER define.
2015-06-11 00:50:04 +02:00
Lennart Poettering
6f45f8ca76 Merge pull request #152 from zonque/buildsys
build-sys: make man/systemd.directives.xml depend on man/custom-entit…
2015-06-10 23:02:23 +02:00
Lennart Poettering
d112701190 Merge pull request #148 from teg/sd-network-race
sd-network: allow the state dir to be created after the monitor
2015-06-10 20:43:38 +02:00
Lennart Poettering
ad091530b3 Merge pull request #151 from mischief/dns-shared-3
move dns code from resolve to shared v3
2015-06-10 20:43:06 +02:00
Daniel Mack
747ca69b5d build-sys: make man/systemd.directives.xml depend on man/custom-entities.ent
Currently, the following command sequence fails:

  make distclean
  ./autogen.sh c
  make distcheck

That's because the command invoked to build man/systemd.directives.xml needs
man/custom-entities.ent to function, which itself isn't a dependency.

The $(filter-out $<,$^) logic used to filter out everything from the
prerequisites except for the first word, which doesn't work anymore
now. Use $(SOURCE_XML_FILES) instead.
2015-06-10 20:42:56 +02:00
Mike Gilbert
4061eed4d9 Include tools/compile-unifont.py in the source tarball
This prevents a build failure when /usr/share/fonts/unifont/unifont.hex
is newer than unifont-glyph-array.bin.
2015-06-10 20:30:42 +02:00
David Herrmann
26589352b2 bus: we now support path_namespace=/
Our bloom-filters support root-path matching. Make sure we properly add
the path_namespace= tag.
2015-06-10 20:22:40 +02:00
David Herrmann
744dccdd36 bus: fix pattern matching
DBus-spec defines two different pattern matchings:

  1) Path and namespace prefix matching. In this case, A matches B either
     if both are equal, or if B is fully included in the namespace of A.
     In other words, A has to be a prefix of B, but end with a separator
     character (or the following character in B must be one).

     This is used for path_namespace= and arg0namespace=

  2) The other pattern matching is used for arg0path= which does a two-way
     matching. That is, A must be a prefix of B, or B a prefix of A.
     Furthermore, the prefix must end with a separator.

Fix the sd-bus helpers to reflect that. The 'simple_' and 'complex_'
prefixes don't make any sense now, but.. eh..
2015-06-10 20:22:40 +02:00
David Herrmann
2e90f867f9 bus: fix test-bus-kerne-bloom.c to match properly
Make sure we actually verify our match-rules are executed properly. Right
now all we test is the bloom-matches, which are non-reliable as they leave
through false-positives.
2015-06-10 20:22:40 +02:00
David Herrmann
a867b00226 bus: fix arg0path= two-way matching
DBus spec clearly defines arg0path= to be a two-way matching. That is,
either the matcher or the matchee can be a prefix of the other to match.
This is not possible to implement with bloom-filters. Instead, we'd have
to add a separate filter for each prefix. This is non-trivial, though.
Hence, just skip the match for now and match locally.
2015-06-10 20:22:40 +02:00
David Herrmann
7cd4dbe9ca bus: fix bloom_add_prefixes() to add all required data
Lets look at an example where we add arg0="/foo/bar/waldo" to a
bloom-filter. The following strings are added:
  "arg0:/foo/bar/waldo"
  "arg0-slash-prefix:/foo/bar"
  "arg0-slash-prefix:/foo"

Two problems arise:

1) If we match on "arg0path=/foo/bar/waldo", the dbus-spec explicitly
states that equal strings are also considered prefixes. However, in the
bloom-match, we can only provide a single match-filter. Therefore, we have
to add "arg0-slash-prefix:/foo/bar/waldo" there, but this never occured in
the bloom-mask of the message.
Hence, this patch makes sure bloom_add_prefixes() adds the full path as
prefix, too.

2) If we match on "arg0path=/foo/", the dbus-spec states that arg0path
does prefix-matching with the trailing slash _included_, unlike
path_namespace= matches, which does *not* include them. This is
inconsistent, but we have to support the specs. Therefore, we must add
prefixes with _and_ without trailing separators.
Hence, this patch makes sure bloom_add_prefixes() adds all prefixes with
the trailing slash included.

The final set of strings added therefore is:
  "arg0:/foo/bar/waldo"
  "arg0-slash-prefix:/foo/bar/waldo"
  "arg0-slash-prefix:/foo/bar/"
  "arg0-slash-prefix:/foo/bar"
  "arg0-slash-prefix:/foo/"
  "arg0-slash-prefix:/foo"
  "arg0-slash-prefix:/"
2015-06-10 20:22:40 +02:00
Nick Owens
37de250906 libsystemd-network: use domain validation instead of hostname validation for dhcp domain option
previously hostname_is_valid was used to validate domain names, which
would silently drop perfectly valid dns names that were longer than a
single dns label.
2015-06-10 11:15:46 -07:00
Nick Owens
df6cfeeff7 shared: add convenience function for validating dns names 2015-06-10 11:15:46 -07:00
Nick Owens
4ad7f2761d resolve: move dns routines into shared 2015-06-10 11:15:45 -07:00
Lennart Poettering
a315ac4e07 journald: don't employ inner loop for reading from incoming sockets
Otherwise, if the socket is constantly busy we will never return to the
event loop, but we really need to to dispatch other (possibly more
high-priority) events too. Hence, return after dispatching one message
to the event handler, and rely on the event loop calling us back
right-away.

Fixes #125
2015-06-10 20:09:10 +02:00
Tom Gundersen
870395a4d8 sd-network: allow the state dir to be created after the monitor
We now listen for new subdirs of /run/systemd, and /run/systemd/netif in case
/run/systemd/netif/links does not exist.
2015-06-10 20:08:11 +02:00
Daniel Mack
a8467435a0 Merge pull request #147 from poettering/cmsg
util: introduce CMSG_FOREACH() macro and make use of it everywhere
2015-06-10 20:06:43 +02:00
Lennart Poettering
2a1288ff89 util: introduce CMSG_FOREACH() macro and make use of it everywhere
It's only marginally shorter then the usual for() loop, but certainly
more readable.
2015-06-10 19:29:47 +02:00
Tom Gundersen
1f8cc1284c Merge pull request #146 from arvidjaar/pr/udev-import-program-exit-code-man
man: clarify that IMPORT{program} is done only for zero exit code
2015-06-10 19:27:22 +02:00
Zbigniew Jędrzejewski-Szmek
cd32b977fa Fix typo
Follow up for 7c918141ed.
2015-06-10 13:17:38 -04:00
Andrei Borzenkov
9de4d0ce2d man: clarify that IMPORT{program} is done only for zero exit code 2015-06-10 19:43:36 +03:00
Lennart Poettering
5410b2ed62 Merge pull request #142 from teg/sd-network-unref-NULL
sd-network: allow NULL in sd_network_monitor_unref
2015-06-10 16:59:43 +02:00
Daniel Mack
94cf036711 Merge pull request #140 from teg/man-udev-timeout
man: udevd - correct default event timeout
2015-06-10 16:46:17 +02:00
Tom Gundersen
0b3476266f sd-network: allow NULL in sd_network_monitor_unref
Match rest of codebase, we always allow unref'ing NULL.
2015-06-10 16:34:43 +02:00
Zbigniew Jędrzejewski-Szmek
b078b5a7ab Merge pull request #85 from keszybz/selinux-context 2015-06-10 10:20:50 -04:00
Zbigniew Jędrzejewski-Szmek
ad5ecc1138 test-copy: test copy_bytes() 2015-06-10 10:14:40 -04:00
Tom Gundersen
87aeefc31e man: udevd - correct default event timeout
This was changed from 30 to 180 seconds quite some time ago.
2015-06-10 15:59:30 +02:00
Lennart Poettering
aa0d0ed6b8 sd-bus: remove ucred parameter from bus_message_from_header() since we don't use it anymore 2015-06-10 15:52:52 +02:00
Lennart Poettering
3c42e8b281 sd-bus: fix early exit when we lack all data in bus_get_owner_creds_dbus1() 2015-06-10 15:52:52 +02:00
Lennart Poettering
d9cea815b6 build-sys: upgrade shadow variable warnings to errors 2015-06-10 15:52:52 +02:00
Lennart Poettering
b56c4604fa bus-message: remove shadow warning with log_debug_bus_message() 2015-06-10 15:52:52 +02:00
Zbigniew Jędrzejewski-Szmek
2de56f7094 journald: simplify context handling
By using our homegrown function we can dispense with all the iffdefery.
2015-06-10 09:12:57 -04:00
Zbigniew Jędrzejewski-Szmek
c4e6556c46 sd-bus: store selinux context at connection time
This appears to be the right time to do it for SOCK_STREAM
unix sockets.

Also: condition bus_get_owner_creds_dbus1 was reversed. Split
it out to a separate variable for clarity and fix.

https://bugzilla.redhat.com/show_bug.cgi?id=1224211
2015-06-10 09:12:57 -04:00
Lennart Poettering
0748385cc4 Merge pull request #132 from ssahani/bond
networkd: bond  improve logging
2015-06-10 15:10:47 +02:00
Lennart Poettering
521446dbff Merge pull request #138 from utezduyar/use-async-convenience-function-on-setting-hostname
networkd: use async convenience call to set hostname
2015-06-10 15:09:03 +02:00
Lennart Poettering
251811f69b Merge pull request #133 from ssahani/net
networkd: vxlan improve logging
2015-06-10 15:08:48 +02:00
Zbigniew Jędrzejewski-Szmek
d868f2a3a1 sd-bus: do not use per-datagram auxiliary information
SELinux information cannot be retrieved this way, since we are
using stream unix sockets and SCM_SECURITY does not work for
them.

SCM_CREDENTIALS use dropped to be consistent. We also should
get this information at connection time.

https://bugzilla.redhat.com/show_bug.cgi?id=1224211
"SCM_SECURITY was only added for datagram sockets."
2015-06-10 09:03:57 -04:00
Daniel Mack
d16b35b43d Merge pull request #137 from torstehu/correct-typo
sd-bus: Correct typo
2015-06-10 14:21:26 +02:00