]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 years agomacro: drop __extension__, reformat and reindent
Filipe Brandenburger [Tue, 7 Aug 2018 02:15:02 +0000 (19:15 -0700)] 
macro: drop __extension__, reformat and reindent

Drop __extension__, since we don't use gcc -Wpedantic or -ansi.

Reformat code for spacing. Add spaces after commas almost everywhere.
Reindent code blocks in macro definitions, for consistency.

5 years agomachinectl: shorten error logging a bit
Lennart Poettering [Mon, 6 Aug 2018 13:47:03 +0000 (15:47 +0200)] 
machinectl: shorten error logging a bit

5 years agosmack-util: use 'path' paremeter as is if it's already absolute in mac_smack_fix_at()
Franck Bui [Mon, 6 Aug 2018 09:31:04 +0000 (11:31 +0200)] 
smack-util: use 'path' paremeter as is if it's already absolute in mac_smack_fix_at()

5 years agoMerge pull request #9792 from poettering/hashmap-mempool
Zbigniew Jędrzejewski-Szmek [Mon, 6 Aug 2018 12:13:30 +0000 (14:13 +0200)] 
Merge pull request #9792 from poettering/hashmap-mempool

minor hashmap fixes

5 years agoresolve: treat some icmp errors as disconnected
Yu Watanabe [Thu, 2 Aug 2018 06:36:32 +0000 (15:36 +0900)] 
resolve: treat some icmp errors as disconnected

Fixes #9773.

5 years agoresolve: sort headers
Yu Watanabe [Thu, 2 Aug 2018 06:41:48 +0000 (15:41 +0900)] 
resolve: sort headers

5 years agoMerge pull request #9775 from yuwata/follow-up-9766
Zbigniew Jędrzejewski-Szmek [Mon, 6 Aug 2018 05:58:50 +0000 (07:58 +0200)] 
Merge pull request #9775 from yuwata/follow-up-9766

5 years agoresolve: fix error handling of dns_name_is_valid() 9775/head
Yu Watanabe [Thu, 2 Aug 2018 07:54:27 +0000 (16:54 +0900)] 
resolve: fix error handling of dns_name_is_valid()

5 years agoman: mention that Hostname= for DHCP must be a valid DNS domain name
Yu Watanabe [Thu, 2 Aug 2018 07:32:42 +0000 (16:32 +0900)] 
man: mention that Hostname= for DHCP must be a valid DNS domain name

5 years agonetwork: DHCP: ignore error in setting hostname when it is given by uname()
Yu Watanabe [Thu, 2 Aug 2018 07:31:10 +0000 (16:31 +0900)] 
network: DHCP: ignore error in setting hostname when it is given by uname()

C.f. #9759.

5 years agonetwork: use free_and_replace()
Yu Watanabe [Thu, 2 Aug 2018 07:28:44 +0000 (16:28 +0900)] 
network: use free_and_replace()

5 years agonetwork: also check that Hostname= is a valid DNS domain name
Yu Watanabe [Thu, 2 Aug 2018 07:28:23 +0000 (16:28 +0900)] 
network: also check that Hostname= is a valid DNS domain name

5 years agoMerge pull request #8822 from fbuihuu/rfc-tmpfiles-safe-upstream
Lennart Poettering [Fri, 3 Aug 2018 16:11:36 +0000 (18:11 +0200)] 
Merge pull request #8822 from fbuihuu/rfc-tmpfiles-safe-upstream

Make tmpfiles safe

5 years agoman: include libsystemd-pkgconfig.xml in a few more man pages 9792/head
Lennart Poettering [Fri, 3 Aug 2018 15:34:40 +0000 (17:34 +0200)] 
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.

5 years agotest-resolved: follow coding style, use fopen() with 'e'
Lennart Poettering [Fri, 3 Aug 2018 14:48:53 +0000 (16:48 +0200)] 
test-resolved: follow coding style, use fopen() with 'e'

5 years agohashmap: add an explicit assert() for detecting when objects migrated between threads
Lennart Poettering [Fri, 3 Aug 2018 14:46:26 +0000 (16:46 +0200)] 
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

5 years agohashmap: add an environment variable to turn off the memory pool used by hashmaps
Lennart Poettering [Fri, 3 Aug 2018 14:45:21 +0000 (16:45 +0200)] 
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

5 years agoman: be more explicit about thread safety of sd_journal
Lennart Poettering [Fri, 3 Aug 2018 14:43:30 +0000 (16:43 +0200)] 
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.

5 years agoupdate TODO
Lennart Poettering [Fri, 3 Aug 2018 14:41:42 +0000 (16:41 +0200)] 
update TODO

5 years agoMerge pull request #9791 from poettering/user-runtime-dir-fixes
Zbigniew Jędrzejewski-Szmek [Fri, 3 Aug 2018 11:32:01 +0000 (13:32 +0200)] 
Merge pull request #9791 from poettering/user-runtime-dir-fixes

user-runtime-dir@.service fixes

5 years agoMerge pull request #9787 from yuwata/dns-over-tls-log
Lennart Poettering [Fri, 3 Aug 2018 11:11:18 +0000 (13:11 +0200)] 
Merge pull request #9787 from yuwata/dns-over-tls-log

DNS-over-TLS(openssl): fix error handling

5 years agounits: assign user-runtime-dir@.service to user-%i.slice 9791/head
Lennart Poettering [Fri, 3 Aug 2018 08:45:31 +0000 (10:45 +0200)] 
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.

5 years agounits: order user-runtime-dir@.service after systemd-user-sessions.service
Lennart Poettering [Fri, 3 Aug 2018 08:42:09 +0000 (10:42 +0200)] 
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.

5 years agounits: make sure user-runtime-dir@.service is Type=oneshot
Lennart Poettering [Thu, 2 Aug 2018 18:57:56 +0000 (20:57 +0200)] 
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.

5 years agouser-runtime-dir: downgrade a few log messages to LOG_DEBUG that we ignore
Lennart Poettering [Thu, 2 Aug 2018 18:56:34 +0000 (20:56 +0200)] 
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.

5 years agoresolve: openssl: make dnstls_stream_{write,read}() may return zero 9787/head
Yu Watanabe [Thu, 2 Aug 2018 22:18:43 +0000 (07:18 +0900)] 
resolve: openssl: make dnstls_stream_{write,read}() may return zero

5 years agoresolve: fix error handling of SSL_shutdown()
Yu Watanabe [Thu, 2 Aug 2018 21:34:19 +0000 (06:34 +0900)] 
resolve: fix error handling of SSL_shutdown()

5 years agoresolve: fix typo and coding style cleanups
Yu Watanabe [Thu, 2 Aug 2018 21:29:38 +0000 (06:29 +0900)] 
resolve: fix typo and coding style cleanups

5 years agoresolve: clear error queue before calling SSL_*()
Yu Watanabe [Thu, 2 Aug 2018 21:26:58 +0000 (06:26 +0900)] 
resolve: clear error queue before calling SSL_*()

5 years agoman: document that 'nofail' also has an effect on ordering
Lennart Poettering [Thu, 2 Aug 2018 18:05:51 +0000 (20:05 +0200)] 
man: document that 'nofail' also has an effect on ordering

Prompted by #9765

5 years agoMerge pull request #9776 from keszybz/sd-bus-docs
Lennart Poettering [Thu, 2 Aug 2018 15:07:03 +0000 (17:07 +0200)] 
Merge pull request #9776 from keszybz/sd-bus-docs

More man pages for sd-bus and related changes

5 years agoresolve: fix error handling of dns_stream_read()
Yu Watanabe [Thu, 2 Aug 2018 13:38:22 +0000 (22:38 +0900)] 
resolve: fix error handling of dns_stream_read()

5 years agoMerge pull request #9764 from yuwata/hash_ops-cleanups
Zbigniew Jędrzejewski-Szmek [Thu, 2 Aug 2018 13:53:05 +0000 (15:53 +0200)] 
Merge pull request #9764 from yuwata/hash_ops-cleanups

Hash ops cleanups

5 years agoman: add sd_bus_message_rewind(3) 9776/head
Zbigniew Jędrzejewski-Szmek [Thu, 2 Aug 2018 08:38:51 +0000 (10:38 +0200)] 
man: add sd_bus_message_rewind(3)

5 years agoman: document sd_bus_slot_get_bus in sd_bus_slot_ref(3)
Zbigniew Jędrzejewski-Szmek [Wed, 1 Aug 2018 22:00:15 +0000 (00:00 +0200)] 
man: document sd_bus_slot_get_bus in sd_bus_slot_ref(3)

Similar reasoning as for sd_bus_message_get_bus().

5 years agoman: add sd_bus_slot_set_description(3)
Zbigniew Jędrzejewski-Szmek [Wed, 1 Aug 2018 21:56:36 +0000 (23:56 +0200)] 
man: add sd_bus_slot_set_description(3)

5 years agoman: add sd_bus_slot_set_userdata(3)
Zbigniew Jędrzejewski-Szmek [Wed, 1 Aug 2018 21:41:49 +0000 (23:41 +0200)] 
man: add sd_bus_slot_set_userdata(3)

5 years agoman: add sd_bus_message_set_expect_reply(3)
Zbigniew Jędrzejewski-Szmek [Wed, 1 Aug 2018 15:27:31 +0000 (17:27 +0200)] 
man: add sd_bus_message_set_expect_reply(3)

5 years agoman: document sd_bus_message_get_bus() in sd_bus_message_new(3)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 15:47:17 +0000 (17:47 +0200)] 
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.

5 years agoman: add sd_bus_message_verify_type(3)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 14:33:02 +0000 (16:33 +0200)] 
man: add sd_bus_message_verify_type(3)

5 years agosd-bus: verify destination and sender values when setting
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 13:39:46 +0000 (15:39 +0200)] 
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.

5 years agoman: add sd_bus_message_get_type(3)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 12:58:41 +0000 (14:58 +0200)] 
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.

5 years agoman: add sd_bus_slot_ref(3)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 12:15:50 +0000 (14:15 +0200)] 
man: add sd_bus_slot_ref(3)

5 years agoman: document sd_bus_message_new_method_return
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 12:07:02 +0000 (14:07 +0200)] 
man: document sd_bus_message_new_method_return

5 years agomeson: print stats in check-api-docs
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 08:32:20 +0000 (10:32 +0200)] 
meson: print stats in check-api-docs

5 years agoman: document *_with_description functions
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 07:56:43 +0000 (09:56 +0200)] 
man: document *_with_description functions

5 years agoman: add sd_bus_message_new(3)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 07:03:04 +0000 (09:03 +0200)] 
man: add sd_bus_message_new(3)

5 years agoman: move more examples to stand-alone files and use 2-space indentation consistenty
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 06:24:45 +0000 (08:24 +0200)] 
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.)

5 years agoman: clarify what can be NULL in an sd_bus_unrefp call
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jul 2018 06:06:07 +0000 (08:06 +0200)] 
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).

5 years agoman: add sd_bus_message_new_call(3)
Zbigniew Jędrzejewski-Szmek [Thu, 26 Jul 2018 18:00:36 +0000 (20:00 +0200)] 
man: add sd_bus_message_new_call(3)

5 years agoman: add sd_bus_message_new_signal(3)
Zbigniew Jędrzejewski-Szmek [Tue, 24 Jul 2018 21:23:29 +0000 (23:23 +0200)] 
man: add sd_bus_message_new_signal(3)

5 years agobasic: use FAMILY_ADDRESS_SIZE() macro in hash_ops for in_addr_data 9764/head
Yu Watanabe [Tue, 31 Jul 2018 16:18:57 +0000 (01:18 +0900)] 
basic: use FAMILY_ADDRESS_SIZE() macro in hash_ops for in_addr_data

5 years agonetwork: make compare functions safe
Yu Watanabe [Tue, 31 Jul 2018 16:15:23 +0000 (01:15 +0900)] 
network: make compare functions safe

As the variable 'line' is unsigned.

5 years agoMerge pull request #9624 from poettering/service-state-flush
Zbigniew Jędrzejewski-Szmek [Thu, 2 Aug 2018 07:50:39 +0000 (09:50 +0200)] 
Merge pull request #9624 from poettering/service-state-flush

flush out ExecStatus structures when a new service cycle begins

5 years agonetwork: add more log messages in configuring DHCP6 client
Yu Watanabe [Wed, 1 Aug 2018 01:42:49 +0000 (10:42 +0900)] 
network: add more log messages in configuring DHCP6 client

5 years agonetwork: add more log messages in configuring DHCP4 client
Yu Watanabe [Wed, 1 Aug 2018 01:35:17 +0000 (10:35 +0900)] 
network: add more log messages in configuring DHCP4 client

5 years agoMerge pull request #9770 from keszybz/etc-resolved-no-address
Yu Watanabe [Thu, 2 Aug 2018 03:54:50 +0000 (12:54 +0900)] 
Merge pull request #9770 from keszybz/etc-resolved-no-address

Slightly more efficient handling of /etc/hosts blacklist entries

5 years agoresolved: change error handling for manager_etc_hosts_read() 9770/head
Zbigniew Jędrzejewski-Szmek [Wed, 1 Aug 2018 10:41:54 +0000 (12:41 +0200)] 
resolved: change error handling for manager_etc_hosts_read()

The choice what errors to ignore is left to the caller, and the caller is
changed to ignore all errors.

On error, previously read data is kept. So if e.g. an oom error happens, we
will continue to return slightly stale data instead of pretending we have no
entries for the given address. I think that's better, for example when
/etc/hosts contains some important overrides that external DNS should not be
queried for.

5 years agoresolved: keep addresses mapped to ::0 in a separate set
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jul 2018 13:09:13 +0000 (15:09 +0200)] 
resolved: keep addresses mapped to ::0 in a separate set

We'd store every 0.0.0.0 and ::0 entry as a structure without any addresses
allocated. This is a somewhat common use case, let's optimize it a bit.

This gives some memory savings and a bit faster response time too:
'time build/test-resolved-etc-hosts hosts' goes from 7.7s to 5.6s, and
memory use as reported by valgrind for ~10000 hosts is reduced
==18097==   total heap usage: 29,902 allocs, 29,902 frees, 2,136,437 bytes allocated
==18240==   total heap usage: 19,955 allocs, 19,955 frees, 1,556,021 bytes allocated

Also rename 'suppress' to 'found' (with reverse meaning). I think this makes
the intent clearer.

5 years agotest-resolved-etc-hosts: add tests for /etc/hosts parsing
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jul 2018 09:01:21 +0000 (11:01 +0200)] 
test-resolved-etc-hosts: add tests for /etc/hosts parsing

Calling 'build/test-resolved-etc-hosts filename' parses just that file.
This is useful to test against https://hosts.ubuntu101.co.za/hosts.

5 years agoresolved: put /etc/hosts hashmaps in a structure and pass that around
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jul 2018 08:01:46 +0000 (10:01 +0200)] 
resolved: put /etc/hosts hashmaps in a structure and pass that around

This hides the details of juggling the two hashmaps from the callers a bit.
It also makes memory management a bit easier, because those two hashmaps share
some strings, so we can only free them together.

etc_hosts_parse() is made responsible to free the half-filled data structures
on error, which makes the caller a bit simpler.

No functional change. A refactoring to prepare for later changes.

5 years agotest-nss-files: simplify module name handling
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jul 2018 14:06:43 +0000 (16:06 +0200)] 
test-nss-files: simplify module name handling

- drop compatibility with autotools (/.libs/ directory)
- don't special-case "libnss_dns", just try build/libnss_foo.so.2 and libnss_foo.so.2.
  This makes it possible to call e.g. build/test-nss files google.com.

5 years agomeson: drop parens when appending to list
Zbigniew Jędrzejewski-Szmek [Tue, 31 Jul 2018 07:44:11 +0000 (09:44 +0200)] 
meson: drop parens when appending to list

Meson does not care either way, so let's use the simpler syntax. And files()
already gives a list, so nesting this in a list wouldn't be necessary even
if meson did not flatten everything.

5 years agoMerge pull request #9760 from yuwata/resolve-etc-hosts-cleanup
Lennart Poettering [Tue, 31 Jul 2018 08:52:34 +0000 (10:52 +0200)] 
Merge pull request #9760 from yuwata/resolve-etc-hosts-cleanup

resolve: several cleanups of handing /etc/hosts

5 years agoudev: net_id: document predictable names for SR-IOV virtual devices
Evgeni Golov [Mon, 30 Jul 2018 11:56:07 +0000 (13:56 +0200)] 
udev: net_id: document predictable names for SR-IOV virtual devices

5 years agoresolve: support address with ifname in /etc/hosts 9760/head
Yu Watanabe [Tue, 31 Jul 2018 07:12:13 +0000 (16:12 +0900)] 
resolve: support address with ifname in /etc/hosts

5 years agoresolve: use in_addr_data type for storing address
Yu Watanabe [Tue, 31 Jul 2018 06:46:28 +0000 (15:46 +0900)] 
resolve: use in_addr_data type for storing address

5 years agobasic: introduce in_addr_data_hash_ops
Yu Watanabe [Tue, 31 Jul 2018 06:45:38 +0000 (15:45 +0900)] 
basic: introduce in_addr_data_hash_ops

5 years agopath-util: make use of path_join() in path_make_absolute_cwd() 8822/head
Franck Bui [Mon, 16 Jul 2018 15:57:41 +0000 (17:57 +0200)] 
path-util: make use of path_join() in path_make_absolute_cwd()

5 years agotmpfiles: add more tests
Franck Bui [Fri, 13 Apr 2018 13:32:25 +0000 (15:32 +0200)] 
tmpfiles: add more tests

5 years agotmpfiles: don't follow unsafe transitions in path_set_*()
Franck Bui [Tue, 20 Mar 2018 07:58:48 +0000 (08:58 +0100)] 
tmpfiles: don't follow unsafe transitions in path_set_*()

Since all path_set_*() helpers don't follow symlinks, it's possible to use
chase_symlinks(CHASE_NOFOLLOW) flag to both open the files specified by the
passed paths and check their validity (unlike their counterpart fd_set_*()
helpers).

5 years agofs-util: add new CHASE_NOFOLLOW flag to chase_symlinks()
Franck Bui [Thu, 26 Apr 2018 20:46:55 +0000 (22:46 +0200)] 
fs-util: add new CHASE_NOFOLLOW flag to chase_symlinks()

This flag mimics what "O_NOFOLLOW|O_PATH" does for open(2) that is
chase_symlinks() will not resolve the final pathname component if it's a
symlink and instead will return a file descriptor referring to the symlink
itself.

Note: if CHASE_SAFE is also passed, no safety checking is performed on the
transition done if the symlink would have been followed.

5 years agotmpfiles: make create_fifo() safe
Franck Bui [Fri, 27 Apr 2018 16:17:32 +0000 (18:17 +0200)] 
tmpfiles: make create_fifo() safe

5 years agofs-util: introduce mkfifoat_atomic() helper
Franck Bui [Fri, 27 Apr 2018 16:20:38 +0000 (18:20 +0200)] 
fs-util: introduce mkfifoat_atomic() helper

5 years agofileio: make tempfn_random_child() accept empty string as path
Franck Bui [Mon, 30 Jul 2018 13:10:49 +0000 (15:10 +0200)] 
fileio: make tempfn_random_child() accept empty string as path

In this case it simply returns the random generated filename with anything
prefixed.

5 years agotmpfiles: introduce create_fifo()
Franck Bui [Fri, 27 Apr 2018 16:11:26 +0000 (18:11 +0200)] 
tmpfiles: introduce create_fifo()

5 years agotmpfiles: introduce empty_directory()
Franck Bui [Thu, 26 Apr 2018 13:45:17 +0000 (15:45 +0200)] 
tmpfiles: introduce empty_directory()

5 years agotmpfiles: introduce create_directory() and create_subvolume() and make them safe
Franck Bui [Fri, 27 Apr 2018 09:51:14 +0000 (11:51 +0200)] 
tmpfiles: introduce create_directory() and create_subvolume() and make them safe

5 years agobasic/stat-util: introduce is_dir_fd()
Franck Bui [Fri, 20 Jul 2018 07:05:38 +0000 (09:05 +0200)] 
basic/stat-util: introduce is_dir_fd()

5 years agobtrfs-util: introduce btrfs_subvol_make_fd()
Franck Bui [Fri, 27 Apr 2018 15:04:47 +0000 (17:04 +0200)] 
btrfs-util: introduce btrfs_subvol_make_fd()

5 years agobasic/label: introduce mkdirat_label()/mkdirat_errno_wrapper() helpers
Franck Bui [Fri, 27 Apr 2018 10:55:56 +0000 (12:55 +0200)] 
basic/label: introduce mkdirat_label()/mkdirat_errno_wrapper() helpers

5 years agoselinux: introduce mac_selinux_create_file_prepare_at()
Franck Bui [Mon, 2 Jul 2018 08:22:56 +0000 (10:22 +0200)] 
selinux: introduce mac_selinux_create_file_prepare_at()

5 years agosmack: introduce mac_smack_fix_at()
Franck Bui [Sat, 30 Jun 2018 10:19:55 +0000 (12:19 +0200)] 
smack: introduce mac_smack_fix_at()

5 years agotmpfiles: introduce create_directory_or_subvolume()
Franck Bui [Thu, 26 Apr 2018 12:54:20 +0000 (14:54 +0200)] 
tmpfiles: introduce create_directory_or_subvolume()

No functional changes.

5 years agotmpfiles: make create_device() safe
Franck Bui [Thu, 12 Apr 2018 16:33:54 +0000 (18:33 +0200)] 
tmpfiles: make create_device() safe

5 years agotmpfiles: introduce create_device()
Franck Bui [Thu, 12 Apr 2018 16:10:57 +0000 (18:10 +0200)] 
tmpfiles: introduce create_device()

5 years agotmpfiles: make copy_files() safe
Franck Bui [Thu, 12 Apr 2018 10:55:22 +0000 (12:55 +0200)] 
tmpfiles: make copy_files() safe

5 years agotmpfiles: introduce copy_files() routine
Franck Bui [Thu, 12 Apr 2018 10:19:22 +0000 (12:19 +0200)] 
tmpfiles: introduce copy_files() routine

No functional changes.

5 years agotmpfiles: make write_one_file() safe
Franck Bui [Fri, 13 Apr 2018 15:54:09 +0000 (17:54 +0200)] 
tmpfiles: make write_one_file() safe

5 years agotmpfiles: make truncate_file() safe
Franck Bui [Fri, 13 Apr 2018 15:50:49 +0000 (17:50 +0200)] 
tmpfiles: make truncate_file() safe

5 years agotmpfiles: introduce truncate_file() which deals with 'F' exclusively
Franck Bui [Fri, 13 Apr 2018 15:31:22 +0000 (17:31 +0200)] 
tmpfiles: introduce truncate_file() which deals with 'F' exclusively

TRUNCATE_FILE is now handled by a new dedicated function
truncate_file(). Indeed we have to take special care when truncating existing
file since the behavior is only specified for regular files.

Well that's not entirely true for fifo and terminal devices since O_TRUNC is
ignored in this case but even in for these types of file, truncating is
probably not the right thing to do.

It is worth noting that both truncate_file() and create_file() have been
modified so they use fstat(2) instead of stat(2) since both functions are not
supposed to follow symlinks.

5 years agotmpfiles: introduce create_file() which deals with 'f'/'F' exclusively
Franck Bui [Fri, 13 Apr 2018 07:19:24 +0000 (09:19 +0200)] 
tmpfiles: introduce create_file() which deals with 'f'/'F' exclusively

write_one_file() only deals with the 'w' command and 'f'/'F' are now handled by
a new function create_file().

This is primarly done because 'w' is allowed to operate on any kind of files,
not just regular ones.

5 years agotmpfiles: make the stat struct parameter in fd_set_*() optional
Franck Bui [Fri, 13 Apr 2018 09:39:39 +0000 (11:39 +0200)] 
tmpfiles: make the stat struct parameter in fd_set_*() optional

So every callers are not forced to stat() the passed file descriptor before
calling those functions.

5 years agotmpfiles: stat file in item_do() rather than in its callers
Franck Bui [Thu, 24 May 2018 12:17:07 +0000 (14:17 +0200)] 
tmpfiles: stat file in item_do() rather than in its callers

This a slight simplification since all callers of item_do()
(glob_item_recursively() and item_do() itself) stat the file descriptor only
for passing it to item_do().

5 years agoman: move explanations about boolean and time-span value from systemd.unit to systemd...
Yu Watanabe [Fri, 27 Jul 2018 08:52:12 +0000 (17:52 +0900)] 
man: move explanations about boolean and time-span value from systemd.unit to systemd.syntax

Fixes #9735.

5 years agoMerge pull request #9734 from irtimmer/feature/dns-over-tls-openssl
Lennart Poettering [Mon, 30 Jul 2018 12:13:05 +0000 (14:13 +0200)] 
Merge pull request #9734 from irtimmer/feature/dns-over-tls-openssl

resolved: Add OpenSSL as alternative SSL library

5 years agoMerge pull request #9747 from yuwata/workaround-structured-initialization
Lennart Poettering [Mon, 30 Jul 2018 11:25:37 +0000 (13:25 +0200)] 
Merge pull request #9747 from yuwata/workaround-structured-initialization

sd-resolve: use structured initialization and a workaround for nested structs

5 years agoExpanding evdev device match for Razer Blade Stealth (2017)
Mike Palmer [Sun, 29 Jul 2018 06:08:31 +0000 (23:08 -0700)] 
Expanding evdev device match for Razer Blade Stealth (2017)

5 years agoMerge pull request #9742 from yuwata/workaround-9718
Lennart Poettering [Mon, 30 Jul 2018 10:40:20 +0000 (12:40 +0200)] 
Merge pull request #9742 from yuwata/workaround-9718

resolve: add option to toggle reading /etc/hosts

5 years agosd-resolve: workaround for structured initialization to nested structs 9747/head
Yu Watanabe [Sun, 29 Jul 2018 07:04:56 +0000 (16:04 +0900)] 
sd-resolve: workaround for structured initialization to nested structs

When a nested struct is initialized by structured initializer, then
padding space is not cleared by zero. So, before setting values,
this makes explicitly set zero including padding.

This fixes the following false positive warning by valgrind:
```
==492== Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised byte(s)
==492==    at 0x56D0CF7: sendmsg (in /usr/lib64/libpthread-2.27.so)
==492==    by 0x4FDD3C5: sd_resolve_getaddrinfo (sd-resolve.c:975)
==492==    by 0x110B9E: manager_connect (timesyncd-manager.c:879)
==492==    by 0x10B729: main (timesyncd.c:165)
==492==  Address 0x1fff0008f1 is on thread 1's stack
==492==  in frame #1, created by sd_resolve_getaddrinfo (sd-resolve.c:928)
==492==
```