| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
And make safe_fork_full() takes fds to be assigned to stdio.
|
|\
| |
| | |
Improve messages emitted when Reload or Reexec is requested
|
| | |
|
|\ \
| | |
| | | |
udev: set worker process name
|
| |/
| |
| |
| | |
No functional changes, just refactoring.
|
|/
|
|
|
|
| |
This result is identical after cpp is done, so we don't save anything
by not having the usual macros. And with the usual macros it's easier to
grep and code-crossreferencing works better.
|
| |
|
| |
|
| |
|
|
|
|
| |
In some places, initialization is dropped when unnecesary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-1 was used everywhere, but -EBADF or -EBADFD started being used in various
places. Let's make things consistent in the new style.
Note that there are two candidates:
EBADF 9 Bad file descriptor
EBADFD 77 File descriptor in bad state
Since we're initializating the fd, we're just assigning a value that means
"no fd yet", so it's just a bad file descriptor, and the first errno fits
better. If instead we had a valid file descriptor that became invalid because
of some operation or state change, the other errno would fit better.
In some places, initialization is dropped if unnecessary.
|
|
|
|
|
|
|
| |
Sometimes a freeze operation can hang due to the presence of kernel
threads inside the unit cgroup (e.g. QEMU-KVM). This ensures that the
ThawUnit operation invoked by systemd-sleep at wakeup always thaws the
unit.
|
|
|
|
|
|
|
|
|
|
| |
In sd_bus_wait(), let's convert EINTR to a return code of 0, thus asking
the caller do loop again and enter sd_bus_process() again (which will
not find any queued events). This way we'll not return an error on
something that isn't really an error. This should typically make sure
things are properly handled by the caller, magically, without eating up
the event entirely, and still giving the caller time to run some code if
they want.
|
|
|
|
|
|
|
| |
Let's move them out of the generic, already very long strv.[ch] module
into the more specific nulst-util.[ch]
No code changes.
|
|
|
|
| |
Fixes #25340
|
|
|
|
|
|
| |
The name "def.h" originates from before the rule of "no needless abbreviations"
was established. Let's rename the file to clarify that it contains a collection
of various semi-related constants.
|
|
|
|
|
| |
util.h is now about logarithms only, so we can rename it. Many files included
util.h for no apparent reason… Those includes are dropped.
|
|
|
|
|
| |
basic/util.[ch] is a grab-bag of unrelated functions. Let's move a few
of the remaning functions to better locations.
|
|
|
| |
* sd-bus: convenience functions to emit a signal to a destination
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We treat symlinks to unit files outside of the search path differently from
symlinks to unit files *in* the search path. The former are "linked" unit
files, while the latter are enablement symlinks and such and will be removed
when disabling the unit.
The history of the check for in_search_path() is interesting: this condition
was added already in the first version of the code in
830964834f330836b9d33752e83de09d4f38da87. Since the beginning, matching
arguments would simply be ignored. I think this is dubious. The man page says:
> Link a unit file that is *not* in the unit file search paths
> into the unit file search path
But for backwards-compat, let's continue to silently do nothing for files
*in* the search path.
The case of symlinks to unit files underneath the search path, but in some
subdirectory, is less clear. We didn't check for this case, so it was
implicitly allowed. But that's just an oversight, we don't want to allow people
to create additional subhierarchies under our hierarchy. Let's check for this
case and refuse.
Closes #24605.
|
|\
| |
| | |
Erradicate strerror
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
strerror_r() is used instead of strerror(). The usual trick is employed: we
allocate a buffer that lives until the end of the surrounding block to provide
the scratch space. This change is particularly important forn sd-bus and the
pam modules, which may be called from threaded code.
I checked the codebase, and we only use bus_error_message() in log statements,
so the returned pointer is not used beyond its valid lifetime.
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
Once everything has been written, a server bus might now process a
pending "BEGIN" and start the bus.
|
| |
|
|
|
|
|
| |
The casting here isn't pretty, but at least it makes it obvious what is
happening instead of implicit and it allows enabling -Wformat-signedness.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than using a separate DATA round to transmit the trace-string of
the ANONYMOUS authentication scheme, transmit it inline as argument.
This requires a refactor of the client-side SASL parser, as we now have
a different set of replies depending on the mode used.
This fixes an issue where libdbus-1 does not query for trace-strings if
not transmit inline as AUTH-ANONYMOUS argument. It is unclear from the
wording of the spec whether this is a violation by libdbus-1. However,
we can work around it by simply changing our mode of transmittal.
|
| |
|
|
|
|
|
| |
`org.freedesktop.DBus.ObjectManager` should only be emitted if
object in question has ObjectManager attached.
|
| |
|
|
|
|
|
|
|
|
|
| |
Objects without ObjectManager should not have
`org.freedesktop.DBus.ObjectManager` interface.
Object with ObjectManager should do.
Also added ASSERT_SE_NONNEG and ASSERT_NONNEG macros.
|
|
|
|
| |
Fixes #24003.
|
|
|
|
|
|
|
|
| |
We now have a local implementation in string-util-fundamental.c, but
it's useful at a lot of other places, hence let's give it a more
expressive name and share it across the tree.
Follow-up for: 8d9156660d6958c8d63b1d44692968f1b5d33920
|
|
|
|
| |
See previous commit for justification.
|
| |
|
|
|
|
| |
Also, document that NULL is allowed.
|
|
|
|
|
| |
The same story as before: it's a useful helper, other uses of the library
are likely to find it useful.
|
|
|
|
|
|
| |
The usual: if we find that function useful, other users of the library
will too. In particular, the v-variants are necessary to build pass-thru
wrappers.
|
|
|
|
|
| |
Function was exported in 07a0d22f9ec5a0cac2385b73dc08b12a811cead8,
but apparently we forgot to remove the old declaration.
|
|\
| |
| | |
Allow ASCII fallback for Unicode characters in logs
|
| | |
|
|/
|
|
| |
grep -l -r http:// | xargs sed -E -i s'#http://(.*).freedesktop.org#https://\1.freedesktop.org#'
|
|
|
|
|
| |
The code was overly complicated… We know what value we expect, we can test it
directly.
|
| |
|
|
|
|
| |
It seems the format is used only by kdbus.
|