1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
Commit Graph

41521 Commits

Author SHA1 Message Date
Yu Watanabe
ce158189a8 network: do not check deprecated flag in address_is_ready()
Without this change, the address with PreferredLifetime=0 cannot be ready,
and thus, no consequent setting up process does not start.
The bug was introduced by 6aa5773.

Follow-up for b7ed5384ab.

Fixes #13341.
2019-08-19 00:04:42 +09:00
Theo Ouzhinski
651dcdd669 man: add missing comma 2019-08-18 02:27:31 +09:00
Mr-Foo
b1e91af8d9 trivial spelling fixes (#13339) 2019-08-18 01:30:57 +09:00
Dan Streetman
8c03df36fe test/test-functions: add mkdir to import_initdir
This dir is created by create_empty_image_rootdir, as well as indirectly
by some other functions, but it should be created by import_initdir so
the newly-exported $initdir exists and can be used immediately without
relying on other functions to create it.
2019-08-17 12:29:15 -04:00
Dan Streetman
0036ce06cb test: replace $TESTDIR/root with $initdir
The $initdir var is already set to $TESTDIR/root, it should be used
instead of direct use of $TESTDIR/root.
2019-08-17 12:29:08 -04:00
Dan Streetman
f422967529 test: TEST-33 and TEST-36 should use create_empty_image_rootdir
This recently added function handles mkdir and mounting of the empty image,
as well as umounting after test_setup.
2019-08-17 12:28:57 -04:00
Dan Streetman
9e19a8b028 test/test-functions: avoid stderr noise, only umount on cleanup if mountpoint
Only umount it during cleanup if the $TESTDIR/root dir is a mountpoint.
This avoids adding noise to the stderr log such as:

mountpoint: /var/tmp/systemd-test.waLOFT/root: No such file or directory
2019-08-17 12:28:41 -04:00
Yu Watanabe
65c24cd087 test-network: add tests for RoutingPolicyRule.Family=ipv6 and both 2019-08-16 22:02:17 +09:00
Yu Watanabe
f6c6ff97f5 network: add RoutingPolicyRule.Family= setting
Closes #13233.
2019-08-16 22:02:17 +09:00
Yu Watanabe
01fc8e4f43 network: split out copying logic from routing_policy_rule_add_internal() 2019-08-16 22:02:17 +09:00
Yu Watanabe
2d79289525 network: rename AddressFamilyBoolean -> AddressFamily
We usually do not call an extended boolean as XxxBoolean.
2019-08-16 22:02:17 +09:00
Yu Watanabe
ec863cdc20 network: add missing entry in serialization/deserialization 2019-08-16 22:01:17 +09:00
Yu Watanabe
43e08c78c7 network: serialize/deserialize address family 2019-08-16 22:01:17 +09:00
Yu Watanabe
0aabccc87d network: refuse the case To= and From= are in different address family 2019-08-16 22:01:17 +09:00
Zbigniew Jędrzejewski-Szmek
a71eb56788 udev: allow persistent storage rules work for ubi devices
Back in dbbf424c8b, we merged a rule to add
persistent storage for /dev/ubi*, but this rule could have never worked because
of the top-level exclude.

Also set "watch" for /dev/ubi*.
2019-08-16 14:34:16 +02:00
Zbigniew Jędrzejewski-Szmek
5492c62a25 udev: assume all devices which have persistent links also need to be watched
We had two similar lists, but one was accepting many more device types.
I assume that this is by mistake, simply because the lack of device links
is easier to notice than the lack of synthesized event after the device is
written to. This uses the same list in both places, effectively adding
"watch" attribute to /dev/nbd*, /dev/zd*, etc.
2019-08-16 14:34:10 +02:00
Zbigniew Jędrzejewski-Szmek
3a2acd9ee0
Merge pull request #13317 from ddstreet/werror
Fix build warnings, so Ubuntu CI can pass --werror to meson
2019-08-16 10:19:09 +02:00
Yuri Chornoivan
72cbcf3aa4 po: update Ukrainian translation (#13329)
* Update Ukrainian translation

* po: update Ukrainian translation
2019-08-16 09:55:19 +02:00
Lennart Poettering
73fdd47940 unit-file: downgrade accidentaly high-prio debug log message 2019-08-16 07:44:20 +09:00
Lennart Poettering
e226badc9c networkctl: avoid outputting '(null)' for LLDP ports without description 2019-08-16 07:43:34 +09:00
Dan Streetman
4d6c1fce0e src/boot/efi/meson.build: if meson --werror is true, set gcc -Werror
This part of the build does not use the normal meson parameters, so
we need to explicitly check for the meson --werror parameter, and if
it's true, set the gcc -Werror parameter for this subdir's build.
2019-08-15 17:46:58 -04:00
Dan Streetman
4287d0832c src/boot/efi/linux: elide __attribute__((regparm(0))) on non-i386
This attribute is x86_32-only, so when building on non-intel archs it
generates a compiler warning.  When building with -Werror this turns
into an error, so only include the attribute on i386 arch builds.
2019-08-15 16:36:10 -04:00
Dan Streetman
82a0fb328e src/boot/efi/shim: elide __attribute__((sysv_abi)) on non-intel archs
This attribute is x86-only, so when building on non-intel archs it
generates a compiler warning.  When building with -Werror this turns
into an error, so only include the attribute on intel archs.
2019-08-15 16:36:10 -04:00
Dan Streetman
9841802955 src/basic/missing_syscall: add comment lines for PR 13319 changes
Add a comment line explaining that the syscall defines might be
defined to invalid negative numbers, as libseccomp redefines them
to negative numbers if not defined by the kernel headers, which is
not obvious just from reading the code checking for defined && > 0
2019-08-15 19:36:50 +02:00
Evgeny Vereshchagin
ce2098b7e9 README: add an OSS-Fuzz badge
Since bug reports, backtraces, coverage reports and build logs are scattered
across at least four different places and there is no publicly available dashboards
the badge can point to, let's just point it to the build logs, which hopefully are going to be
a little bit more usable once https://github.com/google/oss-fuzz/issues/2690 is
addressed.
2019-08-15 17:34:56 +00:00
Tommi Rantala
e57cd3fb88 update-utmp: fix assertion failure if rescue.target, multi-user.target and graphical.target are all inactive
If rescue.target, multi-user.target and graphical.target are all
inactive, get_current_runlevel() is not able to determine current
runlevel, and returns with zero. This zero runlevel value results to
assertion failure in utmp_put_runlevel().

 # systemctl stop rescue.target multi-user.target graphical.target
 # systemctl start systemd-update-utmp-runlevel.service

 systemd[1]: Stopped target Graphical Interface.
 systemd[1]: Stopped target Multi-User System.
 systemd[1]: Starting Update UTMP about System Runlevel Changes...
 systemd-update-utmp[67]: Assertion 'runlevel > 0' failed at src/shared/utmp-wtmp.c:275, function utmp_put_runlevel(). Aborting.
 systemd[1]: systemd-update-utmp-runlevel.service: Main process exited, code=dumped, status=6/ABRT
 systemd[1]: systemd-update-utmp-runlevel.service: Failed with result 'core-dump'.
 systemd[1]: Failed to start Update UTMP about System Runlevel Changes.

Let's just print a warning in this case and skip the utmp update, to
avoid systemd-update-utmp-runlevel.service failures.
2019-08-14 18:22:09 +02:00
Zbigniew Jędrzejewski-Szmek
15e19aa1fc
Merge pull request #13273 from RPigott/zshcomp
Enable resolvectl zsh completions
2019-08-14 18:21:12 +02:00
Lennart Poettering
636e72bce6 sysusers: properly mark generated accounts as locked
Previously, we'd only set the shell to /usr/bin/nologin and lock the
password for system users. Let's go one step further and also lock the
whole account.

This is a paranoid safety precaution, since neither disabling the shell
like this nor disabling the password is sufficient to lock an account,
since remote shell tools generally allow passing different shells, and
logins into ftp or similar protocols don't know the shell concept anyway.
Moreover, in times of ssh authentication by password is just one
option of authentication among many.

Takes inspiration from the recommendations in usermod(8)'s -L switch:

    "Note: if you wish to lock the account (not only access with a
    password), you should also set the EXPIRE_DATE to 1."
2019-08-14 18:19:56 +02:00
Zbigniew Jędrzejewski-Szmek
5d9bc22ac0
Merge pull request #13298 from RPigott/busctl
zsh: add busctl completions
2019-08-14 18:18:55 +02:00
EtherGraf
8c21fba875 hwdb: acceleration mount matrix for a Medion Akoya E3221 (#13310) 2019-08-14 18:15:50 +02:00
Dan Streetman
59b657296a src/basic/missing_syscall: change #ifndef to #if ! (defined && > 0)
The #ifndef check used to work for missing __NR_* syscall defines, but
unfortunately libseccomp now redefines missing syscall number to negative
numbers, in their public header file, e.g.:
https://github.com/seccomp/libseccomp/blob/master/include/seccomp.h.in#L801

When systemd is built, since it includes <seccomp.h>, it pulls in the
incorrect negative value for any __NR_* syscall define that's included in
the seccomp.h header (for those syscalls that the kernel headers don't
yet define, e.g. when built with older/stable-distro kernels).  This leads
to bugs like:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1821625

This changes the check so that it can override the negative number that
libseccomp defines, instead of trying to use the negative syscall number.
To avoid gcc warnings (which are failures with meson --werror), this checks
without generating a redefinition gcc warning.

I have no idea why libseccomp decided to define missing syscalls
to negative numbers inside their *public* header file, causing
problems like this.
2019-08-14 18:09:47 +02:00
Zbigniew Jędrzejewski-Szmek
b208cbe5b4 shared/unit-file: fix systemctl cat user@.service
I assumed that unit_name_to_instnace() returns NULL if there is no instance.
In fact it returns "", so the check for instance was wrong.

Also avoid unnecessary call to unit_name_is_valid().
2019-08-14 16:20:49 +02:00
Lennart Poettering
24f36fb180
Merge pull request #13302 from yuwata/network-set-put-fixes
network: fixes related to set_put()
2019-08-14 16:18:06 +02:00
Lennart Poettering
87915c1c98
Merge pull request #13318 from ddstreet/s390_seccomp
add s390 pkey_mprotect syscall number, and s390 mmap syscall definitions
2019-08-14 16:13:58 +02:00
Mattias Jernberg
a5a8776ae5 core: Avoid race when starting dbus services
In high load scenarios it is possible for services to be started
before the NameOwnerChanged signal is properly installed.

Emulate a callback by also queuing a GetNameOwner when the match is
installed.

Fixes: #12956
2019-08-14 16:12:31 +02:00
Daniel Black
f364a17dd1 test: ppc64* qemu is qemu-system-ppc64 2019-08-14 07:43:29 +00:00
Francesco Pennica
c8818aebab hwdb: Fix airplane mode spam on HP Spectre x360 Convertible
Added additional rule matching my HP Spectre x360 Convertible from 2015 (skylake)
2019-08-14 12:34:35 +09:00
Ronan Pigott
e4e4e4954c shell-completion: complete --match argument for busctl 2019-08-13 20:27:56 -07:00
Dan Streetman
57311925aa src/shared/seccomp-util.c: Add mmap definitions for s390 2019-08-13 15:40:36 -04:00
Dan Streetman
4f6d0cf807 src/basic/missing_syscall: add s390 syscall number for __NR_pkey_mprotect
The syscall number for s390 was added to the kernel at:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b41c51c8e194c0bdfb4b1778a137aea8246c86cd
2019-08-13 15:40:29 -04:00
Lennart Poettering
9ef3376bc9 TODO: add more, and drop implemented stuff 2019-08-13 14:41:24 +02:00
Frantisek Sumsal
215bffe1b8 test: store coredumps in journal
To make debugging much easier, especially for crashes in tests under
QEMU, let's store the entire coredump bundle in the systemd journal,
which is usually kept around by various CIs. Right now, we usually end
up with a journal, but without the coredump itself, which is pretty
useless.
2019-08-13 07:09:57 +00:00
William Wold
d9fcca14a5 hwdb: Add axis overrides for HP Envy x360 (#13304) 2019-08-13 08:03:55 +10:00
Frantisek Sumsal
d397d2b220
Merge pull request #13303 from yuwata/bootctl-segfaults
bootctl: fix segfaults
2019-08-12 19:16:51 +00:00
William A. Kennington III
d1bdafd214 networkd: Keep track of static neighbors
We need to keep track of the static neighbors that are configured on the
interface so that we can delete stale entries that were removed.
2019-08-12 20:28:19 +09:00
Yu Watanabe
f8a2b09a18 bootctl: arg_dolloar_boot_path() may return NULL 2019-08-12 16:14:07 +09:00
Yu Watanabe
a2ae0d4969 bootctl: clear arg_xbootldr_path when acquire_xbootldr() succeeds 2019-08-12 00:04:44 +09:00
Yu Watanabe
3dc2e7af5f network: add missing link_ref() 2019-08-11 09:11:25 +09:00
Yu Watanabe
75a302b561 network: fix potential memleaks related to set_put() 2019-08-11 08:57:01 +09:00
frederik
4c94a4c2d6 man: add example for IPv6 Prefix Delegation 2019-08-11 06:22:12 +09:00