Commit Graph

34678 Commits

Author SHA1 Message Date
Yu Watanabe fd870bac25 core: introduce cgroup_add_device_allow() 2018-08-06 13:42:14 +09:00
Yu Watanabe 839f187753 core/namespace: drop mount points outside of root even if RootDirectory= is not set 2018-08-06 12:51:33 +09:00
Yu Watanabe 9b68367b3a core/namespace: drop conditions depends on `root` is empty or not
After 0722b35934, the variable `root`
is always set.
2018-08-06 12:51:33 +09:00
Yu Watanabe 10c6e7e51e resolve: fix error handling of dns_name_is_valid() 2018-08-06 10:48:20 +09:00
Yu Watanabe 31ee397327 man: mention that Hostname= for DHCP must be a valid DNS domain name 2018-08-06 10:48:12 +09:00
Yu Watanabe a8494759b4 network: DHCP: ignore error in setting hostname when it is given by uname()
C.f. #9759.
2018-08-06 10:48:02 +09:00
Yu Watanabe 19f9e4e2c8 network: use free_and_replace() 2018-08-06 10:46:05 +09:00
Yu Watanabe 6528693a94 network: also check that Hostname= is a valid DNS domain name 2018-08-06 10:46:05 +09:00
Lennart Poettering 685499007f
Merge pull request #8822 from fbuihuu/rfc-tmpfiles-safe-upstream
Make tmpfiles safe
2018-08-03 18:11:36 +02:00
Lennart Poettering 7647c01d8f man: include libsystemd-pkgconfig.xml in a few more man pages
for some reason this was forgotten for a couple of sd_bus man pages,
let's fix that.
2018-08-03 17:36:11 +02:00
Lennart Poettering 7612719ef4 test-resolved: follow coding style, use fopen() with 'e' 2018-08-03 17:36:11 +02:00
Lennart Poettering 205c085bc3 hashmap: add an explicit assert() for detecting when objects migrated between threads
When clients don't follow protocol and use the same object from
different threads, then we previously would silently corrupt memory.
With this assert we'll fail with an assert(). This doesn't fix anything
but certainly makes mis-uses easier to detect and debug.

Triggered by https://bugzilla.redhat.com/show_bug.cgi?id=1609349
2018-08-03 17:36:11 +02:00
Lennart Poettering b4f607433c hashmap: add an environment variable to turn off the memory pool used by hashmaps
Triggered by https://bugzilla.redhat.com/show_bug.cgi?id=1609349
2018-08-03 17:36:11 +02:00
Lennart Poettering 64a7ef8bc0 man: be more explicit about thread safety of sd_journal
Triggered by https://bugzilla.redhat.com/show_bug.cgi?id=1609349

This adds two generic paragaphs we include via xinclude. One is the
"strict" version, which contains wording saying that we are thread
agnostic and what that means. And the other is the "safe" version, for
the cases we provide fully safety.

Let's then change most man pages to use either of these generic
paragraphs. With one exception: man/sd_journal_get_catalog.xml contains
both kinds of function, we hence use manual wording.
2018-08-03 17:36:11 +02:00
Lennart Poettering af560fc1da update TODO 2018-08-03 16:41:42 +02:00
Zbigniew Jędrzejewski-Szmek 72f6e560ac
Merge pull request #9791 from poettering/user-runtime-dir-fixes
user-runtime-dir@.service fixes
2018-08-03 13:32:01 +02:00
Lennart Poettering 4103c950ff
Merge pull request #9787 from yuwata/dns-over-tls-log
DNS-over-TLS(openssl): fix error handling
2018-08-03 13:11:18 +02:00
Lennart Poettering 1193c11a04 units: assign user-runtime-dir@.service to user-%i.slice
This service won't use much resources, but it's certainly nicer to see
it attached th the user's slice along with user@.service, so that
everything we run for a specific user is properly bound into one unit.
2018-08-03 10:45:31 +02:00
Lennart Poettering eb748aef4f units: order user-runtime-dir@.service after systemd-user-sessions.service
We use systemd-user-sessions.service as barrier when to allow login
sessions. With this patch user@.service is ordered after that too, so
that any login related code (which user-runtime-dir@.service is) is
guaranteed to run after the barrier, and never before.
2018-08-03 10:42:09 +02:00
Lennart Poettering d06e8fbce3 units: make sure user-runtime-dir@.service is Type=oneshot
We order user@.service after it, hence we need to properly know when it
finished starting up.
2018-08-03 10:38:49 +02:00
Lennart Poettering 3a13442bbf user-runtime-dir: downgrade a few log messages to LOG_DEBUG that we ignore
As the comments already say it might be quite likely that
$XDG_RUNTIME_DIR is not set up as mount, and we shouldn't complain about
that.

Moreover, let's make this idempotent, so that a runtime dir that is
already gone and is removed again doesn't cause failure.
2018-08-03 10:38:49 +02:00
Yu Watanabe 8e740110df resolve: openssl: make dnstls_stream_{write,read}() may return zero 2018-08-03 07:19:01 +09:00
Yu Watanabe 8eadd29183 resolve: fix error handling of SSL_shutdown() 2018-08-03 07:18:08 +09:00
Yu Watanabe 36f1946c73 resolve: fix typo and coding style cleanups 2018-08-03 06:29:38 +09:00
Yu Watanabe 59c3fee2c7 resolve: clear error queue before calling SSL_*() 2018-08-03 06:26:58 +09:00
Lennart Poettering e6c7c7ffd5 man: document that 'nofail' also has an effect on ordering
Prompted by #9765
2018-08-02 14:15:44 -07:00
Lennart Poettering 27d4866ad8
Merge pull request #9776 from keszybz/sd-bus-docs
More man pages for sd-bus and related changes
2018-08-02 17:07:03 +02:00
Yu Watanabe 99521cab77 resolve: fix error handling of dns_stream_read() 2018-08-02 17:06:32 +02:00
Zbigniew Jędrzejewski-Szmek 1a167ac4f6
Merge pull request #9764 from yuwata/hash_ops-cleanups
Hash ops cleanups
2018-08-02 15:53:05 +02:00
Zbigniew Jędrzejewski-Szmek 46fdbae32e man: add sd_bus_message_rewind(3) 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek e7015301fb man: document sd_bus_slot_get_bus in sd_bus_slot_ref(3)
Similar reasoning as for sd_bus_message_get_bus().
2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek dee0fccca3 man: add sd_bus_slot_set_description(3) 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 6d4a51820e man: add sd_bus_slot_set_userdata(3) 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek d65044e812 man: add sd_bus_message_set_expect_reply(3) 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 9905256523 man: document sd_bus_message_get_bus() in sd_bus_message_new(3)
It's not a particularly obvious place, but it's a trivial function that isn't
worth a man page of its own, and it doesn't fit anywhere else either.
2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 2c48865bd0 man: add sd_bus_message_verify_type(3) 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 3d51a011f1 sd-bus: verify destination and sender values when setting
We would verify destination e.g. in sd_bus_message_new_call, but allow setting
any value later on with sd_bus_message_set_destination. I assume this check was
omitted not on purpose.
2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 9c9207912e man: add sd_bus_message_get_type(3)
sd_bus_message{get_type,is_signal,is_method_call,is_method_error} get one man
page.

sd_bus_message_{set,get}_{destination,path,interface,member,sender} are put in
the second one.
2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek f16a506418 man: add sd_bus_slot_ref(3) 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 7ddee21716 man: document sd_bus_message_new_method_return 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 65889ab72d meson: print stats in check-api-docs 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek f00ded93e0 man: document *_with_description functions 2018-08-02 15:49:45 +02:00
Zbigniew Jędrzejewski-Szmek 206ed9c1f6 man: add sd_bus_message_new(3) 2018-08-02 15:48:46 +02:00
Zbigniew Jędrzejewski-Szmek 787f78b6a1 man: move more examples to stand-alone files and use 2-space indentation consistenty
Moving them out makes it easier to run them through a compiler, use automatic
indentation, and opens the possibility to provide a download link in the
future. I verified that all examples compile cleanly.

(2-space indentation is used because the examples are already significantly
indented in the man page, and we need to keep them narrow so that they display
well on standard terminals.)
2018-08-02 15:45:24 +02:00
Zbigniew Jędrzejewski-Szmek 2c47fff6d2 man: clarify what can be NULL in an sd_bus_unrefp call
Confusingly, the argument is called 'bus' in all cases. Let's not give people
the idea to call sd_bus_unrefp(NULL).
2018-08-02 15:45:24 +02:00
Zbigniew Jędrzejewski-Szmek cfe8ee463d man: add sd_bus_message_new_call(3) 2018-08-02 15:45:20 +02:00
Zbigniew Jędrzejewski-Szmek e8b84fcca6 man: add sd_bus_message_new_signal(3) 2018-08-02 15:44:25 +02:00
Yu Watanabe 2357724699 basic: use FAMILY_ADDRESS_SIZE() macro in hash_ops for in_addr_data 2018-08-02 17:07:25 +09:00
Yu Watanabe ca52812a94 network: make compare functions safe
As the variable 'line' is unsigned.
2018-08-02 17:06:03 +09:00
Zbigniew Jędrzejewski-Szmek 5b316330be
Merge pull request #9624 from poettering/service-state-flush
flush out ExecStatus structures when a new service cycle begins
2018-08-02 09:50:39 +02:00