summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2014-12-29core: loopback - correctly fail the loopback_check if somehow the rtnl calls ↵Tom Gundersen
fail
2014-12-28core: loopback - simplify check_loopback()Tom Gundersen
We no longer configure the addresses on the loopback interface, but simply bring it up and let the kernel do the rest. Also change the check to only check if the interface is up, rather than checking for the IPv4 loopback address.
2014-12-28tmpfiles: add new line type 'v' for creating btrfs subvolumesLennart Poettering
2014-12-27Fix check_loopback()Stéphane Graber
Add missing htonl() so that check_loopback() actually tests for 127.0.0.1 instead of 1.0.0.127 on little-endian machines.
2014-12-24util: fix strict aliasing violations in use of struct inotify_event v5Shawn Paul Landden
There is alot of cleanup that will have to happen to turn on -fstrict-aliasing, but I think our code should be "correct" to the rule.
2014-12-23bus: add missing bus-policy.[ch]Lennart Poettering
Accidentally forgot to commit this. Sorry!
2014-12-23build-sys: move core/build.h → shared/build.hLennart Poettering
After all, pretty much all our tools include it, and it should hence be shared. Also move sysfs-show.h from core/ to login/, since it has no point to exist in core.
2014-12-23env-util: don't include files from src/core/Lennart Poettering
2014-12-23core: rearrange code so that libsystemd/sd-bus/ does not include header ↵Lennart Poettering
files from core Stuff in src/shared or src/libsystemd should *never* include code from src/core or any of the tools, so don't do that here either. It's not OK!
2014-12-23run: add a new "-t" mode for invoking a binary on an allocated TTYLennart Poettering
2014-12-22busname: fix CMD_FREE ioctlDaniel Mack
The KDBUS_CMD_FREE ioctl struct has a size field now, which needs to be set.
2014-12-19util: rename ignore_file() to hidden_file()Lennart Poettering
hidden_file() is a bit more precise, since dot files usually shouldn't be ignored, but certainly be considered hidden.
2014-12-19execute: the runtime directory can only be on tmpfs, hence don't use ↵Lennart Poettering
rm_rf_dangerous() needlessly
2014-12-18load-fragment: allow quoting in command name and document allowed escapesZbigniew Jędrzejewski-Szmek
The handling of the command name and other arguments is unified. This simplifies things and should make them more predictable for users. Incidentally, this makes ExecStart handling match the .desktop file specification, apart for the requirment for an absolute path. https://bugs.freedesktop.org/show_bug.cgi?id=86171
2014-12-18tree-wide: make condition_free_list return NULLZbigniew Jędrzejewski-Szmek
2014-12-18core: make exec_command_free_list return NULLZbigniew Jędrzejewski-Szmek
2014-12-18core: use raw_clone instead of fork in signal handlerZbigniew Jędrzejewski-Szmek
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
2014-12-17load-fragment: properly unescape \;tomsod-m ya ru
https://bugs.freedesktop.org/show_bug.cgi?id=87393
2014-12-16Move dropin listing to sharedZbigniew Jędrzejewski-Szmek
No functional change. This is in preparation for using this in systemctl in the future.
2014-12-15unit: handle nicely of certain unit types are not supported on specific systemsLennart Poettering
Containers do not really support .device, .automount or .swap units; Systems compiled without support for swap do not support .swap units; Systems without kdbus do not support .busname units. With this change attempts to start a unsupported unit types will result in an immediate "unsupported" job result, which is a lot more descriptive then before. Also, attempts to start device units in containers will now immediately fail instead of causing jobs to be enqueued that never go away.
2014-12-12wrap a few *_FOREACH macros in curly bracesThomas Hindoe Paaboel Andersen
cppcheck would give up with "syntax error" without them. This led to reports of syntax errors in unrelated locations and potentially hid other errors
2014-12-12core: retry unmounting until we are done, in case of stacked mountsLennart Poettering
2014-12-12copy: use btrfs reflinking only whe we know we copy full filesLennart Poettering
2014-12-12util: when using basename() for creating temporary files, verify the ↵Lennart Poettering
resulting name is actually valid Also, rename filename_is_safe() to filename_is_valid(), since it actually does a full validation for what the kernel will accept as file name, it's not just a heuristic.
2014-12-11core: correct spacing near eol in code commentsTorstein Husebø
2014-12-11bus: sync with kdbus.gitDavid Herrmann
Sync up with recent kdbus changed: * several ioctls gained .size and .items members (but still unused) * CMD_SEND gained its own ioctl structure * several members of kdbus_msg were dropped as they were only used during SEND, not during RECV etc. * CMD_RECV and CMD_SEND now share a kdbus_reply member which contains the offset and size of the returned message.
2014-12-10scope: make attachment of initial PIDs a bit more robustLennart Poettering
2014-12-10core: don't migrate PIDs for units that may contain subcgroups, do this only ↵Lennart Poettering
for leaf units Otherwise a slice or delegation unit might move PIDs around ignoring the fact that it is attached to a subcgroup.
2014-12-10core: properly pass unit file state to clients via the busLennart Poettering
2014-12-10sd-bus: move common errors src/shared/bus-errors.h → ↵Lennart Poettering
src/libsystemd/sd-bus/bus-common-errors.h Stuff in src/shared/ should not use stuff from src/libsystemd/ really.
2014-12-09ima-setup: simplifyZbigniew Jędrzejewski-Szmek
2014-12-09treewide: sanitize loop_writeZbigniew Jędrzejewski-Szmek
loop_write() didn't follow the usual systemd rules and returned status partially in errno and required extensive checks from callers. Some of the callers dealt with this properly, but many did not, treating partial writes as successful. Simplify things by conforming to usual rules.
2014-12-10util: introduce our own gperf based capability listLennart Poettering
This way, we can ensure we have a more complete, up-to-date list of capabilities around, always.
2014-12-10mount: clarify that we really need to replace the utab inotify code with the ↵Lennart Poettering
native API for this in libmount, as soon as that's stable
2014-12-10core: unify how we iterate over inotify eventsLennart Poettering
Let's add some syntactic sugar for iterating through inotify events, and use it everywhere.
2014-12-10mount: use bools where appropriateLennart Poettering
2014-12-09unit: update unit dropin paths and time when dropin file is written.WaLyong Cho
If a unit is set property by "systemctl set-property", a new dropin file is generated. But the unit's dropin_paths and dropin_mtime are not updated. So the unit is shown as need daemon reload. Update unit dropin_paths and dropin_mtime also when dropin file is written.
2014-12-09run: introduce timer support optionWaLyong Cho
Support timer options --on-active=, --on-boot=, --on-startup=, --on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options corresponding with OnActiveSec=, OnBootSec=, OnStartupSec=, OnUnitActiveSec=, OnUnitInactiveSec=, OnCalendar= of timer respectively. And OnCalendar= and WakeSystem= supported by --timer-property= option like --property= of systemd-run. And if --unit= option and timer options are specified the command can be omitted. In this case, systemd-run assumes the target service is already loaded. And just try to generate transient timer unit only.
2014-12-09core: rename unit_destroy_cgroup() to unit_destroy_cgroup_if_empty() since ↵Lennart Poettering
it's not quite as destructive as it sounds nowadays
2014-12-09cgroup: Handle error when destroying cgroupRoss Lagerwall
If a cgroup fails to be destroyed (most likely because there are still processes running as part of a service after the main pid exits), don't free and remove the cgroup unit from the manager. This fixes a regression introduced by the cgroup rework in v205 where systemd would forget about processes still running after the unit becomes inactive. (This can happen when the main pid exits and KillMode=process or none).
2014-12-08load-fragment: remove wrong ifdef guardZbigniew Jędrzejewski-Szmek
config_parse_warn_compat is now always used for removed options. https://bugs.freedesktop.org/show_bug.cgi?id=87125
2014-12-08timer: timer can be a transient unitWaLyong Cho
2014-12-08bus: StartTransientUnit can have aux unitWaLyong Cho
2014-12-04selinux: figure out selinux context applied on exec() before closing all fdsMichal Sekletar
We need original socket_fd around otherwise mac_selinux_get_child_mls_label fails with -EINVAL return code. Also don't call setexeccon twice but rather pass context value of SELinuxContext option as an extra argument.
2014-12-03machine-id-setup: add a machine_id_commit call to commit on disk a transient ↵Didier Roche
machine-id If /etc was read only at boot time with an empty /etc/machine-id, the latter will be mounted as a tmpfs and get reset at each boot. If the system becomes rw later, this functionality enables to commit in a race-free manner the transient machine-id to disk.
2014-12-03machine-id-setup: casting const away is ugly, let's not do it if there's no ↵Lennart Poettering
reason to
2014-12-03machine-id-setup: Factorize some machine-id-setup functions to be reusedDidier Roche
2014-12-02systemctl: show unit file preset state in "systemctl status" output"Lennart Poettering
2014-12-02manager: log deserialization errors only at LOG_DEBUG levelLennart Poettering
During upgrades and when transitioning between different systemd versions in initrd and on the host we have to expect that some serialization fields are unknown or parse incorrectly. This shouldn't really be considered an error, hence downgrade the log messages about it to debug. This way we can still trace it, but it doesn't confuse users. This kinda reverts 46849c3f.
2014-12-02core: OOM really shouldn't be considered a deserialization parse failureLennart Poettering