summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2015-10-14core: execute: validate syslog level and facilityEvgeny Vereshchagin
2015-10-14systemd-run: can launch units with SyslogFacilityEvgeny Vereshchagin
2015-10-14systemd-run: can launch units with SyslogLevelEvgeny Vereshchagin
2015-10-14core: log if the service to activate vanished before we activate itLennart Poettering
Normally this shouldn't happen unless the daemon is reloaded. A similar check is already in place in socket.c for the socket activation case. This hopefully makes #1526 non-fatal, though it will not fix this, and there's something else to fix.
2015-10-14Merge pull request #1529 from evverx/dbus-props-syslog-fac-priLennart Poettering
core: expose `SyslogFacility` and `SyslogLevel` as properties on dbus
2015-10-14core: expose SyslogLevel and SyslogFacility as properties on dbusEvgeny Vereshchagin
2015-10-13manager: remove unused functionThomas Hindoe Paaboel Andersen
2015-10-12core: manager: expose DefaultLimit* as properties on dbusEvgeny Vereshchagin
2015-10-12bus-util: add bus_property_get_rlimit (move from core/dbus_execute)Evgeny Vereshchagin
2015-10-09core: ignore -.slice and init.scope when isolatingLennart Poettering
Otherwise, we might end up trying to isolate it away when starting user instances. While we are at it, also prohibit manual start/stop of these two units. Fixes: #1507
2015-10-09core: remove taint flag about /etc/mtab not being a symlink.Lennart Poettering
We already stop boot if /etc/mtab is not a symlink right now, and most likely we'll stop referecing it at all in the future, either way there's no point in keeping it around as taint flag.
2015-10-09Merge pull request #1512 from evverx/systemd-run-syslog-propertiesLennart Poettering
systemd-run can launch units with SyslogIdentifier and SyslogLevelPrefix
2015-10-09Merge pull request #1501 from fbuihuu/fix-requires-mounts-for-directivesLennart Poettering
Make sure the mount units pulled by 'RequiresMountsFor=' are loaded, if they exist
2015-10-09systemd-run can now launch units with SyslogIdentifierEvgeny Vereshchagin
2015-10-09systemd-run can now launch units with SyslogLevelPrefixEvgeny Vereshchagin
2015-10-08Make sure the mount units pulled by 'RequiresMountsFor=' are loaded (if they ↵Franck Bui
exist) We should make sure that mount units involved by 'RequiresMountsFor=' directives are really loaded if not required by any others units so that Requires= dependencies on the mount units are applied and thus the mount unit dependencies are started.
2015-10-08core: system.conf: add DefaultTasksAccountingEvgeny Vereshchagin
2015-10-08Merge pull request #1496 from poettering/stdin-fdDaniel Mack
allow passing in fds for stdin/stdout/stderr for transient services
2015-10-08util: do not reset terminal in acquire_terminal()Lennart Poettering
Before, we'd always reset acquired terminals, which is not really desired, as we expose a setting TTYReset= which is supposed to control whether the TTY is reset or not. Previously that setting would only enable a second resetting of the TTY, which is of course pointless... Hence, move the implicit resetting out of acquire_terminal() and make the callers do it if they need it.
2015-10-08core: add support for setting stdin/stdout/stderr for transient servicesLennart Poettering
When starting a transient service, allow setting stdin/stdout/stderr fds for it, by passing them in via the bus. This also simplifies some of the serialization code for units.
2015-10-08core: manager: add some missing dbus propertiesEvgeny Vereshchagin
2015-10-07Merge pull request #1484 from poettering/ask-pass-kernel-keyringDaniel Mack
cache harddisk passwords in the kernel keyring
2015-10-07core: always let the kernel reap zombies when we're about to freezeMichal Schmidt
Regardless of whether we're going to spawn a crash shell or not, let the kernel reap zombies. It's more consistent this way.
2015-10-07core: change how crash_shell and crash_reboot interactMichal Schmidt
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.
2015-10-07core: remove spurious assert in parsing CrashChangeVT=Michal Schmidt
"data" is always NULL (and unused) in config_parse_crash_chvt().
2015-10-07core: adjust error message about /etc/mtabMichal Schmidt
Since having /etc/mtab as a regular file is now a fatal error, stop mentioning irrelevant minor consequences.
2015-10-07ask-password: add support for caching passwords in the kernel keyringLennart Poettering
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.
2015-10-07service: fix memory leak in service_add_fd_store()reverendhomer
fixes Coverity #1325767
2015-10-06Merge pull request #1468 from poettering/fdnamesTom Gundersen
Add support for naming fds for socket activation and more
2015-10-06core: add support for naming file descriptors passed using socket activationLennart Poettering
This adds support for naming file descriptors passed using socket activation. The names are passed in a new $LISTEN_FDNAMES= environment variable, that matches the existign $LISTEN_FDS= one and contains a colon-separated list of names. This also adds support for naming fds submitted to the per-service fd store using FDNAME= in the sd_notify() message. This also adds a new FileDescriptorName= setting for socket unit files to set the name for fds created by socket units. This also adds a new call sd_listen_fds_with_names(), that is similar to sd_listen_fds(), but also returns the names of the fds. systemd-activate gained the new --fdname= switch to specify a name for testing socket activation. This is based on #1247 by Maciej Wereski. Fixes #1247.
2015-10-06core: simplify fd collection code, return number of fds as return valueLennart Poettering
Let's simplify the fd collection code a bit, and return the number of collected fds as positive integer, the way it's customary in our usual code.
2015-10-06socket: don't double close the same fd for FIFOsLennart Poettering
2015-10-03core: don't unset reload result, unless we begin a start or reload operationLennart Poettering
Much like the result of the service itself we should not reset the reload result unless we actually start from the beginning, so that clients can query it at any time. Specifically, let's reset the result states only when we begin with a start operation (for both the main result, and the reload result), when we begin with a reload operation (only for the load result), or when the use explicitly asks for that via "systemctl reset-failed". This is a more generic fix for #1447. Fixes #1447.
2015-10-01core: add new setting Writable= to ListenSpecial= socket unitsLennart Poettering
Writable= is a new boolean setting. If ture, then ListenSpecial= will open the specified path in O_RDWR mode, rather than just O_RDONLY. This is useful for implementing services like rfkill, where /dev/rfkill is more useful when opened in write mode, if we want to not only save but also restore its state.
2015-10-01tree-wide: add missing errno arguments to log_*_errno()Michal Schmidt
A few of the recent conversions to log_*_errno() were missing the errno value arguments. Fixes: e53fc357a9b "tree-wide: remove a number of invocations of strerror() and replace by %m"
2015-10-01Merge pull request #1426 from poettering/log-syntaxDaniel Mack
logging fixes and more
2015-09-30Merge pull request #1419 from keszybz/shell-completionLennart Poettering
Shell completion tweaks
2015-09-30core: make sure we expose the empty string when we detect no virtualizationLennart Poettering
On the bus, stick to exposing the empty string as "no virtualization", instead of none. Fixes #1423
2015-09-30tree-wide: remove a number of invocations of strerror() and replace by %mLennart Poettering
Let's clean up our tree a bit, and reduce invocations of the thread-unsafe strerror() by replacing it with printf()'s %m specifier.
2015-09-30basic: split out cpu set specific APIs into cpu-set-util.[ch]Lennart Poettering
2015-09-30util: rename parse_cpu_set() to parse_cpu_set_and_warn()Lennart Poettering
It's pretty untypical for our parsing functions to log on their own. Clarify in the name that this one does.
2015-09-30log: move log_invalid_utf8() to log.hLennart Poettering
Also, make sure it follows the same scheme as log_syntax() does in its behaviour.
2015-09-30tree-wide: clean up log_syntax() usageLennart Poettering
- 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
2015-09-29core: add a "Requires=" dependency between units and the slices they are ↵Lennart Poettering
located in We place the processes we fork off in the cgroup anyway, and we probably shouldn't be able to get that far if we couldn't set up the slice due to resource problems or unmet conditions. Hence upgrade the dependency between units and the slices they are located in from Wants= to Requires=.
2015-09-29core: rework crash handlingLennart Poettering
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
2015-09-29socket: rename ffs_xyz to usbffs_xyzLennart Poettering
The relation to USB should really be clearer.
2015-09-29core: turn a large if statement into a switchLennart Poettering
2015-09-29selinux: add _cleanup_ concepts to SELinux label allocationLennart Poettering
2015-09-29core: simplify how we create socket fdsLennart Poettering
Let's always return the allocated fds as return values where possible, and make more use of _cleanup_close_
2015-09-29core: small error message wording improvementsLennart Poettering