Commit Graph

21359 Commits

Author SHA1 Message Date
Lennart Poettering
ca285cdb40 Merge pull request #9422 from yuwata/conf-files
cleanups for default conf files
2018-06-28 10:17:54 +02:00
Yu Watanabe
845d247a3d tree-wide: use 'signed int' instead of 'int' for bit field variables
Suggested by LGTM: https://lgtm.com/rules/1506024027114/
2018-06-28 10:16:51 +02:00
Yu Watanabe
f43580f17d resolve: warn when our stub listener is disabled but resolv.conf uses it
Closes #9450.
2018-06-28 10:06:15 +02:00
Evegeny Vereshchagin
283c265387 sd-bus: stop using the result of an assignment as an operand of &&
This makes OBJECT_PATH_FOREACH_PREFIX consistent with PATH_FOREACH_PREFIX
and also fixes 7 alerts reported by LGTM at
ac0a087003/files/src/libsystemd/sd-bus/bus-objects.c (V1383)
2018-06-28 13:17:29 +09:00
Lennart Poettering
874b5ad248 core: tiny comment fix 2018-06-28 11:55:44 +09:00
Lennart Poettering
a7e2e50d35 summary: update nspawn description string a bit
nspawn as it is now is a generally useful tool, hence let's drop the
comments about it being useful for debug and so on only.

The new wording just makes the first sentence of the main page also the
summary.
2018-06-28 11:55:44 +09:00
Filipe Brandenburger
d7af62d52c sleep: fix one more printf format of a fiemap field
Use PRIu64 constant to get the format right on LP-64 architectures,
cast to (uint64_t) to solve incompatibility of __u64.

This was missed in ad4bc33522, so fix it
with this follow up.
2018-06-28 03:29:21 +09:00
Mike Gilbert
358248caa3 basic: add missing comma in raw_clone assembly for sparc
Fixes: 96f64eb574
Closes: https://github.com/systemd/systemd/issues/9444
2018-06-27 09:16:04 -07:00
Lorenz Hübschle-Schneider
b90cbe6638 cryptsetup: Add dependency on loopback setup to generated units
For loopback volumes, the generated unit needs to depend on
systemd-tmpfiles-setup-dev.service to ensure that loopback
support is loaded.

Fixes #9308
2018-06-27 16:57:17 +02:00
Yu Watanabe
04e075b572 bus-util: make log level lower in request_name_destroy_callback()
Fixes #9442.
2018-06-27 16:56:50 +02:00
Lennart Poettering
a5de5c43e6 Merge pull request #9440 from yuwata/fix-js
journal-gateway: update browse.html
2018-06-27 10:37:36 +02:00
Lennart Poettering
7f818901a2 Merge pull request #9438 from yuwata/lgtm-fixes-2
small fixes suggested by LGTM
2018-06-27 10:36:50 +02:00
Yu Watanabe
a661dc36f6 resolve: reduce number of conversions between ifname and ifindex
This also fixes minor memleak introduced in
654457e560c5723b90b419f7651b87040aade07e.
2018-06-26 23:09:36 -07:00
Filipe Brandenburger
5a01b3f35d resolvconf: fixes for the compatibility interface
Also use compat_main() when called as `resolvconf`, since the interface
is closer to that of `systemd-resolve`.

Use a heap allocated string to set arg_ifname, since a stack allocated
one would be lost after the function returns. (This last one broke the
case where an interface name was suffixed with a dot, such as in
`resolvconf -a tap0.dhcp`.)

Tested:
  $ build/resolvconf -a nonexistent.abc </etc/resolv.conf
  Unknown interface 'nonexistent': No such device

Fixes #9423.
2018-06-26 23:09:36 -07:00
Yu Watanabe
e68131526b analyze: actually select longest activated-time of services
Discovered by LGTM.
2018-06-27 14:54:19 +09:00
Yu Watanabe
944072fedd journal-gateway: use localStorage["cursor"] only when it has valid value
Discovered by LGTM.
2018-06-27 14:50:23 +09:00
Yu Watanabe
c497e449f4 journal-gateway: explicitly declare local variables
Suggested by LGTM.
2018-06-27 14:22:28 +09:00
Yu Watanabe
affaed1e55 sd-bus: fix implicit downcast of bitfield reported by LGTM 2018-06-27 13:28:28 +09:00
Filipe Brandenburger
ad4bc33522 sleep: fix printf format of fiemap fields
Use PRIu64 and PRIu32 constants to also get the format right on LP-64
architectures.

For the 64-bit fields, we need a cast to (uint64_t), since __u64 is
defined as a `long long unsigned` and PRIu64 expects a `long unsigned`.
In practice, both are the same, so the cast should be OK.
2018-06-26 20:39:07 +02:00
Yu Watanabe
e0f691e1fd tree-wide: use localtime_r() instead of localtime()
Follow-up for e46acb7950.
2018-06-26 14:26:39 +09:00
Yu Watanabe
ad16158c10 netdev: do not assign unused values 2018-06-26 14:26:19 +09:00
Jan Janssen
aa2cc005d7 crypt-util: Translate libcryptsetup log level instead of using log_debug()
This makes sure that errors reported by libcryptsetup are shown to the
user instead of getting swallowed up by log_debug().
2018-06-26 14:26:07 +09:00
Yu Watanabe
e761599ffd core: add missing option and drop nonexistent option in system.conf 2018-06-26 04:07:19 +09:00
Yu Watanabe
2dcacc7363 journal: add missing option in journald.conf 2018-06-26 04:05:42 +09:00
Yu Watanabe
a4d5708c79 journal-remote: add license and reference to man page in conf files 2018-06-26 04:04:45 +09:00
Yu Watanabe
3632149409 network: provide default networkd.conf 2018-06-26 03:34:49 +09:00
Lennart Poettering
e46acb7950 timedate: use gmtime_r() and localtime_r()
gmtime() and localtime() operate on a static buffer. let's avoid this,
as we never know whether some library might use these calls in some
backrgound thread.

Discovered by lgtm:

https://lgtm.com/projects/g/systemd/systemd/
2018-06-25 19:20:34 +02:00
Zbigniew Jędrzejewski-Szmek
e49807606d Merge pull request #9411 from poettering/systemctl-is-running-fixes
tiny systemctl fixes
2018-06-25 19:03:31 +02:00
Zbigniew Jędrzejewski-Szmek
dfe23d4145 Merge pull request #4522 from lucaswerkmeister/unescape-template
escape: support --unescape with --template
2018-06-25 18:48:01 +02:00
Lennart Poettering
5e4c5bde5c busctl: make parameter const
it's initialized from an argv[] entry, hence let's be make it
non-writable by default.
2018-06-25 18:26:17 +02:00
Lennart Poettering
bfeec178db systemctl: if we can't detect the system-is-running state, assume it's not running 2018-06-25 17:10:27 +02:00
Lennart Poettering
e686a616e8 systemctl: log errors to LOG_DEBUG rather than eating them up entirely 2018-06-25 17:10:27 +02:00
Lennart Poettering
9897b09ba7 systemctl: add 'static' to constant state array 2018-06-25 17:10:27 +02:00
Filipe Brandenburger
b02a7e1aea resolved: assert t->server is set in dns_transaction_emit_tcp.
Uncovered by Coverity. Fixes CID 1393390.
2018-06-25 13:17:25 +02:00
Filipe Brandenburger
53a2383b8b core/job: add check for return of job_type_merge_and_collapse()
Using an assertion is fine, since calls to job_merge_into_installed()
are protected by a check for job_type_is_conflicting().

Uncovered by Coverity, fixes CID 996307.
2018-06-25 13:16:38 +02:00
Lennart Poettering
2919425bab Merge pull request #9398 from yuwata/lgtm-fixes
fixes error handlings and several cleanups suggested by LGTM
2018-06-25 13:12:44 +02:00
Michal Koutný
1e75824cb0 core/manager: Make sure jobs statistics are not double after daemon-reload
We add n_installed_jobs and n_failed_jobs to our inner state after
deserialization. This is fine during daemon-reexec when we start with clear
Manager (and some jobs possibly queued before deserialization), however,
daemon-reload works with the same manager and adding the values would
effectively double the counters. Reset the counters before we deserialize and
add their values again.
2018-06-25 11:18:44 +02:00
Lucas Werkmeister
d936cddcb5 escape: add --instance option
Suggested by @keszybz in #4522.
2018-06-25 11:17:55 +02:00
Zbigniew Jędrzejewski-Szmek
d3a27ed402 boot: do not assume the last character in cmdline is a newline
Fixes #9401.
2018-06-25 11:17:53 +02:00
Lucas Werkmeister
e563e2534c escape: support --unescape with --template 2018-06-25 11:13:38 +02:00
Yu Watanabe
fb14aa7ecc network: fix log message 2018-06-25 10:31:08 +02:00
Yu Watanabe
a9061d97a7 timesync: update log message
Fixes #9388.
2018-06-25 10:27:18 +02:00
Yu Watanabe
75ca1621db timesync: changes type of drift_freq to int64_t
drift_freq is used for storing timex.freq, and is a 64bit integer.
To support x32 ABI, this changes the type of drift_freq to int64_t.

Fixes #9387.
2018-06-25 10:27:18 +02:00
Yu Watanabe
d5c3091122 install: fix error handling in is_symlink_with_known_name() 2018-06-25 14:07:16 +09:00
Yu Watanabe
99c89da02d portable: fix error handling 2018-06-25 13:56:27 +09:00
Yu Watanabe
d61b34f1b2 import: drop unnecessary condition 2018-06-25 13:54:44 +09:00
Yu Watanabe
712fdfd609 sd-dhcp: drop unnecessary condition 2018-06-25 13:51:34 +09:00
Yu Watanabe
8838f46f93 machine-pool: drop unnecessary condition 2018-06-25 13:49:56 +09:00
Yu Watanabe
6da95857c1 resolve: drop dead code 2018-06-25 13:46:52 +09:00
Yu Watanabe
fa6a69d783 resolve: drop dead code 2018-06-25 13:42:31 +09:00