Age | Commit message (Collapse) | Author |
|
Introduces a new concept of "trusted" vs. "untrusted" busses. For the
latter libsystemd-bus will automatically do per-method access control,
for the former all access is automatically granted. Per-method access
control is encoded in the vtables: by default all methods are only
accessible to privileged clients. If the SD_BUS_VTABLE_UNPRIVILEGED flag
is set for a method it is accessible to unprivileged clients too. By
default whether a client is privileged is determined via checking for
its CAP_SYS_ADMIN capability, but this can be altered via the
SD_BUS_VTABLE_CAPABILITY() macro that can be ORed into the flags field
of the method.
Writable properties are also subject to SD_BUS_VTABLE_UNPRIVILEGED and
SD_BUS_VTABLE_CAPABILITY() for controlling write access to them. Note
however that read access is unrestricted, as PropertiesChanged messages
might send out the values anyway as an unrestricted broadcast.
By default the system bus is set to "untrusted" and the user bus is
"trusted" since per-method access control on the latter is unnecessary.
On dbus1 busses we check the UID of the caller rather than the
configured capability since the capability cannot be determined without
race. On kdbus the capability is checked if possible from the attached
meta-data of a message and otherwise queried from the sending peer.
This also decorates the vtables of the various daemons we ship with
these flags.
|
|
|
|
Use double and not float, as there is little to no benefit.
|
|
In the time it takes to process incoming log messages, the process we
are logging details for may exit. This means the cgroup data is no
longer available from '/proc'. Unfortunately, the way the code was
structured before, we never log _SYSTEMD_UNIT if we don't have this
cgroup information.
Add an else if case that allows the passed in unit_id to be logged even
if we couldn't capture cgroup information. This ensures a command like
`journalctl -u run-XXX` will return all log messages from a oneshot
process.
|
|
|
|
kbd-model-map was generated from system-config-keyboard's keyboard_models.py.
Several of the kbd layouts referred in that file do not exist and, so far as I
can tell, never did. I believe these entries existed simply to provide the xkb
configuration information for those layouts, and there never were matching kbd
entries; the kbd names were entirely notional, to satisfy the need for some
entry or other in that field.
For systemd, the only function of kbd-model-map is to 'match' kbd and xkb
configurations, so it does not make any sense to maintain entries for cases
where only one or the other exists in this context.
|
|
|
|
Kernel install doesn't need the second argument on his command line when
removing.
This is correctly documented in the man page.
|
|
|
|
|
|
|
|
THis might happen when sending arrays with 0 enttries, hence this is not
an indication for a problem.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This allows us to drop quite a bit of code.
|
|
together
|
|
|
|
|
|
|
|
Use [brackets] only for optional elements.
Use <optional> in XML sources.
|
|
|
|
|
|
Just as 'identifier' is strdup-ed and freed, we need to do the same for
unit_id.
|
|
|
|
wait_for_jobs was ignoring the errors from the jobs stored in r.
It would only ever return whether the call to sd_bus_remove_filter
went ok. This patch changes it to return the first job related error
encountered. If a job related error is found, then the result of the
call to sd_bus_remove_filter is ignored.
wait_for_jobs was a bit hard to read so I split it up to avoid
the goto and deep nesting.
|
|
It is nicer to say 'systemctl list-units ssh\*' then to use grep,
because colouring is preserved and it is easier to match just against
the unit name.
|
|
The only problem is that libgen.h #defines basename to point to it's
own broken implementation instead of the GNU one. This can be fixed
by #undefining basename.
|
|
introduced in f459b6025f9368116d8c410376546c157314c205
|
|
|
|
|
|
When the state restore is disabled, we would print:
"Unknown verb: load" instead of simply skipping loading the
state.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Unit is typedef'ed in both unit.h and execute.h. The typedef
existed first in unit.h and was later added to execute.h in
c17ec25e4d9bd6c8e8617416f813e25b2ebbafc5
It is no longer needed so let's just keep the one in unit.h to
avoid redefining it.
|
|
|
|
|
|
|
|
|