Commit graph

17549 commits

Author SHA1 Message Date
Lukas Nykryn 3e883473a0 man: we don't have 'Wanted' dependency 2014-10-15 09:29:02 +02:00
Lukasz Skalski 14759eeb71 bus-proxyd: add missing flag translation for RequestName 2014-10-15 09:09:01 +02:00
Zbigniew Jędrzejewski-Szmek e9a19bd882 shell-completion: propose templates for disable/[re]enable/[re]start
Templates can be [re]enabled, on their own if the have DefaultInstance set,
and with an instance suffix in all cases. Propose just the template name
ending in @, to underline the instance suffix may have to be appended.

Likewise for start/restart.

This means that sometimes superflous units that one will not really
want to operate on will be proposed, but this seems better than
proposing a very incomplete set of names.

https://bugs.freedesktop.org/show_bug.cgi?id=66912
2014-10-14 21:20:05 -04:00
Zbigniew Jędrzejewski-Szmek f29c77bc01 shell-completion: fix completion of inactive units
Units which not loaded were not proposed properly. OTOH, we should
filter units from get-unit-files by their state if they are currently
loaded. Bring zsh completions in line with bash completion, the same
logic should be used in both implementations.

https://bugzilla.redhat.com/show_bug.cgi?id=1024379
https://bugzilla.redhat.com/show_bug.cgi?id=790768
https://bugs.freedesktop.org/show_bug.cgi?id=84720
2014-10-14 21:18:42 -04:00
Zbigniew Jędrzejewski-Szmek 1f8af042d9 journal-remote: fix mem leak on error 2014-10-14 21:18:41 -04:00
Daniel Mack 1a2409e262 sd-bus: sync kdbus.h (ABI break)
kdbus learned KDBUS_HELLO_ACCEPT_MEMFD as new connection negotiation
flag. Set it by default in systemd for now.
2014-10-14 20:03:06 +02:00
Lukasz Skalski b0f84d4d78 bus-proxyd: improve compatibility with dbus-1
'GetConnectionUnixProcessID', 'GetConnectionUnixUser' and
'GetConnectionSELinuxSecurityContext' methods should return
'NameHasNoOwner' error (if chosen name is not available on bus)
with more detailed description - like dbus-1:

Could not get PID of name 'org.freedesktop.test': no such name.
Could not get UID of name 'org.freedesktop.test': no such name.
Could not get security context of name 'org.freedesktop.test': no such name.

Otherwise we have only laconic message without proper dbus error:

Error System.Error.ENXIO: No such device or address
2014-10-14 19:39:55 +02:00
Dave Reisner 9ff5ff320e python-systemd: avoid hitting assert in __exit__
Reader_close() asserts that 'args' is always NULL, but the __exit__
function forwards a non-NULL args.
2014-10-14 08:35:16 -04:00
Zbigniew Jędrzejewski-Szmek a5a807e63a resolved: apply label to /run/systemd/resolve/resolv.conf
Under an SELinux system, we want the file that is created to
have a proper context, different from the default for files in /run.
This is so that the policy can give access to almost everyone to
this file.
2014-10-13 22:37:13 -04:00
Zbigniew Jędrzejewski-Szmek 4713135eae resolved: split out writing of resolv.conf
manager_write_resolv_conf() is quite long anyway.
2014-10-13 22:37:12 -04:00
Lennart Poettering b911eb1560 bus: check allow-interactive-auhtorization flag when doing polkit 2014-10-13 17:19:31 +02:00
Lennart Poettering 53a83f4bc0 sd-bus: add support for new allow-interactive-authorization message header flag 2014-10-13 17:19:31 +02:00
Lennart Poettering b576fcf43a polkit: as we dropped support for the polkit bus transport, also drop its polkit policy 2014-10-13 17:19:31 +02:00
Lennart Poettering 0f0cf2f00f update TODO 2014-10-13 17:19:31 +02:00
Lennart Poettering 08073121d8 systemctl: when mangle unit names for the "isolate", suffix with ".target" rather than ".service" by default
After all, we set AllowIsolate exclusively for target units so far, and
this is more or less the only thing tht makes sense, hence also use
".target" as completion suffix by default.
2014-10-13 17:19:31 +02:00
Lennart Poettering 2fc9a280cc systemctl: move unit action table closer to the functions that use them
All other static tables we placed next to the functions that access
them, so let's do this for the unit action table too.
2014-10-13 17:19:31 +02:00
Marko Myllynen 70ae006b43 fi-latin1 console keymap is no more
http://git.altlinux.org/people/legion/packages/kbd.git?p=kbd.git;a=commitdiff;h=a88711232f3216debbb02d0171187442863ccedb
2014-10-13 08:58:40 -04:00
Tom Gundersen fc292b5f58 test-dhcp-client: add more asserts 2014-10-13 10:07:29 +02:00
Dave Reisner e7aab54128 tmpfiles: compare return against correct errno
name_to_handle_at returns -EOPNOTSUPP, not -ENOTSUP.
2014-10-12 21:41:57 -04:00
Zbigniew Jędrzejewski-Szmek 654c2d478f man: join tables in systemd-detect-virt(1)
I think it is more readable and nicer if everything is in
one table.

Also, describe what the return value, since it seems awkward to
describe the change in behaviour with --quiet before describing
what the default is.
2014-10-12 18:28:07 -04:00
Zbigniew Jędrzejewski-Szmek 8d1d1bf20a tests: fix some tests to pass in koji
FAIL: test-engine
=================
Cannot find cgroup mount point: No such file or directory
Assertion 'r >= 0' failed at ../src/test/test-engine.c:46, function main(). Aborting.

FAIL: test-sched-prio
=====================
Cannot find cgroup mount point: No such file or directory
Assertion 'r >= 0' failed at ../src/test/test-sched-prio.c:42, function main(). Aborting.

FAIL: test-bus-cleanup
======================
Assertion 'sd_bus_open_system(&bus) >= 0' failed at ../src/libsystemd/sd-bus/test-bus-cleanup.c:40, function test_bus_open(). Aborting.
after new: refcount 1
2014-10-12 17:31:02 -04:00
Brandon L Black a158dbf156 Set $NOTIFY_SOCKET for control procs if NotifyAccess=all 2014-10-12 11:21:12 -04:00
Zbigniew Jędrzejewski-Szmek b1389b0d08 Modernization 2014-10-12 11:21:12 -04:00
David Herrmann 4623e36006 NEWS: don't mention noinst_* debug programs
systemd-evcat and systemd-modeset are not installed systemd wide and
should really just be used by developers to test the libsystemd-terminal
features. No reason to mention it in NEWS.. despite the undulating
rainbows..
2014-10-11 18:53:26 +02:00
David Herrmann f08f302732 terminal/grdrm: force deep modeset on enter
Usually, when our session is activated (or re-configurated) we should be
able to try a page-flip to our buffer. The kernel driver should reject it
if it is incompatible. As it turns out, drivers don't do this. Therefore,
we now force a deep modeset if we're not sure what mode is set.

This has the side-effect that we might get glitches on session-switches
(depending on driver behavior). However, there's no way around this and it
is what everyone does so far. Most drivers still detect if we keep the
mode and so don't touch the clocks. Therefore, we just get a regular async
flip.
2014-10-11 18:49:20 +02:00
Dan Williams 76253e73f9 sd-dhcp-client: support non-Ethernet hardware addresses
Like Infiniband.  See RFC 4390 section 2.1 for details on DHCP
and Infiniband; chaddr is zeroed, hlen is set to 0, and htype
is set to ARPHRD_INFINIBAND because IB hardware addresses
are 20 bytes in length.
2014-10-11 12:15:54 +02:00
Michael Scherer 5482192e57 Report aa_change_onexec error code
Since aa_change_onexec return the error code in errno, and return
-1, the current code do not give any useful information when
something fail. This make apparmor easier to debug, as seen on
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760526
2014-10-11 12:04:47 +02:00
Lukasz Skalski 547e849b72 bus-proxyd: fix compatibility with old dbus-1
'ListQueuedOwners' method should return 'NameHasNoOwner' error
if chosen name is not available on bus.
2014-10-10 23:43:59 +02:00
Emil Renner Berthing 0fff82e5f8 mount-setup: skip relabelling when SELinux and SMACK not supported
This is also the only place where FTW_ACTIONRETVAL is used, so
this makes systemd compile without SELinux or SMACK support
when the standard library doesn't support this extension.
2014-10-10 13:00:47 +02:00
Tobias Hunger 9f103625b1 fstab-generator: Honor mount.usr*= on kernel command line
This allows to configure boot loader entries for systems where the
root and usr filesystems are in different subvolumes (or even on
different drives).
2014-10-10 12:57:19 +02:00
Lukasz Skalski 82279e6966 kdbus: fix buffer overflow in bus_get_owner_kdbus() function
Commit 710fc9779b7c (kdbus repo) introduced attaching items[]
instead of name[] in kdbus_cmd_conn_info struct. Commit 581fe6c81
(systemd repo) caught up with this change, but item size was not
properly calculated.
2014-10-10 12:44:31 +02:00
Lennart Poettering e737ef153c man: reference table in systemd-detect-virt(1) from ConditionVirtualization= documentation 2014-10-10 12:37:21 +02:00
Lennart Poettering 26d32dc5ee man: include zVM in systemd-detect-virt list 2014-10-10 12:36:57 +02:00
Lennart Poettering a9d9ad1fa7 man: rework VM/container identifier list into a table, and include descriptions for all entries
(also remove chroot from the list, we don't detect that anymore)
2014-10-10 12:29:08 +02:00
Lennart Poettering 864e17068c nspawn: actually allow access to /dev/net/tun in the container
It's not sufficient to just copy the device node over, we need to update
the policy for it too.
2014-10-10 11:11:25 +02:00
Ivan Shapovalov 5516ae4419 systemd-hibernate-resume@.service: remove unnecessary ordering
They were left from an early review iteration, when hibernate-resume
functionality was intended to work also outside of initramfs.
Now this is not the case, and these dependencies became redundant
as systemd-fsck-root.service can never be part of initramfs, and
systemd-remount-fs.service makes little sense in it.
2014-10-09 23:53:15 -04:00
Zbigniew Jędrzejewski-Szmek 65e3a2cf7c build-sys: use -Wno-gnu-variable-sized-type-not-at-end under clang
Otherwise we get useless warnings about journal code.
2014-10-09 23:32:55 -04:00
Zbigniew Jędrzejewski-Szmek 4f47bb8c5e build-sys: use -Wno-typedef-redefinition only for clang
Our checks for -Wno-xxx switches do not work with gcc [1].

[1] https://gcc.gnu.org/wiki/FAQ#wnowarning
2014-10-09 23:32:54 -04:00
Zbigniew Jędrzejewski-Szmek afea8d3853 Update TODO 2014-10-09 23:32:34 -04:00
Rahul Sundaram b3a2a7ceb7 man: clarify what "microsoft" and "oracle" stand for
https://bugzilla.redhat.com/show_bug.cgi?id=1150477
2014-10-09 23:16:53 -04:00
Zbigniew Jędrzejewski-Szmek 8c06592fa1 systemctl: remove casts in formatting 2014-10-09 23:16:53 -04:00
Zbigniew Jędrzejewski-Szmek cab9b000f2 journalctl: use pager for --list-boots 2014-10-09 23:16:53 -04:00
Jan Janssen 06cc69d44c sd-journal: fix sd_journal_enumerate_unique skipping values
sd_journal_enumerate_unique will lock its mmap window to prevent it
from being released by calling mmap_cache_get with keep_always=true.
This call may return windows that are wider, but compatible with the
parameters provided to it.

This can result in a mismatch where the window to be released cannot
properly be selected, because we have more than one window matching the
parameters of mmap_cache_release. Therefore, introduce a release_cookie
to be used when releasing the window.

https://bugs.freedesktop.org/show_bug.cgi?id=79380
2014-10-09 23:16:36 -04:00
Zbigniew Jędrzejewski-Szmek 853bd5cc72 sd-journal: change check to assert
As of 0f99f74a14 'sd-journal: verify that object start with the field
name' this condition should never happen.
2014-10-09 22:51:35 -04:00
Zbigniew Jędrzejewski-Szmek 360af4cf6f sd-journal: do not reset sd_j_enumerate_unique position on error
systemctl would call sd_j_enumerate_unique() interleaved with
sd_j_next(). But the latter can remove a file if it detects an
error in it. In those circumstances sd_j_enumerate_unique would
restart with the first file in hashmap. With many corrupted files
sd_j_enumerate_unique might iterate over the list multiple times.

Avoid this by jumping to the next file in unique list if possible,
or setting a flag that tells sd_j_enumerate_unique that it is done
otherwise.
2014-10-09 22:44:29 -04:00
Lennart Poettering f280bcfb21 man: document the new "rescue" kernel command line option 2014-10-09 18:27:36 +02:00
Michal Schmidt 6041a7ee2c service: enter SERVICE_STOP_SIGTERM state after getting "STOPPING=1"
SERVICE_STOP would mean we're running the ExecStop command. That's not
the case with "STOPPING=1".
Instead we should enter the same state as if we just told the service
to stop, i.e. SERVICE_STOP_SIGTERM.

This fixes a bug where voluntarily exiting services would hang around in
deactivating state until timeout.
2014-10-09 17:48:01 +02:00
Lennart Poettering 384a4be2b0 update TODO 2014-10-09 16:51:39 +02:00
Daniel Mack 7ff3bb4e47 bus-proxy: allow getpeersec() to fail
getpeersec() will fail for non-SELinux enabled machines, so don't make that
a hard error.
2014-10-09 15:41:44 +02:00
Susant Sahani 25dbe4f50f socket-proxyd: Unchecked return value from library
CID 1237543 (#1 of 1): Unchecked return value from library
(CHECKED_RETURN)
2014-10-09 15:34:07 +02:00