Commit graph

6951 commits

Author SHA1 Message Date
Lennart Poettering 7040b626e8 systemd-run: don't print error messages twice 2014-03-05 19:03:10 +01:00
Lennart Poettering 4de33e7f32 systemd-run: make sure --nice=, --uid=, --gid=, --setenv= also work in --scope mode 2014-03-05 19:03:10 +01:00
Tom Gundersen 69629de9c8 networkd: listen to changes to the MAC address
Bridges will change their MAC address when other devices are enslaved. We need
the correct MAC address to acquire a DHCP lease, so take note of it whenever
it changes.
2014-03-05 11:53:29 +01:00
Tom Gundersen 3b35ade3fd sd-rtnl: do not blindly enter containers in message_read()
We need a separate container_enter() function, which will be part of a largerg
API change. For now, just fix message_read().
2014-03-05 11:52:32 +01:00
Tom Gundersen 02ec5cd78a sd-dhcp-client: log the MAC address we are using 2014-03-05 11:07:15 +01:00
Mark Oteiza 0ad6148e87 networkd: restore logic for enslaving to a master bonding interface
This partially reverts commit 54abf46, which unintentionally removed the
enslaving support for bonding interfaces
2014-03-05 10:41:20 +01:00
Zbigniew Jędrzejewski-Szmek a9a245c128 journal: forget file after encountering an error
If we encounter an inconsistency in a file, let's just
ignore it. Otherwise, after previous patch, we would try,
and fail, to use this file in every invocation of sd_journal_next
or sd_journal_previous that happens afterwards.
2014-03-05 00:17:27 -05:00
Zbigniew Jędrzejewski-Szmek fb099c8d2a journal: assume that next entry is after previous entry
With a corrupted file, we can get in a situation where two entries
in the entry array point to the same object. Then journal_file_next_entry
will find the first one using generic_arrray_bisect, and try to move to
the second one, but since the address is the same, generic_array_get will
return the first one. journal_file_next_entry ends up in an infinite loop.

https://bugzilla.redhat.com/show_bug.cgi?id=1047039
2014-03-05 00:17:27 -05:00
Lennart Poettering 760b9d7cba core: don't override NoNewPriviliges= from SystemCallFilter= if it is already explicitly set 2014-03-05 04:41:01 +01:00
Lennart Poettering e567439ec6 systemd-run: support all currently exported properties with -p 2014-03-05 04:08:04 +01:00
Lennart Poettering d584f63894 core: make the LimitXYZ= properties settable for transient service units 2014-03-05 04:08:04 +01:00
Lennart Poettering 1ac67edb7c systemd-run: add some extra safety checks 2014-03-05 04:08:04 +01:00
Lennart Poettering df31a6c0fe systemd-run: add new --property= switch that can set arbitrary properties for the unit that is created
The code for parsing these properties is shared with "systemctl
set-property", which means all the resource control settings are
immediately available.
2014-03-05 03:36:22 +01:00
Lennart Poettering 53ede806cb strv: add new STR_IN_SET() macro that operates similar to IN_SET() but for strings 2014-03-05 03:34:48 +01:00
Lennart Poettering 517d56b1d0 missing: if RLIMIT_RTTIME is not defined by the libc, then we need a new define for the max number of rlimits, too 2014-03-05 02:31:09 +01:00
Lennart Poettering a049d1a972 core: when passing resource limit values to client, map RLIM_INFINITY into portable value (uint64_t) -1 2014-03-05 02:31:09 +01:00
Umut Tezduyar Lindskog 86bafac954 architecture: Add cris 2014-03-04 21:06:05 +01:00
Lennart Poettering 1c231f5648 logind: make $XDG_RUNTIME_DIR a per-user tmpfs
This way each user allocates from his own pool, with its own size limit.

This puts the size limit by default to 10% of the physical RAM size but
makes it configurable in logind.conf.
2014-03-04 20:02:50 +01:00
Zbigniew Jędrzejewski-Szmek b5d742138f Do not print invalid UTF-8 in error messages
Inexplicably, 550a40ec ('core: do not print invalid utf-8 in error
messages') only fixed two paths. Convert all of them now.
2014-03-04 10:04:50 -05:00
Zbigniew Jędrzejewski-Szmek 6e18964d3a Introduce strv_consume which takes ownership
This mirrors set_consume and makes the common use a bit nicer.
2014-03-04 10:04:50 -05:00
Zbigniew Jędrzejewski-Szmek e062dec5ae shutdownd: modernizations 2014-03-04 10:02:09 -05:00
Zbigniew Jędrzejewski-Szmek 61376f96a9 logind: small simplifications 2014-03-04 10:02:09 -05:00
Umut Tezduyar Lindskog 5c1d3fc93d sd-network: IPv4 link-local support [v2]
Implements IPv4LL with respect to RFC 3927
(http://tools.ietf.org/rfc/rfc3927.txt) and integrates it
with networkd. Majority of the IPv4LL state machine is
taken from avahi (http://avahi.org/) project's autoip.

IPv4LL can be enabled by IPv4LL=yes under [Network]
section of .network file.

IPv4LL works independent of DHCP but if DHCP lease is
aquired, then LL address will be dropped.

[tomegun: removed a trailing newline and a compiler warning]
2014-03-03 23:24:34 +01:00
Tom Gundersen b6b8adbff4 networkd: wait-online - fix typo 2014-03-03 23:24:34 +01:00
Lennart Poettering e4e703c307 core: fix assert when trying to serialize non-initialized bus peer tracker object 2014-03-03 23:18:25 +01:00
Thomas Hindoe Paaboel Andersen 4d46396131 silence warning 2014-03-03 22:39:55 +01:00
Lennart Poettering 15bd9a2858 core: add missing show-status.[ch] 2014-03-03 22:27:25 +01:00
Lennart Poettering 8f2665a463 conf-parser: minor optimization in config_parse_string() 2014-03-03 21:53:19 +01:00
Lennart Poettering 3b43629240 conf-parser: drop special casing in config_parse_path()
The code checked for two lvalues that aren't even using
config_parse_path(), so let's drop these checks and make the function
completely generic again.
2014-03-03 21:42:38 +01:00
Lennart Poettering 94828d2ddc conf-parser: config_parse_path_strv() is not generic, so let's move it into load-fragment.c
The parse code actually checked for specific lvalue names, which is
really wrong for supposedly generic parsers...
2014-03-03 21:40:55 +01:00
Lennart Poettering 3af00fb85a core: move config_parse_set_status() into load-fragment.c
Let's keep specific config parsers close to where they are needed. Only
the really generic ones should be defined in conf-parser.[ch].
2014-03-03 21:26:53 +01:00
Lennart Poettering 4d7213b274 core: move ShowStatus type into the core
Let's make the scope of the show-status stuff a bit smaller, and make it
private to the core, rather than shared API in shared/.
2014-03-03 21:23:12 +01:00
Lennart Poettering ca37242e52 conf-parse: rename config_parse_level() to config_parse_log_level()
"level" is a bit too generic, let's clarify what kind of level we are
referring to here.
2014-03-03 21:14:07 +01:00
Lennart Poettering f9cd6be10e logind: ignore lid switch events for 30s after each suspend and 3min after startup
This is needed to give USB docking stations and suchlike time to settle,
so that a display connected to an USB docking station can actually act
as a lid swith inhibitor correctly.

With this change we should have somewhat reliable docking station
support in place.
2014-03-03 20:57:09 +01:00
Lennart Poettering 7e9110a29d logind: fix printf format 2014-03-03 19:39:51 +01:00
Lennart Poettering 6a79c58603 logind: ignore lid switch if more than 1 display is connected
Previously we expected the desktop environment to take an inhibitor
lock, but this opened a race on boot-up where logind might already be
running but no DE is active.

Hence, let's move checking for additional displays into logind. This
also opens up this logic for other DEs, given that only GNOME
implemented the inhibitor logic so far.
2014-03-03 19:32:43 +01:00
Lennart Poettering e66cf1a3f9 core: introduce new RuntimeDirectory= and RuntimeDirectoryMode= unit settings
As discussed on the ML these are useful to manage runtime directories
below /run for services.
2014-03-03 17:55:32 +01:00
Lennart Poettering b64a3d86bc execute: no need to include seccomp.h from execute.h 2014-03-03 17:55:32 +01:00
Lennart Poettering 98b47d54ce execute: free directory path if we fail to remove it because we cannot allocate a thread 2014-03-03 17:55:32 +01:00
Tom Gundersen 8e34a618e2 sd-dhcp-lease: add sd_dhcp_lease_get_next_server() 2014-03-03 17:18:22 +01:00
Tom Gundersen 0ad853bc06 sd-dhcp-lease: add sd_dhcp_lease_get_server_identifier() 2014-03-03 16:48:02 +01:00
Tom Gundersen ce78df79b8 sd-dhcp-lease: add Root Path support
This is necessary when mounting /dev/nfs based on a DHCP lease.
2014-03-03 16:48:02 +01:00
Lennart Poettering 8f8f05a919 bus: add sd_bus_track object for tracking peers, and port core over to it
This is primarily useful for services that need to track clients which
reference certain objects they maintain, or which explicitly want to
subscribe to certain events. Something like this is done in a large
number of services, and not trivial to do. Hence, let's unify this at
one place.

This also ports over PID 1 to use this to ensure that subscriptions to
job and manager events are correctly tracked. As a side-effect this
makes sure we properly serialize and restore the track list across
daemon reexec/reload, which didn't work correctly before.

This also simplifies how we distribute messages to broadcast to the
direct busses: we only track subscriptions for the API bus and
implicitly assume that all direct busses are subscribed. This should be
a pretty OK simplification since clients connected via direct bus
connections are shortlived anyway.
2014-03-03 02:34:13 +01:00
Zbigniew Jędrzejewski-Szmek 840292befd Disallow sizes with increasing unit size
Things like 3B4T, 4B50B, 400 100 (meaning 4*1024**4+3, 54, and 500,
respectively) are now disallowed. It is necessary to say 4T3B, 54B,
500 instead. I think this was confusing and error prone.

As a special form, 400B 100 is allowed, i.e. "B" suffix is treated
as different from "", although they mean the same thing.
2014-03-02 13:59:02 -05:00
Zbigniew Jędrzejewski-Szmek 9480794b27 Allow fractional parts in disk sizes
It seems natural to be able to say SystemMaxUsage=1.5G.

https://bugzilla.redhat.com/show_bug.cgi?id=1047568
2014-03-02 13:59:02 -05:00
Thomas Hindoe Paaboel Andersen e1528e085c networkd-wait-online: use automatic cleanup 2014-03-01 23:16:55 +01:00
Tero Roponen 13e8ceb84e nspawn: fix detection of missing /proc/self/loginuid
Running 'systemd-nspawn -D /srv/Fedora/' gave me this error:
 Failed to read /proc/self/loginuid: No such file or directory

 Container Fedora failed with error code 1.

This patch fixes the problem.
2014-02-28 12:58:02 +01:00
Tom Gundersen cb6fa44cb5 sd-network: turn states 'unknown' and 'unmanaged' into errnos 2014-02-28 02:08:08 +01:00
Tom Gundersen 82bdf8ce36 sd-network: fix header 2014-02-28 02:08:08 +01:00
Henrik Grindal Bakken 46eea341c3 architecture: Add tilegx
Add Tilera's TILE-GX processor family support.
2014-02-28 01:48:31 +01:00