15a900327aba7dc4dc886affe1ae22d3b759b193 |
|
10-Feb-2016 |
Lennart Poettering <lennart@poettering.net> |
core: set RLIMIT_CORE to unlimited by default
The kernel sets RLIMIT_CORE to 0 by default. Let's bump this to unlimited by
default (for systemd itself and all processes we fork off), so that the
coredump hooks have an effect if they honour it.
Bumping RLIMIT_CORE of course would have the effect that "core" files will end
up on the system at various places, if no coredump hook is used. To avoid this,
make sure PID1 sets the core pattern to the empty string by default, so that
this logic is disabled.
This change in defaults should be useful for all systems where coredump hooks
are used, as it allows useful usage of RLIMIT_CORE from these hooks again. OTOH
systems that expect that coredumps are placed under the name "core" in the
current directory will break with this change. Given how questionnable this
behaviour is, and given that no common distro makes use of this by default it
shouldn't be too much of a loss. Also, the old behaviour may be restored by
explicitly configuring a "core_pattern" of "core", and setting the default
system RLIMIT_CORE to 0 again via system.conf. |
b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
021dd87bc055a5bfb2dcef83fc868fe24648b959 |
|
03-Feb-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: apply epoch to system time from PID 1
For use in timesyncd we already defined a compile-time "epoch" value, which is based on the mtime of the NEWS file, and
specifies a point in time we know lies in the past at runtime. timesyncd uses this to filter out nonsensical timestamp
file data, and bump the system clock to a time that is after the build time of systemd. This patch adds similar bumping
code to earliest PID 1 initialization, so that the system never continues operation with a clock that is in the 1970ies
or even 1930s. |
d723cd6554f0b4457d079d3be3ec07b2b5b011a9 |
|
02-Feb-2016 |
Alexander Kuleshov <kuleshovmail@gmail.com> |
manager: print fatal error if early mount failed
The mount_setup_early() can fail and if it will occur, there is
no sense to make selinux setup and etc. |
36c16a7cdd6c33d7980efc2cd6a2211941f302b4 |
|
01-Feb-2016 |
Lennart Poettering <lennart@poettering.net> |
core: rework unit timeout handling, and add new setting RuntimeMaxSec=
This clean-ups timeout handling in PID 1. Specifically, instead of storing 0 in internal timeout variables as
indication for a disabled timeout, use USEC_INFINITY which is in-line with how we do this in the rest of our code
(following the logic that 0 means "no", and USEC_INFINITY means "never").
This also replace all usec_t additions with invocations to usec_add(), so that USEC_INFINITY is properly propagated,
and sd-event considers it has indication for turning off the event source.
This also alters the deserialization of the units to restart timeouts from the time they were originally started from.
Before this patch timeouts would be restarted beginning with the time of the deserialization, which could lead to
artificially prolonged timeouts if a daemon reload took place.
Finally, a new RuntimeMaxSec= setting is introduced for service units, that specifies a maximum runtime after which a
specific service is forcibly terminated. This is useful to put time limits on time-intensive processing jobs.
This also simplifies the various xyz_spawn() calls of the various types in that explicit distruction of the timers is
removed, as that is done anyway by the state change handlers, and a state change is always done when the xyz_spawn()
calls fail.
Fixes: #2249 |
d0a7c5f69207b6719bab94893035fc8f5f6f87cb |
|
01-Feb-2016 |
Lennart Poettering <lennart@poettering.net> |
core: move parsing of rlimits into rlimit-util.[ch]
This way we can reuse it for parsing rlimit settings in "systemctl set-property" and related commands. |
dcadc9671c5ff0e4c1e7b6385f63a84387279f93 |
|
21-Jan-2016 |
Evgeny Vereshchagin <evvers@ya.ru> |
core: add valgrind helper for daemon-reexec
Inspired by https://github.com/systemd/systemd/issues/2187#issuecomment-165587140 |
ee48dbd55f544d9ee4a17497b5757be7e854c869 |
|
12-Jan-2016 |
Nils Carlson <pyssling@ludd.ltu.se> |
core: Add machine-id setting
Allow for overriding all other machine-ids which may be present on
the system using a kernel command line systemd.machine_id or
--machine-id= option.
This is especially useful for network booted systems where the
machine-id needs to be static, or for containers where a specific
machine-id is wanted. |
a103496ca585e22bb5e386e3238b468d133f5659 |
|
11-Jan-2016 |
Ismo Puustinen <ismo.puustinen@intel.com> |
capabilities: keep bounding set in non-inverted format.
Change the capability bounding set parser and logic so that the bounding
set is kept as a positive set internally. This means that the set
reflects those capabilities that we want to keep instead of drop. |
4afd3348c7506dd1d36305b7bcb9feb8952b9d6b |
|
27-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
GLIB has recently started to officially support the gcc cleanup
attribute in its public API, hence let's do the same for our APIs.
With this patch we'll define an xyz_unrefp() call for each public
xyz_unref() call, to make it easy to use inside a
__attribute__((cleanup())) expression. Then, all code is ported over to
make use of this.
The new calls are also documented in the man pages, with examples how to
use them (well, I only added docs where the _unref() call itself already
had docs, and the examples, only cover sd_bus_unrefp() and
sd_event_unrefp()).
This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we
tend to call our destructors these days.
Note that this defines no public macro that wraps gcc's attribute and
makes it easier to use. While I think it's our duty in the library to
make our stuff easy to use, I figure it's not our duty to make gcc's own
features easy to use on its own. Most likely, client code which wants to
make use of this should define its own:
#define _cleanup_(function) __attribute__((cleanup(function)))
Or similar, to make the gcc feature easier to use.
Making this logic public has the benefit that we can remove three header
files whose only purpose was to define these functions internally.
See #2008. |
cf0fbc49e67b55f8d346fc94de28c90113505297 |
|
16-Nov-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
tree-wide: sort includes
Sort the includes accoding to the new coding style. |
9ded9cd14cc03c67291b10a5c42ce5094ba0912f |
|
16-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
core: enable TasksMax= for all services by default, and set it to 512
Also, enable TasksAccounting= for all services by default, too.
See:
http://lists.freedesktop.org/archives/systemd-devel/2015-November/035006.html |
287a0de4ad4d2f7510f914a5f1be65430df8561c |
|
16-Nov-2015 |
Umut Tezduyar Lindskog <umuttl@axis.com> |
downgrade warning if setting preset failed |
0af20ea2ee2af2bcf2258e7a8e1a13181a6a75d6 |
|
13-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
core: add new DefaultTasksMax= setting for system.conf
This allows initializing the TasksMax= setting of all units by default
to some fixed value, instead of leaving it at infinity as before. |
ecee72e1b6c3476b674b58472c483fc4aef7ceed |
|
13-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
core: make sure DefaultLimitCPU= and DefaultLimitRTTIME= understand time units, too
We added this for the per-unit setting, hence let's enable this for the
global default settings too. |
5022ce717016e7d3e659357812fc04b95bbf17d7 |
|
12-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
core: make sure to reset the bus error struct before reusing it
Otherwise the call might fail, because the error structure is already
initialized. |
4bd29fe5cec9d744a4e39240c76b85d999bd2cf7 |
|
12-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
core: drop "override" flag when building transactions
Now that we don't have RequiresOverridable= and RequisiteOverridable=
dependencies anymore, we can get rid of tracking the "override" boolean
for jobs in the job engine, as it serves no purpose anymore.
While we are at it, fix some error messages we print when invoking
functions that take the override parameter. |
75eb615480afd787fa412f0a529523f568f79b26 |
|
10-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
defs: rework CONF_DIRS_NULSTR() macro
The macro is generically useful for putting together search paths, hence
let's make it truly generic, by dropping the implicit ".d" appending it
does, and leave that to the caller. Also rename it from
CONF_DIRS_NULSTR() to CONF_PATHS_NULSTR(), since it's not strictly about
dirs that way, but any kind of file system path.
Also, mark CONF_DIR_SPLIT_USR() as internal macro by renaming it to
_CONF_PATHS_SPLIT_USR() so that the leading underscore indicates that
it's internal. |
412ea7a936ebaa5342a4c2abf48b9e408e6ba5dc |
|
06-Nov-2015 |
Karel Zak <kzak@redhat.com> |
core: support IEC suffixes for RLIMIT stuff
Let's make things more user-friendly and support for example
LimitAS=16G
rather than force users to always use LimitAS=16106127360.
The change is relevant for options:
[Default]Limit{FSIZE,DATA,STACK,CORE,RSS,AS,MEMLOCK,MSGQUEUE}
The patch introduces config_parse_bytes_limit(), it's the same as
config_parse_limit() but uses parse_size() tu support the suffixes.
Addresses: https://github.com/systemd/systemd/issues/1772 |
f1f849b0c6c817fcdd37aca0d60f89e0f9c30993 |
|
04-Nov-2015 |
Torstein Husebø <torstein@huseboe.net> |
core: fix typo |
e2c9a13136cdf71b97a4e26b285ca2c3ba96db66 |
|
03-Nov-2015 |
Evgeny Vereshchagin <evvers@ya.ru> |
core: use runlevel_to_target for /proc/cmdline parsing |
19854865a877a3a4fa3d04550c15a99c0e1187ff |
|
02-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
core: bump net.unix.max_dgram_qlen really early during boot
Only that way it actually has an effect on all our sockets, including
$NOTIFY_SOCKET. |
1d40ddbfd35fa500dcf4312621c235ffe86d28e5 |
|
02-Nov-2015 |
Martin Pitt <martin.pitt@ubuntu.com> |
core: drop check for /etc/mtab
util-linux 2.27.1 now entirely stops looking at /etc/mtab, so we don't need to
verify /etc/mtab during early boot any more. Later on, tmpfiles.d/etc.conf will
fix /etc/mtab anyway, so there's not even a point in warning about it.
Drop test_mtab() and bump the util-linux dependency to >= 2.17.1.
Fixes #1495 |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
15a5e95075a7f6007dd97b2a165c8ed16fe683df |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out printf() helpers to stdio-util.h |
4e731273edfe852a3eee2949cd20f49fd5b4f6d7 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move /proc/cmdline parsing code to proc-cmdline.[ch] |
430f0182b72373145c839dbfe99d2382855cb8f8 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
src/basic: rename audit.[ch] → audit-util.[ch] and capability.[ch] → capability-util.[ch]
The files are named too generically, so that they might conflict with
the upstream project headers. Hence, let's add a "-util" suffix, to
clarify that this are just our utility headers and not any official
upstream headers. |
8fcde01280adcbd07e8205b91ac52b06305b6208 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split stat()/statfs()/stavfs() related calls into stat-util.[ch] |
f4f15635ec05293ffcc83a5b39f624bbabbd8fd0 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move a number of fs operations into fs-util.[ch] |
78f22b973fa2c9b09bd974680836df17163d9ee0 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out resource limits related calls into rlimit-util.[ch] |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] |
b1d4f8e154bf61b5de1b27461ef8e9c8c5e838a1 |
|
26-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out user/group/uid/gid calls into user-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
7d06dad900b0f1541531255fb6409d92fc76483d |
|
07-Oct-2015 |
Michal Schmidt <mschmidt@redhat.com> |
core: always let the kernel reap zombies when we're about to freeze
Regardless of whether we're going to spawn a crash shell or not, let the
kernel reap zombies. It's more consistent this way. |
4cf0b03b976dd7050595f835092b551623468dbe |
|
07-Oct-2015 |
Michal Schmidt <mschmidt@redhat.com> |
core: change how crash_shell and crash_reboot interact
Instead of freezing in PID1 and letting the forked child freeze or
reboot when exec("/bin/sh") fails, just wait for the child's
exit and then do the freeze_or_reboot in PID1 as usual.
This means that when both crash_shell and crash_reboot are enabled, the
system will reboot after the shell exits. |
647cb08bc3d5da8a923d055612f558cb6b61e303 |
|
07-Oct-2015 |
Michal Schmidt <mschmidt@redhat.com> |
core: remove spurious assert in parsing CrashChangeVT=
"data" is always NULL (and unused) in config_parse_crash_chvt(). |
f7cd3d5fcb6f393f1ff1decafb12d51e0db8894a |
|
07-Oct-2015 |
Michal Schmidt <mschmidt@redhat.com> |
core: adjust error message about /etc/mtab
Since having /etc/mtab as a regular file is now a fatal error, stop
mentioning irrelevant minor consequences. |
e287086b8aa2558356af225a12d9bfea8e7d61ca |
|
07-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
ask-password: add support for caching passwords in the kernel keyring
This adds support for caching harddisk passwords in the kernel keyring
if it is available, thus supporting caching without Plymouth being
around.
This is also useful for hooking up "gdm-auto-login" with the collected
boot-time harddisk password, in order to support gnome keyring
passphrase unlocking via the HDD password, if it is the same.
Any passwords added to the kernel keyring this way have a timeout of
2.5min at which time they are purged from the kernel. |
618234a5258768359cb1086b152c5f08aaf89754 |
|
30-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
basic: split out cpu set specific APIs into cpu-set-util.[ch] |
765d143b5fc8dcb44f5fbd391ef36d0835793e7c |
|
30-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
util: rename parse_cpu_set() to parse_cpu_set_and_warn()
It's pretty untypical for our parsing functions to log on their own.
Clarify in the name that this one does. |
12ca818ffddb77eb6a0fabe369a5bcbf6994ff8b |
|
30-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: clean up log_syntax() usage
- Rely everywhere that we use abs() on the error code passed in anyway,
thus don't need to explicitly negate what we pass in
- Never attach synthetic error number information to log messages. Only
log about errors we *receive* with the error number we got there,
don't log any synthetic error, that don#t even propagate, but just eat
up.
- Be more careful with attaching exactly the error we get, instead of
errno or unrelated errors randomly.
- Fix one occasion where the error number and line number got swapped.
- Make sure we never tape over OOM issues, or inability to resolve
specifiers |
b9e74c399458a1146894ce371e7d85c60658110c |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
core: rework crash handling
This introduces a new systemd.crash_reboot=1 kernel command line option
that triggers a reboot after crashing.
This also cleans up crash VT handling. Specifically, it cleans up the
configuration setting, to be between 1..63 or a boolean. This is to
replace the previous logic where "-1" meant disabled. We continue to
accept that setting, but only document the boolean syntax instead.
This also brings the documentation of the default settings in sync with
what actually happens.
The CrashChVT= configuration file setting is renamed to CrashChangeVT=,
following our usual logic of not abbreviating unnecessarily. The old
setting stays support for compat reasons.
Fixes #1300 |
97792515b4885db5661897eaafa9be14acb1b0ff |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
core: properly use the ExitCode bus property when exiting is --user instance |
3f6fd1ba65f962702753c4ad284b588e59689a23 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
util: introduce common version() implementation and use it everywhere
This also allows us to drop build.h from a ton of files, hence do so.
Since we touched the #includes of those files, let's order them properly
according to CODING_STYLE. |
189d5bac5c45a6a735489541e285dec8bfc1d38d |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
util: unify implementation of NOP signal handler
This is highly complex code after all, we really should make sure to
only keep one implementation of this extremely difficult function
around. |
e6e242ad2d5f72573ceb4442242789aa23962cd2 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
core: remove set_default_unit()
The new free_and_strdup() call does pretty much the same thing these
days, no need to keep a private limited purpose version around. |
48b908591457cf8fd83a5506b7dfdf22b547bea7 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
core: modernize prepare_reexecute() |
aa8aeac0504388a73e8c29a969d9665280f90d56 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
core: exit early if we hit OOM |
d1cefe0ae29ce95b13157757913b494d89912b95 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
core: use %m rather than strerror() where we can |
92ca4cac43055689696ea63ca7b7225e85707040 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
main: minor clean-ups
Add (void) casting for a couple of functions where we knowingly ignore
the returning error code.
Use EXIT_FAILURE where appropriate.
Try to initialize structures at declaration time, or at once. |
2feceb5eb945d430999a8130e14c512af35b21d9 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: take benefit of the fact that fdset_free() returns NULL |
3dfc97634ea1e9bdd075e93c90cc9a6879264e71 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
core: order #includes in main.c |
fe382237cad0ade50d38075e0bf948ce07618461 |
|
29-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
strv: add strv_free_free() to strv.c and make use of it
Let's teach it a new trick, and make it return NULL. |
f5c72b739e3252fda11936483ba93963895c4bf2 |
|
25-Sep-2015 |
Filipe Brandenburger <filbranden@google.com> |
util: refactor cpu_set parsing into its own function
Use the new code in config_parse_cpu_affinity2.
Tested by modifying CPUAffinity=... setting in /etc/systemd/system.conf
and reloading the daemon, then checking ^Cpus_allowed in /proc/1/status
to confirm the correct CPU mask is in place. |
8ebfe0cbaad12b55fd022650a841149a548d3e60 |
|
22-Sep-2015 |
David Herrmann <dh.herrmann@gmail.com> |
core: fix shutdown of --user
Shutting down a user session currently fails with:
Sep 22 22:35:38 david-t2 systemd[640]: Reached target Shutdown.
Sep 22 22:35:38 david-t2 systemd[640]: Starting Exit the Session...
Sep 22 22:35:38 david-t2 systemd[640]: Received SIGRTMIN+24 from PID 659 (kill).
Sep 22 22:35:38 david-t2 systemd[640]: Shutting down.
Sep 22 22:35:38 david-t2 systemd[640]: Not executed by init (PID 1).
Sep 22 22:35:38 david-t2 systemd[640]: Critical error while doing system shutdown: Operation not permitted
This is a regression from:
commit 287419c119ef961db487a281162ab037eba70c61
Author: Alban Crequy <alban.crequy@gmail.com>
Date: Fri Sep 18 13:37:34 2015 +0200
containers: systemd exits with non-zero code
Make sure we never ever execute systemd-shutdown from within a
user-manager. Restore the previous behavior by partially reverting given
commit. |
1fc464f6fbecfc5d8ba9f7b98d19e21fb324bfb9 |
|
22-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
cgtop: underline table header
Let's underline the header line of the table shown by cgtop, how it is
customary for tables. In order to do this, let's introduce new ANSI
underline macros, and clean up the existing ones as side effect. |
287419c119ef961db487a281162ab037eba70c61 |
|
21-Sep-2015 |
Alban Crequy <alban.crequy@gmail.com> |
containers: systemd exits with non-zero code
When a systemd service running in a container exits with a non-zero
code, it can be useful to terminate the container immediately and get
the exit code back to the host, when systemd-nspawn returns. This was
not possible to do. This patch adds the following to make it possible:
- Add a read-only "ExitCode" property on PID 1's "Manager" bus object.
By default, it is 0 so the behaviour stays the same as previously.
- Add a method "SetExitCode" on the same object. The method fails when
called on baremetal: it is only allowed in containers or in user
session.
- Add support in systemctl to call "systemctl exit 42". It reuses the
existing code for user session.
- Add exit.target and systemd-exit.service to the system instance.
- Change main() to actually call systemd-shutdown to exit() with the
correct value.
- Add verb 'exit' in systemd-shutdown with parameter --exit-code
- Update systemctl manpage.
I used the following to test it:
| $ sudo rkt --debug --insecure-skip-verify run \
| --mds-register=false --local docker://busybox \
| --exec=/bin/chroot -- /proc/1/root \
| systemctl --force exit 42
| ...
| Container rkt-895a0cba-5c66-4fa5-831c-e3f8ddc5810d failed with error code 42.
| $ echo $?
| 42
Fixes https://github.com/systemd/systemd/issues/1290 |
03a7b521e3ffb7f5d153d90480ba5d4bc29d1e8f |
|
10-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
core: add support for the "pids" cgroup controller
This adds support for the new "pids" cgroup controller of 4.3 kernels.
It allows accounting the number of tasks in a cgroup and enforcing
limits on it.
This adds two new setting TasksAccounting= and TasksMax= to each unit,
as well as a gloabl option DefaultTasksAccounting=.
This also updated "cgtop" to optionally make use of the new
kernel-provided accounting.
systemctl has been updated to show the number of tasks for each service
if it is available.
This patch also adds correct support for undoing memory limits for units
using a MemoryLimit=infinity syntax. We do the same for TasksMax= now
and hence keep things in sync here. |
525d3cc746a037e8cc6b2e0ebaaf76a51856fa6b |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: take benefit of the fact that hashmap_free() returns NULL
And set_free() too.
Another Coccinelle patch. |
74ca738f6a01fb5fc19c5c3899f5cb1fdc1d7f68 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
util: introduce safe_fclose() and port everything over to it
Adds a coccinelle script to port things over automatically. |
1f6b411372076426c0faf0bb350437fb4d82931f |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: update empty-if coccinelle script to cover empty-while and more
Let's also clean up single-line while and for blocks. |
bcce71873bbc908fbd11f2053edffe9151940eaa |
|
09-Sep-2015 |
Daniel Mack <daniel@zonque.org> |
core: freeze execution if /etc/mtab exists
The mount monitor that was added to libmount v2.27 requires /etc/mtab to be
non-existant. As systemd now uses that functionality, we cannot monitor any
mounts anymore, and hence not support .mount units.
Systems that have /etc/mtab around as regular file are unsupported by
systemd since a long time.
This patch makes that condition fatal, so we do not boot up with
non-working mount monitor support. |
ece174c5439021e32ebcc858842de9586072c006 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: drop {} from one-line if blocks
Patch via coccinelle. |
a1e58e8ee1c84b633d6d6d651d5328d4dd4eba5b |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: use coccinelle to patch a lot of code to use mfree()
This replaces this:
free(p);
p = NULL;
by this:
p = mfree(p);
Change generated using coccinelle. Semantic patch is added to the
sources. |
75f86906c52735c98dc0aa7e24b773edb42ee814 |
|
07-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
basic: rework virtualization detection API
Introduce a proper enum, and don't pass around string ids anymore. This
simplifies things quite a bit, and makes virtualization detection more
similar to architecture detection. |
5cc623e644852923def55962d2ee92333af8ead7 |
|
01-Sep-2015 |
Filipe Brandenburger <filbranden@google.com> |
core: Log parse errors in config_parse_cpu_affinity2 |
e155a0aa04e899a535fc3b6a98ef6141181d710f |
|
01-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
cgroup: small cleanups and coding style fixes
A number of simplications and adjustments to brings things closer to our
coding style. |
1592ec21b3c302c29e42d35e48159d1e3361f117 |
|
01-Sep-2015 |
Filipe Brandenburger <filbranden@google.com> |
core: add OOM check in config_parse_join_controllers |
3875c85bae4e9deab4005e156cd69eae2a5401cd |
|
01-Sep-2015 |
Filipe Brandenburger <filbranden@google.com> |
core: Log parse errors in config_parse_join_controllers |
d4ebeb4fb39a03c1ea2be3648dd8aaeade6c5ba2 |
|
01-Sep-2015 |
Filipe Brandenburger <filbranden@google.com> |
core: Use extract_first_word in config_parse_join_controllers
Related to the TODO item to replace FOREACH_WORD_QUOTED with it.
Tested by setting `JoinControllers=cpu,cpuacct,memory net_cls,blkio' in
/etc/systemd/system.conf, rebooting the system with the patched binaries
and checking that the desired setup was created by inspecting the
entries under /sys/fs/cgroup.
No regressions observed in test cases. |
4b40bc38b495bb0c986e7accf5897b164ccfee4d |
|
01-Sep-2015 |
Filipe Brandenburger <filbranden@google.com> |
util: Declare a cleanup routine for a cpu_set_t
Make use of it in config_parse_cpu_affinity2.
Tested by tweaking the `CPUAffinity' setting in /etc/systemd/system.conf
and reloading the daemon to confirm it is working as expected.
No regressions observed in test cases. |
4457c2279e032832bccd6ec0895105e3d6e192cc |
|
01-Sep-2015 |
Filipe Brandenburger <filbranden@google.com> |
core: Use extract_first_word in config_parse_cpu_affinity2
Related to the TODO item to replace FOREACH_WORD_QUOTED with it.
Tested by setting `CPUAfinity=0 1' (and other similar settings) in
/etc/systemd/system.conf, booting the system with the patched binaries
(and also using `systemctl daemon-reload` to reconfigure) and checking
that /proc/1/status indicates only CPUs 0 and 1 are allowed for PID 1.
No regressions observed in test cases. |
6513d561ce4c894ea4e29612a2ed62c8310a164f |
|
31-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
core: use DUAL_TIMESTAMP_NULL where we can |
6b9af96321fea83f32356450cce1f59a5e372e91 |
|
07-Aug-2015 |
Jan Pokorný <jpokorny@redhat.com> |
core: s/reexection/reexecution/ typo fix
Signed-off-by: Jan Pokorný <jpokorny@redhat.com> |
97b11eedff9d2e17101ad453caf9e48b73246719 |
|
31-Jul-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: introduce mfree()
Pretty trivial helper which wraps free() but returns NULL, so we can
simplify this:
free(foobar);
foobar = NULL;
to this:
foobar = mfree(foobar); |
06af2a04fb34c3e8f99734571c0c5d2203d6a265 |
|
09-Jul-2015 |
Thomas Blume <Thomas.Blume@suse.com> |
Reload manager defaults at daemon-reload
"systemctl daemon-reload" should also update the manager defaults from
/etc/systemd/system.conf.
For details, see:
http://lists.freedesktop.org/archives/systemd-devel/2015-June/033062.html
Amended to use manager_set_defaults() as common function. |
4c1fc3e404d648c70bd2f50ac50aeac6ece8872e |
|
07-Jul-2015 |
Daniel Mack <daniel@zonque.org> |
fileio: consolidate write_string_file*()
Merge write_string_file(), write_string_file_no_create() and
write_string_file_atomic() into write_string_file() and provide a flags mask
that allows combinations of atomic writing, newline appending and automatic
file creation. Change all users accordingly. |
10f00ff17b9c9b55dc77c99797d27cb819fa5fdf |
|
30-Jun-2015 |
Iago López Galeiras <iago@endocode.com> |
core: handle --log-target=null when calling systemd-shutdown
When shutting down, if systemd was started with --log-target=null,
systemd-shutdown was being called with --log-target=console. |
ce30c8dcb41dfe9264f79f30c7f51c0e74576638 |
|
10-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: whenever we fork off a foreign child process reset signal mask/handlers
Also, when the child is potentially long-running make sure to set a
death signal.
Also, ignore the result of the reset operations explicitly by casting
them to (void). |
61b9b203feee1ff7320e0f38d9b4b2a5e1944409 |
|
05-Jun-2015 |
Cristian Rodríguez <crrodriguez@opensuse.org> |
core: Remove "old kernel" warning if PR_SET_CHILD_SUBREAPER fails
This made sense when systemd ran on older kernels, nowdays not so much. |
24882e06c135584f16f31ba8a00fecde8b7f6fad |
|
29-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split out signal-util.[ch] from util.[ch]
No functional changes. |
d250afe73d855b8a2bb2ee253a1bef6d91d64e74 |
|
27-May-2015 |
Jonathan Boulle <jonathan.boulle@coreos.com> |
fix extraneous space in equality check |
6465fefe3bbbb6444e1515403e4922546f3e4861 |
|
27-May-2015 |
Jonathan Boulle <jonathan.boulle@coreos.com> |
fix extraneous space in equality check |
304b3079a2039971db6d89f4557931776b758e41 |
|
15-May-2015 |
Dimitri John Ledkov <dimitri.j.ledkov@intel.com> |
core: Execute first boot presets in an enable-only preset-mode.
This means any existing enabled units well be preserved and no
pre-created symlinks will be removed. This is done on first boot, when
the assumption is that /etc is not populated at all (no machine-id
setup). For minimal containers that gives a significant first boot
speed up, approximately ~20ms / ~16% in my trials. |
b2c23da8cea1987a1a329f5a964d3299b7ca7890 |
|
11-May-2015 |
Lennart Poettering <lennart@poettering.net> |
core: rename SystemdRunningAs to ManagerRunningAs
It's primarily just a property of the Manager object after all, and we
try to refer to PID 1 as "manager" instead of "systemd", hence let's to
stick to this here too. |
f2341e0a87cab1558c84c933956e9181d5fb6c52 |
|
11-May-2015 |
Lennart Poettering <lennart@poettering.net> |
core,network: major per-object logging rework
This changes log_unit_info() (and friends) to take a real Unit* object
insted of just a unit name as parameter. The call will now prefix all
logged messages with the unit name, thus allowing the unit name to be
dropped from the various passed romat strings, simplifying invocations
drastically, and unifying log output across messages. Also, UNIT= vs.
USER_UNIT= is now derived from the Manager object attached to the Unit
object, instead of getpid(). This has the benefit of correcting the
field for --test runs.
Also contains a couple of other logging improvements:
- Drops a couple of strerror() invocations in favour of using %m.
- Not only .mount units now warn if a symlinks exist for the mount
point already, .automount units do that too, now.
- A few invocations of log_struct() that didn't actually pass any
additional structured data have been replaced by simpler invocations
of log_unit_info() and friends.
- For structured data a new LOG_UNIT_MESSAGE() macro has been added,
that works like LOG_MESSAGE() but prefixes the message with the unit
name. Similar, there's now LOG_LINK_MESSAGE() and
LOG_NETDEV_MESSAGE().
- For structured data new LOG_UNIT_ID(), LOG_LINK_INTERFACE(),
LOG_NETDEV_INTERFACE() macros have been added that generate the
necessary per object fields. The old log_unit_struct() call has been
removed in favour of these new macros used in raw log_struct()
invocations. In addition to removing one more function call this
allows generated structured log messages that contain two object
fields, as necessary for example for network interfaces that are
joined into another network interface, and whose messages shall be
indexed by both.
- The LOG_ERRNO() macro has been removed, in favour of
log_struct_errno(). The latter has the benefit of ensuring that %m in
format strings is properly resolved to the specified error number.
- A number of logging messages have been converted to use
log_unit_info() instead of log_info()
- The client code in sysv-generator no longer #includes core code from
src/core/.
- log_unit_full_errno() has been removed, log_unit_full() instead takes
an errno now, too.
- log_unit_info(), log_link_info(), log_netdev_info() and friends, now
avoid double evaluation of their parameters |
ff9b60f38bf68eba4a47cabff14547d92e083214 |
|
11-May-2015 |
Torstein Husebø <torstein@huseboe.net> |
treewide: Correct typos and spell plural of bus consistent |
288a74cce597f81d3ba01d8a5ca7d2ba5b654b7e |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add terminal-util.[ch] |
0b452006de98294d1690f045f6ea2f7f6630ec3b |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add process-util.[ch] |
6482f6269c87d2249e52e889a63adbdd50f2d691 |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add formats-util.h |
031886edfc6e96ab778c241035a8d00fb0de99d3 |
|
16-Mar-2015 |
Jasper St. Pierre <jstpierre@mecheye.net> |
core: Remove explicit Plymouth integration
Even if plymouth is running, it might have not displayed the splash yet,
so we'll see a few lines on fbcon when we should have otherwise had
nothing.
Plymouth integration was added to systemd in commit
6faa11140bf776cdaeb8d22d01816e6e48296971. That same day, Plymouth got
systemd integration [0]. As such, the Plymouth integration has always
been obsolete, and was probably only for older Plymouth's. But I can't
imagine anybody running a Plymouth from 2011 with a systemd from 2015.
Remove the Plymouth/systemd integration, and let Plymouth's code tell
systemd to print the details.
[0] http://cgit.freedesktop.org/plymouth/commit/?id=537c16422cd49f1beeaab1ad39846a00018faec1
Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net>
Cc: Daniel Drake <dsd@endlessm.com>
Cc: Ray Strode <rstrode@redhat.com> |
e62d9b81926e22f7a1d8a117fd85bb735d3cead2 |
|
15-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add (void) where we don't care about return value |
d3f86679783aee216d60b125acfb5f39a0df555f |
|
15-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
core: do not use quotes around virt and arch
Quotes are useful when the string can contain spaces or be otherwise
confusing. Not possible with those two. |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use. |
d5d8429a12c4b1ef0dcd226c0904f00f4fa4898a |
|
18-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
everywhere: remove configurability of sysv runlevel to target mapping
With this change runlevel 2, 3, 4 are mapped to multi-user.target for
good, and 5 to graphical.target. This was already the previous mapping
but is now no longer reconfigurable, but hard-coded into the core.
This should generally simplify things, but also fix one bug: the
sysv-generator previously generated symlinks to runlevel[2-5].target
units, which possibly weren't picked up if these aliases were otherwise
only referenced by the real names "multi-user.target" and
"graphical.target".
We keep compat aliases "runlevel[2345].target" arround for cases where
this target name is explicitly requested. |
c2cc6b9aefb6f2085d3ca7eb9743093a17f751da |
|
12-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
core: disarm shutdown watchdog if we fail to set timeout
Better safe than sorry, if drivers are stupid, and reset immediately on
device closing if the timeout could not be initialized.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777735 |
5e07a79e84ab8b045b9df1a2719f14fc84471a1d |
|
04-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
core: don't reset log level to NOTICE if we get quiet on the kernel cmdline
quiet should really just have an effect on the stuff we dump on the
console, not what we log elsewhere.
Hence:
debug on kernel cmdline → interpreted by every tool, turns up
log levels to "debug" everywhere.
quiet on kernel cmdline → interpreted only by PID 1 (and
obviously the kernel) no alteration of the max log level, but
turns off status output.
http://lists.freedesktop.org/archives/systemd-devel/2014-December/026271.html |
86caf09519c702f38552ba4f789b55a562fc29c5 |
|
03-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
core: use some nice macros where appropriate |
5ffa8c818120e35c89becd938d160235c069dd12 |
|
01-Feb-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Add a snprinf wrapper which checks that the buffer was big enough
If we scale our buffer to be wide enough for the format string, we
should expect that the calculation was correct.
char_array_0() invocations are removed, since snprintf nul-terminates
the output in any case.
A similar wrapper is used for strftime calls, but only in timedatectl.c. |
81f5fc2d43800c23a4440ed94cfe38d579e896fe |
|
31-Jan-2015 |
Maxim Mikityanskiy <maxtram95@gmail.com> |
core: make setting the shutdown watchdog configuration via dbus work
https://bugs.freedesktop.org/show_bug.cgi?id=88284 |
82c28f5621ad80585eb6c232a988af955a07060c |
|
30-Jan-2015 |
Kay Sievers <kay@vrfy.org> |
Revert "core: make setting the shutdown watchdog configuration via dbus work"
This reverts commit df6e44c4affced590b0d19c594d9301ffd436591.
systemd --version segfaults.
Starting program: /usr/lib/systemd/systemd --version
Missing separate debuginfos, use: debuginfo-install systemd-216-16.fc21.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
systemd 218
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN
Program received signal SIGSEGV, Segmentation fault.
0x000055555557c9be in main (argc=2, argv=0x7fffffffe4d8) at src/core/main.c:1832
1832 arg_shutdown_watchdog = m->shutdown_watchdog;
(gdb) bt
(gdb) bt full
m = 0x0 |
df6e44c4affced590b0d19c594d9301ffd436591 |
|
29-Jan-2015 |
Maxim Mikityanskiy <maxtram95@gmail.com> |
core: make setting the shutdown watchdog configuration via dbus work
https://bugs.freedesktop.org/show_bug.cgi?id=88284 |
297d563de43167f21510061d2de55979a4d65ac4 |
|
27-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
core: explain why failing to set up the crash handler is not a real problem
http://lists.freedesktop.org/archives/systemd-devel/2015-January/027428.html |
8b173b5e8ccbf946ee88af456792d8e720292d9b |
|
05-Jan-2015 |
Michael Biebl <biebl@debian.org> |
core: fix typo in log message |
f131770b1465fbf423881f16ba85523a05f846fe |
|
31-Dec-2014 |
Veres Lajos <vlajos@gmail.com> |
tree-wide: spelling fixes
https://github.com/vlajos/misspell_fixer
https://github.com/torstehu/systemd/commit/b6fdeb618cf2f3ce1645b3315f15f482710c7ffa
Thanks to Torstein Husebo <torstein@huseboe.net>. |
d7b8eec7dc7fe307d3a08b32cf1a9ad4276ce6d5 |
|
28-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
tmpfiles: add new line type 'v' for creating btrfs subvolumes |
ee05e7795bb9ad7d1212dd49ad362f3e9603c4fd |
|
18-Dec-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
core: use raw_clone instead of fork in signal handler
fork() is not async-signal-safe and calling it from the signal handler
could result in a deadlock when at_fork() handlers are called. Using
the raw clone() syscall sidesteps that problem.
The tricky part is that raise() does not work, since getpid() does not
work. Add raw_getpid() to get the real pid, and use kill() instead of
raise().
https://bugs.freedesktop.org/show_bug.cgi?id=86604 |
ee33e53a70c0d3f9d8aeafe4b8fd84a0d5e1d8d9 |
|
11-Dec-2014 |
Torstein Husebø <torstein@huseboe.net> |
core: correct spacing near eol in code comments |
1b907b5c3b11491b790e541dd24255a758511a2f |
|
29-Nov-2014 |
Josh Triplett <josh@joshtriplett.org> |
core: Support system.conf.d and user.conf.d directories in the usual search paths |
4a62c710b62a5a3c7a8a278b810b9d5b5a0c8f4f |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: another round of simplifications
Using the same scripts as in f647962d64e "treewide: yet more log_*_errno
+ return simplifications". |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
23bbb0de4e3f85d9704a5c12a5afa2dfa0159e41 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: more log_*_errno + return simplifications |
c33b329709ebe2755181980a050d02ec7c81ed87 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: more log_*_errno() conversions, multiline calls
Basically:
find . -name '*.[ch]' | while read f; do perl -i.mmm -e \
'local $/;
local $_=<>;
s/log_(debug|info|notice|warning|error|emergency)\("([^"]*)%s"([^;]*),\s*strerror\(-?([->a-zA-Z_]+)\)\);/log_\1_errno(\4, "\2%m"\3);/gms;print;' \
$f; done
Plus manual indentation fixups. |
279d3c9cead3a7ffb657fedbab0e2bc90db45667 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: more log_*_errno() conversions |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
As a followup to 086891e5c1 "log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno(). |
79008bddf679a5e0900369950eb346c9fa687107 |
|
27-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
log: rearrange log function naming
- Rename log_meta() → log_internal(), to follow naming scheme of most
other log functions that are usually invoked through macros, but never
directly.
- Rename log_info_object() to log_object_info(), simply because the
object should be before any other parameters, to follow OO-style
programming style. |
cb6531bee6e6f66c3a9d85b24fed68fae7fad6ad |
|
26-Nov-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
manager: print fatal errors on the console too
When booting in quiet mode, fatal messages would not be shown at all to the user.
https://bugzilla.redhat.com/show_bug.cgi?id=1155468 |
4104970ef78e40e976215cdb0d1b9170a213cc4b |
|
26-Nov-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
manager: log some fatal errors at emergency level
This adds a new log_emergency() function, which is equivalent to
log_error() for non-PID-1, and logs at the highest priority for PID 1.
Some messages which occur before freezing are converted to use it. |
06d8d842e9de8656d9a46926e7ae7ff967b69ef8 |
|
24-Nov-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
manager: let manager_free() handle NULLs
This makes the calling code a bit simpler. |
f84f9974d827314c8ee86f65a5007ccee210422b |
|
14-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
kmod: move #ifdef checks for kmod-setup out of main.c into kmod-setup.c |
2e75e2a8f56d0d5340dc9fb6fed1f6c4b37c495f |
|
14-Nov-2014 |
Daniel Mack <daniel@zonque.org> |
mount-setup: remove mount_setup_late()
Turns out we can just do kmod_setup() earlier, before we do mount_setup(),
so there's no need for mount_setup_late() anymore. Instead, put kdbusfs in
mount_table[]. |
63cc4c3138fd0ce9cc97884373a2dd8959a13ee9 |
|
13-Nov-2014 |
Daniel Mack <daniel@zonque.org> |
sd-bus: sync with kdbus upstream (ABI break)
kdbus has seen a larger update than expected lately, most notably with
kdbusfs, a file system to expose the kdbus control files:
* Each time a file system of this type is mounted, a new kdbus
domain is created.
* The layout inside each mount point is the same as before, except
that domains are not hierarchically nested anymore.
* Domains are therefore also unnamed now.
* Unmounting a kdbusfs will automatically also detroy the
associated domain.
* Hence, the action of creating a kdbus domain is now as
privileged as mounting a filesystem.
* This way, we can get around creating dev nodes for everything,
which is last but not least something that is not limited by
20-bit minor numbers.
The kdbus specific bits in nspawn have all been dropped now, as nspawn
can rely on the container OS to set up its own kdbus domain, simply by
mounting a new instance.
A new set of mounts has been added to mount things *after* the kernel
modules have been loaded. For now, only kdbus is in this set, which is
invoked with mount_setup_late(). |
b5884878a2874447b2a9f07f324a7cd909d96d48 |
|
07-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
util: simplify proc_cmdline() to reuse get_process_cmdline()
Also, make all parsing of the kernel cmdline non-fatal. |
8a188de9e0ea41509beda12084126d7a75ebe86e |
|
28-Oct-2014 |
WaLyong Cho <walyong.cho@samsung.com> |
mac: add mac_ prefix to distinguish origin security apis |
fa1b91632c5220e6589007af4cd573ca909f915a |
|
28-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
core: remove system start timeout logic again
The system start timeout as previously implemented would get confused by
long-running services that are included in the initial system startup
transaction for example by being cron-job-like long-running services
triggered immediately at boot. Such long-running jobs would be subject
to the default 15min timeout, esily triggering it.
Hence, remove this again. In a subsequent commit, introduce per-target
job timeouts instead, that allow us to control these timeouts more
finegrained. |
cc56fafeebf814ef035e549115cf1850e6473fa5 |
|
23-Oct-2014 |
WaLyong Cho <walyong.cho@samsung.com> |
mac: rename apis with mac_{selinux/smack}_ prefix |
d677d4df80e0ea1c66c691f50867fedd63c6770a |
|
17-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemd: continue switch-root even if umount fails
Leaving the old root around seems better than aborting the
switch. |
5329ab10ffaf5b4a3fd6ebd9380b1ec09d05cfc8 |
|
08-Oct-2014 |
Mantas Mikulėnas <grawity@gmail.com> |
core: map the 'rescue' argument to rescue.target
Even though the 'emergency' and 'single' aliases come from sysvinit, the
lack of 'rescue' is still quite confusing (caught me by surprise for the
9th time yet) and inconsistent with `systemctl rescue` as well. |
fdb14b7ef40d1f19f3bd7c8fa2a3821c2be87a5e |
|
01-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
core: limit timestamp to sane precision
Anything below .1 s is meaningless anyway. |
5a4bf02ff57e4dd3453f2b868c72fe45f60033a3 |
|
28-Aug-2014 |
Harald Hoyer <harald@redhat.com> |
use the switch_root function in shutdown
removes code duplication
also move switch-root to shared |
1b6d7fa742e303611dff8d7ebfa86ee5fb8b7dc7 |
|
26-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
util: make use of newly added reset_signal_mask() call wherever appropriate |
f07756bfe25c64119704c93a634162d6c88b5c89 |
|
22-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
core: introduce "poweroff" as new failure action types
Also, change the default action on a system start-up timeout to powering off. |
2928b0a863091f8f291fddb168988711afd389ef |
|
22-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
core: add support for a configurable system-wide start-up timeout
When this system-wide start-up timeout is hit we execute one of the
failure actions already implemented for services that fail.
This should not only be useful on embedded devices, but also on laptops
which have the power-button reachable when the lid is closed. This
devices, when in a backpack might get powered on by accident due to the
easily reachable power button. We want to make sure that the system
turns itself off if it starts up due this after a while.
When the system manages to fully start-up logind will suspend the
machine by default if the lid is closed. However, in some cases we don't
even get as far as logind, and the boot hangs much earlier, for example
because we ask for a LUKS password that nobody ever enters.
Yeah, this is a real-life problem on my Yoga 13, which has one of those
easily accessible power buttons, even if the device is closed. |
1de1c9c37bb58d99c3f9d86f50212e641a2948b4 |
|
15-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
main,log: parse the log related kernel command line parameters at one place only, and for all tools
Previously, we ended up parsing some of them three times: in main.c when
processing the kernel cmdline, in main.c when processing the process
cmdline (only for containers), and in log.c again.
Let's streamline this, and only parse them in log.c
In PID 1 also make sure we parse "quiet" first, and then override this
with the more specific checks in log.c |
56d96fc00cd009e92e611c11f15c1bfb1b1eb9e8 |
|
15-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
main: minor code modernization for initializing the console |
c1dc6153c9426d98ddbcd8b5077f397f18ff1da7 |
|
11-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
log: never ever log to syslog from PID 1, log to the journal again
We don't support journal-less systems anyway, so let's avoid the
confusion. |
601185b43da638b1c74153deae01dbd518680889 |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Unify parse_argv style
getopt is usually good at printing out a nice error message when
commandline options are invalid. It distinguishes between an unknown
option and a known option with a missing arg. It is better to let it
do its job and not use opterr=0 unless we actually want to suppress
messages. So remove opterr=0 in the few places where it wasn't really
useful.
When an error in options is encountered, we should not print a lengthy
help() and overwhelm the user, when we know precisely what is wrong
with the commandline. In addition, since help() prints to stdout, it
should not be used except when requested with -h or --help.
Also, simplify things here and there. |
b2fadec6048adb3596f2633cb7fe7a49f5937a18 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Properly report invalid quoted strings
$ systemd-analyze verify trailing-g.service
[./trailing-g.service:2] Trailing garbage, ignoring.
trailing-g.service lacks ExecStart setting. Refusing.
Error: org.freedesktop.systemd1.LoadFailed: Unit trailing-g.service failed to load: Invalid argument.
Failed to create trailing-g.service/start: Invalid argument |
a2a5291b3f5ab6ed4c92f51d0fd10a03047380d8 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Reject invalid quoted strings
String which ended in an unfinished quote were accepted, potentially
with bad memory accesses.
Reject anything which ends in a unfished quote, or contains
non-whitespace characters right after the closing quote.
_FOREACH_WORD now returns the invalid character in *state. But this return
value is not checked anywhere yet.
Also, make 'word' and 'state' variables const pointers, and rename 'w'
to 'word' in various places. Things are easier to read if the same name
is used consistently.
mbiebl_> am I correct that something like this doesn't work
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"'
mbiebl_> systemd seems to strip of the quotes
mbiebl_> systemctl status shows
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS $RootDir $MountPoint
mbiebl_> which is pretty weird |
3a43da2832dc5360a638d043f469a6dcbe025582 |
|
29-Jul-2014 |
Kay Sievers <kay@vrfy.org> |
time-util: add and use USEC/NSEC_INFINIY |
c264aeab4b0e7b69f469e12e78d4a48b3ed7a66e |
|
27-Jul-2014 |
Kay Sievers <kay@vrfy.org> |
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 |
0d8c31ff7237149b505290652864b4e7e866b2a7 |
|
21-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
test-engine: fix access to unit load path
Also add a bit of debugging output to help diagnose problems,
add missing units, and simplify cppflags.
Move test-engine to normal tests from manual tests, it should now
work without destroying the system. |
b87c2aa6bf1247c298c9bd9f56b9b56a87836b2d |
|
21-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemd: use pager for --test and --help |
36f822c4bd077f9121757e24b6516e5c7ada63b5 |
|
17-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Let config_parse open file where applicable
Special care is needed so that we get an error message if the
file failed to parse, but not when it is missing. To avoid duplicating
the same error check in every caller, add an additional 'warn' boolean
to tell config_parse whether a message should be issued.
This makes things both shorter and more robust wrt. to error reporting. |
e9f3d2d508bfd9fb5b54e82994bda365a71eb864 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Constify ConfigTableItem tables |
e26807239bd65bc17535a53cd540f38600e7ef24 |
|
07-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
firstboot: get rid of firstboot generator again, introduce ConditionFirstBoot= instead
As Zbigniew pointed out a new ConditionFirstBoot= appears like the nicer
way to hook in systemd-firstboot.service on first boots (those with /etc
unpopulated), so let's do this, and get rid of the generator again. |
418b9be50018303cde79b423d4701b7fd86ddbdc |
|
07-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
firstboot: add new component to query basic system settings on first boot, or when creating OS images offline
A new tool "systemd-firstboot" can be used either interactively on boot,
where it will query basic locale, timezone, hostname, root password
information and set it. Or it can be used non-interactively from the
command line when prepareing disk images for booting. When used
non-inertactively the tool can either copy settings from the host, or
take settings on the command line.
$ systemd-firstboot --root=/path/to/my/new/root --copy-locale --copy-root-password --hostname=waldi
The tool will be automatically invoked (interactively) now on first boot
if /etc is found unpopulated.
This also creates the infrastructure for generators to be notified via
an environment variable whether they are running on the first boot, or
not. |
3408ba015aee3a88c91962c028738be757779519 |
|
07-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
main: explain our /etc empty check a bit in a comment |
baa1bdf70f21848fbe01d3f383ae0f59d86a9bf3 |
|
04-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
main: change check whether /etc is unpopulated to look for /etc/machine-id
Previously, we checked whether /etc was completely empty. This makes it
difficult though for container managers such as nspawn to install a
small number of files (such as /etc/timezone), and have the system
otherwise populate its own tree.
Hence, change this by looking for /etc/machine-id, which should be a
good sign whether /etc is populated or not. |
1f97091d3cb0887c264176b47b0a86c269acf0b5 |
|
27-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
main: uid_to_name() might fail due to OOM, protect against that |
d6239dc4b0cf55a953d6c40890859b85d504ef19 |
|
26-Jun-2014 |
Michał Bartoszkiewicz <mbartoszkiewicz@gmail.com> |
core: use correct format string for UIDs |
9bfcda9528636914aef3e0ab91191bb81654c83d |
|
20-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
core: clean-up signal reset logic when reexec
There's no need to save the old sigmask, if we are going to die. Let's
simplify this. Also, reset all the signal handlers, so that we don't
leave SIG_IGN set for some of them across reexec. |
9e01adfa90ab48e24b55a507d68768fc12e951f3 |
|
19-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
main: don't show help text anymore when we detect an unknown kernel cmdline value starting with "systemd."
As generators and other components started to maintain their own kernel
command line options this help text needed more and more exceptions and
wasn't complete anyway. Fixing that would leak more information about
specific generators into PID 1, which we should avoid.
Given that kernel cmdline handling traditionally doesn't generate errors
or show help texts, let's just remove the logic for it for systemd too. |
ca05941b9a6d7855bda2a7cb2cc16bbd3911acdd |
|
19-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
main: honour rd.systemd.unit= only in the initrd, not the host |
5f5c2f3855a87566e8885c7c0ae504782917a9b0 |
|
17-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
core: populate unit file set with preset data if we boot with empty /etc |
489388fbc0be89e2b978258d277b5ff2da573174 |
|
17-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
machine-id-setup: allow passing NULL as function argument, for simplicity |
c47fc1f025dd4b4c22d4650385748dc8486df0b6 |
|
17-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
kmod: conditionalize kmod setup on CAP_SYS_MODULE, not whether we run in a container
It's generally preferrable to conditionalize on the actual ability to do
something then the context we run in. |
d7b15e0a0161e8fd823bffd61a4799364871582f |
|
17-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
log: don't downgrade log level in non-PID 1 if "quiet" is passed on kernel cmdline
"debug" should apply to all tools, but "quiet" only to PID1. |
5a85ca1cb622fda4a39c8a6f00dccea7f8a1e82a |
|
16-Jun-2014 |
Ruediger Oertel <ro@suse.de> |
Reset signal-mask on re-exec to init=..
Process 1 (aka init) needs to be started with an empty signal mask.
That includes the process 1 that's started after the initrd is finished.
When the initrd is using systemd (as it does with dracut based initrds)
then it is systemd that calls the real init. Normally this is systemd
again, except when the user uses for instance "init=/bin/bash" on the
kernel command line. |
5b4c0131214cd99b7b4936b97c728ce0c5d9af32 |
|
13-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
core: don't complain at early boot if /etc/mtab is not the right symlink
When we boot up with an empty /etc it's ok if the symlink doesn't exist.
We will create it later with tmpfiles. |
5ae4d543cb9b45ad6c6b82b78da1d6abc2291cdb |
|
13-Jun-2014 |
Lennart Poettering <lennart@poettering.net> |
os-release: define /usr/lib/os-release as fallback for /etc/os-release
The file should have been in /usr/lib/ in the first place, since it
describes the OS container in /usr (and not the configuration in /etc),
hence, let's support os-release files in /usr/lib as fallback if no
version in /etc exists, following the usual override logic.
A prior commit already enabled tmpfiles to create /etc/os-release as a
symlink to /usr/lib/os-release should it be missing, thus providing nice
compatibility with applications only checking in /etc.
While it's probably a good idea if all apps check both locations via a
fallback logic, it is only necessary in the early boot process, as long
as the /etc/os-release symlink has not been restored, in case we boot
with an empty /etc. |
fdd25311706bd32580ec4d43211cdf4665d2f9de |
|
28-May-2014 |
Lennart Poettering <lennart@poettering.net> |
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. |
24efb112451413c1013d5f7fe27d7e2cd407647a |
|
24-May-2014 |
Kay Sievers <kay@vrfy.org> |
shared: rename hwclock.[ch] to clock-util.[ch] |
9a0549093332880df47c4218209ce126b8586835 |
|
22-May-2014 |
Lennart Poettering <lennart@poettering.net> |
cgroups: simplify CPUQuota= logic
Only accept cpu quota values in percentages, get rid of period
definition.
It's not clear whether the CFS period controllable per-cgroup even has a
future in the kernel, hence let's simplify all this, hardcode the period
to 100ms and only accept percentage based quota values. |
99a17ada9caa8e190b5cafa5cd3c19618feeff48 |
|
05-May-2014 |
Kay Sievers <kay@vrfy.org> |
core: require cgroups filesystem to be available
We should no longer pretend that we can run in any sensible way
without the kernel supporting us with cgroups functionality. |
b2f8b02ec27dfec9cbd23573f47aba494f2e9b5f |
|
25-Apr-2014 |
Lennart Poettering <lennart@poettering.net> |
core: expose CFS CPU time quota as high-level unit properties |
b2103dccb354de3f38c49c14ccb637bdf665e40f |
|
06-Apr-2014 |
Kay Sievers <kay@vrfy.org> |
reduce the amount of messages logged to /dev/kmsg when "debug" is specified |
bd8f585b9996667db89764ece1cacf37672e3223 |
|
24-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
core: add a setting to globally control the default for timer unit accuracy |
03e334a1c7dc8c20c38902aa039440763acc9b17 |
|
18-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
util: replace close_nointr_nofail() by a more useful safe_close()
safe_close() automatically becomes a NOP when a negative fd is passed,
and returns -1 unconditionally. This makes it easy to write lines like
this:
fd = safe_close(fd);
Which will close an fd if it is open, and reset the fd variable
correctly.
By making use of this new scheme we can drop a > 200 lines of code that
was required to test for non-negative fds or to reset the closed fd
variable afterwards. |
92f2f92edcad46ce4098ee26504edca0a1dad68e |
|
14-Mar-2014 |
Greg KH <gregkh@linuxfoundation.org> |
machine-id: add --root option to operate on an alternate fs tree
This makes it possible to initialize the /etc/machine-id file on an
arbitrary filesystem hierarchy. This helps systems that wish to run
this at image creation time in a subdirectory, or from initramfs before
pivot-root is called.
[tomegun: converted to using _cleanup_free_ macros] |
26abdc73a212b90f7c4b71808a1028d2e87ab09f |
|
08-Mar-2014 |
Dave Reisner <dreisner@archlinux.org> |
fix off by one error in array index assertion
Since the index is already post-incremented when the array is appended
to, this assertion can be wrongly reached when the array is at capacity
(with the NULL terminator). The bug is reproducible on shutdown with
the following settings in /etc/systemd/system.conf:
LogTarget=journal-or-kmsg
LogColor=yes
LogLocation=yes
Reported by Thermi on IRC. |
73b80ec2d999c45ce13f3e034704249d80829f7e |
|
07-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
gpt-auto-generator: automatically find the root disk of the system
When run in an initrd and no root= argument is set (or is set to
root=gpt-auto) we will automatically look for the root partition on the
same disk the EFI ESP is located on.
Since we look for swap, /home and /srv on the disk the root partition is
located on, we hence have a fully discoverable chain:
Firmware discovers the EFI ESP partition → the initrd discovers the
root partition → the host OS discovers swap, /home, and /srv.
Note that this requires an EFI boot loader that sets the
LoaderDevicePartUUID EFI variable, such as Gummiboot. |
059cb3858acd038ff2cef10a3a99119bf71a8fc6 |
|
06-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
util: move more intellegince into parse_proc_cmdline()
Already split variable assignments before invoking the callback. And
drop "rd." settings if we are not in an initrd. |
517d56b1d0f67dcf76710bc1e17b05518b8cabe6 |
|
05-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
missing: if RLIMIT_RTTIME is not defined by the libc, then we need a new define for the max number of rlimits, too |
4d7213b2747ddd87002f970ccc60b1a9ab637136 |
|
03-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
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/. |
b64a3d86bcc3b3698824019d0ebdc2117ad31bb5 |
|
03-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
execute: no need to include seccomp.h from execute.h |
085afe36cb823e7d5b8c5f3ef21ebb9639bac78b |
|
24-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
core: add global settings for enabling CPUAccounting=, MemoryAccounting=, BlockIOAccounting= for all units at once |
e49d3c016751c03e544697656e8e596af8a664d7 |
|
24-Feb-2014 |
Łukasz Stelmach <l.stelmach@samsung.com> |
smack: set loaded_policy in smack_setup()
With loaded_policy set to true mount_setup() relabels /dev properly. |
d9d93745cd2efcdfca8f82d798e61e0ee70cef5c |
|
21-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
hostnamectl: should the sanitized arch, not the native uname() one |
15bd5aee092572116886f0f9381f3477f48241fb |
|
17-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
main: make gcc shut up |
b6e2f3293d0f9a821819d96038eec2a19062151f |
|
17-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
core: fixate show_status earlier, so that we actually print the welcome message
Previously, we'd fixed show_state only after printing the welcome
message which had the effect that the welcome message was almost always
suppressed. |
8a8bf3c045d50917cea76ae5a6e659fca0c03e03 |
|
17-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
main: don't set no_new_privs when using SystemCallArchitectures= system-wide
After all, we want to allow userspace to get new privs... |
b1e90ec515408aec2702522f6f68c4920b56375b |
|
17-Feb-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Pass log config from systemd to systemd-shutdown
If PID 1 debug logging is enabled, it is nice to keep those settings
when switching to systemd-shutdown binary, independently of whether
this was done through /proc/cmdline options, or through runtime
manipulations. |
fb4729006a7174472e8a435b0887e532cd6217fc |
|
17-Feb-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Some modernizations |
141a79f491fd4bf5ea0d66039065c9f9649bfc0e |
|
17-Feb-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Extract looping over /proc/cmdline into a shared function
In cryptsetup-generator automatic cleanup had to be replaced
with manual cleanup, and the code gets a bit longer. But existing
code had the issue that it returned negative values from main(),
which was wrong, so should be reworked anyway. |
89fffa2735ea975b3716ee47820d194bd86cce5f |
|
13-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
seccomp: fix build again if libseccomp is missing |
d3b1c5083359faa6cfca81810cf87ef70d0290f6 |
|
13-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
core: add a system-wide SystemCallArchitectures= setting
This is useful to prohibit execution of non-native processes on systems,
for example 32bit binaries on 64bit systems, this lowering the attack
service on incorrect syscall and ioctl 32→64bit mappings. |
d450b6f2a9dd8a7fb14e9f8f771ddd70de7afc5e |
|
28-Jan-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
manager: add systemd.show_status=auto mode
When set to auto, status will shown when the first ephemeral message
is shown (a job has been running for five seconds). Then until the
boot or shutdown ends, status messages will be shown.
No indication about the switch is done: I think it should be clear
for the user that first the cylon eye and the ephemeral messages appear,
and afterwards messages are displayed.
The initial arming of the event source was still wrong, but now should
really be fixed. |
d8160f21fd295b451cee9679aa281fedf1cb8e8c |
|
09-Jan-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Improve messages about user mode a bit |
cc3d61683d877791e6b2ce0b17940d4d77cd6550 |
|
05-Jan-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Remove unused variables |
e3e45d4f82daa5cd85ba40dde9127df900096c0c |
|
05-Jan-2014 |
Simon Peeters <peeters.simon@gmail.com> |
strv: multiple cleanups
- turn strv_merge into strv_extend_strv.
appending strv b to the end of strv a instead of creating a new strv
- strv_append: remove in favor of strv_extend and strv_push.
- strv_remove: write slightly more elegant
- strv_remove_prefix: remove unused function
- strv_overlap: use strv_contains
- strv_printf: STRV_FOREACH handles NULL correctly |
ccd06097c79218f7d5ea4c21721bbcbc7c467dca |
|
03-Jan-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use format patterns for usec_t, pid_t, nsec_t, usec_t
It is nicer to predefine patterns using configure time check instead of
using casts everywhere.
Since we do not need to use any flags, include "%" in the format instead
of excluding it like PRI* macros. |
b8d0ffc21f9c237cdeef49b1873b47df1a0a1543 |
|
23-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
log: als turn on debug logging in non-PID1 if /proc/cmdline contains "debug" |
b43b8f7a7e088c31416374340f576887968f7cad |
|
19-Dec-2013 |
Kay Sievers <kay@vrfy.org> |
do not run kmod-setup in a container |
220ec97ad65150542bb9c8a1ba20b19ea0d49ff8 |
|
18-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
core: in a container log to /dev/console if "debug" is specified |
99f098257f5e4135609edc3df965ebf27975df18 |
|
18-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
log: don't reopen /dev/console each time we call log_open()
Instead, force reopen it only if we really really have to. |
919ce0b7affc6fbd68598b709faf477f56c22ac1 |
|
17-Dec-2013 |
Shawn Landden <shawn@churchofgit.com> |
_noreturn_ --> noreturn for C11 compat
also define noreturn w/o <stdnoreturn.h> |
e3dd987cfc395848256fc6eae637ed0eaf5f1635 |
|
30-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
core: allocate a kdbus bus for each systemd instance, if we can |
f5f6d0e25574dd63fb605b81fa7767dd71c454db |
|
26-Nov-2013 |
Daniel Buch <boogiewasthere@gmail.com> |
tree-wide usage of %m specifier instead of strerror(errno)
Also for log_error() except where a specific error is specified
e.g. errno ? strerror(errno) : "Some user specified message" |
0bee65f0622c4faa8ac8ae771cc0c8a936dfa284 |
|
25-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
shutdown: during final killing spree also send SIGHUP in addition to SIGTERM to deal with shells
This makes shutdown a bit faster if debug-shell.service is enabled. |
71a6151083d842b2f5bf04e50239f0bf85d34d2e |
|
25-Nov-2013 |
Tom Gundersen <teg@jklm.no> |
conf-parser: distinguish between multiple sections with the same name
Pass on the line on which a section was decleared to the parsers, so they
can distinguish between multiple sections (if they chose to). Currently
no parsers take advantage of this, but a follow-up patch will do that
to distinguish
[Address]
Address=192.168.0.1/24
Label=one
[Address]
Address=192.168.0.2/24
Label=two
from
[Address]
Address=192.168.0.1/24
Label=one
Address=192.168.0.2/24
Label=two |
54b434b1b5055f934230fe04fad35b01642b8488 |
|
20-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
valgrind: make running PID 1 in valgrind useful
Since valgrind only generates useful output on exit() (rather than
exec()) we need to explicitly exit when valgrind is detected. |
718db96199eb307751264e4163555662c9a389fa |
|
20-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
core: convert PID 1 to libsystemd-bus
This patch converts PID 1 to libsystemd-bus and thus drops the
dependency on libdbus. The only remaining code using libdbus is a test
case that validates our bus marshalling against libdbus' marshalling,
and this dependency can be turned off.
This patch also adds a couple of things to libsystem-bus, that are
necessary to make the port work:
- Synthesizing of "Disconnected" messages when bus connections are
severed.
- Support for attaching multiple vtables for the same interface on the
same path.
This patch also fixes the SetDefaultTarget() and GetDefaultTarget() bus
calls which used an inappropriate signature.
As a side effect we will now generate PropertiesChanged messages which
carry property contents, rather than just invalidation information. |
c2e0d600ed76f6767d59715d93cf862808552ea2 |
|
10-Nov-2013 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
analyze: plot the time spent setting up security modules |
3f41e1e5955552a771748225334b3e8a7eb02b8a |
|
08-Nov-2013 |
Lukas Nykryn <lnykryn@redhat.com> |
manager: configurable StartLimit default values
https://bugzilla.redhat.com/show_bug.cgi?id=821723 |
8be28fb1e0aa57b2a6ba7736440c9bba54cb86d1 |
|
07-Nov-2013 |
Kay Sievers <kay@vrfy.org> |
core: fix require $XDG_RUNTIME_DIR
$ sudo dracut -f
Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.
/usr/lib/dracut/modules.d/98systemd/module-setup.sh: line 10:
((: >= 198 : syntax error: operand expected (error token is ">= 198 ") |
86198b2788e56fd05959c2dce670d1646bf99bcd |
|
07-Nov-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
udevadm-settle: add missing brace |
3f6da75bcef8293382ce2674322f6c50428eb39f |
|
07-Nov-2013 |
Mantas Mikulėnas <grawity@gmail.com> |
core: require $XDG_RUNTIME_DIR to be set for user instances
It seems that some places use /run otherwise, which isn't going to work. |
74df0fca09b3c31ed19e14ba80f996fdff772417 |
|
06-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
util: unify reading of /proc/cmdline
Instead of individually checking for containers in each user do this
once in a new call proc_cmdline() that read the file only if we are not
in a container. |
1f19a534ea84458670ec011f6d1ba96f76e3f783 |
|
05-Nov-2013 |
Oleksii Shevchuk <alxchk@gmail.com> |
Configurable Timeouts/Restarts default values
https://bugs.freedesktop.org/show_bug.cgi?id=71132
Patch adds DefaultTimeoutStartSec, DefaultTimeoutStopSec, DefaultRestartSec
configuration options to manager configuration file. |
ca2871d9b027018c108e0cf7bbc4e5a919e300c3 |
|
21-Oct-2013 |
Kay Sievers <kay@vrfy.org> |
bus: remove static introspection file export |
6c081276dc11722656906361ac78e415757865e3 |
|
01-Oct-2013 |
Lennart Poettering <lennart@poettering.net> |
main: don't free fds array twice |
90dc8c2ea2cebf2dd195abe4768205a831fd32cb |
|
26-Sep-2013 |
Mike Gilbert <floppym@gentoo.org> |
main: set umask before creating any files
This avoids a problem when we inherit a non-zero umask from the
initramfs. This would cause /run/systemd to be created with the wrong
mode. |
31c885e9ae53f4b88a36452c4ca10643fdd0fd06 |
|
30-Aug-2013 |
Harald Hoyer <harald@redhat.com> |
main: drop capabilities of userhelpers before ours
First drop the capabilities of the userhelpers before dropping our own,
otherwise we might not be allowed to drop the capabilities of the
userhelpers. Especially, if we want to drop CAP_SYS_MODULE.
Credits: Matteo Sasso |
bd6d2963396061ed068c4c6c54d8104b59ba91dc |
|
27-Aug-2013 |
Kay Sievers <kay@vrfy.org> |
log to kmsg when "debug" is used on the kernel command line |
ce8aba568156f2b9d0d3b023e960cda3d9d7db81 |
|
30-Jul-2013 |
Kay Sievers <kay@vrfy.org> |
do not pass-along the environment from the kernel or initrd |
e21fea24ae2a7a04f6d5c9d2bbbaf5833d248952 |
|
26-Jul-2013 |
Kay Sievers <kay@vrfy.org> |
rework systemd's own process environment handling/passing
Stop importing non-sensical kernel-exported variables. All
parameters in the kernel command line are exported to the
initial environment of PID1, but suppressed if they are
recognized by kernel built-in code. The EFI booted kernel
will add further kernel-internal things which do not belong
into userspace.
The passed original environ data of the process is not touched
and preserved across re-execution, to allow external reading of
/proc/self/environ for process properties like container*=. |
21bf2ab082b42f03df5b4685df2fddc4d6e0d572 |
|
23-Jul-2013 |
Kay Sievers <kay@vrfy.org> |
remove left-over initrd time stamp handling |
c72aadd1851096ea979f68b4e32cca71746ccdc4 |
|
17-Jul-2013 |
Harald Hoyer <harald@redhat.com> |
remove RD_TIMESTAMP import
If you want timing information from the initramfs, use systemd in the
initramfs. |
befb5b6a71c175d523644edbddd01b4b722fe956 |
|
11-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
core: rearrange if blocks a bit |
66713f77e851c12452729d37e22ef66673852b8f |
|
10-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
core: uninstall cgroup agent only if we are running outside of a container
Since the cgroupfs is currently not virtualized for containers we
shouldn't reset the hosts agent from the container. |
71445ae75b0e9954d141e5f0ee97803b406ea332 |
|
10-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
core: send out "Reloading" signal before and after doing a full reload/reexec of PID 1
Since we'll unload all units/job during a reload, and then readd them it
is really useful for clients to be aware of this phase hence sent a
signal out before and after. This signal is called "Reloading" (despite
the fact that it is also sent out during reexecution, which we consider
a special case in this context) and has one boolean parameter which is
true for the signal sent before the reload, and false for the signal
after the reload. The UnitRemoved/JobRremoved and UnitNew/JobNew due to
the reloading are guranteed to be between the pair of Reloading
messages. |
6fa4853328e3d78d092172fa54effb7e785d0a85 |
|
10-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
core: serialize/deserialize bus subscribers |
ec26be514ff3c5367b21f9881369080bda54fd2d |
|
05-Jul-2013 |
Kay Sievers <kay@vrfy.org> |
suppress status message output at shutdown when 'quiet' is given |
ad929bcc27e2c6c1aa731053e45882686e9babab |
|
04-Jul-2013 |
Kay Sievers <kay@vrfy.org> |
disable the cgroups release agent when shutting down
During shutdown, when we try to clean up all remaining processes, the
kernel will fork new agents every time a cgroup runs empty. These
new processes cause delays in the final SIGTERM, SIGKILL logic.
Apart from that, this should also avoid that the kernel-forked binaries
cause unpredictably timed access to the filesystem which we might need to
unmount. |
e9dd9f9547350c7dc0473583b5c2228dc8f0ab76 |
|
03-Jul-2013 |
Jason St. John <jstjohn@purdue.edu> |
man: improve grammar and word formatting in numerous man pages
Use proper grammar, word usage, adjective hyphenation, commas,
capitalization, spelling, etc.
To improve readability, some run-on sentences or sentence fragments were
revised.
[zj: remove the space from 'file name', 'host name', and 'time zone'.] |
11ddb6f48e367ae4b51c31d199b28f5be041a301 |
|
28-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
main: fix loading of default target |
c2756a68401102786be343712c0c35acbd73d28d |
|
28-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
core: add transient units
Transient units can be created via the bus API. They are configured via
the method call parameters rather than on-disk files. They are subject
to normal GC. Transient units currently may only be created for
services (however, we will extend this), and currently only ExecStart=
and the cgroup parameters can be configured (also to be extended).
Transient units require a unique name, that previously had no
configuration file on disk.
A tool systemd-run is added that makes use of this functionality to run
arbitrary command lines as transient services:
$ systemd-run /bin/ping www.heise.de
Will cause systemd to create a new transient service and run ping in it. |
4ad490007b70e6ac18d3cb04fa2ed92eba1451fa |
|
27-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
core: general cgroup rework
Replace the very generic cgroup hookup with a much simpler one. With
this change only the high-level cgroup settings remain, the ability to
set arbitrary cgroup attributes is removed, so is support for adding
units to arbitrary cgroup controllers or setting arbitrary paths for
them (especially paths that are different for the various controllers).
This also introduces a new -.slice root slice, that is the parent of
system.slice and friends. This enables easy admin configuration of
root-level cgrouo properties.
This replaces DeviceDeny= by DevicePolicy=, and implicitly adds in
/dev/null, /dev/zero and friends if DeviceAllow= is used (unless this is
turned off by DevicePolicy=). |
abb26902e424c4142b68ead35676028b12249b77 |
|
27-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
core: don't do runaway fork()s if we hit a segfault from our segfault handler |
97d0e5f83ba4dd713170f802b90149b7325bc992 |
|
20-Jun-2013 |
Umut Tezduyar <umut@tezduyar.com> |
manager: add DefaultEnvironment option
This complements existing functionality of setting variables
through 'systemctl set-environment', the kernel command line,
and through normal environment variables for systemd in session
mode. |
1cce5d639cdcb3b237e2eda3c36782f98ff23b46 |
|
06-Jun-2013 |
Chengwei Yang <chengwei.yang@intel.com> |
manager: Do not handle SIGKILL since we can not
This is a minor fix because it's not a major issue, this fix just avoid
to get EINVAL error from sigaction(2).
There are two signals can not handled at user space, SIGKILL and
SIGSTOP even we're PID 1, trying to handle these two signals will get
EINVAL error.
There are two kinds of systemd instance, running as system manager or
user session manager, apparently, the latter is a general user space
process which can not handle SIGKILL. The special pid 1 also can not
do that refer to kernel/signal.c:do_sigaction().
However, pid 1 is unkillable because the kernel did attach
SIGNAL_UNKILLABLE to it at system boot up, refer to
init/main.c:start_kernel()
--> rest_init()
--> kernel_thread()
--> kernel_init()
--> init_post()
current->signal->flags |= SIGNAL_UNKILLABLE |
9749cd77bc6121a304a7f1eb0f03f26e620dc9da |
|
30-May-2013 |
Lukas Nykryn <lnykryn@redhat.com> |
core: read "debug" from kernel commandline and set log level |
4f8d551ff0177df87fae6cb970471186a422d064 |
|
29-May-2013 |
Zachary Cook <zachcook1991@gmail.com> |
systemd: record efi timestamps after /sys is mounted
This partially reverts commit c3a170f3, which moved
efi_get_boot_timestamps too early in main(), before
/sys is assured to be mounted
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64371
[tomegun: in particular /sys/firmware/efi/efivars needs to be
mounted, which is not a problem if a systemd-initramfs containing
the correct module is being used. But not everyone uses an
initramfs...] |
19adb8a3204fefd91411b5f0f350c8bc6bcf75fe |
|
06-May-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemd-sleep: add support for freeze and standby
A new config file /etc/systemd/sleep.conf is added.
It is parsed by systemd-sleep and logind. The strings written
to /sys/power/disk and /sys/power/state can be configured.
This allows people to use different modes of suspend on
systems with broken or special hardware.
Configuration is shared between systemd-sleep and logind
to enable logind to answer the question "can the system be
put to sleep" as correctly as possible without actually
invoking the action. If the user configured systemd-sleep
to only use 'freeze', but current kernel does not support it,
logind will properly report that the system cannot be put
to sleep.
https://bugs.freedesktop.org/show_bug.cgi?id=57793
https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=7e73c5ae6e7991a6c01f6d096ff8afaef4458c36
http://lists.freedesktop.org/archives/systemd-devel/2013-February/009238.html
SYSTEM_CONFIG_FILE and USER_CONFIG_FILE defines were removed
since they were used in only a few places and with the
addition of /etc/systemd/sleep.conf it becomes easier to just
append the name of each file to the dir name. |
c3a170f3d3358135a39ac6eafe66f18aef0bd67d |
|
25-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
systemd: record the timestamps as early as possible
The time for systemd initialization and selinux policy loading
is accounted to the initrd or the kernel, which is wrong.
Instead of:
Startup finished in 5.559s (firmware) + 36ms (loader) + 665ms (kernel) +
975ms (initrd) + 1.410s (userspace) = 8.647s
the more correct output is:
Startup finished in 5.559s (firmware) + 36ms (loader) + 665ms (kernel) +
475ms (initrd) + 1.910s (userspace) = 8.647s |
db5c0122853a9ecf1cc92e6593461932df2fa866 |
|
25-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
conf-parser: restrict .include usage
Disallow recursive .include, and make it unavailable in anything but
unit files. |
a6b26d9011de60e1c41f51e8d2aab1d2f7bbf0f5 |
|
24-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Small cleanup |
cd8f53ab1601513cc3407447bfe3359ee7139676 |
|
23-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
core: there's no point to complain so loudly about non-isolatable boot targets |
7fd1b19bc9e9f5574f2877936b8ac267c7706947 |
|
18-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
move _cleanup_ attribute in front of the type
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html |
449101fce2757575c4813a9512890536365445f6 |
|
18-Apr-2013 |
Simon Peeters <peeters.simon@gmail.com> |
Move bus_error to dbus-common and remove bus_error_message_or_strerror
bus_error and bus_error_message_or_strerror dit almost exactly the same,
so use only one of them and place it in dbus-common. |
543295ad369793bdac510c6c3bf4afae8f1cdab5 |
|
17-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
core/main: use _cleanup_ |
e8e581bf256b8c0fbd430935af79fa0e8ee570a1 |
|
17-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Report about syntax errors with metadata
The information about the unit for which files are being parsed
is passed all the way down. This way messages land in the journal
with proper UNIT=... or USER_UNIT=... attribution.
'systemctl status' and 'journalctl -u' not displaying those messages
has been a source of confusion for users, since the journal entry for
a misspelt setting was often logged quite a bit earlier than the
failure to start a unit.
Based-on-a-patch-by: Oleksii Shevchuk <alxchk@gmail.com> |
799de03f51def1cb3cea376c2e3e783c721c9b89 |
|
17-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
core/main: generate 4 parsing functions from a macro |
b3680f49e20c51e31c8dea84a11207df7b8f0100 |
|
08-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
Do not serialize environment, when switching root
When switching root, i.e. LANG can be set to the locale of the initramfs
or "C", if it was unset. When systemd deserializes LANG in the real root
this would overwrite the setting previously gathered by locale_set().
To reproduce, boot with an initramfs without locale.conf or change
/etc/locale.conf to a different language than the initramfs and check a
daemon started by systemd:
$ tr "$\000" '\n' </proc/$(pidof sshd)/environ | grep LANG
LANG=C
To prevent that, serialization of environment variables is skipped, when
serializing for switching root.
https://bugzilla.redhat.com/show_bug.cgi?id=949525 |
245802dd89ccf10de446faff5577e041d5372062 |
|
06-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use _cleanup_ when reading config files |
b92bea5d2a9481de69bb627a7b442a9f58fca43d |
|
06-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Use initalization instead of explicit zeroing
Before, we would initialize many fields twice: first
by filling the structure with zeros, and then a second
time with the real values. We can let the compiler do
the job for us, avoiding one copy.
A downside of this patch is that text gets slightly
bigger. This is because all zero() calls are effectively
inlined:
$ size build/.libs/systemd
text data bss dec hex filename
before 897737 107300 2560 1007597 f5fed build/.libs/systemd
after 897873 107300 2560 1007733 f6075 build/.libs/systemd
… actually less than 1‰.
A few asserts that the parameter is not null had to be removed. I
don't think this changes much, because first, it is quite unlikely
for the assert to fail, and second, an immediate SEGV is almost as
good as an assert. |
2fa4092c2829dd14e50c430ae2f23551d23c6c1d |
|
04-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
util: make time formatting a bit smarter
Instead of outputting "5h 55s 50ms 3us" we'll now output "5h
55.050003s". Also, while outputting the accuracy is configurable.
Basically we now try use "dot notation" for all time values > 1min. For
>= 1s we use 's' as unit, otherwise for >= 1ms we use 'ms' as unit, and
finally 'us'.
This should give reasonably values in most cases. |
7f602784de4fd378120e8ebfe6d830862b9cae03 |
|
03-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
util: rename parse_usec() to parse_sec() sinds the default unit is seconds
Internally we store all time values in usec_t, however parse_usec()
actually was used mostly to parse values in seconds (unless explicit
units were specified to define a different unit). Hence, be clear about
this and name the function about what we pass into it, not what we get
out of it. |
7989e1f2d79891ff73dea0ede1c98c47b62547db |
|
01-Apr-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Partially revert e62d8c394474
The ~80 chars per line part wasn't well received. |
e62d8c3944745ed276e6d4f33153009860e5cfc5 |
|
31-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Modernization
Use _cleanup_ and wrap lines to ~80 chars and such. |
ab4224458bf32d0e733f8e74b34414635389acc1 |
|
22-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
main: minor simplification |
db813c2a9199d694f8e97618889425a2401524d6 |
|
22-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
main: use strv_find() where we can |
e2b1eb2661e95c8e3d03c5f7183a234fea990b68 |
|
22-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
main: don't mount cgroup controller unless PID == 1
This completes c1dae1b3c9729fb8ab749dd4e2dad07e0fad7ed8 in a way. |
c1dae1b3c9729fb8ab749dd4e2dad07e0fad7ed8 |
|
14-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
main: don't mount /sys, /dev and friends when we run with PID != 1
Back from old times when we developed systemd on non-systemd hosts we
still mounted the missing directories such as the cgroup stuff even when
running with a PID != 1. There's no point for that anymore, so let's
just do that if we are actually PID 1, and never otherwise.
https://bugs.freedesktop.org/show_bug.cgi?id=62354 |
ab17a050b778412b11c82f4fa974be9c491ead36 |
|
07-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
core: if we cannot JOB_ISOLATE the default target JOB_REPLACE it instead
In order to maintain compatibility with older initrds which do not have
AllowIsolate=yes set for their target units, fallback to JOB_REPLACE if
JOB_ISOLATE doesn't work, but complain about it. |
ffbd2c4d45787ba5ba85a32db6551efba66a1ee6 |
|
07-Mar-2013 |
Nathaniel Chen <nathaniel.chen@intel.com> |
core: mount and initialize Smack
SMACK is the Simple Mandatory Access Control Kernel, a minimal
approach to Access Control implemented as a kernel LSM.
The kernel exposes the smackfs filesystem API through which access
rules can be loaded. At boot time, we want to load the access rules
as early as possible to ensure all early boot steps are checked by Smack.
This patch mounts smackfs at the new location at /sys/fs/smackfs for
kernels 3.8 and above. The /smack mountpoint is not supported.
After mounting smackfs, rules are loaded from the usual location.
For more information about Smack see:
http://www.kernel.org/doc/Documentation/security/Smack.txt |
8f838d8aab0c5480664de04dce0171de4f4c7b00 |
|
07-Mar-2013 |
Nathaniel Chen <nathaniel.chen@intel.com> |
core: move mount_setup_early() to main.c
move mount_setup_early() call to main.c, before security module setup,
so there are no more repeat calls. |
dd7c30c36a8235652e7c1ad8e6082f32ff6de2f9 |
|
07-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
core: don't complain about systemd.journald.xxx kernel command line arguments in PID 1
https://bugzilla.redhat.com/show_bug.cgi?id=880025 |
95f1b47d27066c139ca685f65a2e4e91e1c3d6a9 |
|
06-Mar-2013 |
Tom Gundersen <teg@jklm.no> |
main: ISOLATE rather than REPLACE default.target
This allows switch-root to work correctly if a unit is active both before and
after the switch-root, but its dependencies change. Before the patch, any
dependencies added to active units by switch-root will not be pulled, in
particular filesystems configured in /etc/fstab would not be activated if
local-fs.target was active in the initrd.
It is not clear to me if there is a bug in the REPLACE handling, or if it is
working as expected and that we really want to use ISOLATE instead as this patch
does. |
a5c32cff1f56afe6f0c6c70d91a88a7a8238b2d7 |
|
14-Feb-2013 |
Harald Hoyer <harald@redhat.com> |
honor SELinux labels, when creating and writing config files
Also split out some fileio functions to fileio.c and provide a SELinux
aware pendant in fileio-label.c
see https://bugzilla.redhat.com/show_bug.cgi?id=881577 |
0c4025d14201a46a1ce09ef5e266f8f81c47b22f |
|
11-Feb-2013 |
Lennart Poettering <lennart@poettering.net> |
core: don't accept invalid environment assignments from the kernel cmdline |
bc2708414babc5c99bb8000e63c84e87606cc15d |
|
04-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
build-sys: drop all distribution specfic checks
Yay, we now have a completely generic systemd. No distribution specific checks anymore! |
01e10de3c2b9c2944bd86b12fab83d1164d0b64a |
|
22-Dec-2012 |
Lennart Poettering <lennart@poettering.net> |
socket: support socket activation of containers |
e30431623a7d871da123cc37055ac49abf2c20ea |
|
20-Nov-2012 |
Tom Gundersen <teg@jklm.no> |
build-sys: make loadable module support optional
kmod is unecessary if loadable module support is disabled in the kernel,
so make the dependency optional. |
19e65613563dd9c14cf1ce58aa6e151de8fb90c2 |
|
27-Oct-2012 |
Kay Sievers <kay@vrfy.org> |
hwclock: do not seal the kernel's time-warp call from inside the initrd |
6bae23a0388dd077fee99e83e161d297c3e2b768 |
|
16-Oct-2012 |
Thomas Bächler <thomas@archlinux.org> |
core: Refuse to run a user instance when the system hasn't been booted with systemd.
Running as a user instance won't work at all if systemd isn't running as system
manager, so refuse to start in that case. |
a07fdfa376add41d9101d39db25fb2ecb17d5fca |
|
24-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
main: don't try to mout cpuset with cpu+cpuacct anymore
Turns out cpuset needs explicit initialization before we could make use
of it. Thus mounting cpuset with cpu/cpuacct would make it impossible to
just create a group in "cpu" and start it. |
67445f4e22ad924394acdd4fd49e6f238244a5ca |
|
18-Sep-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
core: move ManagerRunningAs to shared
Note: I did s/MANAGER/SYSTEMD/ everywhere, even though it makes the
patch quite verbose. Nevertheless, keeping MANAGER prefix in some
places, and SYSTEMD prefix in others would just lead to confusion down
the road. Better to rip off the band-aid now. |
a866073d35dea05e6f3e56328d3eb6436943e7e6 |
|
17-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
main: when transitioning from initrd to the main system log to kmsg
When the new PID is invoked the journal socket from the initrd might
still be around. Due to the default log target being journal we'd log to
that initially when the new main systemd initializes even if the kernel
command line included a directive to redirect systemd's logging
elsewhere.
With this fix we initially always log to kmsg now, if we are PID1, and
only after parsing the kernel cmdline try to open the journal if that's
desired.
(The effective benefit of this is that SELinux performance data is now
logged again to kmsg like it used to be.) |
72edcff5db936e54cfc322d9392ec46e2428fd9b |
|
17-Sep-2012 |
Kay Sievers <kay@vrfy.org> |
hwclock: always set the kernel's timezone
Properly tell the kernel at bootup, and any later time zone changes,
the actual system time zone.
Things like the kernel's FAT filesystem driver needs the actual time
zone to calculate the proper local time to use for the on-disk time
stamps.
https://bugzilla.redhat.com/show_bug.cgi?id=802198 |
4096d6f5879aef73e20dd7b62a01f447629945b0 |
|
17-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
main: bump up RLIMIT_NOFILE for systemd itself
For setups with many listening sockets the default kernel resource limit
of 1024 fds is not enough. Bump this up to 64K to avoid any limitations
in this regard. We are careful to pass on the kernel default to daemons
however, since normally resource limits are a good to enforce,
especially since select() can't handle fds > 1023. |
2f6f1bc30c528ca7346b4c93f08b65682aa2876f |
|
10-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
selinux: close stdin/stdout/stderr before loading selinux policy
Let's make sure libselinux doesn't spew to stderr |
ac59a798f2e9e616872e5c571219374c6d8f010d |
|
07-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
main: fix syntax of net_prio cgroup controller |
be5412d85493615bc2b027bd7131497e31725190 |
|
04-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
main: jointly mount more controllers
After talking to the cgroup kernel folks at LPC we came to the
conclusion that it is probably a good idea to mount all CPU related
resp. all network related cgroup controllers together, both because they
are good defaults for admins and because this might prepare
for eventual kernel cleanups where the ability to mount them separately
is removed. |
032f81645b3a60be316d7a0ed1e84443aa8737ba |
|
23-Aug-2012 |
Lukas Nykryn <lnykryn@redhat.com> |
core: free word later in parse_proc_cmdline |
ddfa5101a2e0d94571c10e2bbc7c38b60dc6cba1 |
|
21-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
main: fix PR_SET_CHILD_SUBREAPER warning version |
8b8ffe6828c97c82870cfd30c647fa269964810f |
|
21-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
core: fix error checking for PR_SET_CHILD_SUBREAPER |
6afa301b8daa6261f5715a964b0e5263d2e9dd0c |
|
06-Aug-2012 |
Lennart Poettering <lennart@poettering.net> |
main: fix typo |
1421211924ff05af3b0c0d52f1c84472d0307456 |
|
06-Aug-2012 |
Shawn Landden <shawnlandden@gmail.com> |
continue work with error messages, log_oom()
Adds messages for formally silent errors: new "Failed on cmdline argument %s: %s".
Removes some specific error messages for -ENOMEM in mount-setup.c. A few specific
ones have been left in other binaries. |
d4447f4d955d5bfbdec6feec8e332b8c126f474a |
|
25-Jul-2012 |
Auke Kok <auke-jan.h.kok@intel.com> |
main: set PR_SET_CHILD_REAPER for MANAGER_USER
Become the reaper for all children part of the user session. Tested
with several forking services. |
6b78f9b4354010f8af2fe48c783ffd52b2db8f57 |
|
18-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
unit: don't serialize job state, only unit state across switch-root |
cee530bb23b78c0dfd18b0c2718cfe41286396df |
|
17-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
switch-root: don't wait for processes
When we transition from the initrd to the main system, don't reap
processes, so that they can be handled normally after deserialization. |
9ba0bc4e0f3cc606635547c6215f5af8982851df |
|
17-Jul-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemd: add --version option
systemd --version mirrors systemctl --version:
$ ./systemd --version
systemd 186
other
+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT -LIBCRYPTSETUP
This information can be retrieved by other means (systemctl, etc.),
but it's easier for a newbie if 'systemd --version' says something
useful. And 'systemd --help' is already there, so let's complement
that with '--version'. |
a504223d9a448ab338e369997c39c04067c8f906 |
|
13-Jul-2012 |
Harald Hoyer <harald@redhat.com> |
main: only reopen /dev/console if we switch-root to a custom init
There's no point in reopening /dev/console if we reopen it anyway
afterwards. |
bd3fa1d2434aa28564251ac4da34d01537de8c4b |
|
13-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
core: go on a killing spree when transitioning from initrd to main system |
cd3bd60a2e4bb08526d953a323bbe1a0ace78b9e |
|
10-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
switch-root: reopen /dev/console before we switch root |
26a1efdf61b462d0fff440a558a96f5cd184920c |
|
02-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
core: mention if we are run from an initial RAM disk |
c20f5ac765ff8073a469dad85d9aaefa080196fc |
|
28-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
main: print detected virtualiaztion at boot |
af6da548aa14c57da7f17b3a1f2211efdb811d19 |
|
26-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
core: make systemd.confirm_spawn=1 actually work
This adds a timeout if the TTY cannot be acquired and makes sure we
always output the question to the console, never to the TTY of the
respective service. |
d081dffbd3e57dc9da494a3384e333bf565d4175 |
|
22-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
core: remove sysv_console option
This option never made much sense. It was originally intended to make
sure that the usual startup output of sysv scripts goes to the terminal.
However, since SysV scripts started from a terminal would not output to
that terminal, but rather /dev/console this effect was more often than
not actually taking place. Nowadays systemd has much nicer boot time
status output than SysV which makes the sysv output redundant. Finally,
all output of services goes to the journal anyway, and is not lost.
Hence, let's drop this option, and simplify things a bit. |
66a78c2b95ba6cc0be15dab68c5af816fb5b7a33 |
|
22-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
cryptsetup: allow configuration of LUKS disks via the kernel cmdline
This generalizes a bit of the functionality already available in dracut. |
c66e7bc7a19c068ca1c414f2f8bd5dc13c20907f |
|
22-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
man: document all kernel command line options we understand |
aa0f64ac851ebf27342d66947b5170bfeb9f49ae |
|
31-May-2012 |
Lennart Poettering <lennart@poettering.net> |
main: allow setting of timer slack for PID 1 |
939b8f14dcd9312140d001b55b4e7a87173682ef |
|
29-May-2012 |
Lennart Poettering <lennart@poettering.net> |
capabilities: when dropping capabilities system-wide also drop them from usermode helpers
This hooks things up with /proc/sys/kernel/usermodehelper/bset and
/proc/sys/kernel/usermodehelper/inheritable. |
ec8927ca5940e809f0b72f530582c76f1db4f065 |
|
24-May-2012 |
Lennart Poettering <lennart@poettering.net> |
main: add configuration option to alter capability bounding set for PID 1
This also ensures that caps dropped from the bounding set are also
dropped from the inheritable set, to be extra-secure. Usually that should
change very little though as the inheritable set is empty for all our uses
anyway. |
745e2fb79ab20f3e98310d5e889a161ffe8b492c |
|
22-May-2012 |
Kay Sievers <kay@vrfy.org> |
main: only fall back to /bin/sh in case /sbin/init does not exist |
bf4df7c3b6cb24918d94835cafd9dd60881c8981 |
|
22-May-2012 |
Lennart Poettering <lennart@poettering.net> |
main: properly queue default.target after switched root
This also introduces rd.systemd.unit= to specify the unit to boot into
in the initrd. |
c93ff2e913a6da516c83c0d3f8df73004acc6c8b |
|
21-May-2012 |
Frederic Crozat <fcrozat@suse.com> |
main: allow system wide limits for services |
2660882b52ae1a5d97a2344633a999d88a3cd45b |
|
21-May-2012 |
Lennart Poettering <lennart@poettering.net> |
main: rename a few fix to follow general naming style |
416693175bc317ef3fa4963af51a5ee077320d09 |
|
21-May-2012 |
Lennart Poettering <lennart@poettering.net> |
switch-root: move switch_root() call into its own .c file |
97a66e94700845239cfe628da3569ac06034fa4d |
|
21-May-2012 |
Harald Hoyer <harald@redhat.com> |
main: do_switch_root() do not recursively remove across device boundaries |
c3ba62509efe274c2bf6482056044e6fab65fec0 |
|
21-May-2012 |
Harald Hoyer <harald@redhat.com> |
core/main.c: handle the initrd timestamp differently, if in the initrd
If systemd is in the initrd/initramfs, set the initrd timestamp and do
not try to read it from the RD_TIMESTAMP environment variable. |
e148ac5a6cccd1c9c23bf7b3085b50fdb1cd1cf9 |
|
21-May-2012 |
Harald Hoyer <harald@redhat.com> |
core/main.c: do_switch_root(): do not remove the old root if not in initrd
Only recursively remove the old root, if we have been in an
initrd/initramfs. |
d03bc1b814b853497120c35a9a8d6a66925963ff |
|
21-May-2012 |
Harald Hoyer <harald@redhat.com> |
core/main.c: add "--switchedroot" parameter
If systemd serializes from a switch_root, it adds "--switchedroot" to
the systemd in the real root.
If "--switchedroot" is found, then we do not skip all the stuff, which
is skipped for normal rexecs. |
f67cc036ba92a3c71acb664ed2d548de5827cf1f |
|
21-May-2012 |
Harald Hoyer <harald@redhat.com> |
main: corrected do_switch_root()
do_switch_root now mount moves "/dev", "/proc", "/sys", "/run" and
removes the old root recursively. |
b8f8323268ae974288e49a7cc6c1c47531e436c9 |
|
21-May-2012 |
Lennart Poettering <lennart@poettering.net> |
main: try a bit harder to find an init process to execute after reexec/switch-root |
b809bd0940b3c12d49cfc79d2a2c1a449b3dcf50 |
|
09-May-2012 |
Michal Schmidt <mschmidt@redhat.com> |
main: fix uninitialized variable |
e564a98237817d8c89f7979856a87d3788988742 |
|
09-May-2012 |
Michal Schmidt <mschmidt@redhat.com> |
main: fix assertion failure due to use of ELEMENTSOF on a non-array |
664f88a7e653918942b858e3f387be2ebc9ebf03 |
|
09-May-2012 |
Lennart Poettering <lennart@poettering.net> |
manager: introduce SwitchRoot bus call for initrd/main transition |
a5d87bf0eaf718afe62fb0b18c2f526c6e4375fc |
|
08-May-2012 |
Lennart Poettering <lennart@poettering.net> |
main: simplify+unify logic for parsing runtime booleans |
bbc98d32560cc456531bf254f7b69054921082bd |
|
08-May-2012 |
Kay Sievers <kay@vrfy.org> |
util: split-out hwclock.[ch] |
8d8e945624a0080073d94941f3032b8fa3b3aa15 |
|
24-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
manager: drop MountAuto= and SwapAuto= options
The ability to set MountAuto=no and SwapAuto=no was useful during the
adoption phase of systemd, so that distributions could stick to their
classic mount scripts a bit longer. It is about time to get rid of it
now. |
a0a3844815b0f346dba03f41245c620f432e462f |
|
20-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
main: log to the journal in container mode, by default |
e9a5ef7cddcfcdb29b5aef3896931132b6fd5165 |
|
17-Apr-2012 |
Kay Sievers <kay@vrfy.org> |
selinux: unify systemd and udev code |
9f28b98ec6461b4e06edd1e149c1ee5e9dcc4be0 |
|
13-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
main: unset some more env vars |
b6e661357ce25601829943c7f98981a92b3f1b68 |
|
12-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
main: we want all setup functions to be in files called xxx-setup.[ch] |
78a825f216d39ee0295b00647b059d45467e1d02 |
|
12-Apr-2012 |
Kay Sievers <kay@vrfy.org> |
rename machine-id-main.c tomacht the binary and move main.c to core/ |