Commit graph

1471 commits

Author SHA1 Message Date
Tom Gundersen 091a364c80 resolved: add daemon to manage resolv.conf
Also remove the equivalent functionality from networkd.
2014-05-19 18:14:56 +02:00
Lennart Poettering 4eaea66423 network: always take possession of host side of nspawn veth tunnels and do IPv4LL on them 2014-05-18 20:52:49 +09:00
Lennart Poettering a349eb10d3 timesyncd: run timesyncd as unpriviliged user "systemd-timesync" (but still with CAP_SYS_TIME) 2014-05-18 20:52:49 +09:00
Tom Gundersen 2dcf7ec6ec networkd: manager - read fallback DNS servers from config file
We will still use the compiled-in defaults if no DNS entry exists in the config file.
2014-05-16 19:48:25 +02:00
Cristian Rodríguez 679be2a742 network: fix build failure, missing KMOD_XXX flags
- Add KMOD_CFLAGS and KMOD_LIBS where appropiate
- networkd now requires kmod. make --disable-kmod --enable-networkd
to raise an error.
2014-05-15 18:51:54 +02:00
Zbigniew Jędrzejewski-Szmek 058fb31996 readahead: add test to show fs_on_ssd() result 2014-05-15 15:29:59 +02:00
Lennart Poettering 19befb2d5f sd-bus: introduce sd_bus_slot objects encapsulating callbacks or vtables attached to a bus connection
This makes callback behaviour more like sd-event or sd-resolve, and
creates proper object for unregistering callbacks.

Taking the refernce to the slot is optional. If not taken life time of
the slot will be bound to the underlying bus object (or in the case of
an async call until the reply has been recieved).
2014-05-15 01:15:30 +02:00
David Herrmann e0dd92729e shared: add ring buffer
New "struct ring" object that implements a basic ring buffer for arbitrary
byte-streams. A new basic runtime test is also added.

This will be needed for our pty helpers for systemd-console and friends.
2014-05-13 22:08:13 +02:00
Susant Sahani 7951dea209 networkd: introduce ipip tunnel
This patch enables basic ipip tunnel support.
It works with kernel module ipip

example conf:

file: ipip.netdev

[NetDev]
Name=ipip-tun
Kind=ipip
MTUBytes=1480

[Tunnel]
Local=192.168.223.238
Remote=192.169.224.239
TTL=64

file: ipip.network

[Match]
Name=em1

[Network]
Tunnel=ipip-tun

[tomegun:
         - drop unused variable
         - take ref when enslaving]
2014-05-12 17:37:12 +02:00
Tom Gundersen e0e5ce237b timesyncd: only run when the system has a carrier on a network interface
As the operational state detection in sd-network is still too primitive, timesyncd
will likely try to connect a bit early, so the first attempt will fail.
2014-05-08 15:28:19 +02:00
Lennart Poettering 7b8b9686e0 timesyncd: hook up systemd-timesyncd with systemd-timedated
Later on we will probably remove support for controlling any other NTP
implementations but systemd-timesyncd, but for now, let's keep things
generic
2014-05-06 18:20:49 +02:00
Lennart Poettering e8af69739a timesyncd: read server settings from a configuration file
Also, allow compiling in a default server list via a configure command
line item.
2014-05-06 17:02:11 +02:00
Lennart Poettering 856a5a7d76 timesyncd: lookup name server via sd-resolve, support IPv6, react to SIGINT/SITERM 2014-05-05 23:53:17 +02:00
Lennart Poettering 76cf10dab7 build-sys: move async.[ch] to src/shared
So that we can use it at multiple places.
2014-05-05 21:19:06 +02:00
Kay Sievers d38cbe1bb7 build-sys: fix linking order for networkd-wait-only 2014-04-29 16:26:51 +02:00
Lennart Poettering 93f1bcf400 sd-resolve: rework sd-resolve to be callback based, similar in style to sd-bus and sd-event 2014-04-29 15:45:16 +02:00
Tom Gundersen 4c06153f7b networkd: fix distcheck 2014-04-29 15:42:05 +02:00
Kay Sievers a91df40e69 timesyncd: add unit and man page 2014-04-29 09:51:53 +02:00
Kay Sievers 687ed1237b rename timedate-sntp to timesync 2014-04-28 17:08:52 +02:00
Umut Tezduyar Lindskog d9bf4f8c6c libnetworkd: add link local tests
- Also only allow positive ifindex on both dhcp and ipv4ll

[tomegun: the kernel always sets a positive ifindex, but some APIs accept
          ifindex=0 with various meanings, so we should protect against
          accidentally passing ifindex=0 along.]
2014-04-27 23:39:13 +02:00
Tom Gundersen cef8b07358 networkd-wait-online: drop config file and add commandline options instead 2014-04-26 01:20:12 +02:00
Lennart Poettering 0d522a7a05 errno: make sure to handle the 3 errnos that are aliases for others properly 2014-04-24 08:12:20 +02:00
Tom Gundersen 3a67e927e3 networkd-wait-online: improve interoptability and enable by default
To make sure we don't delay boot on systems where (some) network links are managed by someone else
we don't block if something else has successfully brought up a link.

We will still block until all links we are aware of that are  managed by networkd have been
configured, but if no such links exist, and someone else have configured a link sufficiently
that it has a carrier, it may be that the link is ready so we should no longer block.

Note that in all likelyhood the link is not ready (no addresses/routes configured),
so whatever network managment daemon configured it should provide a similar wait-online
service to block network-online.target until it is ready.

The aim is to block as long as we know networking is not fully configured, but no longer. This
will allow systemd-networkd-wait-online.service to be enabled on any system, even if we don't
know whether networkd is the main/only network manager.

Even in the case networking is fully configured by networkd, the default behavior may not be
sufficient: if two links need to be configured, but the first is fully configured before the
second one appears we will assume the network is up. To work around that, we allow specifying
specific devices to wait for before considering the network up.

This unit is enabled by default, just like systemd-networkd, but will only be pulled in if
anyone pulls in network-online.target.
2014-04-24 00:23:07 +02:00
Kay Sievers 0fbedd1fdc remove bus-driverd, the interface is now handled natively by bus-proxyd 2014-04-22 19:31:26 +02:00
Tom Gundersen d1ca51b153 nss-myhostname: port to sd-rtnl 2014-04-19 18:39:24 +02:00
Zbigniew Jędrzejewski-Szmek 1dd5aa56d1 build-sys: do not try to build test-rtnl-manual w/o kmod 2014-04-17 23:39:54 -04:00
Łukasz Stelmach 7c4e5e4db8 build-sys: add libkmod flags for test_rtnl_manual 2014-04-17 23:39:54 -04: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
Kay Sievers dec51b29f9 bus: update kdbus.h 2014-04-10 13:02:35 -07: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
Kay Sievers b6b20d1d36 build-sys: remove no longer needed user/org.freedesktop.DBus.busname 2014-04-02 11:34:59 +02:00
Tom Gundersen d8e538ecd9 sd-rtnl: rework rtnl type system
Use a static table with all the typing information, rather than repeated
switch statements. This should make it a lot simpler to add new types.

We need to keep all the type info to be able to create containers
without exposing their implementation details to the users of the library.

As a freebee we verify the types of appended/read attributes.

The API is extended to nicely deal with unions of container types.
2014-03-28 19:11:59 +01:00
Kay Sievers e57e4e2be3 build-sys: update "linkcheck"
<kay> ssuominen: and drop --no-as-needed from the linkcheck?
<kay> ssuominen: i expect it all triggers without the gc-sections thing alone
<ssuominen> if the intention is to make it strict as possible,
  to catch undefined references caused by missing -lfoo in linker line, then
  LDFLAGS="-Wl,-fuse-ld=gold -Wl,--as-needed -Wl,--no-gc-sections"
2014-03-26 19:22:17 +01:00
Kay Sievers bc61d6ac01 build-sys: rename "check-broken" to "linkcheck" 2014-03-26 13:12:47 +01:00
Kay Sievers 381a662a90 build-sys: split "make upload" and "make tango" 2014-03-26 13:07:58 +01:00
Kay Sievers 4851ac4526 bus: provide org.freedesktop.systemd1.busname for systemd --user 2014-03-26 03:38:48 +01:00
Kay Sievers 0afee06b26 build-sys: disable test-cgroup-mask, it mangles valid user data in /run/user/$UID/
$ ./test-cgroup-mask
  ...
  rmdir("/run/user/2702/systemd/generator") = 0
  open("/run/user/2702/systemd/generator.late", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_NOFOLLOW|O_NOATIME|O_CLOEXEC) = 5
  fstat(5, {st_mode=S_IFDIR|0755, st_size=3200, ...}) = 0
  fcntl(5, F_GETFL)                       = 0x78800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_NOFOLLOW|O_NOATIME)
  fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
  getdents(5, /* 160 entries */, 32768)   = 10072
  unlinkat(5, "org.gnome.Weather.Application.busname", 0) = 0
  unlinkat(5, "dbus-org.gnome.Weather.Application.service", 0) = 0
  ...
2014-03-26 02:54:34 +01:00
Kay Sievers 5870f79a0b build-sys: add "make check-broken" to find limited-toolchain link errors 2014-03-26 01:36:57 +01:00
Kay Sievers 2fa495c8a4 build-sys: fix library link order 2014-03-25 23:29:43 +01:00
Kay Sievers 307e6d8304 build-sys: split-off internal libsystemd-resolve 2014-03-25 23:29:43 +01:00
Lennart Poettering 3b5b000fbc build-sys: prepare 212 2014-03-25 20:22:41 +01:00
Susant Sahani 9a6704a81f sd-rtnl: add support for tunnel attributes
Added support for tunneling netlink attrributes (ipip, gre, sit).
These works with kernel module ipip, gre and sit . The test cases are
moved to a separate file and manual test as well because they require
respective kernel modules as well.
2014-03-25 14:44:33 +01:00
Lennart Poettering 7f8aa67131 core: remove tcpwrap support
tcpwrap is legacy code, that is barely maintained upstream. It's APIs
are awful, and the feature set it exposes (such as DNS and IDENT
access control) questionnable. We should not support this natively in
systemd.

Hence, let's remove the code. If people want to continue making use of
this, they can do so by plugging in "tcpd" for the processes they start.
With that scheme things are as well or badly supported as they were from
traditional inetd, hence no functionality is really lost.
2014-03-24 20:07:42 +01:00
Tom Gundersen c6f7c917a1 libsystemd-network: move network-utils from src/shared
This does not belong in shared as it is mostly a detail of our networking subsystem.

Moreover, now we can use libudev here, which will simplify things.
2014-03-21 21:54:37 +01:00
Daniel Mack 5892a914d1 busname: introduce Activating directive
Add a new config 'Activating' directive which denotes whether a busname
is actually registered on the bus. It defaults to 'yes'.

If set to 'no', the .busname unit only uploads policy, which will remain
active as long as the unit is running.
2014-03-19 02:25:36 +01:00
Lennart Poettering 58dfc42ecf build-sys: move sd-login src/login → src/libsystemd/sd-login
After all, it is ultimately linked to libsystems.so anyway, thus belongs
there and shares very little with the rest of logind, hence let's move
this away.
2014-03-17 18:35:48 +01:00
Zbigniew Jędrzejewski-Szmek cc64d0175a journal-remote: HTTP(s) support
The whole tool is made dependent on µhttpd availability. It should be
easy to make the µhttpd parts conditional, but since transfer over
HTTP seems to be the primary use case, currently this is not done.

Current implementation uses nested epoll loops: sd-event is used for
the external event loop, and µhttpd uses epoll in its own
loop. Unfortunately µhttpd does not expose enough information to add
the descriptors it uses to the external event loop. This means that
starvation of other events is possible, if one of the inner µhttpd
loops is constantly busy. This means that µhttpd servers should not
be mixed with other sources.

The TLS authentication parts haven't been really tested properly, and
should not be take too seriously.
2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek fdfccdbc98 journal-remote: tool to receive messages over the network 2014-03-17 01:55:48 -04:00
Zbigniew Jędrzejewski-Szmek cafc7f9130 journal-gatewayd: log to journal from gnutls
Prefix "gnutls: " is added. Some semi-random mapping of gnutls levels
to syslog levels is done, but since gnutls levels seem to be used
rather loosely, most end up as debug.
2014-03-17 01:55:48 -04:00
Wieland Hoffmann d895500c47 zsh completion: Install _sd_machines with _machinectl
_machinectl uses _sd_machines to provide a list of all available
machines.
2014-03-15 00:32:06 -04:00