| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An stdio FILE* stream usually refers to something with a file
descriptor, but that's just "usually". It doesn't have to, when taking
fmemopen() and similar into account. Most of our calls to fileno()
assumed the call couldn't fail. In most cases this was correct, but in
some cases where we didn't know whether we work on files or memory we'd
use the returned fd as if it was unconditionally valid while it wasn't,
and passed it to a multitude of kernel syscalls. Let's fix that, and do
something reasonably smart when encountering this case.
(Running test-fileio with this patch applied will remove tons of ioctl()
calls on -1).
|
|\
| |
| | |
don't try to access shadow from logind
|
| | |
|
|\ \
| | |
| | | |
Flag setting helper and some other minor cleanups
|
| | | |
|
| | |
| | |
| | |
| | | |
adds BusLocator variant called bus_message_new_method_call()
|
| | |
| | |
| | |
| | |
| | | |
Mechanical rename in response to
https://github.com/systemd/systemd/pull/15331#issuecomment-611472240
|
|\ \ \
| | | |
| | | | |
user/group name validity rework
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reworks the user validation infrastructure. There are now two
modes. In regular mode we are strict and test against a strict set of
valid chars. And in "relaxed" mode we just filter out some really
obvious, dangerous stuff. i.e. strict is whitelisting what is OK, but
"relaxed" is blacklisting what is really not OK.
The idea is that we use strict mode whenver we allocate a new user
(i.e. in sysusers.d or homed), while "relaxed" mode is when we process
users registered elsewhere, (i.e. userdb, logind, …)
The requirements on user name validity vary wildly. SSSD thinks its fine
to embedd "@" for example, while the suggested NAME_REGEX field on
Debian does not even allow uppercase chars…
This effectively liberaralizes a lot what we expect from usernames.
The code that warns about questionnable user names is now optional and
only used at places such as unit file parsing, so that it doesn't show
up on every userdb query, but only when processing configuration files
that know better.
Fixes: #15149 #15090
|
|\ \ \
| |_|/
|/| | |
CoredumpFilter=
|
| | |
| | |
| | |
| | | |
Fixes #6685.
|
| |/ |
|
|\ \
| | |
| | | |
Show Environment= entries with spaces in systemctl
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This makes the Environment entries more round-trippable: a similar format is
used for input and output. It is certainly more useful for users, because
showing [unprintable] on anything non-trivial makes systemctl show -p Environment
useless in many cases.
Fixes: #14723 and https://bugzilla.redhat.com/show_bug.cgi?id=1525593.
$ systemctl --user show -p Environment run-*.service
Environment=ASDF=asfd "SPACE= "
Environment=ASDF=asfd "SPACE=\n\n\n"
Environment=ASDF=asfd "TAB=\t\\" "FOO=X X"
|
| |
| |
| |
| |
| |
| |
| | |
Let's make the log msgs a bit longer, to make clearer what is going on
here...
Prompted bymy attempts to debug #15354
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many of the convenience functions from sd-bus operate on verbose sets
of discrete strings for destination/path/interface/member.
For most callers, destination/path/interface are uniform, and just the
member is distinct.
This commit introduces a new struct encapsulating the
destination/path/interface pointers called BusAddress, and wrapper
functions which take a BusAddress* instead of three strings, and just
pass the encapsulated strings on to the sd-bus convenience functions.
Future commits will update call sites to use these helpers throwing
out a bunch of repetitious destination/path/interface strings littered
throughout the codebase, replacing them with some appropriately named
static structs passed by pointer to these new helpers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before:
```
write(2, "Device /dev/loop1p1 is too small.\n", 34) = -1 ENOTCONN (Transport
endpoint is not connected)
```
After:
```
$ journalctl -b -e | grep 'too small'
Apr 02 16:53:30 loora systemd[343579]: Device /dev/loop1p1 is too small.
```
|
|
|
|
|
| |
Mechanical change to eliminate some cruft by using the
new take_fdopen{_unlocked}() wrappers where trivial.
|
|\
| |
| | |
Functional test rework
|
| |
| |
| |
| |
| | |
We have a bazillion of those unit files, and keeping them all directly in tests/
has become rather unwieldy.
|
| |
| |
| |
| |
| | |
I want to use it from sd-path later on so it needs to be moved out of
src/shared (libsystemd is not allowed to use code from src/shared).
|
| |
| |
| |
| | |
Those functions have only one non-test user, so we can move them to src/core/.
|
| | |
|
|\ \
| | |
| | | |
networkctl: Display more geneve properties
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
If XDG_CONFIG_DIRS is unset, the specification says we should assume
/etc/xdg.
|
|/ / |
|
|\ \
| |/
|/| |
Add two man pages for sd-bus
|
| |
| |
| |
| |
| | |
sd_bus_try_close() always returns -EOPNOTSUPP if bus is a valid object.
It nevers returns -EBUSY. So we'd always go into the "fallback" path.
|
| |
| |
| |
| |
| |
| |
| | |
systemd will automatically derive CPU affinity mask from NUMA node
mask.
Fixes #13248
|
|/ |
|
|
|
|
|
|
|
|
| |
Giving --echo to systemd-ask-password allows to echo the user input instead
of masking it. This is useful when querying for usernames or similar.
Showing "(press TAB for no echo)" does not make sense there, so do not.
Note that pressing TAB or ESC still disables echo.
|
|
|
|
| |
without having to specify the whole display map
|
|
|
|
|
|
| |
In case the dissected image has a filesystem, don't scan for partitions. This
avoids problems with services using a `RootImage=` in early boot when udevd is
not yet started.
|
|
|
|
| |
Signed-off-by: Denis Pronin <dannftk@yandex.ru>
|
|
|
|
| |
Closes #14770.
|
|
|
|
|
|
|
|
| |
This adds SYSTEMD_GENERATOR_PATH and SYSTEMD_ENVIRONMENT_GENERATOR_PATH
environment variables that will be read in the same manner as
SYSTEMD_UNIT_PATH is. i.e. if set, these paths will be used and a
trailing empty entry means that the usual paths will be appended, while
no trailing entry means that solely the given paths are used.
|
|
|
|
| |
This is so that we can use the same pattern for other sets of paths.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This improves the following debug log.
Before:
systemd[1162]: Restricting namespace to: .
After:
systemd[1162]: Restricting namespace to: n/a.
|
|
|
|
| |
"set up" and "look up" are the verbs, "setup" and "lookup" are the nouns.
|
|\
| |
| | |
Syslog address length fix
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It fully initializes the address structure, so no need for pre-initialization,
and also returns the length of the address, so no need to recalculate using
SOCKADDR_UN_LEN().
socklen_t is unsigned, so let's not use an int for it. (It doesn't matter, but
seems cleaner and more portable to not assume anything about the type.)
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
As of the commit aae9a96d4b3a8562af9e8c6a23871b442645b954 removing --follow
option in systemctl command, OUTPUT_FOLLOW has never been set anywhere. Let's
remove it.
The condition expression of the if-statement in show_journal() that refers to
OUTPUT_FOLLOW now thus evaluates always to true. Hence, the call of
sd_journal_wait() is in dead code, and the outer infinite for-loop is
meaningless, which we remove as cleanup.
There is no functional change by this commit.
|
|\
| |
| | |
conf-parser: fix line number in error message
|
| |
| |
| |
| | |
Fixes #14929.
|
|\ \
| |/
|/| |
systemctl: be more specific when emitting warning about rotated journal
|
| |
| |
| |
| |
| | |
See inline comment for disucssion.
Fixes #14281.
|
|\ \
| | |
| | | |
userdb: make groupdb_all() always set iterator when it returns >= 0
|