Commit graph

1584 commits

Author SHA1 Message Date
Kay Sievers 706b7936d0 gudev: replace regex with sym file 2014-06-21 16:25:15 +02:00
Kay Sievers e09c69d9fd pam_systemd: replace regex with sym file 2014-06-21 15:45:49 +02:00
Kay Sievers dfb0c6cc3b pam_systemd: rename source file to match the module 2014-06-21 15:44:14 +02:00
Filipe Brandenburger 65adc982db build-sys: check that compat-libs are enabled for "make dist"
Running "make dist" requires --enable-compat-libs since DIST_SOURCES will list
generated files such as libsystemd-daemon.c.

Tested:
  $ ./configure && make && make dist
  *** compat-libs must be enabled in order to make dist
  make: *** [dist-check-compat-libs] Error 1
2014-06-20 18:44:40 -04:00
Filipe Brandenburger 279419b379 build-sys: check that python is enabled for "make dist"
Running "make dist" requires Python support since some of the man page sources
(such as man/systemd.index.xml and man/systemd.directives.xml) are generated by
Python scripts, so break "make dist" and give an useful error message when
Python or the Python lxml module is not available.

Tested:
  $ ./configure --without-python && make && make dist
  *** python and python-lxml module must be installed and enabled in order to make dist
  make: *** [dist-check-python] Error 1
2014-06-20 18:44:40 -04:00
Filipe Brandenburger b9d5b4c30d build-sys: configure --with-python when running distcheck
Python support is pretty much essential to create man pages, so we should make
sure that distcheck will request it during configure.

Tested: Successfully ran "make distcheck" and confirmed --with-python was
present in the ./configure run inside the unpacked distribution directory.
2014-06-20 18:44:40 -04:00
Filipe Brandenburger 49100d2abd build-sys: do not include id128-constants.h in the dist archive
File src/python-systemd/id128-constants.h is auto generated and its generation
does not require special tools, only sed.  There is no point in bundling it in
the distribution archive, so let's mark it as nodist_ to have it excluded.

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

Tested: Successfully ran "make dist" after ./configure --without-python.
2014-06-20 18:44:40 -04:00
Filipe Brandenburger 61b5c82d91 build-sys: add sysusers.d/systemd.conf to CLEANFILES
The sysusers.d/systemd.conf configuration file was originally introduced in
commit 1b99214789, but it was not marked for cleanup.  This caused distcheck
to complain about the file not being removed by distcleam.

Tested: Successfully ran "make distcheck" with this patchset.
2014-06-20 14:27:25 +02:00
Michael Marineau 09e00c524f test: ensure conf_files_list returns absolute paths 2014-06-20 00:10:47 -04:00
Filipe Brandenburger 228b2a1277 sd-dhcp6-client: include dhcp6-protocol.h in the list of sources
If the file is not listed, then "make dist" will not include it.

Tested: "make distcheck" works after this fix is applied.

Fixes: 139b011ab8
2014-06-20 00:25:08 +02:00
Filipe Brandenburger ab2bc6feee sd-dhcp6-client: fix path of sd-icmp6-nd.h in Makefile.am
It was incorrectly looking for a file in src/libsystemd-network/ when the file was actually deployed to src/systemd/ instead.  This broke "make dist".

Tested: "make dist" works again after this patchset is applied.

Fixes: f20a35cc0d
2014-06-20 00:25:04 +02:00
Filipe Brandenburger 302c9d6c8b sd-dhcp6-client: remove bogus dependency on dhcp6-icmp6.h
Makefile.am had a reference to it but it none of the sources included it.

Tested: "make dist" works again after this patchset is applied.

Fixes: 2ea8857eff
2014-06-20 00:25:00 +02:00
Lennart Poettering 326bb68c40 debug-generator: add new generator
debug-generator can mask specific units if they are specified on the
kernel command line with systemd.mask=.

debug-generator can pull in debug-shell.service is systemd.debug-shell
is passed on the kernel command line.
2014-06-19 16:33:01 +02:00
Patrik Flykt 3fb2c57038 sd-dhcp6-lease: Add DHCPv6 lease handling
Create a structure describing a DHCPv6 lease. Add internal functions
for creating a new lease and accessing the server ID, preference and
IAID. Provide functions for clearing addresses and associated timers.

External users are initially given only the capabilities of
referencing and unreferencing the lease structure.
2014-06-19 15:44:44 +03:00
Patrik Flykt 2ea8857eff sd-dhcp6-client: Add DHCPv6 Solicit test case
Verify the Solicit message created by the DHCPv6 client code.

Provide local variants for detect_vm(), detect_container() and
detect_virtualization() defined in virt.h. This makes the DHCPv6
library believe it is run in a container and does not try to request
interface information from udev for the non-existing interface index
used by the test case code.
2014-06-19 15:44:44 +03:00
Patrik Flykt f12ed3bf0b sd-dhcp6-client: Add basic DHCPv6 option handling
Add option appending and parsing. DHCPv6 options are not aligned, thus
the option handling code must be able to handle options starting at
any byte boundary.

Add a test case for the basic option handling.
2014-06-19 15:44:43 +03:00
Patrik Flykt 813e3a6ffc sd-dhcp6-client: Add basic DHCPv6 test cases
Add test cases for basic DHCPv6 client handling, e.g. setting
interface index, mac address and attaching event loop.
2014-06-19 15:44:43 +03:00
Patrik Flykt f20a35cc0d sd-icmp6-nd: Add initial Router Advertisement test case
Feed a Router Advertisement to the code and expect proper events
each time. The sending part is ignored, as all of it is static code
in the real dhcp_network_icmp6_send_rs() function.
2014-06-19 15:44:43 +03:00
Patrik Flykt e316912679 sd-icmp6-nd: Add Router Solicitation and Advertisement support
Provide functions to bind the ICMPv6 socket to the approriate interface
and set multicast sending and receiving according to RFC 3493, section
5.2. and RFC 3542, sections 3. and 3.3. Filter out all ICMPv6 messages
except Router Advertisements for the socket in question according to
RFC 3542, section 3.2.

Send Router Solicitations to the all routers multicast group as
described in RFC 4861, section 6. and act on the received Router
Advertisments according to section 6.3.7.

Implement a similar API for ICMPv6 handling as is done for DHCPv4 and
DHCPv6.
2014-06-19 15:44:43 +03:00
Lennart Poettering f4bab1690e coredump: coredumpctl is so useful now, make it a first-class citizen
Drop the "systemd-" prefix, renaming it from "systemd-coredumpctl" to
"coredumpctl".
2014-06-19 13:46:01 +02:00
Lennart Poettering 8d4e028f18 coredump: include stacktrace of coredumps in the log message
elfutils' libdw is maintained, can read DWARF debug data and appears to
be the library of choice for generating backtraces today.
2014-06-19 12:38:45 +02:00
Lennart Poettering 34c10968cb coredump: optionally store coredumps on disk, not in the journal
Introduce a new configuration file /etc/systemd/coredump.conf to
configure when to place coredumps in the journal and when on disk.

Since the coredumps are quite large, default to storing them only on
disk.
2014-06-19 00:00:24 +02:00
Lennart Poettering 11bf3cced1 networkd: add address pool support
When an address is configured to be all zeroes, networkd will now
automatically find a locally unused network of the right size from a
list of pre-configured pools. Currently those pools are 10.0.0.0/8,
172.16.0.0/12, 192.168.0.0/16 and fc00::/7, i.e. the network ranges for
private networks. They are compiled in, but should be configurable
eventually.

This allows applying the same configuration to a large number of
interfaces with each time a different IP range block, and management of
these IP ranges is fully automatic.

When allocating an address range from the pool it is made sure the range
is not used otherwise.
2014-06-18 18:28:29 +02:00
Lennart Poettering 9542239eaf cryptsetup: introduce new cryptsetup-pre.traget unit so that services can make sure they are started before and stopped after any LUKS setup
https://bugzilla.redhat.com/show_bug.cgi?id=1097938
2014-06-18 00:09:46 +02:00
Ronny Chevalier fe582db94b build-sys: add missing backslash 2014-06-17 17:29:47 -04:00
Lennart Poettering a1259e0a14 build-sys: touch /usr on "make install"
this way, the "make install" will be detected as offline update on next
boot.
2014-06-17 03:09:27 +02:00
Lennart Poettering 1713703c96 preset: ship a minimal preset file upstream
This is useful so that distros have something to base their own policy
of. It also useful to make sure that minimal installs always get useful
configuration in place.
2014-06-17 02:43:44 +02:00
Ronny Chevalier 106ecd769d tests: add test-fdset 2014-06-16 20:38:22 +02:00
Ronny Chevalier c182135d3a tests: add test-socket-util 2014-06-16 20:38:22 +02:00
Susant Sahani 326cb4061a networkd: introduce vxlan
This patch enables netwokd to create vxlan

Changes:
Added:
	1. File networkd networkd-vxlan.c
	2. to netdev
	    bool learning
	    struct in_addr group
	    uint64_t vxlanid;
	3. VXLAN subsection and config
	   parameters
2014-06-16 20:38:22 +02:00
Lennart Poettering 137243fd13 units: add a service to invoke ldconfig on system updates at boot 2014-06-16 12:33:22 +02:00
Lennart Poettering b532bdeae9 rpm: add RPM macros to apply sysusers, sysctl, and binfmt drop-ins
With this in place RPMs can make sure that whatever they drop in is
immeidately applied, and not delayed until next reboot.

This also moves systemd-sysusers back to /usr/bin, since hardcoding the
path to /usr/lib in the macros would mean compatibility breaks in
future, should we turn sysusers into a command that is actually OK for
people to call directly. And given that that is quite likely to happen
(since it is useful to prepare images with its --root= switch), let's
just prepare for it.
2014-06-13 20:11:59 +02:00
Tom Gundersen b44cd88210 sd-dhcp-server: add basic functionality for creating/destroying server instance 2014-06-13 16:53:13 +02:00
Lennart Poettering 55745f2054 tmpfiles: add minimal tmpfiles snippet to rebuild the most essential stuff from /etc 2014-06-13 13:29:25 +02:00
Lennart Poettering ecde7065f7 units: rebuild /etc/passwd, the udev hwdb and the journal catalog files on boot
Only when necessary of course, nicely guarded with the new
ConditionNeedsUpdate= condition we added.
2014-06-13 13:26:32 +02:00
Lennart Poettering 8ea48dfcd3 update-done: add minimal tool to manage system updates for /etc and /var, if /usr has changed
In order to support offline updates to /usr, we need to be able to run
certain tasks on next boot-up to bring /etc and /var in line with the
updated /usr. Hence, let's devise a mechanism how we can detect whether
/etc or /var are not up-to-date with /usr anymore: we keep "touch
files" in /etc/.updated and /var/.updated that are mtime-compared with
/usr. This means:

Whenever the vendor OS tree in /usr is updated, and any services that
shall be executed at next boot shall be triggered, it is sufficient to
update the mtime of /usr itself. At next boot, if /etc/.updated and/or
/var/.updated is older than than /usr (or missing), we know we have to
run the update tools once. After that is completed we need to update the
mtime of these files to the one of /usr, to keep track that we made the
necessary updates, and won't repeat them on next reboot.

A subsequent commit adds a new ConditionNeedsUpdate= condition that
allows checking on boot whether /etc or /var are outdated and need
updating.

This is an early step to allow booting up with an empty /etc, with
automatic rebuilding of the necessary cache files or user databases
therein, as well as supporting later updates of /usr that then propagate
to /etc and /var again.
2014-06-13 13:26:32 +02:00
Lennart Poettering 48e93f88ff sysusers: move systemd-sysusers to libexec for now 2014-06-13 13:26:32 +02:00
Lennart Poettering f8b5d99408 sysuser: generate default snippet incorporating TTY_GID properly
When the user specifies --with-tty-gid= then we should honour that and
write it to the snippet, too.
2014-06-12 23:22:27 +02:00
Lennart Poettering 1b99214789 sysusers: add minimal tool to reconstruct /etc/passwd and /etc/group from static files
systemd-sysusers is a tool to reconstruct /etc/passwd and /etc/group
from static definition files that take a lot of inspiration from
tmpfiles snippets. These snippets should carry information about system
users only. To make sure it is not misused for normal users these
snippets only allow configuring UID and gecos field for each user, but
do not allow configuration of the home directory or shell, which is
necessary for real login users.

The purpose of this tool is to enable state-less systems that can
populate /etc with the minimal files necessary, solely from static data
in /usr. systemd-sysuser is additive only, and will never override
existing users.

This tool will create these files directly, and not via some user
database abtsraction layer. This is appropriate as this tool is supposed
to run really early at boot, and is only useful for creating system
users, and system users cannot be stored in remote databases anyway.

The tool is also useful to be invoked from RPM scriptlets, instead of
useradd. This allows moving from imperative user descriptions in RPM to
declarative descriptions.

The UID/GID for a user/group to be created can either be chosen dynamic,
or fixed, or be read from the owner of a file in the file system, in
order to support reconstructing the correct IDs for files that shall be
owned by them.

This also adds a minimal user definition file, that should be
sufficient for most basic systems. Distributions are expected to patch
these files and augment the contents, for example with fixed UIDs for
the users where that's necessary.
2014-06-12 23:07:33 +02:00
Lennart Poettering 42a04ee69c build-sys: update library versions 2014-06-11 15:30:28 +02:00
Lennart Poettering a4a878d040 units: introduce network-pre.target as place to hook in firewalls
network-pre.target is a passive target that should be pulled in by
services that want to be executed before any network is configured (for
example: firewall scrips).

network-pre.target should be ordered before all network managemet
services (but not be pulled in by them).

network-pre.target should be order after all services that want to be
executed before any network is configured (and be pulled in by them).
2014-06-11 12:14:55 +02:00
Lennart Poettering 9339db7187 tmpfiles: always recreate the most basic directory structure in /var
Let's allow booting up with /var empty. Only create the most basic
directories to get to a working directory structure and symlink set in
/var.
2014-06-11 00:12:21 +02:00
Lennart Poettering 849958d1ba tmpfiles: add new "C" line for copying files or directories 2014-06-10 23:02:40 +02:00
Dave Reisner bfa501e150 build: fix copypaste error in networkd-wait-online symlink 2014-06-09 08:48:21 -04:00
Thomas Hindoe Paaboel Andersen 95ed3294c6 Move handling of sysv initscripts to a generator
Reuses logic from service.c and the rc-local generator.

Note that this drops reading of chkconfig entirely. It also drops reading
runlevels from the LSB headers. The runlevels were only used to check for
runlevels outside of the normal 1-5 range and then add special dependencies
and settings. Special runlevels were dropped in the past so it seemed to be
unused code.

The generator does not know about non-generated units with a value set with
SysVStartPriority=. These are therefor not taken into account when converting
start priority to before/after.
2014-06-07 00:59:32 +02:00
Lennart Poettering bcf3295d2b bus: add basic dbus1 policy parser
Enforcement is still missing, but at least we can parse it now.
2014-06-06 19:41:24 +02:00
Lennart Poettering fb69d7096d socket-proxyd: port to asynchronous name resolution using sd-resolve 2014-06-05 16:12:48 +02:00
Lennart Poettering 03ee5c38cb journald: move /dev/log socket to /run
This way we can make the socket also available for sandboxed apps that
have their own private /dev. They can now simply symlink the socket from
/dev.
2014-06-04 16:53:58 +02:00
Lennart Poettering 6a010ac9e5 bus-proxy: drop priviliges if we can
Either become uid/gid of the client we have been forked for, or become
the "systemd-bus-proxy" user if the client was root. We retain
CAP_IPC_OWNER so that we can tell kdbus we are actually our own client.
2014-06-04 11:13:08 +02:00
Tom Gundersen 682265d5e2 resolved: run as unpriviliged "systemd-resolve" user
This service is not yet network facing, but let's prepare nonetheless.
Currently all caps are dropped, but some may need to be kept in the
future.
2014-06-03 10:40:28 +02:00
Tom Gundersen bddfc8afd3 networkd: drop CAP_SYS_MODULE
Rely on modules being built-in or autoloaded on-demand.

As networkd is a network facing service, we want to limits its capabilities,
as much as possible. Also, we may not have CAP_SYS_MODULE in a container,
and we want networkd to work the same there.

Module autoloading does not always work, but should be fixed by the kernel
patch f98f89a0104454f35a: 'net: tunnels - enable module autoloading', which
is currently in net-next and which people may consider backporting if they
want tunneling support without compiling in the modules.

Early adopters may also use a module-load.d snippet and order
systemd-modules-load.service before networkd to force the module
loading of tunneling modules.

This sholud fix the various build issues people have reported.
2014-06-03 00:40:23 +02:00
Susant Sahani 10142d75cc networkd: introduce veth device support
This patch adds veth device support to networkd.

Example conf:

File: veth.netdev

[NetDev]
Name=veth-test
Kind=veth

[Peer]
Name=veth-peer
2014-06-02 16:09:40 +02:00
Lennart Poettering d3cf48f4bd networkd: run as unpriviliged "systemd-network" user
This allows us to run networkd mostly unpriviliged with the exception of
CAP_NET_* and CAP_SYS_MODULE. I'd really like to get rid of the latter
though...
2014-06-01 09:12:00 +02:00
Lennart Poettering fdd2531170 virt: rework container detection logic
Instead of accessing /proc/1/environ directly, trying to read the
$container variable from it, let's make PID 1 save the contents of that
variable to /run/systemd/container. This allows us to detect containers
without the need for CAP_SYS_PTRACE, which allows us to drop it from a
number of daemons and from the file capabilities of systemd-detect-virt.

Also, don't consider chroot a container technology anymore. After all,
we don't consider file system namespaces container technology anymore,
and hence chroot() should be considered a container even less.
2014-05-28 18:53:44 +08:00
Lennart Poettering 76d4bef384 build-sys: bump package and library version 2014-05-27 19:02:22 +08:00
Djalal Harouni e866af3acc nspawn: make nspawn robust to container failure
nspawn and the container child use eventfd to wait and notify each other
that they are ready so the container setup can be completed.

However in its current form the wait/notify event ignore errors that
may especially affect the child (container).

On errors the child will jump to the "child_fail" label and terminate
with _exit(EXIT_FAILURE) without notifying the parent. Since the eventfd
is created without the "EFD_NONBLOCK" flag, this leaves the parent
blocking on the eventfd_read() call. The container can also be killed
at any moment before execv() and the parent will not receive
notifications.

We can fix this by using cheap mechanisms, the new high level eventfd
API and handle SIGCHLD signals:

* Keep the cheap eventfd and EFD_NONBLOCK flag.

* Introduce eventfd states for parent and child to sync.
Child notifies parent with EVENTFD_CHILD_SUCCEEDED on success or
EVENTFD_CHILD_FAILED on failure and before _exit(). This prevents the
parent from waiting on an event that will never come.

* If the child is killed before execv() or before notifying the parent,
we install a NOP handler for SIGCHLD which will interrupt blocking calls
with EINTR. This gives a chance to the parent to call wait() and
terminate in main().

* If there are no errors, parent will block SIGCHLD, restore default
handler and notify child which will do execv(), then parent will pass
control to process_pty() to do its magic.

This was exposed in part by:
https://bugs.freedesktop.org/show_bug.cgi?id=76193

Reported-by: Tobias Hunger tobias.hunger@gmail.com
2014-05-25 11:23:35 +08:00
Kay Sievers 24efb11245 shared: rename hwclock.[ch] to clock-util.[ch] 2014-05-24 07:56:20 +09:00
Kay Sievers 5052e3996d build-sys: let libsystemd_network pull in libudev-internal.la
On Thu, May 22, 2014 at 9:53 AM, Jan Engelhardt <jengelh@inai.de> wrote:
>
> If libsystemd-network.la is relying on that udev function, it ought
> to specify libudev(-internal).la in libsystemd_network_la_LIBADD.
2014-05-22 10:19:07 +09:00
Kay Sievers 2f14583f47 build-sys: do not run symbol list export test for compat-only libs
The verbose link-time deprecation warnings are annoying. These libs
will never change or be extended; there is no need to test the list
of exported symbols.
2014-05-22 09:46:09 +09:00
Kay Sievers ffcf82d250 build-sys: fix linking order
./.libs/libsystemd-network.a(libsystemd_network_la-network-internal.o):
  network-internal.c:function net_get_unique_predictable_data:
  error: undefined reference to 'udev_device_get_property_value'
collect2: error: ld returned 1 exit status
2014-05-22 09:46:09 +09:00
Kay Sievers 5590bbe529 Makefile.am: fix whitespace 2014-05-22 09:46:09 +09:00
Jan Engelhardt f884afb206 build: put missing KMOD_CFLAGS into Makefile
The build fails if kmod is not in a default location.
2014-05-22 09:27:26 +09:00
Lennart Poettering f7dc3ab9f4 logind: don't apply RemoveIPC= to system users
We shouldn't destroy IPC objects of system users on logout.

http://lists.freedesktop.org/archives/systemd-devel/2014-April/018373.html

This introduces SYSTEM_UID_MAX defined to the maximum UID of system
users. This value is determined compile-time, either as configure switch
or from /etc/login.defs. (We don't read that file at runtime, since this
is really a choice for a system builder, not the end user.)

While we are at it we then also update journald to use SYSTEM_UID_MAX
when we decide whether to split out log data for a specific client.
2014-05-21 09:36:49 +09: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
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