Zbigniew Jędrzejewski-Szmek
a5dfc36ce6
fuzz-unit-file: add one more test case
...
There seems to be no error per se. RequiresMountsFor=%s%s%s..%s%s%s is expanded to
RequiresMountsFor=/bin/zsh/bin/zsh/bin/zsh/bin/zsh/..., which takes a bit of time,
and then we iterate over this a few times, creating a hashmap with a hashmap
for each prefix of the path, each with one item pointing back to the original unit.
Takes about 0.8 s on my machine.
2018-12-10 11:57:26 +01:00
Zbigniew Jędrzejewski-Szmek
4cb06c5949
Use VLA instead of alloca
...
The test is the same, but an array is more readable.
2018-12-10 11:57:26 +01:00
Zbigniew Jędrzejewski-Szmek
60473f0c23
pid1: fix (harmless) off-by-one in PATH_MAX comparison
...
PATH_MAX is supposed to include the terminating NUL byte. But we already
check that there is no NUL byte in the specified path. Hence the maximum
length we can expect is PATH_MAX - 1.
This doesn't change much, but makes this use of PATH_MAX consistent with the
rest of the codebase.
2018-12-10 11:57:26 +01:00
Zbigniew Jędrzejewski-Szmek
f8703ed7e5
basic/path-util: line-break PATH_FOREACH_PREFIX macros
...
Now I can see what they do :]
2018-12-10 11:57:26 +01:00
Zbigniew Jędrzejewski-Szmek
296acffe45
When parsing paths, reject anything above PATH_MAX
...
The check for length is done after path_simplify(), to be nice to paths which
are constructed using specifiers, and have duplicate slashes and stuff.
2018-12-10 11:57:26 +01:00
Zbigniew Jędrzejewski-Szmek
9b674e2581
core/device: fix typo
2018-12-07 15:39:52 +01:00
Yu Watanabe
83da42c3bf
bash-completion: analyze: support 'security'
2018-12-07 08:05:18 +01:00
Zbigniew Jędrzejewski-Szmek
9b73c84739
Merge pull request #11072 from yuwata/fix-networkctl-ip6gre
...
networkctl: fix TYPE field of ip6gre devices
2018-12-07 08:03:32 +01:00
Yu Watanabe
925fb1e1ec
missing: add ARPHRD_IP6GRE
...
This fixes TYPE field of networkctl's output for ip6gre devices.
2018-12-07 11:48:41 +09:00
Yu Watanabe
0b7d48f5f4
af-list,arphrd-list: also include relevant missing_*.h headers
2018-12-07 11:48:41 +09:00
Yu Watanabe
18bf324ab5
journal: use missing_audit.h to generate audit_type-list.txt
2018-12-07 11:48:37 +09:00
Yu Watanabe
54480d649f
cap-list: use missing_capabilty.h to generate list of capabilities
2018-12-07 11:31:22 +09:00
Yu Watanabe
eeef672f0c
Merge pull request #11038 from keszybz/man-timeouts
...
Small improvements for documentation of timeout options
2018-12-07 02:53:40 +01:00
Zbigniew Jędrzejewski-Szmek
2e7e19cafc
systemctl: be nice to users and give hint how to specify "-.mount"
...
https://bugzilla.redhat.com/show_bug.cgi?id=1656639
Using "--" is a trick that is hard to discover. Let's give users a hint:
$ build/systemctl status -.service
build/systemctl: invalid option -- '.'
Hint: to specify units starting with a dash, use "--":
build/systemctl [OPTIONS...] {COMMAND} -- -.service ...
I use program_invocation_name because that's what getopt seems to use.
"::" is used in the option string so that getopt doesn't complain about
a missing argument in case somebody passes "-." as the argument. After all
"." is not a real option.
2018-12-07 02:49:03 +01:00
Zbigniew Jędrzejewski-Szmek
0f495e0123
shared/blkid-util: do not include util.h needlessly
2018-12-07 02:49:03 +01:00
Yu Watanabe
a81921e47e
Revert "pager: close all fds when forking off pager"
...
This reverts commit 55844aebb6 .
As `exe_name_pipe` are closed by safe_fork().
2018-12-06 21:15:55 +01:00
Yu Watanabe
e1eb35db1e
Merge pull request #11056 from poettering/resolved-ifindex
...
resolved: request incoming ifindex for DNS UDP packets, too
2018-12-06 19:29:42 +01:00
Yu Watanabe
1df69c94b1
Merge pull request #11066 from yuwata/test-network-tiny-cleanups
...
test-network: several cleanups
2018-12-06 19:16:53 +01:00
Alexey Bogdanenko
487e33242f
test-resolved: fix error code check in assertion
...
If file "/etc/hosts" does not exist, fopen fails and sets errno to ENOENT
("No such file or directory"). So errno should be compared with ENOENT.
This mistake causes test test-resolved-etc-hosts to fail when run on Debian
image built with mkosi.debian included in the repo. The image does not include
"/etc/hosts" file as it is not created by debootstrap, see debootstrap manpage
https://manpages.debian.org/stretch/debootstrap/debootstrap.8.en.html .
2018-12-06 17:23:05 +01:00
Zbigniew Jędrzejewski-Szmek
871fa294ff
Merge pull request #10935 from poettering/rlimit-nofile-safe
...
Merged by hand to resolve a trivial conflict in TODO.
2018-12-06 17:19:21 +01:00
Yu Watanabe
f0a43eb821
Merge pull request #11063 from yuwata/update-missing-v3
...
missing: split missing.h into small pieces
2018-12-06 16:54:27 +01:00
Yu Watanabe
131717cbb4
test-network: make search_words_in_file() hit multi words
2018-12-06 16:48:42 +01:00
Yu Watanabe
e4eacdb09f
test-network: delete rules before running next test
2018-12-06 16:48:42 +01:00
Yu Watanabe
fa7cd60281
test-network: add a line break after starting networkd
...
This may be ugly. But otherwise, outputs of several check commands
are shown without new line...
2018-12-06 16:48:42 +01:00
Yu Watanabe
e40a58b5bc
test-network: check link before starting dnsmasq
2018-12-06 16:48:42 +01:00
Yu Watanabe
14ecd604a4
test-network: show command outputs
2018-12-06 16:48:41 +01:00
Yu Watanabe
a9bc5e370e
test-network: sort imported modules
2018-12-06 16:48:41 +01:00
Yu Watanabe
09ea6724e7
test-network: sort links and units
2018-12-06 16:48:41 +01:00
Yu Watanabe
14dc033574
test-network: fix typo in class name
2018-12-06 16:48:41 +01:00
Zbigniew Jędrzejewski-Szmek
2d479ff1cc
Merge pull request #10963 from poettering/bus-force-state-change-signal
...
force PropertiesChanged bus signal on all unit state changes
2018-12-06 16:42:21 +01:00
Paweł Szewczyk
6dce3bb401
fd-util: Fix error handling in safe_fclose
...
Function fclose_nointr returns negative value on error.
2018-12-06 16:15:39 +01:00
Zbigniew Jędrzejewski-Szmek
a91f96ad39
Merge pull request #10994 from poettering/sd-bus-tweaks
...
small sd-bus tweaks
2018-12-06 15:26:05 +01:00
Yu Watanabe
801503d22b
Merge pull request #10988 from ssahani/IFLA_BRPORT_MCAST_TO_UCAST
...
networkd: bridge add support to configure multicast_to_unicast
2018-12-06 14:32:52 +01:00
Yu Watanabe
fda96700e4
Merge pull request #11032 from ssahani/invert-rule
...
networkd: RPDB rule - add support to configure inverted rule.
2018-12-06 14:27:36 +01:00
Yu Watanabe
e93672eeac
tree-wide: drop missing.h from headers and use relevant missing_*.h
2018-12-06 13:31:16 +01:00
Yu Watanabe
204f52e32d
lockfile: drop unnecessary headers from lockfile-util.h
2018-12-06 13:31:16 +01:00
Yu Watanabe
893829359a
nsflsgs: drop missing.h and use missing_sched.h
2018-12-06 13:31:16 +01:00
Yu Watanabe
ef118d00eb
util: drop missing.h from socket-util.h
2018-12-06 13:31:16 +01:00
Yu Watanabe
3c94e50486
util: drop missing.h from time-util.c
2018-12-06 13:31:16 +01:00
Yu Watanabe
503f480f8e
missing: move fs or mount related definitions to missing_fs.h
...
This also fixes errnous definition MS_REC -> MS_SLAVE.
2018-12-06 13:30:43 +01:00
Yu Watanabe
311c1a5d0a
missing: drop falloc related definitions
...
All these values are exposed earlier than linux-3.11.
Let's drop them.
2018-12-06 13:28:34 +01:00
Yu Watanabe
22332e339b
missing: move sched.h related definitions to missing_sched.h
2018-12-06 13:28:28 +01:00
Yu Watanabe
dab28f0905
missing: drop old drm related definitions
...
These values are exposed earlier than linux-3.11.
Let's use drm/drm.h.
2018-12-06 13:27:47 +01:00
Yu Watanabe
957c622b86
missing: drop BPF_XOR as we have linux/bpf_common.h
2018-12-06 13:27:23 +01:00
Yu Watanabe
fec6661efd
missing: drop DM_DEFERRED_REMOVE as we have dm-ioctl.h
2018-12-06 13:26:55 +01:00
Yu Watanabe
470f348b97
missing: move definition of secure_getenv() to missing_stdlib.h
2018-12-06 13:26:55 +01:00
Yu Watanabe
b19bb11142
missing: move rand related definitions to missing_random.h
2018-12-06 13:26:55 +01:00
Yu Watanabe
5ee668d2d1
missing: drop TIOCVHANGUP
...
This is defined before linux-3.11. Also, its value depnends on
architecture. So, it is not good to define in this form.
2018-12-06 13:26:48 +01:00
Yu Watanabe
c8a363eb15
missing: add memfd related definitions to missing_mman.h
2018-12-06 13:25:24 +01:00
Yu Watanabe
d7330b60a9
missing: move timer related definition to missing_timerfd.h
2018-12-06 13:25:24 +01:00