1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00
Commit Graph

17392 Commits

Author SHA1 Message Date
Daniel Mack
bc75205c77 sd-bus: sync kdbus.h (ABI break)
In kdbus.h, the following details changed:

 * All commands gained a 'kernel_flags' field to report the flags supported
   by the driver. Before, this was done in the 'flags' field in a
   bidirectional way, which turned out to be a problem for the code in
   sd-bus, as many parts of it reuse the same ioctl struct more than once
   and consider them to be owned by userspace.

 * Name listings are now returned by a new struct instead of reusing struct
   kdbus_cmd_name for that matter. This way, we don't add more unneeded
   fields to it and make the API cleaner.

 * 'conn_flags' was renamed to 'flags' in struct kdbus_cmd_hello to make
   the API a bit more unified.
2014-10-21 19:19:44 +02:00
Michal Schmidt
14f27b4e3b strv: use realloc_multiply() to check for multiplication overflow
This could overflow on 32bit, where size_t is the same as unsigned.
2014-10-21 14:36:03 +02:00
Lennart Poettering
97569e154b strv: add an additional overflow check when enlarging strv()s
https://bugs.freedesktop.org/show_bug.cgi?id=76745
2014-10-21 14:01:28 +02:00
Ronny Chevalier
bb604b2f42 man: add examples for coredumpctl
Add examples to clarify how to use coredumpctl

See https://bugs.freedesktop.org/show_bug.cgi?id=83437
2014-10-21 01:16:17 +02:00
Ronny Chevalier
c45827d6e7 man: fix project reference for archlinux 2014-10-21 01:11:50 +02:00
Ronny Chevalier
d4873485cf man: add missing commas 2014-10-21 01:11:46 +02:00
Lennart Poettering
0b3b83e59b man: move one more nspawn example into a proper <example> section 2014-10-21 01:11:14 +02:00
Ronny Chevalier
1db8c66f2e man: use <example> instead of multiple <refsect1> for examples 2014-10-21 01:09:17 +02:00
Ronny Chevalier
e2e07fec7b shared: remove unused functions
- mkdir_p_prefix: It has never been used
- mkdir_parents_prefix_label: Unused since 1434ae6fd4
2014-10-21 00:40:44 +02:00
Ronny Chevalier
e4746b5738 util: avoid duplication of TIME_T_MAX 2014-10-21 00:38:30 +02:00
Lennart Poettering
6dab5bb181 update TODO 2014-10-20 22:03:36 +02:00
Christian Hesse
1cdf717550 sd-journal: consistently use ternary operator for all direction checks 2014-10-20 22:02:49 +02:00
Lennart Poettering
2dd1ca3fd6 bus-proxy: let's make use of the translated errors get_creds_by_name() provides us with 2014-10-20 21:50:37 +02:00
Lennart Poettering
24078eebf3 Revert "bus-proxyd: improve compatibility with dbus-1"
This reverts commit b0f84d4d78.

get_creds_by_name() already translate the error nicely, we just need to
make use of it.
2014-10-20 21:46:09 +02:00
Lennart Poettering
388ce34425 man: try to reword explanation of Sockets= a bit 2014-10-20 21:06:14 +02:00
Lukasz Skalski
659b937e67 kdbus: free returned buffer when the memory is no longer needed 2014-10-20 20:09:05 +02:00
Jan Synacek
cd4c6fb125 man: fix localectl set-x11-keymap syntax description 2014-10-20 19:23:13 +02:00
Lennart Poettering
78366f6ee0 update TODO 2014-10-20 19:23:13 +02:00
Lennart Poettering
5c20a8bca1 man: document sd_bus_creds_get_connection_name() 2014-10-20 19:23:13 +02:00
Lennart Poettering
b7ea3f3ed6 man: suffix C functions with () 2014-10-20 19:23:13 +02:00
Lennart Poettering
5c8da64734 man: document sd_machine_get_class() and sd_machine_get_ifindices() 2014-10-20 19:23:13 +02:00
Michal Schmidt
e6c253e363 sysctl.d: default to fq_codel, fight bufferbloat
Quoting from Jon Corbet's report of Stephen Hemminger's talk at Linux
Plumbers Conference 2014 (https://lwn.net/Articles/616241/):

    [...] So Stephen encouraged everybody to run a command like:

    sysctl -w net.core.default_qdisc=fq_codel

    That will cause fq_codel to be used for all future connections
    [Qdiscs apply to interfaces, not connections. Pointed out by TomH
    in the article comments. -- mschmidt] (up to the next reboot).
    Unfortunately, the default queuing discipline cannot be changed,
    since it will certainly disturb some user's workload somewhere.

Let's have the recommended default in systemd.

Thanks to Dave Täht for advice and the summary at
https://lists.bufferbloat.net/pipermail/cerowrt-devel/2014-October/003701.html
2014-10-20 18:19:00 +02:00
Daniel Mack
a2243d5488 sd-bus: sync kdbus.h (ABI break)
kdbus.h now has KDBUS_ATTACH_COMM split into KDBUS_ATTACH_TID_COMM and
KDBUS_ATTACH_PID_COMM. The items were split already, so the change in
systemd is easy.
2014-10-20 15:26:00 +02:00
Lukas Nykryn
8fc5cd71be shell-completion/bash: add add-wants and add-requires 2014-10-19 18:20:06 +02:00
Daniel Mack
4a3e79e1b6 sd-bus: sync kdbus.h (ABI break)
In kdbus.h, the 'features' field has been dropped again. Instead of
negotiating features that way, we decided to make the kernel return the
set of supported flags in each ioctl struct's .flags field, in both the
success and error cases.
2014-10-18 20:57:53 +02:00
Zbigniew Jędrzejewski-Szmek
e7bc519620 systemd: try harder to bind to notify socket
Without the socket open we are going to crash and burn. If for
whatever reason we fail during deserialization we will fail when
trying to open the socket. In this case it is better to unlink the old
socket and maybe lose some messages, than to continue without the
notification socket.

Of course this situation should not happen, but we should handle
it as gracefully as possible anyway.

https://bugzilla.redhat.com/show_bug.cgi?id=1099299
2014-10-17 10:09:27 -04:00
Zbigniew Jędrzejewski-Szmek
46849c3fb1 systemd: log deserialization errors as warnings
If we failed to parse something that we wrote ourselves,
things are seriously off. This is also likely to lead to
problems futher on.
2014-10-17 10:09:27 -04:00
Zbigniew Jędrzejewski-Szmek
d677d4df80 systemd: continue switch-root even if umount fails
Leaving the old root around seems better than aborting the
switch.
2014-10-17 10:09:27 -04:00
Daniel Mack
317cde8b80 nspawn: fix DeviceAllow list
Commit 864e17068 ("nspawn: actually allow access to /dev/net/tun in the
container") added "/dev/net/tun" to the list of allowed devices but forgot
to tweak the array length, which caused "/dev/kdbus/*" to be missed.
2014-10-17 16:07:12 +02:00
Lukas Nykryn
7491ccf2cb environment: append unit_id to error messages regarding EnvironmentFile 2014-10-17 16:05:57 +02:00
Zbigniew Jędrzejewski-Szmek
c7e4a7bece missing: remove fanotify
It was only used in readahead.
2014-10-17 08:55:42 -04:00
Lennart Poettering
8fa6cbe1a9 execute: downgrade namespace error to "warning"
Also, extend the printed warning a bit, explaining the situation more
verbosely.
2014-10-17 13:54:27 +02:00
Lennart Poettering
8a25e11e6c update TODO 2014-10-17 13:49:08 +02:00
Lennart Poettering
a004cb4cb2 namespace: add missing 'const' to parameters 2014-10-17 13:49:08 +02:00
Lennart Poettering
342641fb47 systemctl: by default interactively ask for polkit authorization, if possible
Also, allow using --no-ask-password to turn off ineractive polkit
authorization.
2014-10-17 13:49:08 +02:00
Michal Sekletar
0015ebf3fa execute: don't fail child when we don't have privileges to setup namespaces
If we don't have privileges to setup the namespaces then we are most likely
running inside some sort of unprivileged container, hence not being able to
create namespace is not a problem because spawned service can't access host
system anyway.
2014-10-17 11:51:46 +02:00
Kay Sievers
c32195e057 Revert "sd-bus: sync kdbus.h (ABI break)"
This reverts commit 1a2409e262.

Support from the kdbus interface was removed. We require
memfds to be supported by all clients.
2014-10-17 10:12:44 +02:00
Lukasz Skalski
f60e98b336 resolve: add missing header
Change-Id: I64f7c6b446f6d92057c35cc3d4e29bd2bad8f75b
2014-10-17 00:19:16 +02:00
Tom Gundersen
9536cf93b9 terminal: log unsupported ANSI or DEC mode changes 2014-10-16 14:43:57 +02:00
Tom Gundersen
7ee738ec33 terminal: split ANSI from DEC mode changes 2014-10-16 14:43:57 +02:00
David Strauss
80d3d25d09 man: fix copy/paste error in CPUQuota= section of resource-control 2014-10-15 16:50:44 +02:00
Jan Synacek
97426dcfca man: fix typos 2014-10-15 12:24:33 +02:00
Michal Sekletar
5e78424f4a selinux: fix potential double free crash in child process
Before returning from function we should reset ret to NULL, thus cleanup
function is nop.

Also context_str() returns pointer to a string containing context but not a
copy, hence we must make copy it explicitly.
2014-10-15 10:58:27 +02:00
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