Zbigniew Jędrzejewski-Szmek
28add648a8
coredump: use uid_is_system() when appropriate
2020-09-25 17:18:56 +02:00
Zbigniew Jędrzejewski-Szmek
98dcb8f4c7
Move {uid,gid}_is_*() from basic to shared
...
Those are functions that express policy, and nothing in basic/ uses
(or should use) them.
2020-09-25 17:18:56 +02:00
Zbigniew Jędrzejewski-Szmek
960b585ba1
Merge pull request #17145 from poettering/kill-chmod-and-chown-unsafe
...
remove chmod_and_chown_unsafe()
2020-09-24 09:40:56 +02:00
Lennart Poettering
bcaf20dc38
Merge pull request #17143 from keszybz/late-exec-resolution-alt
...
Late exec resolution (subset)
2020-09-24 09:38:36 +02:00
germanztz
73439a3d76
hwdb: add Medion Akoya E2221T MD60691 ( #17147 )
2020-09-24 09:33:43 +02:00
Charles Lee
19ad553442
Translated using Weblate (Chinese (Simplified))
...
Currently translated at 63.1% (118 of 187 strings)
Co-authored-by: Charles Lee <lchopn@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/zh_CN/
Translation: systemd/master
2020-09-24 09:30:56 +02:00
Kyle Huey
fbccb980e5
random-util: Add an environment variable to disable RDRAND.
...
SYSTEMD_RDRAND=0 will prevent using RDRAND even on systems whose CPUID claims
to support it. All other values have no effect.
Fixes : #17112
2020-09-24 09:22:45 +02:00
Anita Zhang
6de6f4891f
Merge pull request #17142 from poettering/catalog-fix-de
...
catalog: add missing @ to German catalog file
2020-09-23 23:41:38 -07:00
Anita Zhang
8f4946dc8b
Merge pull request #17146 from poettering/use-more-proc-mounted
...
use proc_mounted() more
2020-09-23 23:39:20 -07:00
Lennart Poettering
c7828862b3
Merge pull request #17118 from poettering/sync-shutdown-loop
...
fsync() block devices before detaching them during shutdown
2020-09-23 21:47:03 +02:00
Lennart Poettering
dee1f028f5
Merge pull request #17144 from poettering/mount-nofollow
...
tree-wide: mostly avoid following symlinks when mounting
2020-09-23 21:46:02 +02:00
Lennart Poettering
1f40142721
update TODO
2020-09-23 18:57:37 +02:00
Lennart Poettering
890084db03
tree-wide: port remaining umount() calls to umount_verbose()
2020-09-23 18:57:37 +02:00
Lennart Poettering
21935150a0
tree-wide: switch remaining mount() invocations over to mount_nofollow_verbose()
...
(Well, at least the ones where that makes sense. Where it does't make
sense are the ones that re invoked on the root path, which cannot
possibly be a symlink.)
2020-09-23 18:57:37 +02:00
Lennart Poettering
30f5d10421
mount-util: rework umount_verbose() to take log level and flags arg
...
Let's make umount_verbose() more like mount_verbose_xyz(), i.e. take log
level and flags param. In particular the latter matters, since we
typically don't actually want to follow symlinks when unmounting.
2020-09-23 18:57:36 +02:00
Lennart Poettering
511a8cfe30
mount-util: switch most mount_verbose() code over to not follow symlinks
2020-09-23 18:57:36 +02:00
Lennart Poettering
5012d567a8
mount-util: make sure get_mount_flags() ever follows symlinks
...
It doesn't follow symlinks when we check for the mount flags via
libmount, hence it shouldn't do either when we go via statvfs().
2020-09-23 18:57:36 +02:00
Lennart Poettering
28126409b2
mount-util: add helpers for mount() without following symlinks
2020-09-23 18:57:36 +02:00
Lennart Poettering
e55299da4d
shutdown: also fsync() DM devices before going down
...
Similar reasons as the previous patch.
2020-09-23 18:33:48 +02:00
Lennart Poettering
32c4626c4c
shutdown: also fsync() MD devices when going down
...
Let's make this explicit, just in case this suffers by the same issues
as the loopback devices, and drops in-flight IO when we disassemble it.
2020-09-23 18:33:48 +02:00
Lennart Poettering
1a269c4ee3
shutdown: don't compare pointers with 0
2020-09-23 18:33:48 +02:00
Lennart Poettering
4534b32c73
shutdown: fsync() before detaching loopback devices
...
This is a follow-up for cae1e8fb88
: we
also call the detach ioctls in the shutdown code, hence add the fsync()s
there too, just to be safe.
2020-09-23 18:33:48 +02:00
Lennart Poettering
4265a66a5e
fs-util: check for /proc mounted in access_fd()
...
It's a very basic function very similar to other cases where we go via
/proc/self/fd/, hence do the explicit proc_mounted() check here too.
2020-09-23 18:20:38 +02:00
Lennart Poettering
48d837cd92
fs-util: use strna() on returned strings of fd_get_path() if we don't check its return value
...
Let's make sure to use strna() on the strings returned by fd_get_path()
where we knowingly ignore any failures. We got this right in most cases,
but two were missing.
2020-09-23 18:20:38 +02:00
Lennart Poettering
8fe8f3aaba
basic: update fd_get_path() to use proc_mounted() helper
...
We use it pretty much everywhere else, hence use it here too.
This also changes the error generated from EOPNOTSUPP to ENOSYS, to
match the other cases where we do such a check. One user checked for
EOPNOTSUPP which is updated to check for ENOSYS instead.
2020-09-23 18:20:38 +02:00
Lennart Poettering
1e5bfa2ac8
fs-util: drop chmod_and_chown_unsafe() which is unused now
2020-09-23 18:00:19 +02:00
Lennart Poettering
62c03398ba
sysusers: modernize file backup logic a bit
...
Let's use _cleanup_ magic to clean up files, let's fully operate by fds
whenever we can.
2020-09-23 18:00:19 +02:00
Lennart Poettering
e59d030ff8
update TODO
2020-09-23 15:25:25 +02:00
Zbigniew Jędrzejewski-Szmek
8038b99d0d
run: let systemd resolve the path with RootDirectory=/RootImage=
...
Fixes #13338 .
2020-09-23 14:49:37 +02:00
Zbigniew Jędrzejewski-Szmek
526e3cbbdd
core: don't try to load units from non-absolute paths
...
The error message disagreed with the check that was actually performed. Adjust the check.
2020-09-23 14:49:37 +02:00
Lennart Poettering
3142135098
catalog: add missing @ to German catalog file
2020-09-23 13:56:51 +02:00
Lennart Poettering
6333aa9d46
sd-radv: fix indentation
...
Fix-up for 97efde65d8
2020-09-23 13:44:26 +02:00
Lennart Poettering
d5bc4e6898
machine: fix error code propagation in two cases
2020-09-23 13:24:25 +02:00
Lennart Poettering
6b6737119a
Merge pull request #17130 from keszybz/static-analyzer-cleanups
...
Trivial cleanups based on static analysis
2020-09-23 13:23:56 +02:00
Roy Chen (陳彥廷)
f280aecd38
man: sd_bus_message_new: fix typo
2020-09-23 11:58:08 +02:00
Ronan Pigott
1f0541dace
sd-path: include 'search' in search pathnames
2020-09-23 10:08:44 +02:00
Ronan Pigott
cf18af825a
zsh: add systemd-path completions
2020-09-23 10:07:14 +02:00
Lennart Poettering
2d52f8c46c
Merge pull request #17124 from bluca/copypasta
...
dissect-image: use correct path variable when reading verity signatures, do not refuse verity GPT without /usr partition
2020-09-23 09:43:39 +02:00
Lennart Poettering
3cbf74652b
Merge pull request #17127 from poettering/errno-fixup
...
make more use of errno-util.h macros
2020-09-23 09:43:18 +02:00
Zbigniew Jędrzejewski-Szmek
a5d815bb7f
Merge pull request #16938 from poettering/homed-rtc-wrong
...
homed: don't refuse logins when RTC is wrong
2020-09-22 20:51:39 +02:00
Zbigniew Jędrzejewski-Szmek
2b2919a5ff
Merge pull request #17109 from fbuihuu/udev-opts-tweaks
...
Udev opts tweaks
2020-09-22 18:54:48 +02:00
Zbigniew Jędrzejewski-Szmek
fec5929f8b
shared/conf-parser: drop redundant cast to boolean
...
parse_boolean returns either 0 or 1 or error, and we checked for errors
earlier already.
2020-09-22 18:00:44 +02:00
Zbigniew Jędrzejewski-Szmek
0a9bf7fa59
logind: use _cleanup_ in one more place
2020-09-22 18:00:44 +02:00
Zbigniew Jędrzejewski-Szmek
d52e1c420c
sd-{login,netlink,network}: use TAKE_FD() in more places
2020-09-22 18:00:44 +02:00
Zbigniew Jędrzejewski-Szmek
90e207e41f
test-bus-chat: add missing return value in check
2020-09-22 17:58:11 +02:00
Zbigniew Jędrzejewski-Szmek
afa8ffae99
various: remove assignments of unread variables
2020-09-22 17:58:11 +02:00
Zbigniew Jędrzejewski-Szmek
4ffd4705fb
activate: reduce scope of iterator variable
2020-09-22 17:58:11 +02:00
Zbigniew Jędrzejewski-Szmek
89de370edd
core/namespace: drop bitfield annotations from boolean fields
...
Such microoptimization makes sense when the structure is used in many many copies,
but here's it's not, and the few bytes we save are not worth the extra code the
compiler has to generate:
return ns_info->mount_apivfs ||
ns_info->protect_control_groups ||
ns_info->protect_kernel_tunables ||
...
before:
49b187: 48 8b 45 f8 mov -0x8(%rbp),%rax
49b18b: 0f b6 00 movzbl (%rax),%eax
49b18e: 83 e0 80 and $0xffffff80,%eax
49b191: 84 c0 test %al,%al
49b193: 75 32 jne 49b1c7 <namespace_info_mount_apivfs+0x80>
49b195: 48 8b 45 f8 mov -0x8(%rbp),%rax
49b199: 0f b6 00 movzbl (%rax),%eax
49b19c: 83 e0 08 and $0x8,%eax
49b19f: 84 c0 test %al,%al
49b1a1: 75 24 jne 49b1c7 <namespace_info_mount_apivfs+0x80>
49b1a3: 48 8b 45 f8 mov -0x8(%rbp),%rax
49b1a7: 0f b6 00 movzbl (%rax),%eax
49b1aa: 83 e0 10 and $0x10,%eax
49b1ad: 84 c0 test %al,%al
49b1af: 75 16 jne 49b1c7 <namespace_info_mount_apivfs+0x80>
after:
49b024: 48 8b 45 f8 mov -0x8(%rbp),%rax
49b028: 0f b6 40 07 movzbl 0x7(%rax),%eax
49b02c: 84 c0 test %al,%al
49b02e: 75 2e jne 49b05e <namespace_info_mount_apivfs+0x7a>
49b030: 48 8b 45 f8 mov -0x8(%rbp),%rax
49b034: 0f b6 40 03 movzbl 0x3(%rax),%eax
49b038: 84 c0 test %al,%al
49b03a: 75 22 jne 49b05e <namespace_info_mount_apivfs+0x7a>
49b03c: 48 8b 45 f8 mov -0x8(%rbp),%rax
49b040: 0f b6 40 04 movzbl 0x4(%rax),%eax
49b044: 84 c0 test %al,%al
49b046: 75 16 jne 49b05e <namespace_info_mount_apivfs+0x7a>
2020-09-22 17:58:11 +02:00
Lennart Poettering
36f8cf0163
Merge pull request #17086 from keszybz/developer-mode-default
...
Update dbus docs, make developer mode default
2020-09-22 16:29:28 +02:00
Lennart Poettering
fce93d7aa3
ptyfwd: use ERRNO_IS_DISCONNECT() when checking for disconnection on foreign fds
2020-09-22 16:25:22 +02:00