1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 16:59:03 +03:00
Commit Graph

15086 Commits

Author SHA1 Message Date
Tom Gundersen
1403f45ab6 sd-rtnl: multi-part message - store as linked-list rather than independent messages
This means the API can stay the same as for single-part messages by simply passing the head message around. Unrefing
the head of the linked list unrefs the whole list.
2014-04-14 17:53:21 +02:00
Tom Gundersen
e00d77ddd5 sd-rtnl: message_addr - expose a few more getters 2014-04-14 17:53:01 +02:00
Tom Gundersen
e9189a1f56 networkd: link - ignore missing MAC address from NEWLINK message
The kernel may broadcast such messages, simply discard them.
2014-04-14 17:53:01 +02:00
Kay Sievers
d060b62fcb hwdb: PCI - include "primary" model string in subsystem model string
The data in the PCI ids file is randomly inconsistent. Many
subvendor model strings just describe the "product" where the
hardware is built into, not the hardware itself. This causes
some "Network Card Model Foo" to show up as "Laptop Model Bar".

Try to make the best out of this mess and concatenate both
strings to describe the hardware.
2014-04-14 08:21:52 -07:00
Kay Sievers
dbe633cc02 hwdb: update 2014-04-14 08:21:51 -07:00
Lennart Poettering
d96ea5048b util: ignore kernel errors reported via close(), unless it is EBADF
The kernel can return pretty much anything there, even though the fd is
closed. Let's not get confused by that.
2014-04-13 20:01:41 -07:00
Kay Sievers
3ebdb81ef0 udev: serialize/synchronize block device event handling with file locks 2014-04-13 19:54:27 -07:00
Lennart Poettering
2f1a3d0868 bus-proxy: when replying to bus calls set a synthetic serial number and patch the sender address
Otherwise old libdbus1 is confused and will not accept our replies.
2014-04-13 19:43:00 -07:00
Lennart Poettering
2a0abe5b6d bus: process AddMatch/RemoveMatch driver call in proxy
Previously, AddMatch/RemoveMatch calls where processed exclusively in
the proxy. That's racy however, since subscribing to a signal might not
complete before the signal is sent due to some subsequent method call.
Hence, in order to expose the same ordering guarantees as dbus1 process
the AddMatch/RemoveMatch calls from the proxy, so that they are
dispatched synchronously to all following messages, thus fixing the
race.

Ultimately, we should probabably dissolve the driver entirely into the
proxy, as it is purely a compatibility feature anyway...
2014-04-13 18:34:55 -07:00
Lennart Poettering
6e0369b0ff man: explain that the timestamps on incoming kdbus messages are not necessarily monotonically increasing 2014-04-13 17:42:11 -07:00
Lennart Poettering
11fb37f16e update TODO 2014-04-13 17:41:51 -07:00
Lennart Poettering
bdb65e785a build-sys: add Makefile symlink 2014-04-13 17:41:02 -07:00
Lennart Poettering
01083ad094 update TODO 2014-04-13 17:41:01 -07:00
Lennart Poettering
faae655de3 man: add man page for sd_event_new() 2014-04-13 17:41:01 -07:00
Kay Sievers
9ea28c55a2 udev: remove seqnum API and all assumptions about seqnums
The way the kernel namespaces have been implemented breaks assumptions
udev made regarding uevent sequence numbers. Creating devices in a
namespace "steals" uevents and its sequence numbers from the host. It
confuses the "udevadmin settle" logic, which might block until util a
timeout is reached, even when no uevent is pending.

Remove any assumptions about sequence numbers and deprecate libudev's
API exposing these numbers; none of that can reliably be used anymore
when namespaces are involved.
2014-04-13 17:12:14 -07:00
Dan Kilman
a163b64c4b bash completion: fix __get_startable_units 2014-04-13 11:39:43 -04:00
Zbigniew Jędrzejewski-Szmek
b972115c97 path-util: also check for existence of binary when given absolute path
In contrast to a filename-only argument, find_binary() did not
actually check if an path exists, allowing the code to fail later on.
This was OK, but it seems nicer to treat both paths identically.

Also take advantage of path_make_absolute_cwd doing strdup() by itself
if necessary to simplify.
2014-04-12 17:23:13 -04:00
Mike Gilbert
eb66db55fc fsck: Search for fsck.type in PATH
Modifies find_binary() to accept NULL in the second argument.

fsck.type lookup logic moved to new fsck_exists() function, with a test.
2014-04-12 17:23:13 -04:00
Marcel Holtmann
b189101727 hwdb: Update database of Bluetooth company identifiers 2014-04-12 10:38:16 -07:00
Tanu Kaskinen
05a2f6fefe man: mention XDG_CONFIG_HOME in systemd.unit 2014-04-12 13:12:32 -04:00
Cristian Rodríguez
aca33b078c build: if -fstack-protector-strong is available, use it. 2014-04-12 11:56:07 -04:00
Thomas Bächler
472fc28fda core: Make sure a stamp file exists for all Persistent=true timers
If a persistent timer has no stamp file yet, it behaves just like a normal
timer until it runs for the first time. If the system is always shut down
while the timer is supposed to run, a stamp file is never created and
Peristent=true has no effect.

This patch fixes this by creating a stamp file with the current time
when the timer is first started.
2014-04-12 10:20:55 -04:00
Zbigniew Jędrzejewski-Szmek
baf167ee0a journal: properly detect language specified in line
... it turns out that the duplicates in our own catalog were not real
duplicates, but translations.
2014-04-12 10:20:55 -04:00
Zbigniew Jędrzejewski-Szmek
e3b9d9c802 journal: cleanup up error handling in update_catalog()
- Negative/positive errno mixup caused duplicates not to be detected properly.
  Now we get a warning about some duplicate entries in our own catalogs...
- Errors in update_catalog would be ignored, but they should not be.
2014-04-12 10:20:55 -04:00
Zbigniew Jędrzejewski-Szmek
6e00a80641 test-dhcp-client: unref lease objects to make valgrind happy
Also unref client objects in test code, and initalize logging,
to DEBUG by default.
2014-04-12 10:20:55 -04:00
Zbigniew Jędrzejewski-Szmek
ca2d378414 Unify GREEDY_REALLOC and GREEDY_REALLOC_T
greedy_realloc() and greedy_realloc0() now store the allocated
size as the count, not bytes.

Replace GREEDY_REALLOC uses with GREEDY_REALLOC_T everywhere,
and then rename GREEDY_REALLOC_T to GREEDY_REALLOC. It is just
too error-prone to have two slightly different macros which do the
same thing.
2014-04-12 10:20:55 -04:00
Tom Gundersen
7cc832b91e networkd: link - require both RUNNING and LOWER_UP before using link
Usually RUNNING implies LOWER_UP, but for drivers that don't support oper state, RUNNING can
also mean that the state is unknown. In that case we should just trust LOWER_UP directly.
2014-04-12 12:48:12 +02:00
Tom Gundersen
ffba61663a networkd: wait for IFF_RUNNING rather than IFF_LOWER_UP
The interface is not fully ready until it enterns RUNNING. This was causing
problems with sending out DHCP messages before the interface was ready, so they
would get lost. In particular this affected DHCP INIT-REBOOT, as it relies on
the first package sent being successful (or it will fall back to a full reboot).

Also improve the logging a lot, to make future debugging of link state a lot
easier.
2014-04-12 12:06:28 +02:00
Tom Gundersen
730b306208 sd-dhcp-client: drop logging about T1/T2
These are redundant now that the REQUEST messages contain the same information.
2014-04-12 11:20:28 +02:00
Tom Gundersen
998d804702 sd-dhcp-client: improve logging
Specify what kind of REQUEST we send, and distinguish between REBOOT and START.
Also log stop reasons as strings rather than numbers.
2014-04-12 01:01:13 +02:00
Tom Gundersen
7739a40b45 sd-dhcp-client: use client_initialiez and client_restart for REBOOT 2014-04-12 00:34:05 +02:00
Tom Gundersen
702807365e networkd: add an assert
This error should never happen, so replace the check with an assert. The check
was anyway broken due to an uninitialized return value.

Reported by Thomas Hindoe Paaboel Andersen <phomes@gmail.com>.
2014-04-11 23:57:18 +02:00
Tom Gundersen
50d6810ea8 sd-dhcp-client: document message creation a bit more
Also reshuffle some code to make the correspondence with the RFC a bit more
obvious.

Small functional change: fail if we try to send a message from the wrong state.
2014-04-11 22:24:26 +02:00
Tom Gundersen
8a9e761600 sd-dhcp-client: assert that we can only create DISCOVER or REQUEST messages 2014-04-11 22:24:25 +02:00
Tom Gundersen
eb105b96d5 sd-dhcp-client: rebind raw socket when resetting transaction id
As we are now filtering the raw socket based on the transaction id, we must
reset the BPF when we reset the transaction id.
2014-04-11 18:02:54 +02:00
Patrik Flykt
4d978a4669 sd-ipv4ll: Add an explicit stop state for IPv4LL
Add an explicit stop state for IPv4LL so that the user can stop the
IPv4LL client from the callback. When returning from the callback,
check also the stop state in order to halt any further protocol
processing.
2014-04-11 10:54:12 +03:00
Patrik Flykt
56cd007ab8 sd-ipv4ll: Add reference counting for IPv4LL
Similar to DHCP, the IPv4LL library user can decide to free the LL
client any time the callback is called. Guard against freeing the
LL client in the callback by introducing proper reference counting.

Also update code using the IPv4LL library to properly handle a
returned NULL from the notify and stop functions if the IPv4LL
client was freed.
2014-04-11 10:53:52 +03:00
Patrik Flykt
781ca7a13f sd-dhcp-client: Add an explicit stop state for the DHCP client
Add an explicit stop state for the DHCP client so that the library
user can issue a stop at any time the callback has been called.
When returning from the callback, check also the stop state and
stop any further DHCP processing.
2014-04-11 10:53:34 +03:00
Patrik Flykt
e5b04c8de8 sd-dhcp-client: Add reference counting for DHCP
The DHCP library user can decide to free the DHCP client any time
the callback is called. After the callback has been called, other
computations may still be needed - the best example being a full
restart of the DHCP procedure in case of lease expiry.

Fix this by introducing proper reference counting. Properly handle
a returned NULL from the notify and stop functions if the DHCP
client was freed.
2014-04-11 10:53:10 +03:00
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