| Commit message (Collapse) | Author | Age |
|
|
|
| |
and related calls
|
|
|
|
| |
status set membership
|
|
|
|
| |
NULL result only
|
| |
|
|
|
|
| |
If for whatever reason there was nothing to load or loading failed, don't keep trying.
|
|
|
|
| |
Only 'real' devices are required to have an uevent file.
|
|
|
|
| |
log_error_errno() already adds a newline, so drop them.
|
| |
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=90163
|
|
|
|
|
| |
This is useful to print wall messages from logind with the right client
tty. (to be added in a later patch)
|
|
|
|
|
|
| |
Not that all functionality has been ported over to logind, the old
implementation can be removed. There goes one of the oldest parts of
the systemd code base.
|
|
|
|
|
|
| |
Port over more code from shutdownd and teach logind to write /run/nologin at
least 5 minutes before the system is going down, and
/run/systemd/shutdown/scheduled when a shutdown is scheduled.
|
|
|
|
|
| |
Also, don't consider this an loggable event, so that code that tries to
read creds from a direct connection, doesn't generate logs.
|
|
|
|
|
|
|
|
| |
This reverts b67f944. Lazy loading of device properties does not work for devices
that are received over netlink, as these are sealed. Reinstate the unconditional
loading of the device db.
Reported by: Mantas Mikulėnas <grawity@gmail.com>.
|
|
|
|
|
|
|
| |
direct connection
It's never a good idea, let's just not do it, not even on dierct
connections.
|
|
|
|
|
|
|
| |
test for mount points
It's a very recent kernel addition, but certainly makes sense to
support.
|
| |
|
|
|
|
|
|
| |
So far we authenticate direct connections primarily at connection time,
but let's also do this for each method individually, by attaching the
creds we need for that right away.
|
|
|
|
|
|
|
|
| |
- fix some memory leaks on error conditions
- handle all error cases properly, and log about failures
- move HAVE_ACL and no-HAVE_ACL code closer to each other
|
|
|
|
|
| |
If the underlying device has not read in the properties yet, the generation will be 0, so
make sure we trigger the reading at least once.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a timer to print UTMP wall messages so that it repeatedly informs users
about a scheduled shutdown:
* every 1 minute with less than 10 minutes to go
* every 15 minutes with less than 60 minutes to go
* every 30 minutes with less than 180 minutes (3 hours) to go
* every 60 minutes if more than that to go
This functionality only active if the .EnableWallMessages DBus property
is set to true. Also, a custom string can be added to the wall message,
set through the WallMessagePrefix property.
|
|
|
|
|
| |
When deleting a read-only subsvolume with a sub-subvolume, we need to
mark it writable first, otherwise the removal will not work.
|
|
|
|
|
|
| |
When creating recursive read-only snapshots we need to mark the snapshot
writable immediately before creating subsnapshots within it, otherwise
the operation for it will fail.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
If we get passed an fd that does not refer to a regular file or
directory, we should not issue btrfs ioctls on it, since it might end up
in a device driver or similar (note that DRM for example uses the same
ioctl numbers as some file system ioctls).
Hence, let's make sure to always check if something is a regular file or
directory, or is on btrfs before invoking the respective ioctls. It's
better to be safe than sorry.
|
|
|
|
|
|
|
| |
Let's unify the code that checks whether an fd is on btrfs a bit.
(Also, rename btrfs_is_snapshot() to btrfs_is_subvol(), since that's
usually how this is referred to in our code)
|
|
|
|
|
|
|
|
|
|
| |
attributes
Before invoking file system ioctls we need to make sure that the
specified fd actually refers to a file system object, and not a device
node or similar. Otherwise we might by accident invoke unrelated device
driver ioctls. For example, DRM ioctls use the same ioctl numbers as the
various file system ioctls.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch add support to create vti6 tunnel
test:
vt6.network
[Match]
Name=wlan0
[Network]
Tunnel=ip6vti
vti6.netdev
[NetDev]
Name=ip6vti
Kind=vti6
[Tunnel]
Local=2a00:ffde:4567:edde::4987
Remote=2001:473:fece:cafe::5179
ip link
11: ip6_vti0@NONE: <NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT
group default
link/tunnel6 :: brd ::
12: ip6vti@wlan0: <POINTOPOINT,NOARP> mtu 1500 qdisc noop state DOWN
mode DEFAULT group default
link/tunnel6 2a00:ffde:4567:edde::4987 peer 2001:473:fece:cafe::5179
|
|
|
|
|
| |
kdbus has been passing us the ppid file for a while, actually make use
of it.
|
| |
|
| |
|
|
|
|
|
|
|
| |
with them missing
This way the root subvolume can be left read-only easily, and variable
and user data writable with explicit quota set.
|
| |
|
|
|
|
| |
the other log functions
|
|
|
|
| |
device
|
|
|
|
|
| |
Also, when we do permissions checks using creds, verify that we don't do
so based on augmented creds, as extra safety check.
|
|
|
|
| |
is free
|
|
|
|
| |
Let's better be safe than sorry.
|
|
|
|
| |
known names
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a method called ScheduleShutdown in org.freedesktop.login1.Manager
which adds a timer to shut down the system at a later point in time.
The first argument holds the type of the schedule that is about to
happen, and must be one of 'reboot', 'halt' or 'poweroff'.
The second argument specifies the absolute time, based on
CLOCK_REALTIME in nanoseconds, at which the the operation should be
executed.
To cancel a previously scheduled shutdown, the CancelScheduledShutdown()
can be called, which returns a bool, indicating whether a scheduled
timeout was cancelled.
Also add a new property called ScheduledShutdown which returns the
equivalent to what was passed in via ScheduleShutdown, as '(st)' type.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Factor out the code to ask polkit for authorization from
method_do_shutdown_or_sleep() into an own function called
verify_shutdown_creds().
This is needed in order to also use the same checks when shutdown
operations are scheduled. For that, it's also necessary to allow
NULL values for that action{,_multiple_sessions,_ignore_inhibit)
arguments, which will suppress the call if no action string is
passed.
|
| |
|
| |
|
|
|
|
|
| |
sd_device_new_from_* now returns -ENODEV when the device does not exist, and the enumerator
silently drops these errors as missing devices is exepected.
|
|
|
|
|
|
|
|
| |
It is still possible to include uninitialized ones, but now that is opt-in. In most
cases people only want initialized devices. Exception is if you want to work without
udev running.
Suggested by David Herrmann.
|
|
|
|
|
|
|
| |
This is rarely, if ever, used. Drop it from the new public API and only keep it for
the legacy API.
Suggested by David Herrmann.
|
| |
|
| |
|
| |
|
| |
|