Commit graph

21843 commits

Author SHA1 Message Date
David Herrmann e1439a1472 NEWS: update
Add 'machinectl shell' to NEWS and also update date and contributors
lists.
2015-08-27 17:03:18 +02:00
David Herrmann 154429127c sd-bus: do not connect to dbus-1 socket when kdbus is available
We should not fall back to dbus-1 and connect to the proxy when kdbus
returns an error that indicates that kdbus is running but just does not
accept new connections because of quota limits or something similar.

Based on a patch by Kay.
2015-08-27 16:43:02 +02:00
David Herrmann 057171efc1 Revert "sd-bus: do not connect to dbus-1 socket when kdbus is available"
This reverts commit d4d00020d6. The idea of
the commit is broken and needs to be reworked. We really cannot reduce
the bus-addresses to a single address. We always will have systemd with
native clients and legacy clients at the same time, so we also need both
addresses at the same time.
2015-08-27 16:32:22 +02:00
David Herrmann 8faae625dc selinux: drop mac_selinux_unit_access_check_strv()
It is not acceptable to load unit files during enable/disable operations
just to figure out the selinux labels. systemd implements lazy loading
for units, so the selinux hooks need to follow it.

This drops the mac_selinux_unit_access_check_strv() helper which
implements a non-acceptable policy check. If anyone cares for that
functionality, you really should pass a callback+userdata to the helpers
in src/shared/install.c which does policy checks on each touched file.

See #1050 on github for more.
2015-08-27 16:29:01 +02:00
David Herrmann 19bee5c367 sd-bus: rename bloom-tag to arg0-has
We use dashes in our bloom-tags. Make sure the newly introduced arg0has
tag uses the same style.

Note that the external dbus-tags don't use dashes, though. They are
defined in the spec and we need to keep compatibility there.
2015-08-27 16:29:01 +02:00
David Herrmann 21e654dae9 Merge pull request #1036 from poettering/sd-bus-arg0has
sd-bus: introduce new match type "arg0has=" for matching arrays of st…
2015-08-27 16:14:20 +02:00
David Herrmann 5f92c3ada6 Merge pull request #1024 from poettering/sd-bus-explicit
sd-bus: introduce new SD_BUS_VTABLE_PROPERTY_EXPLICIT flag
2015-08-27 16:12:52 +02:00
Kay Sievers 25568304d2 udev: control - add FIXME comment to remove work-around 2015-08-27 12:57:17 +02:00
Kay Sievers fd5a461316 hwdb: update 2015-08-26 18:38:30 +02:00
Kay Sievers 1aa28c9521 build-sys: bump versions 2015-08-26 16:09:17 +02:00
David Herrmann a00458421d sd-dhcp6: fix domainname memleak
strv_extend() does not consume the passed entry, hence, we must properly
free it. Furthermore, we should *not* use strv_consume() as we do greedy
allocations on 'ret'; and greedy-allocations should only be used for short
lived objects or caches.

Fix the domainname parser to properly free temporary storage when done.
2015-08-26 12:37:56 +02:00
David Herrmann e6b18ffaea sd-dhcp: don't randomly ref objects
In our API design, getter-functions don't ref objects. Calls like
foo_get_bar() will not ref 'bar'. We never do that and there is no real
reason to do it in single threaded APIs. If you need a ref-count, you
better take it yourself *BEFORE* doing anything else on the parent object
(as this might invalidate your pointer).

Right now, sd_dhcp?_get_lease() refs the lease it returns. A lot of
code-paths in systemd do not expect this and thus leak the lease
reference. Fix this by changing the API to not ref returned objects.
2015-08-26 12:30:56 +02:00
Daniel Mack 31ab68df9a Merge pull request #1048 from poettering/resolved-man
man: resolved man page updates (plus one to machinectl)
2015-08-26 12:01:56 +02:00
David Herrmann 86d17e1d73 Merge pull request #1047 from poettering/machinectl-TERM
machinectl: pass $TERM into "machinectl shell" sessions
2015-08-26 11:55:48 +02:00
Lennart Poettering 762a5766dc man: minor extension to the machinectl man page
s/an/any/, as reported by Vito Caputo.

Also mention explicitly that the security properties (i.e. SELinux) are
also isolated when "machinectl shell" is used.
2015-08-26 11:02:28 +02:00
Lennart Poettering 0d6868f9ae man: document nss-resolve 2015-08-26 11:00:09 +02:00
Martin Pitt be5afe9f5f Merge pull request #1044 from d-hatayama/fix_systemctl_abspath
selinux: fix regression of systemctl subcommands when absolute unit file paths are specified
2015-08-26 10:53:45 +02:00
Lennart Poettering 2dc6b11d29 man: document resolved's RR synthesizing and query routing 2015-08-26 10:30:06 +02:00
Lennart Poettering 031fc5a1ac Merge pull request #998 from vbatts/tar_nosparse_flag
import: don't create sparse tar archives
2015-08-26 10:09:11 +02:00
Lennart Poettering 89fec31893 machinectl: pass $TERM into "machinectl shell" sessions 2015-08-26 10:07:21 +02:00
Tom Gundersen aa036f1a23 Merge pull request #1046 from poettering/resolved-dump
dump resolved cache/zone info on SIGSUR1, plus one fix
2015-08-26 10:02:37 +02:00
Lennart Poettering d9fcf2ba1a manager: close hostname fd *after* removing it epoll
Otherwise the epoll removal will fail and result in a warning.
2015-08-26 09:42:06 +02:00
Lennart Poettering 4d506d6bb7 resolved: dump cache and zone contents to syslog on SIGUSR1 2015-08-26 09:41:45 +02:00
Marcel Holtmann da1d9fc2cc hwdb: Update database of Bluetooth company identifiers 2015-08-26 09:21:02 +02:00
HATAYAMA Daisuke 9fa7c1aeb9 selinux: fix regression of systemctl subcommands when absolute unit file paths are specified
The commit 4938696301 overlooked the
fact that unit files can be specified as unit file paths, not unit
file names, wrongly passing a unit file path to the 1st argument of
manager_load_unit() that handles it as a unit file name. As a result,
the following 4 systemctl subcommands:

    enable
    disable
    reenable
    link
    mask
    unmask

fail with the following error message:

    # systemctl enable /usr/lib/systemd/system/kdump.service
    Failed to execute operation: Unit name /usr/lib/systemd/system/kdump.service is not valid.
    # systemctl disable /usr/lib/systemd/system/kdump.service
    Failed to execute operation: Unit name /usr/lib/systemd/system/kdump.service is not valid.
    # systemctl reenable /usr/lib/systemd/system/kdump.service
    Failed to execute operation: Unit name /usr/lib/systemd/system/kdump.service is not valid.
    # cp /usr/lib/systemd/system/kdump.service /tmp/
    # systemctl link /tmp/kdump.service
    Failed to execute operation: Unit name /tmp/kdump.service is not valid.
    # systemctl mask /usr/lib/systemd/system/kdump.service
    Failed to execute operation: Unit name /usr/lib/systemd/system/kdump.service is not valid.
    # systemctl unmask /usr/lib/systemd/system/kdump.service
    Failed to execute operation: Unit name /usr/lib/systemd/system/kdump.service is not valid.

To fix the issue, first check whether a unit file is passed as a unit
file name or a unit file path, and then pass the unit file to the
appropreate argument of manager_load_unit().

By the way, even with this commit mask and unmask reject unit file
paths as follows and this is a correct behavior:

    # systemctl mask /usr/lib/systemd/system/kdump.service
    Failed to execute operation: Invalid argument
    # systemctl unmask /usr/lib/systemd/system/kdump.service
    Failed to execute operation: Invalid argument
2015-08-26 15:00:05 +09:00
Daniel Mack 7c268a0489 Merge pull request #1043 from phomes/master
test-util: fix a memleak
2015-08-26 00:05:33 +02:00
Daniel Mack 487ebe593c Merge pull request #1039 from poettering/nspawn-machine-template
nspawn: make sure --template= and --machine= my be combined
2015-08-25 23:58:40 +02:00
Daniel Mack 6a18bd1616 Merge pull request #1038 from poettering/coredumpctl-directory
Add --directory= option for reading alternate journal
2015-08-25 23:58:03 +02:00
Daniel Mack a0cb22c475 Merge pull request #1040 from poettering/cgroup-path-fix
fix "systemctl status idontexist.service" showing the full cgroup tree
2015-08-25 23:57:28 +02:00
Thomas Hindoe Paaboel Andersen 21e5a0bea0 test-util: fix a memleak 2015-08-25 23:52:18 +02:00
Daniel Mack d8b7e75f51 resolve: fix regression in dns-scope
Bring back a return statement 106784eb errornously removed.

Thanks to @phomes for reporting.
2015-08-25 23:51:34 +02:00
Daniel Mack 13918f62ff Merge pull request #1041 from phomes/master
trivial cleanups
2015-08-25 23:48:07 +02:00
Daniel Mack 4ece412faf Merge pull request #1034 from poettering/resolved-fixes-2
various resolved fixes
2015-08-25 23:47:30 +02:00
Thomas Hindoe Paaboel Andersen c615b4ba9f machinectl: remove unused variable 2015-08-25 21:15:54 +02:00
Thomas Hindoe Paaboel Andersen 2307f37e46 execute: make the invalid entry of the enum -1
Set _EXEC_UTMP_MODE_INVALID to -1. This matches the return value from
string_table_lookup.
2015-08-25 21:15:54 +02:00
Lennart Poettering 98bac6058c core: report root cgroup as "/" over the bus
Internally, the root cgroup is stored as the empty string in
Unit.cgroup_path, and "no cgroup" as NULL. Unfortunately, D-Bus does not
know a NULL concept, hence when reporting the cgroup to clients we
should turn the root cgroup into "/", and leave the empty string for the
"no cgroup" case.

This should make sure that "systemctl status -- -.slice" works correctly
and shows the entire cgroup tree.
2015-08-25 20:42:50 +02:00
Lennart Poettering 37a0d5bf21 Revert "systemctl: properly handle empty control group paths in "status""
This reverts commit b04c25f9ef.
2015-08-25 20:37:54 +02:00
Lennart Poettering c1521918b4 nspawn: make sure --template= and --machine= my be combined
Fixes #1018.

Based on a patch from Seth Jennings.
2015-08-25 20:28:31 +02:00
Lennart Poettering f6a4dae6a5 man: minor fixes to coredumpctl(1) 2015-08-25 20:06:46 +02:00
Stef Walter b73e9a024b coredumpctl: Add --directory option for reading alternate journal
In the Cockpit integration tests we hang onton the journal files
for a failed test and would like to inspect them using coredumpctl.

This commit adds the ability to specify an alternate directory
for coredumpctl to read the journal from.
2015-08-25 20:06:43 +02:00
Lennart Poettering eccd47c5be sd-bus: introduce new match type "arg0has=" for matching arrays of strings
Previously, sd-bus inofficially already supported bus matches that
tested a string against an array of strings ("as"). This was done via an
enhanced way to interpret "arg0=" matches. This is problematic however,
since clients have no way to determine if their respective
implementation understood strv matches or not, thus allowing invalid
matches to be installed without a way to detect that.

This patch changes the logic to only allow such matches with a new
"arg0has=" syntax. This has the benefit that non-conforming
implementations will return a parse error and a client application may
thus efficiently detect support for the match type.

Matches of this type are useful for "udev"-like systems that "tag" objects
with a number of strings, and clients need to be able to match against
any of these "tags".

The name "has" takes inspiration from Python's ".has_key()" construct.
2015-08-25 19:28:30 +02:00
Lennart Poettering f0258e4736 resolved: add comments to DNS_PACKET_MAKE_FLAGS() clarifying DNS vs LLMNR
Some flags are defined differently on unicast DNS and LLMNR, let's
document this in the DNS_PACKET_MAKE_FLAGS() macro.
2015-08-25 19:04:04 +02:00
Lennart Poettering 069360a66a resolved: make packet flags logic more expressive again
This partially reverts 106784ebb7, ad
readds separate DNS_PACKET_MAKE_FLAGS() invocations for the LLMNR and
DNS case. This is important since SOme flags have different names and
meanings on LLMNR and on DNS and we should clarify that via the comments
and how we put things together.
2015-08-25 18:54:55 +02:00
Lennart Poettering 4667e00a61 resolved: rename DNS UDP socket to 'dns_udp_fd'
This hopefully makes this a bit more expressive and clarifies that the
fd is not used for the DNS TCP socket. This also mimics how the LLMNR
UDP fd is named in the manager object.
2015-08-25 18:51:23 +02:00
Tom Gundersen 33c1c9745c Merge pull request #1033 from poettering/machine-fixes
misc machine fixes
2015-08-25 18:50:44 +02:00
Lennart Poettering 8bed4cbcc0 bus-util: make more properties settable in --property=
Add a couple of new properties to the supported set we can pass in
systemd-run's and systemd-nspawn's --property= switch.
2015-08-25 18:39:50 +02:00
Lennart Poettering 6cd16034fc man: add hyphen to improve man text 2015-08-25 18:37:53 +02:00
Lennart Poettering 7e9cc4361d core: drop spurious new line 2015-08-25 18:37:31 +02:00
Lennart Poettering a1104deef0 machine: policykit string fixes 2015-08-25 18:37:16 +02:00
Tom Gundersen 498fb56739 Merge pull request #1022 from poettering/machinectl-shell
Add new "machinectl shell" command for su(1)-like behaviour
2015-08-25 16:46:27 +02:00