1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-27 18:55:09 +03:00
Commit Graph

13599 Commits

Author SHA1 Message Date
Lennart Poettering
80514f9c9b macro: log assertion at debug level in assert_return() 2013-12-10 17:01:10 +00:00
Lennart Poettering
6e8df5f00a bus: introduce new SD_BUS_VTABLE_HIDDEN flag for vtable members
When this flag is set then its member will not be shown in the
introspection data. Also, properties with this flag set will not be
included in GetAll() responses.
2013-12-10 16:52:49 +00:00
Lennart Poettering
adacb9575a bus: introduce "trusted" bus concept and encode access control in object vtables
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.
2013-12-10 16:52:49 +00:00
Kay Sievers
85719154e7 libudev: hwdb - use libudev not systemd logging 2013-12-10 16:37:26 +01:00
Zbigniew Jędrzejewski-Szmek
739d81ddd0 test: wrap $LOOPDEV in quotes
Otherwise things go awry if it is not set ('[ -b ]' is not the same as '[ -b "" ]'!).
2013-12-10 07:46:21 -05:00
Ronny Chevalier
c6a77179a4 test: rework run_qemu
It tries to find a suitable QEMU binary and will use KVM if present.
We can now configure QEMU from outside with 4 variables :
  - $QEMU_BIN : path to QEMU's binary
  - $KERNEL_APPEND : arguments appended to kernel cmdline
  - $KERNEL_BIN : path to a kernel
    Default /boot/vmlinuz-$KERNEL_VER
  - $INITRD : path to an initramfs
    Default /boot/initramfs-${KERNEL_VER}.img
  - $QEMU_SMP : number of CPU simulated by QEMU.
    Default 1

(from Alexander Graf's script: http://www.spinics.net/lists/kvm/msg72389.html)
2013-12-10 07:46:21 -05:00
Ronny Chevalier
1a6dc6534e test: fix TEST-02-CRYPTSETUP
missing generate_module_dependencies call which prevents dm_mod and
dm_crypt modules to be loaded
2013-12-10 07:46:21 -05:00
Dan McGee
4987623d01 Bring bootchart code in line with CODING_STYLE
Use double and not float, as there is little to no benefit.
2013-12-10 07:40:55 -05:00
Dan McGee
2d43b19090 Ensure unit is journaled for short-lived or oneshot processes
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.
2013-12-10 07:40:55 -05:00
Shawn Landden
06d461ee6f update README to not suggest that systemd works without procfs 2013-12-10 07:40:55 -05:00
Marcel Holtmann
0234c59921 hwdb: Update database of Bluetooth company identifiers 2013-12-10 03:17:39 -08:00
Adam Williamson
18c92a4958 correct name of Tajik kbd layout in kbd-model-map 2013-12-10 05:16:46 -05:00
Adam Williamson
70dc36d17f drop several entries from kbd-model-map whose kbd layouts do not exist
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.
2013-12-10 05:16:46 -05:00
Jason St. John
8c9552c6b4 man: improve wording and comma usage in systemd.journal-fields(7)
Improve wording under "Description" and "_KERNEL_DEVICE="
2013-12-10 05:07:31 -05:00
Lukasz Skalski
f7e2bd5a80 libsystemd-bus: use assert_return 2013-12-09 23:27:19 -05:00
Sébastien Luttringer
d838db0d3b kernel-install: fix help output
Kernel install doesn't need the second argument on his command line when
removing.
This is correctly documented in the man page.
2013-12-09 23:19:16 -05:00
Lennart Poettering
5877dc5a7f test: add gvariant test for empty messages 2013-12-10 03:31:52 +01:00
Lennart Poettering
5f7e8903b2 bus: properly handle empty messages 2013-12-10 03:30:51 +01:00
Lennart Poettering
224a1ed4c1 bus: empty gvariant arrays should at least get size 1 2013-12-10 03:04:16 +01:00
Lennart Poettering
041b85cf01 bus: it's OK to send messages with an empty payload but non-empty signature
THis might happen when sending arrays with 0 enttries, hence this is not
an indication for a problem.
2013-12-10 02:57:46 +01:00
Lennart Poettering
9bb59c29f0 bus: update kdbus.h 2013-12-10 02:33:33 +01:00
Lennart Poettering
8f2e44f820 bus: make gcc shut up 2013-12-10 02:33:13 +01:00
Lennart Poettering
a99b3a4a9f update TODO 2013-12-10 01:11:43 +01:00
Lennart Poettering
72d87e6519 bus: beef up zero copy test case 2013-12-10 01:07:32 +01:00
Lennart Poettering
e1d337d462 bus: only accept gvariant native endian messages via kdbus 2013-12-10 01:07:09 +01:00
Lennart Poettering
d36b703136 bus: fix rewinding in gvariant messages 2013-12-10 01:06:52 +01:00
Lennart Poettering
5763192abf bus: fix signature handling when exiting container 2013-12-10 01:06:29 +01:00
Lennart Poettering
0039a203b1 bus: properly deserialize gvariant fixed size arrays 2013-12-10 01:05:23 +01:00
Lennart Poettering
d63850688d bus: handler empty messages correctly when using gvariant marshalling 2013-12-10 01:04:36 +01:00
Lennart Poettering
f30976971c bus: suppress creating empty parts in messages 2013-12-10 01:03:41 +01:00
Lennart Poettering
18f5b48f3f bus: rely on explicit eof check instead of checking when mapping payload
This allows us to drop quite a bit of code.
2013-12-09 23:24:17 +01:00
Lennart Poettering
813892259b bus: rearrange bus-message.c function order to keep read and write calls together 2013-12-09 23:16:14 +01:00
Lennart Poettering
6647dc6659 bus: demarshal gvariant 2013-12-09 23:04:49 +01:00
Lennart Poettering
d3a485135a extend CODING_STYLE document a bit 2013-12-09 23:04:05 +01:00
Zbigniew Jędrzejewski-Szmek
171754aa4a man: document 'is-enabled' output
https://bugzilla.redhat.com/show_bug.cgi?id=953077
2013-12-08 19:26:51 -05:00
Zbigniew Jędrzejewski-Szmek
04504f93d1 systemctl: fix 'is-enabled' 2013-12-08 19:26:51 -05:00
Zbigniew Jędrzejewski-Szmek
d08e75edf9 systemctl: simplify argument parsing 2013-12-08 19:26:51 -05:00
Zbigniew Jędrzejewski-Szmek
4f8f66cb42 Help output spring cleaning
Use [brackets] only for optional elements.
Use <optional> in XML sources.
2013-12-08 19:26:51 -05:00
Zbigniew Jędrzejewski-Szmek
a6c3d202b1 kernel-install: add -h/--help 2013-12-08 19:26:51 -05:00
Zbigniew Jędrzejewski-Szmek
014e7ea7f2 Trim TODO 2013-12-08 19:26:51 -05:00
Thomas Hindoe Paaboel Andersen
272bf69e98 bootchart: remove dead assignment 2013-12-08 22:28:37 +01:00
Dan McGee
f92ae4968f Fix memory leak in stdout journal streams
Just as 'identifier' is strdup-ed and freed, we need to do the same for
unit_id.
2013-12-08 13:15:59 -08:00
Kay Sievers
e13bb5d2b1 test: cgroup-util - do not fail if cpu controller is not available 2013-12-08 06:36:39 +01:00
Thomas Hindoe Paaboel Andersen
4c49ab0e7a systemctl: fix and refactor wait_for_jobs
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.
2013-12-07 22:39:46 +01:00
Zbigniew Jędrzejewski-Szmek
d8fba7c6cc systemctl: allow globbing in list-<whatever> commands
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.
2013-12-06 21:29:55 -05:00
Zbigniew Jędrzejewski-Szmek
2b6bf07dd2 Get rid of our reimplementation of basename
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.
2013-12-06 21:29:55 -05:00
Thomas Hindoe Paaboel Andersen
f433609894 systemctl: check the value from start_unit_one
introduced in f459b6025f
2013-12-06 21:13:46 +01:00
Kay Sievers
4ccbc14615 bus: catch up with latest kdbus changes 2013-12-06 21:11:37 +01:00
Kay Sievers
5e16c2575b bus: catch up with latest kdbus changes 2013-12-06 20:28:35 +01:00
Bastien Nocera
354806fb46 rfkill: Avoid error when state restore is disabled
When the state restore is disabled, we would print:
"Unknown verb: load" instead of simply skipping loading the
state.
2013-12-06 16:44:38 +01:00