Age | Commit message (Collapse) | Author |
|
This introduces a new SYSVIEW_EVENT_SETTLE notification that is sent after
initial scanning via sysview is done. This is very handy to let the
application raise warnings in case requested resources are not found
during startup.
The SETTLE event is sent after systemd-logind and udev enumerations are
done. This event does in no way guarantee that a given resource is
available. All it does is notify the application that scanning is done!
You must not react to SETTLE if you don't have external synchronization
with the resource you're waiting for.
The main use-case for SETTLE is to run applications _inside_ of logind
sessions and startup sysview. You really want to make sure that the own
session you're running in was found during enumeration. If not, something
is seriously wrong.
|
|
The error-code propagated via sysview is always negative. Avoid
multiplying by -1 before returning it. Otherwise, we will return >0
instead of <0, which will not be detected as error by sysview-core.
|
|
|
|
|
|
|
|
|
|
renameat2() exists since Linux 3.15 but btrfs support for the flag
RENAME_NOREPLACE was added later.
This patch implements a fallback when renameat2() returns EINVAL.
EINVAL is the error returned when the filesystem does not support one of
the flags.
|
|
path_is_mount_point() compares the mount_id of a directory and the
mount_id of the parent directory. When following symlinks, the function
to get the parent directory does not take the symlink into account.
/bin -> /usr/bin with /usr being a mountpoint:
mount_id of /bin with AT_SYMLINK_FOLLOW != mount_id of /
|
|
GetConnectionCredentials method was added to dbus-1 specification
more than one year ago. This method should return "[...] as many
credentials as possible for the process connected to the server",
but at this moment only "UnixUserID", "LinuxSecurityLabel" and
"ProcessID" are defined by the specification. We should add support
for next credentials after extending dbus-1 spec.
|
|
|
|
|
|
|
|
|
|
Avoid double logs printing. Not that we don't return
manager_update_global_progress() to the handler callback as if the console or
plymouth isn't available momentarily, we still desire to handle future
fd progress events if those are available again (like cancellation, reports…)
|
|
We don't want to keep /dev/console open all the time, but only open it when
needed, to avoid interfering with SAK.
|
|
|
|
just a typo fix
|
|
Usually when using loop_read(), we want to read the full buffer.
Add a helper that mirrors loop_write(), and returns 0 when full buffer
was read, and an error otherwise.
Use -ENODATA for the short read, to distinguish it from a read error.
|
|
Introduced a few commits ago.
|
|
|
|
audit.h uses uint32_t and bool.
log.h uses abs.
|
|
It is more elegant to do this in one step.
Coverity complains about the TOCTOU difference, but it is not an
actual problem (CID #1237777).
|
|
Introduced in fa6ac76083b8ff.
Might be related to CID #1261724, but I don't know if coverity can
recurse this deep.
|
|
|
|
|
|
This should have been committed with
udev_device_add_property - implicitly mark properties for saving to db
|
|
|
|
Properties should only be saved to the db when added to the udev_device by udevd, and only if
the property does not start with a '.'. Make this implicit rather than expose the marking of
properties.
|
|
This should be internal to the library as it is only about reflecting the sysfs state in the udev_device.
|
|
|
|
This essentially replaces
open("/run/udev/queue", O_WRONLY|O_CREAT|O_CLOEXEC|O_TRUNC|O_NOFOLLOW, 0444)
with
open("/run/udev/queue", O_WRONLY|O_CREAT|O_CLOEXEC|O_NOCTTY, 0644),
which is ok for our purposes.
|
|
|
|
Also rename r to buf, since r is customarily reserved for the return value.
|
|
I'm pretty sure that this is what was meant here.
|
|
|
|
Fix return value if unlink fails.
|
|
If the highlighted line did not move outside of the visible
region, it should not be necessary to update idx_last.
CID #1287137, #1287138.
|
|
|
|
|
|
|
|
connection fd
|
|
|
|
|
|
Let's clean up the function naming scheme and put the object they
operate on first in the name, the way OO programming usually does it.
Also, let's make sure can properly destroy half-initialized Manager
objects.
|
|
|
|
|
|
|
|
- the even source should not be freed before the fd for it is closed
- read() returns an ssize_t and we need to handle it as such
- properly handle errors from read()
- reuse on_plymouth_disconnect() whenever we disconnect from plymouth,
and rename it plymouth_disconnect hence()
|
|
|
|
|