Commit graph

7547 commits

Author SHA1 Message Date
Susant Sahani abf446af60 networkd: introduce sit tunnel
This patch introduces sit tunnel support to networkd

Example conf:
file: sit.netdev

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

[Tunnel]
Local=10.65.223.238
Remote=10.65.223.239

file: sit.network

[Match]
Name=em1

[Network]
Tunnel=sit-tun

[tomegun: rebased]
2014-05-19 22:50:23 +02:00
Tom Gundersen 473dfd7bd5 networkd-wait-online: wait for addresses to be configured 2014-05-19 22:00:35 +02:00
Tom Gundersen e56f363803 timesyncd: only attempt to connect when an address is configured
For now, we accept both link-local and routable addresses, maybe we want to
restrict ourselves to routable addresses only.
2014-05-19 20:54:42 +02:00
Tom Gundersen e375dcde72 networkd/sd-network: extend operational states
Expose states 'degraded' or 'routable' if a link has a site/link-local or a routable address, respectively.
2014-05-19 20:44:21 +02:00
Tom Gundersen bcb7a07e0a networkd/sd-network: expose statically configured NTP servers 2014-05-19 18:42:14 +02:00
Tom Gundersen d408b50681 networkd: fixup static DNS serialization 2014-05-19 18:14:56 +02:00
Tom Gundersen 81d98a39eb sd-dhcp-lease/sd-network: modernization and fix leak 2014-05-19 18:14:56 +02:00
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
Tom Gundersen 7dbf94a9c4 sd-network: expose DNS information 2014-05-19 18:14:56 +02:00
Tom Gundersen 7374f9d87c networkd: link - serialize DNS information 2014-05-19 18:14:56 +02:00
Tom Gundersen 09bee74d7a sd-dhcp-lease: move in_addr (de)serialization to shared network code 2014-05-19 18:14:56 +02:00
Lennart Poettering a077b666cb sd-login: add C API to query primary session of a user 2014-05-19 09:33:20 +09:00
Lennart Poettering 952d32609f logind: fix Display property of user objects
When we dropped support for creating a per-user to the "main" X11
display we stopped returning useful data in the "Display" user property.
With this change this is fixed and we again expose an appropriate
(graphical session) in the property that is useful as the "main" one, if
one is needed.
2014-05-19 09:03:20 +09:00
Evan Nemerson 2be6107255 gudev: add missing (nullable) annotations on return values 2014-05-18 18:58:40 +02:00
Djalal Harouni 7e690cefd4 analyze: read host and system information from remote
This makes "systemd-analyze plot" read host information from remote.

While we are it show if this is a virtualized system.

https://bugs.freedesktop.org/show_bug.cgi?id=76498

Reported-by: Zach <zachcook1991@gmail.com>
2014-05-19 01:47:06 +09:00
Djalal Harouni 9be3455f55 hostnamed: expose KernelVersion on the bus
This is needed to fix bug:

https://bugs.freedesktop.org/show_bug.cgi?id=76498

Reported-by: Zach <zachcook1991@gmail.com>
2014-05-19 01:46:52 +09:00
David Strauss cdc06ed7b6 core: Filter by state behind the D-Bus API, not in the systemctl client. 2014-05-19 00:50:30 +09:00
Lennart Poettering d3152a09ac machined: make sure GetMachineAddresses() is available for unprivileged processes 2014-05-19 00:47:26 +09:00
Nis Martensen f1721625e7 fix spelling of privilege 2014-05-19 00:40:44 +09:00
Lennart Poettering 878cd7e95c machined: add logic to query IP addresses of containers 2014-05-18 20:52:49 +09:00
Lennart Poettering f864fd1b4b timesyncd: make use of floating event sources for signal handling 2014-05-18 20:52:49 +09:00
Lennart Poettering 9f7115498b timesyncd: enable watchdog support 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 16cd414ba0 networkd: log - only log about udev initalization on debug level 2014-05-17 20:51:37 +02:00
Tom Gundersen 428fd0a758 networkd: keep list of active addresses 2014-05-17 20:51:37 +02:00
Tom Gundersen 9505d3c6de networkd: IP address equality 2014-05-17 20:46:11 +02:00
Thomas Hindoe Paaboel Andersen bf9bead187 udev: avoid use of uninitialized err
After 1ea972174b err is no longer
set unless we hit a special case. Initialize it to 0 and remove
a check that will never fail.
2014-05-17 08:41:48 +02:00
Thomas Hindoe Paaboel Andersen 4723e4b2a4 systemctl: more cleanup
This is followup on 05cae7f343

I think the intention was to use the newly introduced 'path'
variable in the inner loop instead of p.
2014-05-17 08:41:37 +02:00
Michael Marineau 342aea1950 conf-parser: silently ignore sections starting with "X-"
This allows external tools to keep additional unit information in a
separate section without scaring users with a big warning.
2014-05-17 00:29:07 -04:00
Zbigniew Jędrzejewski-Szmek 2915234da0 bus: fix unitialized variable access in error path 2014-05-16 18:03:00 -04:00
Tom Gundersen ee9b9875fd networkd: add missing files 2014-05-16 20:16:12 +02:00
Will Woods 68d3acaccb core: let selinux_setup() load policy more than once
When you switch-root into a new root that has SELinux policy, you're
supposed to to run selinux_init_load_policy() to set up SELinux and load
policy. Normally this gets handled by selinux_setup().

But if SELinux was already initialized, selinux_setup() skips loading
policy and returns 0. So if you load policy normally, and then you
switch-root to a new root that has new policy, selinux_setup() never
loads the new policy. What gives?

As far as I can tell, this check is an artifact of how selinux_setup()
worked when it was first written (see commit c4dcdb9 / systemd v12):

  * when systemd starts, run selinux_setup()
  * if selinux_setup() loads policy OK, restart systemd

So the "if policy already loaded, skip load and return 0" check was
there to prevent an infinite re-exec loop.

Modern systemd only calls selinux_setup() on initial load and after
switch-root, and selinux_setup() no longer restarts systemd, so we don't
need that check to guard against the infinite loop anymore.

So: this patch removes the "return 0", thus allowing selinux_setup() to
actually perform SELinux setup after switch-root.

We still want to check to see if SELinux is initialized, because if
selinux_init_load_policy() fails *but* SELinux is initialized that means
we still have (old) policy active. So we don't need to halt if
enforce=1.
2014-05-16 20:09:02 +02:00
Mantas Mikulėnas d36d90933a logind: allow suspending if there are no displays
With proprietary graphics drivers, there won't be any 'drm' devices in
sysfs, so logind will never suspend the system upon closing the lid,
even if only one (internal) display is connected. This has been reported
by multiple users so far.

IMHO, it's better to suspend the system in this case for safety reasons,
to avoid having nvidia blob users' laptops overheat, for the same reason
that sleep inhibitors are overridden (LidSwitchIgnoreInhibited=yes).
2014-05-16 19:50:42 +02: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
Tom Gundersen d4920165fe networkd: network - store DNS servers in List rather than Set
This way we preserve the order of preference.
2014-05-16 19:48:25 +02:00
Lennart Poettering 9f24adc288 nspawn: properly format container_uuid in UUID format
http://lists.freedesktop.org/archives/systemd-devel/2014-April/018971.html
2014-05-16 19:37:19 +02:00
Tanu Kaskinen 66379f841e path-lookup: don't hardcode .config
If XDG_CONFIG_HOME is set, then we should respect that.
2014-05-16 18:47:36 +02:00
Tanu Kaskinen 7cb9c51ce8 path-util: add path_make_relative()
In user_dirs() in path-lookup.c, I want to replace this:
        symlink("../../../.config/systemd/user", data_home);
with
        symlink(config_home, data_home);
to avoid hardcoding .config when XDG_CONFIG_HOME is set.

The problem is that config_home is an absolute path, and it's better
to make the symlink relative. path_make_relative() is an utility
function that converts an absolute path into a relative one.
2014-05-16 18:47:34 +02:00
Holger Hans Peter Freyther f1f0198cb6 fsck: Allow to specify the fsck repair option in the cmdline
Some unattended systems do not have a console attached and entering
the default rescue mode will not be too helpful. Allow to specify
the "-y" option to attempt to fix all filesystem errors.

Manually verified by downloading an image.gz of e2fsprogs, using
losetup and running systemd-fsck on the loop device and varying
the fsck.repair=preen|yes|no option.
2014-05-16 18:33:59 +02:00
Tom Gundersen e16cb2e4ef networkd: hardcode a set of default dns servers
Similarly to NTP servers, this can be set at compile-time.
2014-05-16 17:19:04 +02:00
Alison Chaiken 332bc31992 man: readahead: fix cmdline switch inconsistency between readahead.c and docs
Source code has "files-max" and XML has --max-files.
2014-05-16 17:13:03 +02:00
Lennart Poettering a8c73b860c readahead: modernizations 2014-05-16 17:07:51 +02:00
Tom Gundersen 3c4cb0645c networkd: log the initialization status of links 2014-05-16 14:52:02 +02:00
Tom Gundersen 3d94b7870c networkd: fix typo 2014-05-16 14:52:02 +02:00
Tom Gundersen 3d3d425547 networkd: rename Address and Route list fields 2014-05-16 14:52:02 +02:00
Kay Sievers 15a224e06c timesyncd: fix typo in comment 2014-05-16 04:00:59 +02:00
Lennart Poettering 9bdb98c594 core: make sure to serialize jobs for all units
Previously we wouldn't serialize jobs for units that themselves have
nothing to serialize.

http://lists.freedesktop.org/archives/systemd-devel/2014-May/019051.html
2014-05-16 01:15:03 +02:00
Kay Sievers 59a9fce47b timesyncd: fix error path return value
https://bugs.freedesktop.org/show_bug.cgi?id=78752
2014-05-15 20:50:02 +02:00
Lennart Poettering 301f9684e6 logind: bring polkit policy for hibernate in line with suspend/poweroff/reboot
THere's no reason why hibernate should be better protected then
suspendor poweroff, so sync the policies.
2014-05-15 18:33:36 +02:00
Tom Gundersen 987efa17dd networkd: logging - align messages 2014-05-15 18:16:31 +02:00