| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Various trivial cleanups and follow-ups
|
| |
| |
| |
| | |
Let's keep all the timeout definitions in one place.
|
| | |
|
| |
| |
| |
| | |
Let's hide the hard to grasp 62 behind a name.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We should be more careful with distinguishing the cases "all bits set in
caps mask" from "cap mask invalid". We so far mostly used UINT64_MAX for
both, which is not correct though (as it would mean
AmbientCapabilities=~0 followed by AmbientCapabilities=0) would result
in capability 63 to be set (which we don't really allow, since that
means unset).
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The rest of our codebase stores caps masks in a uint64_t, and also
assumes UINT64_MAX was a suitable value for "unset mask". Hence refuse
any caps outside of 0…62.
(right now the kernel knows 40 caps, hence 22 more to go before we have
to reconsider our life's choices.)
|
| |
| |
| |
| | |
Let's use strextend_with_separator() and CAPABILITY_TO_STRING().
|
| |
| |
| |
| |
| |
| |
| | |
allocate fallback buffer
Let's add a helper that can return a numeric string in case we don't
recognize a name for a capability.
|
| |
| |
| |
| |
| |
| |
| |
| | |
We refuse it otherwise currently, simply because we cannot store it in a
uint64_t caps mask value anymore while retaining the ability to use
UINT64_MAX as "unset" marker.
The check actually was in place already, just one off.
|
| |
| |
| |
| |
| | |
Make return parameter optional. And return whether there were any caps
we didn't recognize via 0/1 return value.
|
| |
| |
| |
| |
| | |
We typically don't use the _alloc() suffix anymore for anything, hence
drop it here too.
|
|\ \
| |/
|/| |
Add more openat() helpers of utility functions
|
| | |
|
| |
| |
| |
| | |
This is useful for debugging issues like #26474.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Follow-up for a2b052b29f8bc141e94a4af95d1653a38a57eaeb.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This substantially reworks mempool_cleanup() so that it releases pools
with all freed tiles only, but keeps all pools with still-allocated
tiles around.
This is more correct, as the previous implementation just released all
pools regardless if anything was still used or not. This would make
valgrind shut up but would just hide memory leaks altogether. Moreover
if called during regular runtime of a program would result in bad memory
accesses all over.
Hence, let's add a proper implementation and only trim pools we really
know are empty.
This way we can safely call these functions later, when under memory
pressure, at any time.
|
| |
| |
| |
| |
| |
| |
| | |
To match how we usually do this current allocation code.
(Also, make it accept a NULL pointer, also in order to match behaviour
in the rest of our codebase)
|
| |
| |
| |
| |
| |
| |
| | |
This new helper returns the beginning of the usable area of the pool
object.
For now this is only used once, a later commit will use it more.
|
| | |
|
| | |
|
|/
|
|
|
| |
Let's clean this up and export this always, so that we can later call
when we are under memory pressure.
|
|
|
|
|
| |
Let's add a proper helper for querying the number of threads in a
process.
|
|
|
|
|
|
| |
As suggested here:
https://github.com/systemd/systemd/pull/26450#pullrequestreview-1302922404
|
|\
| |
| | |
sd-event: reduce memory use of sd_event_source objects
|
| | |
|
|\ \
| | |
| | | |
chase-symlinks fixes
|
| | |
| | |
| | |
| | |
| | | |
Instead of special casing "/", let's just always open a dirfd to the
root directory.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Whether we should return an absolute path or not is irrelevant
to whether CHASE_AT_RESOLVE_IN_ROOT is set. We should only return
an absolute path if we are provided one and the directory file
descriptor is AT_FDCWD
- When the directory file descriptor is AT_FDCWD, we should always
resolve symlinks against "/". Currently, if the directory file
descriptor is AT_FDCWD and CHASE_AT_RESOLVE_IN_ROOT is set, we
resolve symlinks against the current working directory which is
almost always not going to be what the caller wants.
- Currently, if we provide an absolute path with a positive directory
file descriptor without CHASE_AT_RESOLVE_IN_ROOT SET, we interpret
the path relative to "/" instead of the given directory file descriptor.
Let's make sure that when we're given a positive directory file
descriptor, we always resolve the given path relative to it.
|
|\ \ \
| | | |
| | | | |
pid1/systemctl: add ability to enqueue POSIX RT sigs with associated value to service processes
|
| | |/
| |/| |
|
| | | |
|
| | |
| | |
| | |
| | | |
Follow-up for a4d2461c46f40c9ae5002a2aea35b35ccb60ef9c.
|
|/ / |
|
| |
| |
| |
| |
| | |
quite often we want to set a log target and immediately open it. Add a
common helper for that.
|
|\ \
| | |
| | | |
Copy symlink xattrs
|
| | |
| | |
| | |
| | | |
Like getxattr_malloc() but for setxattr() and friends.
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| | |
Follow-up for 4453ebe4db0511d25bed1040930ea6430c1bed91.
With the feature list all dandified, the most important part of the
output, i.e. the project name and version, are less visible.
|
| | |
|
|/
|
|
|
|
|
|
|
|
| |
From a given cgroup path, cg_path_get_unit() allows to retrieve the
unit's name. Although, this removes the path to the unit's cgroup,
preventing the result to be used to fetch xattrs.
Introduce cg_path_get_unit_path() which provides the path to the unit's
cgroup. This function behave similarly to cg_path_get_unit() (checking
the validity and escaping the unit's name).
|
|
|
|
|
|
| |
Our logging uses program_invocation_short_name. Without this patch,
logs from forked client may become broken; spuriously truncated or
the short invocation name is not completely shown in the log.
|
|\
| |
| | |
sysusers: improve messages and autocreate /etc
|
| |
| |
| |
| |
| |
| |
| |
| | |
This allows sysusers to operate with --root that is an empty directory.
It may be useful to, for example, populate the user database before installing
anything else.
firstboot was already doing this, so drop the duplicated call there.
|
| | |
|
| |
| |
| |
| | |
Without commas, the sentences can be hard to parse.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Config options are -Ddefault-timeout-sec= and -Ddefault-user-timeout-sec=.
Existing -Dupdate-helper-user-timeout= is renamed to -Dupdate-helper-user-timeout-sec=
for consistency. All three options take an integer value in seconds. The
renaming and type-change of the option is a small compat break, but it's just
at compile time and result in a clear error message. I also doubt that anyone was
actually using the option.
This commit separates the user manager timeouts, but keeps them unchanged at 90 s.
The timeout for the user manager is set to 4/3*user-timeout, which means that it
is still 120 s.
Fedora wants to experiment with lower timeouts, but doing this via a patch would
be annoying and more work than necessary. Let's make this easy to configure.
|
|/
|
|
|
|
| |
fsconfig_command/mount_attr conflict with glibc 2.36
Co-authored-by: Frantisek Sumsal <frantisek@sumsal.cz>
|