1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

14997 Commits

Author SHA1 Message Date
Tom Gundersen
48a4612e6b sd-dhcp-client: recevie_message - verify cmsg_len before reading 2014-04-11 00:52:23 +02:00
Tom Gundersen
bc078e7163 sd-rtnl: use SO_PASSCRED
This unifies the socket handling with other sd-* libraries.
2014-04-11 00:52:23 +02:00
Thomas Hindoe Paaboel Andersen
5ba85788ab bash completion: add -i/--image to nspawn 2014-04-11 00:49:05 +02:00
Kay Sievers
862bbf89c6 bus: catch up with kdbus changes (ABI break) 2014-04-10 13:27:23 -07:00
Kay Sievers
dec51b29f9 bus: update kdbus.h 2014-04-10 13:02:35 -07:00
Kay Sievers
d8c21348df timedated: ignore initial delta in history data 2014-04-10 12:58:10 -07:00
Tom Gundersen
1b89cf5648 sd-rtnl: don't drop multi-part messages
We still only return the first message part in callback/synchronous calls.
2014-04-10 19:40:48 +02:00
Tom Gundersen
77768cbabc sd-rtnl: use GREEDY_REALLOC for message queues 2014-04-10 19:00:36 +02:00
Tom Gundersen
d47e1de40e sd-dhcp-client: test - fix for jenkins
This test should have been updated when changing the magic cookie handling around.

Reported by Ken MacLeod.
2014-04-10 17:08:32 +02:00
Philip Lorenz
70f539ca14 nspawn: Fix erroneous OOM when building group list
change_uid_gid() never initialises sz which may cause greedy_realloc to
skip the initial buffer allocation.
2014-04-10 09:50:39 -04:00
Lukas Nykryn
13be49798c cgls: fix running with -M option
systemd-machined doesn't store cgroup path in a state file anymore.
Let's figure it out from the scope.
2014-04-10 11:46:51 +02:00
David Herrmann
9541666b8d login: add 'mir' to the list of session types
Add Mir to the list of session types. This is implemented for LightDM
in lp:~robert-ancell/lightdm/xdg-session-desktop [1].

[1] https://code.launchpad.net/~robert-ancell/lightdm/xdg-session-desktop/+merge/214108

(david: adjusted commit-header and fixed whitespace issues)
2014-04-09 21:22:48 +02:00
Mike Gilbert
13468826f2 Document CONFIG_NET_NS as a required kernel option
Several units now utilize the PrivateNetwork parameter, which requires
network namespace support.
2014-04-09 11:21:16 +02:00
Tom Gundersen
7ff8f4b53c networkd: guard against NULL pointers
This should never be a problem, but better be safe than sorry.
2014-04-08 21:26:19 +02:00
Tom Gundersen
aa6fc9b8c8 sd-dhcp-client: include client id in debug messages 2014-04-08 19:16:30 +02:00
Zbigniew Jędrzejewski-Szmek
de41590a9b man: reword Persistent= description
I think it is easier to grok this way.
2014-04-07 21:02:47 -04:00
Zbigniew Jędrzejewski-Szmek
c4acff1275 test-dhcp-client: style fixes 2014-04-07 21:02:47 -04:00
Zbigniew Jędrzejewski-Szmek
938d2699d2 backlight: unify error messages 2014-04-07 21:02:33 -04:00
Tom Gundersen
d576127429 libsystemd-network: Speed up checksum computation using 64 bit integers
Improve the checksum computation by using 64 bit integers instead of the 16 bit
integers in the existing implementation. This change speeds up the computation
with approximately 78% both on 64 bit and 32 bit systems.

Please see RFC 1071 for details.
2014-04-07 15:39:21 +03:00
Tom Gundersen
298f77c60c ipv4ll: use BPF on raw socket
This should significantly reduce spurious wakeups.
2014-04-07 09:24:18 +02:00
Tom Gundersen
463b73e24e sd-ipv4ll: fix packet broadcasting
Umut said: 'I have noticed a bug that we are sending PROBE/ANNOUNCE messages on
00:00:00:00:00:00 address where it should be broadcast.'
2014-04-07 09:13:02 +02:00
Tom Gundersen
7429b07f82 sd-dhcp-client: improve BPF
Try a bit harder to make the kernel drop packets not for us. This should reduce
the number of wakeups from n^2 to n in the number of dhcp clients, which admittedly
only makes a differenc in very extreme cases.
2014-04-06 19:42:11 +02:00
Tom Gundersen
0c79c68d93 sd-dhcp-client: eagerly drop too small packets
If they are too small to fit the IP+UDP+DHCP headers they can be of no use, so
don't waste resources parsing them. This is at the cost of losing some verbosity
in the logging.
2014-04-06 19:42:11 +02:00
Tom Gundersen
3b7ca119fd sd-dhcp-client: move magic cookie into DHCPMessage struct
Also move the checking of it to the main message handler, rather than the
options parser.

Fix a bug, so we now drop the packet if any of the magic bytes don't match.
Before we used to only drop the packet if they were all wrong.
2014-04-06 19:36:05 +02:00
Tom Gundersen
19aa72f74e udev: net_id - use constants rather than magic numbers 2014-04-06 18:00:40 +02:00
Thomas Hindoe Paaboel Andersen
609211792b journal-remote-parse: avoid passing null to memchr
Found with scan-build
2014-04-06 11:55:20 +02:00
Kay Sievers
b2103dccb3 reduce the amount of messages logged to /dev/kmsg when "debug" is specified 2014-04-06 00:10:18 -04:00
Zbigniew Jędrzejewski-Szmek
b65f24238b systemd-python: fix failing assert
A parameter which was always null before, now get's set to
the module.
2014-04-05 13:30:08 -04:00
Zbigniew Jędrzejewski-Szmek
b532cf3722 systemd-python: use .hex instead of .get_hex()
It turns out the latter got removed in Python 3.

https://bugs.freedesktop.org/show_bug.cgi?id=77086
2014-04-05 13:30:07 -04:00
Zbigniew Jędrzejewski-Szmek
0830ba6189 build-sys: add newly used if_link.h defines to missing.h
Reported-by: Arnaud Gaboury <arnaud.gaboury@gmail.com>
2014-04-05 13:18:36 -04:00
Zbigniew Jędrzejewski-Szmek
ecb08ec6a5 Fix a few return codes in error paths 2014-04-05 00:55:19 -04:00
Florian Albrechtskirchinger
ee0e4cca5a tty-ask-password-agent: return negative errno
Return negative errno in wall_tty_block(). get_ctty_devnr() already
returns a negative errno in case of failure, no need to negate it again.

Reported-by: Simon <hwold@odai.homelinux.net>
2014-04-05 00:55:19 -04:00
Zbigniew Jędrzejewski-Szmek
b3ae710c25 systemctl: update NAME to PATTERN in help()
Previously the man page was modified, but not help().
2014-04-05 00:42:10 -04:00
Zbigniew Jędrzejewski-Szmek
a08ac7e0f7 logind: remove one cast 2014-04-05 00:42:10 -04:00
Zbigniew Jędrzejewski-Szmek
0ade5ffe27 journal: fix export of messages containing newlines
In "export" format, newlines are significant, and messages containing
newlines must be exported as "binary".
2014-04-05 00:42:01 -04:00
Zbigniew Jędrzejewski-Szmek
a36b8debe6 journalctl: free arg_file on exit 2014-04-05 00:41:35 -04:00
Thomas Bächler
3cadce7d33 backlight: do nothing if max_brightness is 0
On virtually any newer Asus mainboard, the eeepc-wmi driver is loaded.
It exposes a backlight device despite the lack of any physical backlight
devices. This fake backlight device has max_brightness set to 0. Since
the introduction of the clamp_brightness function, systemd-backlight
tries to write '1' to brightness and fails.

This patch changes systemd-backlight to exit gracefully when
max_brightness is 0 before performing any action. This affects
both the load and save actions.
2014-04-04 15:14:12 +02:00
Kay Sievers
51e430a5b0 bash_completion: busctl - add support for --user mode 2014-04-04 08:24:22 -04:00
Thomas Hindoe Paaboel Andersen
085ebc1b22 bash completion: Add -r/--recursive to systemctl 2014-04-03 22:54:41 +02:00
Tom Gundersen
60a0d61e7d network: default to IPv4LL on host0
Now that we have a graceful handover from IPv4LL to DHCP, there is no longer any reason to leave this off by default.
2014-04-03 19:09:22 +02:00
Susant Sahani
0a827d105d sd-rtnl: fix broken test cases and add support for tunnel
This patch fixes the broken test-cases for sd-rtnl and add support for ipip
and sit tunnel.

[tomegun: minor fixups]
2014-04-03 18:09:24 +02:00
Umut Tezduyar Lindskog
aba496a58a networkd: smooth transition from ipv4ll to dhcp address
Currently when both ipv4ll and dhcp are enabled, ipv4ll
address (if one has been claimed) is removed when dhcp
address is aquired. This is not the best thing to do
since there might be clients unaware of the removal
trying to communicate.

This patch provides a smooth transition between ipv4ll
and dhcp. If ipv4ll address was claimed [1] before dhcp,
address is marked as deprecated. Deprecated address is still
a valid address and packets can be received on it but address
cannot be selected as a source address. If dhcp lease cannot
be extended, then ipv4ll address is marked as valid again.

[1] If there is no collision, claiming IPv4LL takes between 4 to
7 seconds.
2014-04-03 16:00:25 +02:00
Umut Tezduyar Lindskog
3e790eae01 networkd: drop routes when lease expires 2014-04-03 16:00:19 +02:00
David Herrmann
8016b90484 logind: don't print error if devices vanish during ACL-init
If a device is unplugged while we initialize it, we will get ENOENT for
ACL-init (and related stuff). We currently print errors then, which is
misleading. Print a debug-message early and continue.
2014-04-02 16:25:40 +02:00
Kay Sievers
ca2bb1606a udev: do not export "static node" tags for non-existing devices 2014-04-02 15:47:09 +02:00
Tom Gundersen
bc29e507e2 sd-dhcp-client: use BPF on raw socket
Filter out everything except UDP packets destined for the DHCP client port,
this should avoid the vast majority of spurious wakeups.

Filter based on [0], with permission.

Possible improvemnts: also check for the DHCP magic cookie to drop invalid
packets. Check for our xid to filter out packets destined for other clients.

[0]: <https://github.com/ambrop72/badvpn/blob/master/dhcpclient/BDHCPClient.c#L57>
2014-04-02 14:49:51 +02:00
Kay Sievers
b6b20d1d36 build-sys: remove no longer needed user/org.freedesktop.DBus.busname 2014-04-02 11:34:59 +02:00
Thomas Hindoe Paaboel Andersen
5985ea4d17 build-sys: no use for compat libs in the static analysis 2014-04-01 22:32:44 +02:00
Tom Gundersen
bcf3ce7b39 sd-ipv4ll: speed up bind() in the same way as for dhcp 2014-04-01 21:29:56 +02:00
Daniel Buch
0ef298ab47 build-sys: workaround scan-build bug to fix ./autogen.sh s
It seems to be a clang-analyzer problem since it don't behave like
clang-compiler regarding -std={c99,gnu99}
2014-04-01 20:57:14 +02:00