Frantisek Sumsal
7d4f00c88c
mountpoint-util: tmpfs supports uid=/gid= mount options
...
As tmpfs(5) says, both uid= and gid= are supported since kernel 2.5.7 and
the mount utility seems to agree:
```
# stat -c "%U:%G" mnt
root:root
# mount -o uid=testuser,gid=testuser -t tmpfs tmpfs mnt
# stat -c "%U:%G" mnt
testuser:testuser
```
However, systemd-mount currently complains:
```
# systemd-mount --owner testuser -t tmpfs tmpfs mnt
File system type tmpfs is not known to support uid=/gid=, refusing.
```
2022-11-07 00:03:49 +01:00
Lennart Poettering
981cfbe046
process-util: add new FORK_CLOEXEC_OFF flag for disabling O_CLOEXEC on remaining fds
...
Often the fds that shall stay around in the child shall be passed
to a process over execve(), hence add an option to explicitly disable
O_CLOEXEC on them in the child.
2022-11-04 18:53:36 +01:00
Lennart Poettering
ed18c22c98
fd-util: add new fd_cloexec_many() helper
2022-11-04 18:46:42 +01:00
Lennart Poettering
d11c14a981
fd-util: make fd_in_set() (and thus close_all_fds()) handle invalidated fds in the array
...
let's handle gracefully if fds in the specified array are already
invalidated (i.e. negative). This is handy when putting together arrays
on the fly.
2022-11-04 18:45:32 +01:00
Samuel Thibault
ede5a78f50
shutdown: Add Xen kexec support
...
In the Xen case, it's the hypervisor which manages kexec. We thus
have to ask it whether a kernel is loaded, instead of relying on
/sys/kernel/kexec_loaded.
2022-11-02 20:47:41 +01:00
Daan De Meyer
1c265fcd59
namespace: Add hidepid/subset support check
...
Using fsopen()/fsconfig(), we can check if hidepid/subset are supported to
avoid the noisy logs from the kernel if they aren't supported. This works
on centos/redhat 8 as well since they've backported fsopen()/fsconfig().
2022-11-01 16:12:58 +01:00
Jan Janssen
0bab5534b3
coverage: Mark _coverage__exit as noreturn
...
../src/basic/coverage.h:15:48: warning: function '_coverage__exit' could
be declared with attribute 'noreturn' [-Wmissing-noreturn]
2022-11-01 10:23:50 +00:00
Yu Watanabe
4117366a28
btrfs-util: move btrfs_defrag_fd() from fd-util.[ch]
...
After d71ece3f0b , the function is not used
in libbasic or libsystemd anymore. Let's move it to more appropriate
place.
2022-10-25 16:25:46 +09:00
Yu Watanabe
a56dd1580d
string-util: make free_and_strdup_warn() return 1 when new string is assigned
2022-10-24 18:55:11 +09:00
Luca Boccassi
7a329f2bac
Merge pull request #25036 from keszybz/plurals
...
Remove usage of "noun(s)" in messages and docs
2022-10-17 17:12:16 +02:00
Zbigniew Jędrzejewski-Szmek
02df2981b5
meson: drop repeated output in error message
2022-10-17 15:10:53 +02:00
Zbigniew Jędrzejewski-Szmek
0923b4253c
tree-wide: replace "plural(s)" by "plurals"
...
(s) is just ugly with a vibe of DOS. In most cases just using the normal plural
form is more natural and gramatically correct.
There are some log_debug() statements left, and texts in foreign licenses or
headers. Those are not touched on purpose.
2022-10-17 15:10:53 +02:00
Thomas Blume
d72f4a3897
basic/mountpoint-util: skip dependency on quota services for some filesystems
2022-10-14 20:57:30 +02:00
Luca Boccassi
5762dbfad6
Merge pull request #24883 from bluca/extrel_force
...
portable: allow caller to override extension-release name check
2022-10-12 20:20:46 +02:00
Luca Boccassi
a063184097
Merge pull request #24934 from keszybz/remove-nss-lookup
...
Remove nss lookups from pid1
2022-10-12 15:21:40 +02:00
Yu Watanabe
6c65a9e1d6
Merge pull request #24973 from keszybz/simplify-variable-declarations
...
Simplify variable declarations
2022-10-12 19:36:47 +09:00
Luca Boccassi
06768b90a3
portable: allow caller to override extension-release name check
...
When the --force flag is used, do not insist that the extension-release
file has to match the extension image name
2022-10-12 09:57:24 +01:00
Luca Boccassi
192a9b70c2
os-util: split out extension-release xattr helper
2022-10-12 09:57:24 +01:00
Zbigniew Jędrzejewski-Szmek
67f047a6f2
basic/user-util: simplify variable declarations in fget{pw,gr}ent_sane()
2022-10-12 09:18:41 +02:00
Zbigniew Jędrzejewski-Szmek
9154bd57db
basic/chase-symlinks: add note that CHASE_WARN is not for PID 1
...
This should be enough to make us remember that constraint. A more heavy-weight
approach like renaming the option to CHASE_WARN_NSS_LOOKUP would be possible,
but it'd make the callers quite verbose and doesn't seem worth it.
2022-10-12 08:01:01 +02:00
Luca Boccassi
da60182759
Merge pull request #24933 from keszybz/erradicate-strerror
...
Erradicate strerror
2022-10-11 21:47:38 +02:00
Zbigniew Jędrzejewski-Szmek
0b6a47957b
tree-wide: drop () around the first argument of a ternary op
...
https://github.com/systemd/systemd/pull/24933#discussion_r991242789
2022-10-11 16:59:00 +02:00
Zbigniew Jędrzejewski-Szmek
0cf1a4b3a7
Get rid of strerror_safe()
2022-10-11 16:59:00 +02:00
Zbigniew Jędrzejewski-Szmek
f37508d506
tree-wide: get rid of lgtm annotations
...
We now use CodeQL, and LGTM itself is gone. Those old annotations are not
useful for anythign now.
2022-10-11 16:59:00 +02:00
Zbigniew Jędrzejewski-Szmek
f69ae8585f
tree-wide: define and use STRERROR_OR_EOF()
2022-10-11 16:58:21 +02:00
Zbigniew Jędrzejewski-Szmek
2c5d05b3cd
basic: add STRERROR() wrapper for strerror_r()
2022-10-11 16:10:21 +02:00
Zbigniew Jędrzejewski-Szmek
892dc96787
basic/stdio-util: allow xsprintf() to be used without any arguments
...
xsprintf(buf, "…: %m") would fail, now it works.
2022-10-11 16:10:21 +02:00
Lennart Poettering
00675c363f
tree-wide: add ERRNO_IS_XATTR_ABSENT() helper
...
We check the same list of error codes on various xattr operations, and
we should on some more. Add a common helper for this purpose.
2022-10-10 16:00:15 +02:00
Zbigniew Jędrzejewski-Szmek
50c5b991df
basic/errno-util: add helper to protect and set errno in one step
...
This pattern is used in a few places. Those are changed in this patch.
Subsequent patches will add more.
2022-10-10 09:12:21 +02:00
Zbigniew Jędrzejewski-Szmek
6b7834fe5d
basic/log: include the log syntax callback in the errno protection block
...
In general, log_syntax_internal() must keep errno unchanged. But the
call to log_syntax_callback() was added outside of the block protected
by PROTECT_ERRNO.
2022-10-07 16:25:56 +02:00
Luca Boccassi
e96180a88d
Merge pull request #24877 from brauner/namespace_utils
...
namespace-util: add an initial set of tweaks
2022-10-04 21:59:48 +01:00
Christian Brauner
2fe299a320
namespace-util: add in_same_namespace()
...
Add a helper for the canonical way to determine whether two namespaces
are identical.
2022-10-04 18:51:28 +02:00
Christian Brauner
c3b9c418c0
namespace-util: add namespace_info
2022-10-04 18:46:27 +02:00
Christian Brauner
9014fd82f7
missing_sched: add CLONE_NEWTIME
2022-09-30 17:08:57 +02:00
Luca Boccassi
697f082697
Merge pull request #24853 from poettering/resolved-monitor-fixes
...
resolved: various monitor fixes
2022-09-30 15:46:13 +01:00
Jonas Kümmerlin
1355672437
generator: skip fsck if fsck command is missing
...
This is useful for systems which don't have any fsck.
We already skip emitting the fsck dependency when the fsck.$fstype helper
is missing, but fstab-generator doesn't necessarily know the fstype when
handling the root= parameter.
Previously, systemd-fsck was started for these mounts and then exited
immediately because it couldn't find the fsck.$fstype helper.
2022-09-30 15:01:41 +01:00
Lennart Poettering
24fe5e9807
glyph-util: add left arrow special glyph entry
2022-09-30 14:14:48 +02:00
Daan De Meyer
354dc913c5
Merge pull request #24635 from DaanDeMeyer/repart-verity-sig
...
repart: Add support for generating verity sig partitions
2022-09-23 18:53:04 +02:00
Daan De Meyer
2812017cfb
basic: Add strgrowpad0()
2022-09-23 14:10:07 +02:00
Lennart Poettering
497ca785aa
fs-util: add mknodat_atomic()
2022-09-23 09:25:33 +02:00
Lennart Poettering
4f477796f3
fs-util: make mkfifo_atomic() just a shortcut for mkfifoat_atomic()
2022-09-23 09:24:05 +02:00
Lennart Poettering
da9dd029a2
fs-util: replace symlink_atomic() by symlinkat_atomic()
2022-09-23 09:22:36 +02:00
Yu Watanabe
0a935bb850
Merge pull request #24711 from poettering/verify_fsroot_dir-rework
...
find-esp: rework verify_fsroot_dir() a bit
2022-09-21 00:56:00 +09:00
Lennart Poettering
739d9cae40
recurse-dir: use fd_reopen() at one more place
...
Inspired by 83b94cf10e
2022-09-21 00:55:23 +09:00
Lennart Poettering
52f19d9678
stat-util: add statx_mount_same() to check if two stax refer to the same mount
2022-09-20 13:52:01 +02:00
Lennart Poettering
2bd315fb2b
stat-util: add statx_inode_same() helper to check if two statx structs refer to same inode
...
The same as stat_inode_same(), but for struct statx rather than struct
stat.
2022-09-20 13:52:01 +02:00
Lennart Poettering
d45dee7c00
chase-symlinks: don't insist on absolute paths if CHASE_PREFIX_ROOT is set
...
There's little reason to require this, given that we can just say that
if a relative path is specified it is to be read relative to the root.
This fixes a bootctl bug introduced by
3730dc5d5b which didn't bother prefixing
paths as necessary.
2022-09-20 13:52:01 +02:00
Yu Watanabe
f1d93b84bc
mkdir: chase_symlinks_and_stat() does not return 0
...
This reverts commits e22916e61d and
1e146d7382 .
2022-09-19 22:54:05 +09:00
Yu Watanabe
5b4671ec47
Merge pull request #24646 from yuwata/udev-node-symlink_atomic
...
udev: introduce symlink_atomic_full() and use it
2022-09-19 05:25:58 +09:00
Yu Watanabe
28f9bcd65a
path-util: add examples for path_make_relative() and path_make_relative_parent()
...
Addresses https://github.com/systemd/systemd/pull/24646#discussion_r973691797 .
2022-09-19 00:30:29 +09:00