Commit graph

16329 commits

Author SHA1 Message Date
Lennart Poettering b914e211f3 resolved: when resolving an address PTR record via llmnr, make a tcp connection by default 2014-07-29 20:57:58 +02:00
Lennart Poettering 623a4c97b9 resolve: add llmnr responder side for UDP and TCP
Name defending is still missing.
2014-07-29 20:57:58 +02:00
David Herrmann 359017c1ae barrier: fix race in test-code
The barrier_wait_next_twice* test-cases run:
  Parent:                             Child:
    set_alarm(10)                       sleep_for(1);
    ...                                 set_alarm(1);
    sleep_for(2)                        ...

Therefore, the parent exits after 2+ periods, the client's alarm fires
after 2+ periods. This race turns out to be lost by the child on other
machines, so avoid it by increasing the parent's sleep-interval to 4. This
way, the client has 2 periods to run the barrier test, which is far more
than enough.
2014-07-29 19:19:49 +02:00
Kay Sievers f22bbd11db build-sys: add missing files for distcheck 2014-07-29 17:54:57 +02:00
Kay Sievers ab6efe71f3 test: test_tables - fix missing symbols when --gc-sections are not available 2014-07-29 17:10:16 +02:00
Kay Sievers 94a15ffa14 factory: install minimal PAM and nsswitch config 2014-07-29 16:58:18 +02:00
Kay Sievers 9ec6e95b04 udev: place opening { at the same line as the function declaration 2014-07-29 15:49:25 +02:00
Kay Sievers 51f1ec3bbe build-sys: remove systemd-coredumpctl symlink 2014-07-29 15:20:42 +02:00
Kay Sievers dd5eddd28a udev: unify event timeout handling 2014-07-29 15:18:27 +02:00
Hannes Reinecke 9719859c07 udevd: add --event-timeout commandline option
Some events take longer than the default 30 seconds. Killing those
events will leave the machine halfway configured.

Add a commandline option '--event-timeout' to handle these cases.
2014-07-29 13:45:07 +02:00
Kay Sievers 32767cb1e8 login: update systemd-user PAM configuration file 2014-07-29 13:20:20 +02:00
Kay Sievers 3a43da2832 time-util: add and use USEC/NSEC_INFINIY 2014-07-29 13:20:20 +02:00
David Herrmann cf347234ae barrier: convert msecs to usecs in test-code
Avoid using msecs in favor of usec_t. This is more consistent with the
other parts of systemd and avoids the confusion between msec and usec. We
always use usecs, end of story.
2014-07-29 13:04:51 +02:00
David Herrmann b13dbd6ca4 terminal/subterm: use usec_t instead of "unsigned long"
Avoid hard-coding "unsigned long" and use the usec_t type defined in
src/shared.
2014-07-29 13:00:35 +02:00
Tom Gundersen 16aa63a00b networkd: route/address - use trivial hash functions 2014-07-28 12:21:51 +02:00
Tom Gundersen 6a0a2f860f networkd: unify handling of stacked netdevs 2014-07-28 12:16:40 +02:00
Tom Gundersen ae06ab1014 networkd: store ifindex as int 2014-07-28 11:46:57 +02:00
Tom Gundersen 527503444e sd-dhcp-server: add forcerenew support 2014-07-28 10:44:51 +02:00
Tom Gundersen 615c1467c8 sd-dhcp-client: add support for FORCERENEW
This partially implements RFC3203. Note that we are not fully compliant as we do not
support authentication.
2014-07-28 10:44:51 +02:00
Tom Gundersen 0af03ba57f sd-dhcp-client: listen on UDP socket as soon as a lease is acquired
This is necessary in order to listen for FORCERENEW events.
2014-07-28 10:44:51 +02:00
Tom Gundersen 076adf013a dhcp-network: enable IP_FREEBIND for UDP sockets
This allows the sockets to be bound to a specific address before it is configured,
also enable SO_REUSEADDR to allow multiple DHCP clients to run at the same time.
2014-07-28 10:44:51 +02:00
Tom Gundersen 2d2349cc3e sd-dhcp-client: drop event DHCP_EVENT_NO_LEASE
Keep this internal to the client and simply restart it when NAK is receieved, as
per the RFC.
2014-07-28 10:44:51 +02:00
Tom Gundersen 9fbc25232c sd-dhcp-client: only verify UDP messages
RAW messages are verified by the BPF in the kernel.
2014-07-28 10:44:51 +02:00
Michal Sekletar 36dd072cdf journald: always add syslog facility for messages coming from kmsg
Set SYSLOG_FACILITY field for kernel log messages too. Setting only
SYSLOG_IDENTIFIER="kernel" is not sufficient and tools reading journal
maybe confused by missing SYSLOG_FACILITY field for kernel log messages.
2014-07-28 10:25:49 +02:00
Eric Cook c317a1a19c shell-completion: prevent mangling unit names (bash)
This fixes the issue noted by Zbigniew in most cases.
if a unit's name is enclosed in single quotes completion still
will not happen after the first `\'.

https://bugs.freedesktop.org/show_bug.cgi?id=78388
2014-07-27 15:27:16 -04:00
Ansgar Burchardt e2d7c1a075 drop_duplicates: copy full BindMount struct
At least

  t->ignore = f->ignore;

is missing here. Just copy the full struct to be sure.
2014-07-27 15:15:11 -04:00
Ansgar Burchardt 0f625d0b87 parse_boolean: require exact matches
Require exact matches in all cases instead of treating strings
starting with 't' ('f') as true (false).

This is required for config_parse_protect_system to parse ProtectSystem=full
correctly: it uses parse_boolean and only tries a more specific parsing
function if that did not return a valid result. Thus "full" was treated as
"false" before.
2014-07-27 15:15:11 -04:00
Kay Sievers ccc6fa0d6b factory: nss - add generic config 2014-07-27 14:53:21 +02:00
Kay Sievers e5168066e7 factory: PAM - add generic fallback config
Single PAM fallback config file to be used in /etc to allow
bootstrapping of a system with an empty /etc.
2014-07-27 14:34:19 +02:00
Kay Sievers c264aeab4b core: only set the kernel's timezone when the RTC runs in local time
We can not reliably manage any notion of local time. Every daylight
saving time change or time zone change by traveling will make the
time jump, and the local time might jump backwards which creates
unsolvable problems with file timestamps.

We will no longer tell the kernel our local time zone and leave
everything set to UTC. This will effectively turn FAT timestamps
into UTC timestamps.

If and only if the machine is configured to read the RTC in local
time mode, the kernel's time zone will be configured, but
systemd-timesysnc will disable the kernel's system time to RTC
syncing. In this mode, the RTC will not be managed, and external
tools like Windows bootups are expected to manage the RTC's time.

https://bugs.freedesktop.org/show_bug.cgi?id=81538
2014-07-27 10:44:31 +02:00
Zbigniew Jędrzejewski-Szmek c6a373a263 bash-completion: use list-unit-files to get "all" units
I think that it is better to return good results slightly more slowly,
than partial quickly. Also reading from disk seems fast enough. Even
the delay on first try with completely cold cache is acceptable.

This is just for bash, 'cause zsh was already doing this.

https://bugzilla.redhat.com/show_bug.cgi?id=790768
2014-07-26 20:15:38 -04:00
Zbigniew Jędrzejewski-Szmek 8f077bf94e Print kdbus path when opening fails
This makes it easier to debug what is going on.
2014-07-26 15:08:42 -04:00
Zbigniew Jędrzejewski-Szmek 4aa4d2ae97 update-done: include a short description in .updated
People might be confused where the file comes from, since the name is not
at all specific.

https://bugzilla.redhat.com/show_bug.cgi?id=1121301#c8
2014-07-26 15:08:42 -04:00
Zbigniew Jędrzejewski-Szmek 0c6ea3a4e2 Add utility function to append root to path 2014-07-26 15:08:42 -04:00
Zbigniew Jędrzejewski-Szmek 60731f32f1 systemctl: do not bother to mutate state on error
We will abort anyway.
2014-07-26 15:08:42 -04:00
Daniel Buch 5b6f6ebd63 analyze: fix seg-fault with no cl-argument
We need to check if argv[1] is set before compare
2014-07-26 15:08:42 -04:00
Karel Zak 7de80bfe2e Always check asprintf return code
There is a small number of the places in sources where we don't check
asprintf() return code and assume that after error the function
returns NULL pointer via the first argument. That's wrong, after
error the content of pointer is undefined.
2014-07-26 15:08:41 -04:00
Eric Cook 6d314eca15 shell-completion: prevent mangling unit names
Units with literal hex '\xFF' in their names has to be read
and printed properly.
dev-disk-byx2dlabel-root.device != dev-disk-by\x2dlabel-root.device
2014-07-26 15:08:41 -04:00
Tom Gundersen ad8bc9ea50 sysctl.d: enable promote_secondaries by default
Without this, secondary addresses would get deleted when the primary one is. This is not
the desired behavior when one would like to transition from one address to another in the
same subnet (such as when a new IP address is given over DHCP).

In networkd, when given a new IP over DHCP we will add it, without explicitly removing the
old one first (and hence never have a window without an IP address configured). Assuming the
addresses are in the same subnet, that means that the old address is the primary and the new
address is the secondary one. Once the old address expires, the kernel will drop it. With the
old behavior this means that both addresses would be lost, which is clearly not what we want.
With the new behavior, only the old address is lost, and the new one is promoted to primary.

Reported by Michael Olbrich <m.olbrich@pengutronix.de>
2014-07-25 11:18:12 +02:00
Lukas Nykryn deffddf1df busname: CLD_KILLED was used twice 2014-07-25 10:44:27 +02:00
Lukas Nykryn e05aa2e02b bus-proxyd: fix incorrect comparison
We should be interested in k variable.
2014-07-25 10:25:06 +02:00
Lukas Nykryn eb17e17859 bus-proxyd: fix incorrect comparison
Err can't be bigger then zero. Rest of the code uses negative Exxxx values.
2014-07-25 09:58:52 +02:00
Tom Gundersen bfa695b5cc networkd: ipv4ll - default to setting up ipv4ll routes
This is necessary for non-ipv4ll hosts to communicate with ipv4ll-only hosts on the same link. Defaults
to being enabled, but can be opted out.

See: <http://avahi.org/wiki/AvahiAutoipd#Routes>
2014-07-25 02:14:23 +02:00
Tom Gundersen 3c072310d5 networkd: ipv4ll - drop unnecessary get_address() 2014-07-25 02:12:00 +02:00
Kay Sievers 2e5b17d013 udev: exclude MD from block device ownership event locking
MD instantiates devices at open(). This is incomptible with the
locking logic, as the "change" event emitted when stopping a
device will bring it back.
2014-07-24 23:37:35 +02:00
Tom Gundersen fa94c34b08 libsystemd-network: use CLOCK_BOOTTIME instead of CLOCK_MONOTONIC where possible
The timeouts in the networking library (DHCP lease timeouts and similar) should not be affected
by suspend. In the cases where CLOCK_BOOTTIME is not implemented, it is still safe to fallback to
CLOCK_MONOTONIC, as the consumers of the library (i.e., networkd) _should_ renew the leases when
coming out of suspend.
2014-07-24 19:02:58 +02:00
Tom Gundersen 77ff2de999 time-util: add clock_boottime_or_monotonic
CLOCK_BOOTTIME is not supported by timerfd on older kernels, so for the time beeing,
use this helper instead which will fallback to CLOCK_MONOTONIC if CLOCK_BOOTTIME is
not supported.
2014-07-24 19:02:58 +02:00
Tom Gundersen a854881616 sd-event: add support for CLOCK_BOOTTIME
This requires a very recent kernel (3.15), so care should be taken
when using this functionality.
2014-07-24 16:37:01 +02:00
Tom Gundersen 6f4dedb250 sd-network: expose DNS/NTP servers as strings
This avoids having to distinguish between IPv4 and IPv6, allowing us
to keep their internal orderings. The consumers now has to turn the
strings into addresses.
2014-07-23 23:54:52 +02:00
Tom Gundersen 6073b6f26a resolved: don't read DHCP leases
networkd will expose both statically configured DNS servers and servers
receieved over DHCP in sd_network_get_dns(), so no need to keep
the distinction in resolved.
2014-07-23 23:54:52 +02:00