| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Then, we can shorten many test definitions.
|
|
|
|
|
|
| |
offline-passwd.[ch] are only used by systemd-tmpfiles and the relevant
test. And are not included in libshared. So, it is not suitable to
located under src/shared.
|
|
|
|
| |
As it is common now in our tools.
|
|
|
|
|
| |
The trailing NULL in the argument list is now implied (similar to
what we already have in place in strjoin()).
|
|
|
|
| |
Follow-up for 94566540e3863032df3a8a89f948b94d764ca2b4.
|
|
|
|
| |
Closes #17690.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In many cases the tables are largely the same, hence define a common set
of macros to generate the common parts.
This adds in a couple of missing specifiers here and there, so is more
thant just refactoring: it actually fixes accidental omissions.
Note that some entries that look like they could be unified under these
macros can't really be unified, since they are slightly different. For
example in the DNSSD service logic we want to use the DNSSD hostname for
%H rather than the unmodified kernel one.
|
| |
|
| |
|
|\
| |
| |
| |
| | |
keszybz/tmpfiles-sysusers-disable-standalone-image
tmpfiles,sysusers: disable --image= support in standalone versions
|
| |
| |
| |
| | |
Fixes #17278.
|
| | |
|
|/ |
|
|
|
|
| |
Reported by Fossies.org
|
|\
| |
| | |
copy: optionally recreate hardlinks when copying file trees
|
| |
| |
| |
| | |
Fixes: #7382
|
|/
|
|
|
|
|
|
|
| |
When 4dfaa528d45 was first commited its callers relied on `errno` instead of the
return value for error reporting. Which worked fine, since internally
under all conditions base were set — even if ugly and not inline with
our coding style. Things then got broken in
f8606626ed3c2582e06543550d58fe9886cdca5f where suddenly additional
syscalls might end up being done in the function, thus corrupting `errno`.
|
| |
|
|
|
|
|
|
| |
This simplifies things quite a bit, and is reusable wherever we want to
use statx() later on. Not sure why I didn't do it like this right from
the beginning...
|
|
|
|
|
| |
Let's deal with the msan initialization issue once for all cases instead
of over and over again.
|
|\
| |
| | |
tmpfiles: use statx()
|
| |
| |
| |
| |
| |
| |
| |
| | |
This allows us to properly detect mount points, for free. (Also, allows
us to respect btimes that are newer than the cutoff, which should be
useful when people untar file trees in /var/tmp)
Fixes: #16848
|
|/
|
|
| |
These macros call abs() internally, hence let's simplify invocations.
|
|
|
|
|
| |
Instead of a multiple fixed format helper functions, add an enum and
a single helper, so that it's easier to extend in the future.
|
| |
|
|
|
|
| |
This is otherwise very confusing...
|
|
|
|
|
| |
--user only really works with certain env vars such as XDG_RUNTIME_DIR
set, but that's just weird if --root= is used.
|
| |
|
|
|
|
|
|
| |
The test binary has two modes: in the default argument-less mode, it
just checks that "root" can be resolved. When invoked manually, a root
prefix and user/group names can be specified.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://tools.ietf.org/html/draft-knodel-terminology-02
https://lwn.net/Articles/823224/
This gets rid of most but not occasions of these loaded terms:
1. scsi_id and friends are something that is supposed to be removed from
our tree (see #7594)
2. The test suite defines an API used by the ubuntu CI. We can remove
this too later, but this needs to be done in sync with the ubuntu CI.
3. In some cases the terms are part of APIs we call or where we expose
concepts the kernel names the way it names them. (In particular all
remaining uses of the word "slave" in our codebase are like this,
it's used by the POSIX PTY layer, by the network subsystem, the mount
API and the block device subsystem). Getting rid of the term in these
contexts would mean doing some major fixes of the kernel ABI first.
Regarding the replacements: when whitelist/blacklist is used as noun we
replace with with allow list/deny list, and when used as verb with
allow-list/deny-list.
|
|\
| |
| | |
Fix handling of cases where a duplicate item is added to a set and related cleanups
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Patch contains a coccinelle script, but it only works in some cases. Many
parts were converted by hand.
Note: I did not fix errors in return value handing. This will be done separate
to keep the patch comprehensible. No functional change is intended in this
patch.
|
|/ |
|
|
|
|
|
|
|
| |
Use -Dstandalone-binaries=yes to enable building and installing this standalone
version of the binary without a dependency on the systemd-shared solib.
Also move the list of sources for systemd-tmpfiles to its own meson.build file.
|
|\
| |
| | |
tmpfiles: let's make pstore sysfs failure silent
|
| |
| |
| |
| | |
allowed
|
|/
|
|
|
|
|
|
|
|
|
| |
Old kernels returned EINVAL if quota was off but we tried to manipulate
it anyway. Since
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8a36e408d40606e21cd4e2dd9601004a67b14868
this changed: now ENOTCONN is returned. This of course is a kernel API
compat breakage, but let's not make a fuss and just map EINVAL to
ENOTCONN to make it recognizable the same way everywhere.
Fixes: #15896
|
|\
| |
| | |
tmpfiles: read /etc/passwd + /etc/group with fgetpwent()/fgetgrent() if --root= is specified
|
| |
| |
| |
| | |
without NSS)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are two libc APIs for accessing the user database: NSS/getpwuid(),
and fgetpwent(). if we run in --root= mode (i.e. "offline" mode), let's
use the latter. Otherwise the former. This means tmpfiles can use the
database included in the root environment for chowning, which is a lot
more appropriate.
Fixes: #14806
|
|/
|
|
|
|
|
|
|
| |
As described in #15603, it is a fairly common setup to use a fqdn as the
configured hostname. But it is often convenient to use just the actual
hostname, i.e. until the first dot. This adds support in tmpfiles, sysusers,
and unit files for %l which expands to that.
Fixes #15603.
|
|\
| |
| | |
tmpfiles,sysusers,pid1: add a bunch of more specifiers
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
if we parse an xattr line that has no valid assignment, we might end up
with an empty ->xattr list. Don't hit assert on that, just go on.
Fixes: #15610
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mounted
let's return ENOSYS in that case, to make things a bit less confusng.
Previously we'd just propagate ENOENT, which people might mistake as
applying to the object being modified rather than /proc/ just not being
there.
Let's return ENOSYS instead, i.e. an error clearly indicating that some
kernel API is not available. This hopefully should put people on a
better track.
Note that we only do the procfs check in the error path, which hopefully
means it's the less likely path.
We probably can add similar bits to more suitable codepaths dealing with
/proc/self/fd, but for now, let's pick to the ones noticed in #14745.
Fixes: #14745
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
I think the two names were both pretty bad. They did not give a proper hint
what the difference between the two functions is, and sd_path_home sounds like
it is somehow related to /home or home directories or whatever, when in fact
both functions return the same set of paths as either a colon-delimited string
or a strv. "_strv" suffix is used by various functions in sd-bus, so let's
reuse that.
Those functions are not public yet, so let's rename.
|
|
|
|
| |
Closes: #10855
|