summaryrefslogtreecommitdiffstats
path: root/src/timesync (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-07-29shared/install: typoZbigniew Jędrzejewski-Szmek1-1/+1
2019-07-19test-fs-util: call test functions in order of declarationZbigniew Jędrzejewski-Szmek1-2/+2
2019-07-19Create src/shared/unit-file.[ch] for unit-file related opsZbigniew Jędrzejewski-Szmek17-54/+76
So far we put such functinos in install.[ch], but that is tied too closely to enable/disable. Let's start moving things to a place with a better name.
2019-07-19shared/dropin: rename function for clarityZbigniew Jędrzejewski-Szmek1-2/+4
The caller looks for directories and is called "..._find_dirs()". Here, there is no "finding" going on, so I found the old name confusing.
2019-07-19shared/dropin: use TAKE_PTR in one more placeZbigniew Jędrzejewski-Szmek1-19/+11
2019-07-19basic/path-util: move two path_simplify* functions to be adjacentZbigniew Jędrzejewski-Szmek2-54/+54
No functional change.
2019-07-19pid1: get rid of unit_supported() helperZbigniew Jędrzejewski-Szmek2-7/+3
Another case where "open code" is easier to read than the helper.
2019-07-19basic/set: constify operations which don't modify SetZbigniew Jędrzejewski-Szmek4-14/+14
No functional change, but it's nicer to the reader.
2019-07-19pid1: do not say "(null)" if no disabled controllersZbigniew Jędrzejewski-Szmek1-1/+1
It looks like we made a mistake. The list is just empty, that's all.
2019-07-19pid1: simplify timestamp buffer declarationZbigniew Jędrzejewski-Szmek1-14/+8
2019-07-19Rename test-unit-file to test-load-fragmentZbigniew Jędrzejewski-Szmek2-1/+1
This file was testing a mix of functions from src/core/load-fragment.c and some from src/shared/install.c. Let's name it more appropriately. I want to add tests for the new unit-file.c too.
2019-07-19test-unit-file: move some tests to new test-env-file.cZbigniew Jędrzejewski-Szmek3-130/+147
2019-07-19test-hashmap: move tests which should also apply to ordered hashmaps and add ↵Zbigniew Jędrzejewski-Szmek2-58/+66
comment Effectively this does two more tests also for ordered hashmaps. This setup is a bit confusing, let's add a comment.
2019-07-19basic/hashmap: add hashops variant that does strdup/freeing on its ownZbigniew Jędrzejewski-Szmek5-0/+60
So far, we'd use hashmap_free_free to free both keys and values along with the hashmap. I think it's better to make this more encapsulated: in this variant the way contents are freed can be decided when the hashmap is created, and users of the hashmap can always use hashmap_free.
2019-07-19test-strv: add function headersZbigniew Jędrzejewski-Szmek1-7/+86
2019-07-19sysusers,strv: export the hash ops to map char* → strvZbigniew Jędrzejewski-Szmek3-35/+67
Also make string_strv_hashmap_put return 0 only if the entry already existed.
2019-07-19basic/unit-name: allow unit_name_to_instance() to be used to classify unitsZbigniew Jędrzejewski-Szmek3-19/+25
This could already be done by calling unit_name_is_*(), but if we don't know if the argument is a valid unit name, it is more convenient to have a single function which returns the type or possibly an error if the unit name is not valid. The values in the enum are sorted "by length". Not really important, but it seems more natural to me.
2019-07-19basic/unit-name: drop unused functionZbigniew Jędrzejewski-Szmek1-5/+0
2019-07-19path-util: add path_startswith_strv()Zbigniew Jędrzejewski-Szmek3-11/+37
2019-07-19test-path-util: add function headersZbigniew Jędrzejewski-Szmek1-0/+33
2019-07-17systemctl: call the unit dbus path dbus_path everywhereZbigniew Jędrzejewski-Szmek1-22/+22
Similar variables had differing names: unit, path, unit_path. We also have file system paths in surrounding code. Let's make this easier for the reader and use "dbus_path" consistently.
2019-07-17pid1: kill unit_file_find_dropin_paths() helperZbigniew Jędrzejewski-Szmek3-20/+9
It had two users, but it is just a very thin wrapper around unit_file_find_dropin_paths(), so using it seems more complicated than directly invoking unit_file_find_dropin_paths() twice.
2019-07-17man: rework the description of Aliases and .wants/.requires directoriesZbigniew Jędrzejewski-Szmek1-26/+32
The description of Alias= wasn't incorrect, but it sounded like Alias= creates a different type of dependency, while it's just a glorified way to create symlinks. Also recommend 'preset' in addition to 'enable'. Describe .wants/.requires dirs as equals, without implying that the [Install] section can only be used for .wants. The text was partially out of date (systemd-networkd.service now creates as alias in /etc, not /usr/lib, let's just not say anything about the full path).
2019-07-17mount-util: bind_remount: avoid calling statvfsJakob Unterwurzacher1-4/+27
The commit "util: Do not clear parent mount flags when setting up namespaces" introduced a statvfs call read the flags of the original mount and have them applied to the bind mount. This has two problems: (1) The mount flags returned by statvfs(2) do not match the flags accepted by mount(2). For example, the value 4096 means ST_RELATIME when returned by statvfs(2), but means MS_BIND when passed to mount(2). (2) A call to statvfs blocks indefinitely when ran against a disconnected network drive ( https://github.com/systemd/systemd/issues/12667 ). We already use libmount to parse `/proc/self/mountinfo` but did not use the mount flag information from there. This patch changes that to use the mount flags parsed by libmount instead of calling statvfs. Only if getting the flags through libmount fails we call statvfs. Fixes https://github.com/systemd/systemd/issues/12667
2019-07-17core: ExecCondition= for servicesAnita Zhang21-23/+225
Closes #10596
2019-07-17test/test-functions: fix install_dmeventd to correctly install bin/libsDan Streetman1-28/+1
2019-07-17Free up some resources on Azure PipelinesEvgeny Vereshchagin2-71/+0
Let's drop the tests we also run on CentOS CI to free up some resources for something more useful.
2019-07-17test/test-functions: instmods call to find should use -type fDan Streetman1-1/+1
without using -type f, the logs print an error such as: E: E: modprobe: FATAL: Module asymmetric_keys not found in directory /lib/modules/4.15.0-54-generic while this doesn't appear to cause problems, it can be extremely distracting when trying to debug real failures.
2019-07-17test: when stripping binaries, ignore case in suppressing "File format not ↵Dan Streetman1-1/+1
recognized" The grep -v matches all lowercase, but "file" is captialized; just ignore case so it's suppressed for either all lowercase or capital File.
2019-07-17test: ignore errors during test cleanup, so cleanup can finishDan Streetman2-17/+18
Also move TESTDIR and STATEFILE removal into test_cleanup
2019-07-17test: add create_empty_image_rootdir() to simplify testcase setupDan Streetman32-197/+76
Almost all tests were manually mounting/unmounting $TESTDIR/root from the loopback image; this moves all that into test-functions so the test setup functions are simplier. Also add test_setup_cleanup() function, to cleanup what is mounted by create_empty_image_rootdir()
2019-07-16test-network: drop warn_about_firewalld() as it is not necessary any moreYu Watanabe1-9/+0
2019-07-16test-network: stop firewalld in setUpModule()Yu Watanabe1-7/+14
2019-07-16test-network: add tests for link state file vs resolvectl or timedatectlYu Watanabe2-0/+107
2019-07-16resolve: fix memleakYu Watanabe1-0/+3
2019-07-16bash-completion: support ntp-servers and revert command for timedatectlYu Watanabe1-0/+9
2019-07-16timedatectl: add 'ntp-servers' and 'revert' commands to modify link NTP serversYu Watanabe2-0/+117
2019-07-16resolvectl: support networkd managed interfacesYu Watanabe2-150/+253
Closes #9808.
2019-07-16network: implement DBus methods to set DNS related propertiesYu Watanabe10-56/+865
2019-07-16resolve: expose dns_server_address_valid()Yu Watanabe5-18/+19
2019-07-16network: introduce GetLinkByName and GetLinkByIndex bus methodsYu Watanabe2-0/+79
2019-07-16network: implement ListLinks DBus methodYu Watanabe2-0/+46
2019-07-16network: move manager dbus prototypes to networkd-manager-bus.hYu Watanabe5-3/+13
2019-07-16pid1: make sure to restore correct default values for some rlimitsFranck Bui1-60/+106
Commit fb39af4ce42d7ef9af63009f271f404038703704 forgot to restore the default rlimit values (RLIMIT_NOFILE and RLIMIT_MEMLOCK) while PID1 is reloading. This patch extracts the code in charge of initializing the default values for those rlimits in order to create dedicated functions, which take care of their initialization. These functions are then called in parse_configuration() so we make sure that the default values for these rlimits get restored every time PID1 is reloading its configuration.
2019-07-16test-network: extend sleep timeYu Watanabe1-4/+4
Even if addresses provided by DHCP is assigned, the state file may not be written yet, or resolved may not receive the state change signal yet, or resolved may not process the signal yet...
2019-07-16network: do not configure routes when dropping addressesYu Watanabe2-0/+10
Follow-up for 4ff296b02411bb4f0dc38f48cbab06f8645d2a08.
2019-07-16coredump: (void)ify all calls of iovw_put_string_field() where we ignore ↵Franck Bui1-27/+28
failure on purpose All those calls are dealing with optional metadata.
2019-07-16coredump: gather all process metadata in iovecs first and then cache themFranck Bui1-247/+260
Now we first gather all process metadata and populate the process info cache with them. In this way, the cache only references metadata recorded in iovecs[] so there's no need to bother freeing (part of) cached metadata later. The other advantage is that the coredump handler mode and the service mode are more similar as the cache is populated in the same way for both cases. It also renames the array indexes so it becomes clear which metadata are passed by the kernel and which ones are retrieved from the runtime environment.
2019-07-16coredump: use 'input_fd' name for the pipe fd passed by the kernel everywhereFranck Bui1-5/+5
'input_fd' variable name is used mostly everywhere except in process_socket() where it's named 'coredump_fd', which is pretty confusing since 'coredump_fd' is used for the coredump filename in submit_coredump(). So let's use 'input_fd' consistently as name for the pipe fd passed by the kernel. No functional changes.
2019-07-16tests: bump up QEMU_MEMEvgeny Vereshchagin1-1/+1