1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-14 15:21:37 +03:00
Commit Graph

17906 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
568981d2ac missing: add __NR_getrandom for a few more archs
Mips has getrandom() too, but there's just too many variants
for me too care. Either someone who cares does it, or they get
compile-time warnings with old kernel headers.
2014-11-22 12:04:53 -05:00
Lukas Nykryn
1e648011b2 selinux-access: fix broken ternary operator
it seems to be a typo introduced by ebcf1f97de
-                _r = selinux_access_check(_b, _m, _u->source_path ?:_u->fragment_path, (permission), &_error); \
+        ({ Unit *_unit = (unit); selinux_generic_access_check(bus,message, _unit->fragment_path ?: _unit->fragment_path, permission,error); })
2014-11-21 21:23:39 +01:00
Lennart Poettering
43dbecd5a3 man: don't mix 2ch and 8ch indentation in busctl.xml 2014-11-21 20:46:01 +01:00
Lennart Poettering
3802a3d3d7 man: add emacs header to get correct indention in nxml-mode for the manpage XML files that use 2ch indenting
In the long run we really should figure out if we want to stick with 8ch
or 2ch indenting, and not continue with half-and-half. For now, just
make emacs aware of the files that use 2ch indenting.
2014-11-21 20:44:48 +01:00
Lennart Poettering
a44b10818a busctl: add --timeout= option to specify method call timeout 2014-11-21 20:31:50 +01:00
Lennart Poettering
3805157836 busctl: add options to control message header flags when invoking methods 2014-11-21 20:13:26 +01:00
Martin Pitt
574edc9006 nspawn: Add try-{host,guest} journal link modes
--link-journal={host,guest} fail if the host does not have persistent
journalling enabled and /var/log/journal/ does not exist. Even worse, as there
is no stdout/err any more, there is no error message to point that out.

Introduce two new modes "try-host" and "try-guest" which don't fail in this
case, and instead just silently skip the guest journal setup.

Change -j to mean "try-guest" instead of "guest", and fix the wrong --help
output for it (it said "host" before).

Change systemd-nspawn@.service.in to use "try-guest" so that this unit works
with both persistent and non-persistent journals on the host without failing.

https://bugs.debian.org/770275
2014-11-21 14:27:26 +01:00
Lennart Poettering
812bd1e6ab units: make sure rfkill service is bount to the actual hardware 2014-11-21 01:20:57 +01:00
Lennart Poettering
eab459bc06 Revert "systemd-logind.service: set Type=notify"
This reverts commit a4962513c5.

logind.service is a D-Bus service, hence we should use the dbus name as
indication that we are up. Type=dbus is implied if BusName= is
specified, as it is in this case.

This removes a warning that is printed because a BusName= is specified
for a Type=notify unit.
2014-11-21 01:17:52 +01:00
Martin Pitt
797e7a51cd tmpfiles.d: Create /var/lib/containers
Create /var/lib/containers so that it exists with an appropriate mode. We want
0700 by default so that users on the host aren't able to call suid root
binaries in the container. This becomes a security issue if a user can enter a
container as root, create a suid root binary, and call that from the host.
(This assumes that containers are caged by mandatory access control or are
started as user).
2014-11-21 00:34:26 +01:00
Lennart Poettering
1fc5560911 busctl: show property values in "introspect" output, add "set-property" command, and support both a terse and a verbose output format 2014-11-21 00:32:02 +01:00
Lennart Poettering
b18ec7e29f busctl: when --address is specified do not assume we connect to a full bus 2014-11-21 00:32:02 +01:00
Lennart Poettering
79f34de9fb busctl: use canned error message on parse failure 2014-11-21 00:32:02 +01:00
Lennart Poettering
0ca454d474 sd-bus: create clean error when a property Set() call with incorrect signature is passed in 2014-11-21 00:32:02 +01:00
Lennart Poettering
609c302907 build: avoid trailing whitespace in feature string 2014-11-21 00:32:02 +01:00
Jakub Filak
ad450c3e04 util: add functions getting proc cwd and root
/proc/[pid]/cwd and /proc/[pid]/root are symliks to corresponding
directories

The added functions returns values of that symlinks.
2014-11-21 00:32:02 +01:00
Thomas Haller
1c6eb4e36b sd-dhcp-lease: fix copy-paste error asserting wrong function argument 2014-11-20 16:51:29 +01:00
Lennart Poettering
73fc23c064 busctl: pass error output to stdout (rather than stderr) when generate tree for all objects
This is a ton more useful when some services fail, since we continue
crawling then and output everything to a pager.
2014-11-20 00:01:05 +01:00
Lennart Poettering
d0b2babf52 busctl: improve output of service creds 2014-11-20 00:01:05 +01:00
Lennart Poettering
0171da06ef busctl: add new "introspect" verb for introspecting objects 2014-11-20 00:01:05 +01:00
Lennart Poettering
9b772efb41 sd-bus: refuse properties that claim to be both writable and constant at the same time 2014-11-20 00:01:05 +01:00
Lennart Poettering
4c3f1641f1 core: watchdog bus properties cannot be both writable and constant 2014-11-20 00:01:05 +01:00
Lennart Poettering
e1ba963fdf tests: fix minor memory leak 2014-11-20 00:01:05 +01:00
Lennart Poettering
575ccc1b69 set: make set_consume() actually free the allocated string if the string already is in the set 2014-11-20 00:01:05 +01:00
Lennart Poettering
a1ad376761 busctl: split out introspection parser from tree logic so that we can reuse it for a future "busctl introspect" command 2014-11-20 00:01:05 +01:00
Dave Reisner
a4962513c5 systemd-logind.service: set Type=notify
The code already calls sd_notify("READY=1"), so we may as well take
advantage of the startup behavior in the unit. The same was done for
the journal in a87a38c20.
2014-11-19 08:13:34 -05:00
Dan Williams
e37f74a6d5 sd-dhcp-lease: load/save client ID
The lease is usually tied to the client ID, so users of the
lease may want to know what client ID it was acquired with.
2014-11-19 00:58:51 +01:00
Dan Williams
ba6c0fd630 sd-dhcp-client: allow getting/setting the client ID
The client identifier can be in many different formats, not just
the one that systemd creates from the Ethernet MAC address.  Non-
ethernet interfaces may have different client IDs formats.  Users
may also have custom client IDs that the wish to use to preserve
lease options delivered by servers configured with the existing
client ID.
2014-11-19 00:53:24 +01:00
Lennart Poettering
7b0fce617c update TODO 2014-11-19 00:19:40 +01:00
Tom Gundersen
1dc24d5f48 sd-dhcp-lease: expose load/save functions
Based on patch by Dan Williams.
2014-11-18 19:10:37 +01:00
Dan Williams
d8d74ef06f sd-dhcp-client: fix REBOOT state handling
client->secs wasn't getting set in the REBOOT state, causing
an assertion.  REBOOT should work the same way as INIT, per
RFC 2131:

 secs   2  Filled in by client, seconds elapsed since client
           began address acquisition or renewal process.

REBOOT is necessary because some DHCP servers (eg on
home routers) do not hand back the same IP address unless the
'ciaddr' field is filled with that address, which DISCOVER
cannot do per the RFCs.  This leads to multiple leases
on machine reboot or DHCP client restart.
2014-11-18 18:25:43 +01:00
Susant Sahani
b77acbcf7d namespace: unchecked return value from library
fix:

CID 1237553 (#1 of 6): Unchecked return value from library
(CHECKED_RETURN

CID 1237553 (#3 of 6): Unchecked return value from library
(CHECKED_RETURN)

CID 1237553 (#4 of 6): Unchecked return value from library
(CHECKED_RETURN)

CID 1237553 (#5 of 6): Unchecked return value from library
(CHECKED_RETURN

CID 1237553 (#6 of 6): Unchecked return value from library
(CHECKED_RETURN)
2014-11-17 12:06:40 +01:00
Susant Sahani
3aeaee978a bus-socket: fix CID#996290 Unchecked return value 2014-11-17 11:00:14 +01:00
Susant Sahani
0c9eefb7e3 resolve: fix CID#1237549 Unchecked return value 2014-11-17 10:58:55 +01:00
Susant Sahani
9593d9d9d5 log: unchecked return value from library
fix 1237557 Unchecked return value from library
2014-11-17 10:57:00 +01:00
Ronny Chevalier
c9732bae8f udev: silence TOCTOU warning when creating a directory
CID#979416. There is no real race here to fix, but lets make coverity
happy and rework the code.

Note that we still fail if the directory is removed _after_ we ran
mkdir(), so the same race is still there. Coverity is complaining, though.
Rewrite the code to make it happy.

(David: rewrote the commit-message to note that this is not a race. If I'm
        wrong, blame me, not Ronny!)
2014-11-16 19:38:08 +01:00
Thomas Hindoe Paaboel Andersen
8e24a4f8b6 pam_systemd: remove unused null check
username was already checked with isempty() and cannot be null at
this point.

CID#1237766
2014-11-15 23:47:39 +01:00
Thomas Hindoe Paaboel Andersen
85e74b26c3 autogen: drop unnecessary -Wno-gnu for the clang shortcut
It is no longer necessary after 65e3a2cf7c
where -Wno-gnu-variable-sized-type-not-at-end is added if we detect
that the compiler is clang.
2014-11-15 21:32:59 +01:00
Lennart Poettering
e341912313 bus-proxy: avoid redundant name validity checks
Our API calls check the validity of bus names anyway, hence we don't
have to do this before calling them...
2014-11-14 20:06:20 +01:00
Lennart Poettering
f5d8989ce5 bus-proxy: properly check for bus name prefixes when enforcing policy 2014-11-14 20:06:01 +01:00
Lennart Poettering
49d4b1eecf bus-proxy: drop broken access check in driver
The access check call was broken (as it tried to read a service name
from the UpdateActivationEnvironment() method call which doesn't carry
any). Also, it's unnecessary to make any access checks here, as we just
forward the call to PID 1 which should do the access checks necessary.
2014-11-14 18:47:59 +01:00
Lennart Poettering
5f68e74b6a kmod-setup: improve for "kdbus" word on the kernel cmdline
We really shouldn't check for words with "strstr()"...
2014-11-14 18:02:30 +01:00
Lennart Poettering
f84f9974d8 kmod: move #ifdef checks for kmod-setup out of main.c into kmod-setup.c 2014-11-14 17:58:32 +01:00
Lennart Poettering
264b807071 update TODO 2014-11-14 17:55:19 +01:00
Lennart Poettering
d55192add7 busctl: introduce busctl "get-property" command for reading and dumping object properties 2014-11-14 17:52:40 +01:00
Daniel Mack
2e75e2a8f5 mount-setup: remove mount_setup_late()
Turns out we can just do kmod_setup() earlier, before we do mount_setup(),
so there's no need for mount_setup_late() anymore. Instead, put kdbusfs in
mount_table[].
2014-11-14 15:18:56 +01:00
Lennart Poettering
56c8b52d4d busctl: various tweaks to "busctl tree" output 2014-11-14 13:18:51 +01:00
Lennart Poettering
86349ffe49 man: various tweaks for busctl(1) man page 2014-11-14 13:18:51 +01:00
Lennart Poettering
781fa93815 busctl: add new "call" command to invoke methods on a service 2014-11-14 13:18:51 +01:00
Lennart Poettering
8022212b3b sd-bus: add sd_bus_message_is_empty() for checking whether a message carries any body 2014-11-14 13:18:51 +01:00