Age | Commit message (Collapse) | Author |
|
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.
|
|
make manager_gc(), manager_startup(), manager_new(), manager_free()
and manager_run() static, and kill their forward declarations.
|
|
Instead of open-coding the delayed action and inhibit timeout logic,
switch over to a real sd_event_source based implementation.
This is not only easier to read but also allows us to add more timers
in the future.
|
|
|
|
http://lists.freedesktop.org/archives/systemd-devel/2015-April/031187.html
|
|
The daemons should really have the time to kill the workers first,
before systemd does it, hence use KillMode=mixed for these daemons.
https://bugs.freedesktop.org/show_bug.cgi?id=90051
|
|
It's better to continue as good as we can, than to totally fail. Hence,
let's log about the failure and continue.
|
|
Let's make sure that we don't enqueue triggering jobs for units before
those units are actually fully loaded.
http://lists.freedesktop.org/archives/systemd-devel/2015-April/031176.html
https://bugs.freedesktop.org/show_bug.cgi?id=88401
|
|
Fixes:
CC src/core/libsystemd_core_la-device.lo
src/core/device.c: In function 'device_serialize':
src/core/device.c:169:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
|
|
This reverts commit 6e392c9c45643d106673c6643ac8bf4e65da13c1.
We really shouldn't invent external state keeping hashmaps, if we can
keep this state in the units themselves.
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=90163
|
|
This reworks how we enter tentative state and does so only when a device
was previously not announced via udev. The previous check actually just
checked whether a new state bit was set, which is not correct.
Also, to be able to reliably maintain the tentative state across daemon
reloads, we need to serialize and deserialize it.
|
|
|
|
<audit-1400> is replaced by AVC, etc.
A fallback mechanism is provided for unlisted event types.
Occasionally new types are added to the kernel, but not too often.
Add a simple "test", which simply prints the mapping.
|
|
|
|
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>.
|
|
The old tags are read from the db when deciding which tags to clear,
make sure we don't write out the new db before the old one has been
read.
|
|
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.
|
|
This is useful to print wall messages from logind with the right client
tty. (to be added in a later patch)
|
|
Also, don't consider this an loggable event, so that code that tries to
read creds from a direct connection, doesn't generate logs.
|
|
As reported my Maciej Wereski:
http://lists.freedesktop.org/archives/systemd-devel/2015-February/028320.html
|
|
http://lists.freedesktop.org/archives/systemd-devel/2015-April/031094.html
|
|
USB and PCI soundcards have a nice set of ID_* properties. It would
be handy for firewire soundcards to have the same.
Note that this removes the explicit setting of ID_ID in the firewire
conditional. Because we are now setting ID_SERIAL, ID_ID will come
from later in the file.
|
|
The ALSA id sysattr is generated by the sound subsystem and is not
a stable identifier. It is generated though some string manipulation
then made unique if there is a conflict. This means that it is
enumeration-dependent and shouldn't be used for ID_ID.
If ID_ID is supposed to be system-unique, it is not already since
for firewire it is generated from the guid and there are broken
firewire devices that have duplicate guids across devices.
This is tracked for PulseAudio at
https://bugs.freedesktop.org/show_bug.cgi?id=90129.
This is essentially a revert of systemd
ed1b2d9fc7d5c5bfe2a67b0b8ff9e5ea8694268e.
|
|
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.
|
|
|
|
Device name is PixArt, but it's sold as a HP brand.
https://bugs.freedesktop.org/show_bug.cgi?id=90142
|
|
When parsing a unit with a trailing slash after an escaped line break, like
ExecStart=/bin/echo 'foo \
bar'
the split() function (through config_parse()) asserted and crashed pid 1:
Assertion 'current[*l + 1] == quotechars[0]' failed at ../src/shared/util.c:583, function split(). Aborting.
Fix this by returning an error in this case ("trailing garbage").
Add corresponding test case. Also fix the missing "unit" argument of
config_parse_exec() in the comment.
https://launchpad.net/bugs/1447243
|
|
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
|
|
|
|
Reported by Holger Reif.
|
|
|
|
|
|
When running udevadm settle --timeout=0, the ping always times out, and
udevadm will return 0 without checking the queue state.
(David: Use a reasonable timeout to still get the barrier provided by
ctrl-ping)
|
|
|
|
We should try to execute them in the same order they appear in the
configuration files, as it is documented. Hence move to an ordered
hashmap.
(Note though, that this still doesn't execute them completely in order:
we will still apply non-glob lines before glob-lines, and reorder lines
prefixing each other and that apply to the same paths).
http://lists.freedesktop.org/archives/systemd-devel/2015-March/029055.html
|
|
When deleting a read-only subsvolume with a sub-subvolume, we need to
mark it writable first, otherwise the removal will not work.
|
|
When --ephemeral is used there's no need to keep the image read-only, so
let's not do that then.
|
|
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.
|
|
|
|
|
|
The module is currently no auto-loadable (and this is unlikely to change
anytime soon, given it's API is via getsockopt/setsockopt). It is needed
by networkd and nspawn currently.
Users who really don't like the module to be loaded have the option to
blacklist it still, or not compile it at all. But for all others this
should make things work out-of-the-box.
|
|
|
|
|
|
This way users have the freedom to set or unset the FS_NOCOW_FL flag on
their journal files by setting it on the journal directory. Since our
default tmpfiles configuration now sets this flag on the directory the
flag is set by default on new files, however people can opt-out of this
by masking the tmpfiles file for it.
|
|
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.
|