Commit graph

37248 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek bd00527779 resolved: rework parsing of /etc/hosts
Do not treat various errors (missing hostname, invalid address) as fatal,
just warn and continue. /etc/hosts is written by humans and we should not
reject the whole file just because a singly entry is not to our liking.

Handle comments as described in hosts(5):
everything from the comment character until the end of the line should be
ignored.

Fixes #10779.

Add tests.
2018-12-10 09:56:56 +01:00
Zbigniew Jędrzejewski-Szmek c9ff152e92 test-dns-domain: print function names 2018-12-05 12:34:57 +01:00
Zbigniew Jędrzejewski-Szmek c65f788b9f test-resolved-etc-hosts: when parsing an external file, skip other tests
This makes timing tests much more useful. So let's simplify things, and just do
the parsing of the external file when that is specified.
2018-12-05 12:34:57 +01:00
Evgeny Vereshchagin 4a165974a3
Merge pull request #11025 from evverx/clang-asan
travis: also run the tests built with clang under ASan+UBsan
2018-12-05 09:19:46 +03:00
Evgeny Vereshchagin 90bdd9daf6
Merge pull request #11051 from poettering/sock-addr-un-len
trick out ubsan
2018-12-05 09:05:02 +03:00
Lennart Poettering 085b39e9df socket-util: Let's trick out ubsan when it validate struct sockaddr_un.sun_path[]
Linux is stupid and sometimes returns a "struct sockaddr_un" that is
longer than its fields, as it NUL terminates .sun_path[] even if it has
full length. ubsan detects this, rightfully. Since this is a Linux
misdesign let's trick out ubsan a bit.

Fixes: #11024
2018-12-04 23:28:14 +01:00
Lennart Poettering 836f9cfebd socket-util: break lines in sockaddr_pretty() signature
It's soo long, let's make this more readable.
2018-12-04 23:28:14 +01:00
Lennart Poettering 994b9d4e90 socket-util: shorten code a bit 2018-12-04 23:28:14 +01:00
Oliver Smith 73da50222c man/daemon.xml: use AM_DISTCHECK_CONFIGURE_FLAGS
Change the man page to recommend setting AM_DISTCHECK_CONFIGURE_FLAGS
instead of DISTCHECK_CONFIGURE_FLAGS. This is the recommended way from
the automake manual, as otherwise the flag can't be overridden by the
user with something like:
  DISTCHECK_CONFIGURE_FLAGS=--some-additional-flags make distcheck

References:
https://www.gnu.org/software/automake/manual/html_node/Checking-the-Distribution.html
https://osmocom.org/issues/3718
2018-12-04 22:45:14 +01:00
Vojtech Trefny 38397c8ce0 rules: watch metadata changes on DASD devices
To make sure the change event is emitted and udev db is updated
after metadata changes.
2018-12-04 20:57:47 +01:00
Lennart Poettering ee589a1882
Merge pull request #11041 from yuwata/update-missing-v2
missing: separate missing.h more
2018-12-04 16:19:02 +01:00
Lennart Poettering 1e9e7196cb
Merge pull request #11042 from yuwata/tiny-coding-style-fixes
Tiny coding style fixes
2018-12-04 16:15:09 +01:00
Chris Down aad1e6be99 cgroup: Use varname for cgroup_disable documentation
The current use of literal + replaceable is pretty ugly as it usually
ends up with cgroup_disable= rendered in quotes, which looks really
weird, and this doesn't conform with others of a similar type (for
example, the earlier `DefaultDependencies=no` discussion in the same
file.
2018-12-04 14:59:32 +01:00
Zbigniew Jędrzejewski-Szmek 0c630f4bf8
Merge pull request #11037 from poettering/json-table
optionally output tables as JSON
2018-12-04 14:32:10 +01:00
Lennart Poettering ea900d2bfe
Merge pull request #11009 from poettering/root-cgroup-again
tweak root cgroup attribute fiddling for cgroupsv1 again
2018-12-04 12:33:03 +01:00
Yu Watanabe 36dd5ffd5d util: drop missing.h from util.h 2018-12-04 10:00:34 +01:00
Yu Watanabe f2a3de0116 tree-wide: add whitespace between type and variable name 2018-12-04 09:29:54 +01:00
AsciiWolf 879175daa4 l10n: update Czech Translation 2018-12-04 09:25:39 +01:00
Yu Watanabe b403758ce0 ip-protocol-list: sort headers 2018-12-04 09:18:21 +01:00
Yu Watanabe 38e0c63d72 missing: move char{16,32}_t definitions to missing_type.h 2018-12-04 08:38:18 +01:00
Yu Watanabe 8ca2702f00 missing: move capabilities to missing_capability.h 2018-12-04 08:38:14 +01:00
Yu Watanabe 2a03bb3e65 missing: move prctl related entries to missing_prctl.h 2018-12-04 08:34:46 +01:00
Yu Watanabe e01819f84b missing: move statx related definitions to missing_stat.h 2018-12-04 08:27:50 +01:00
Yu Watanabe 1e54f0ab15 missing: move entries defined in magic.h to missing_magic.h 2018-12-04 07:55:23 +01:00
Yu Watanabe 31c2ddabea missing: move input related entries to missing_input.h 2018-12-04 07:51:52 +01:00
Yu Watanabe 3843e8260c missing: rename securebits.h to missing_securebits.h 2018-12-04 07:49:24 +01:00
Yu Watanabe b9683baffe missing: move btrfs related entries to missing_btrfs.h and missing_btrfs_tree.h 2018-12-04 07:46:59 +01:00
Yu Watanabe d7276b61bd missing: move missing entries in keyctl.h to missing_keyctl.h 2018-12-04 07:42:32 +01:00
Yu Watanabe 475c18f06a meson: add missing missing_*.h 2018-12-04 07:34:47 +01:00
William A. Kennington III 3a5d89fa82 analyze: Fix if not HAVE_SECCOMP
The new systemd analyze code dependend on routines provided by
libseccomp even if HAVE_SECCOMP is false. This expands the code disabled
in analyze-security to make sure we don't depend on seccomp.
2018-12-04 13:51:59 +09:00
Yu Watanabe b1c7e54ad7
Merge pull request #11039 from yuwata/fix-11036
missing: re-add mistakenly dropped entries
2018-12-04 13:48:47 +09:00
Evgeny Vereshchagin 05b36f1f65 travis: install llvm to get llvm-symbolizer
See https://clang.llvm.org/docs/AddressSanitizer.html#symbolizing-the-reports
2018-12-04 04:56:02 +01:00
Yu Watanabe 22b749d6ef missing: rearrange missing_if_link.h to support centos 2018-12-04 02:35:36 +01:00
Yu Watanabe b6459df80f missing: re-add mistakenly dropped entries
These entries are mistakenly dropped by 9714c020fc.

Fixes #11036.
2018-12-04 01:45:14 +01:00
Evgeny Vereshchagin b8366c5497 travis: also run the tests built with clang under ASan+UBsan 2018-12-04 01:10:13 +01:00
Lennart Poettering 94a80afed4 format-table: never try to reuse cells that have color/url/uppercase set
The table cell reusing code is supposed to be an internal memory
optimization, and not more. This means behaviour should be the same as
if we wouldn't reuse cells.
2018-12-03 22:42:38 +01:00
Lennart Poettering 9969b54279 tree-wide: specify all table headers in lower-case 2018-12-03 22:42:38 +01:00
Lennart Poettering 359abf6dd0 format-table: add option to uppercase cells on display
This adds a per-cell option for uppercasing displayed strings.
Implicitly turn this on for the header row. The fact that we format the
table header in uppercase is a formatting thing after all, hence should
be applied by the formatter, i.e. the table display code.

Moreover, this provides us with the benefit that we can more nicely
reuse the specified table headers as JSON field names, like we already
do: json field names are usually not uppercase.
2018-12-03 22:42:38 +01:00
Lennart Poettering ad9d139e02 machinectl: optionally output table in JSON 2018-12-03 22:42:38 +01:00
Lennart Poettering e3483674ec loginctl: optionally output table in json
This works now:

  $ loginctl list-session --output=json-pretty
2018-12-03 22:42:38 +01:00
Lennart Poettering 31ac235771 format-table: optionally covert/output table to JSON 2018-12-03 22:42:38 +01:00
Lennart Poettering c93d372d7c format-table: use right field for display
Since .timespan and .timestamp are unionized on top of each other this
doesn't actually matter, but it is still more correct to address it
under it's correct name.
2018-12-03 22:42:38 +01:00
Lennart Poettering e4cbdffe28 output-mode: add new helper OUTPUT_MODE_IS_JSON()
Just a pretty way to determine whether the selected output mode is a
JSON output mode.
2018-12-03 22:42:38 +01:00
Lennart Poettering 9e964bb8e4 output-mode: add generic helper to pick right JsonFormatFlags for given OutputMode 2018-12-03 22:42:38 +01:00
Lennart Poettering ab91733c7e json: add new display flag JSON_FORMAT_COLOR_AUTO
Typically we want to enable color when colors_enabled() says so, hence
let's automatize this.
2018-12-03 22:42:38 +01:00
Lennart Poettering 897f099bb0 json: introduce explicit type for json formatting flags 2018-12-03 22:42:38 +01:00
Lennart Poettering 63e688cc3b
Merge pull request #11031 from poettering/gcc-attr-cleanup
various gcc attribute clean-ups
2018-12-03 21:59:00 +01:00
David Malcolm 1e8817b327 analyze: tweak wording of description for ProtectSystem= (#11035) 2018-12-03 21:57:09 +01:00
Lennart Poettering a365325e04
Merge pull request #10567 from cdown/disable_controller
cgroup: Add DisableControllers= directive to disable controller in subtree
2018-12-03 18:58:29 +01:00
Lennart Poettering 76b31bbb24
Merge pull request #10920 from yuwata/hashmap-destructor
hashmap: make hashmap_free() call destructors of key or value
2018-12-03 17:59:44 +01:00