summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2014-05-15sd-bus: introduce sd_bus_slot objects encapsulating callbacks or vtables ↵Lennart Poettering
attached to a bus connection This makes callback behaviour more like sd-event or sd-resolve, and creates proper object for unregistering callbacks. Taking the refernce to the slot is optional. If not taken life time of the slot will be bound to the underlying bus object (or in the case of an async call until the reply has been recieved).
2014-05-14core: no need to pass bus object to selinux access check calls anymoreLennart Poettering
2014-05-14core: sysvcompat - avoid repeated function callTom Gundersen
2014-05-14core: sysvcompat - $network should be equivalent to network-online, rather ↵Tom Gundersen
than network target Most likely the facility needed is actual connectivity, rather than whether or not the network managment daemon is running. We also need to explicitly pull in the network-online.target, as it is not active by default. This means {systemd-networkd,NetworkManager}-wait-online.service, can be enabled by default as part of network-online.target, and only delay boot when some service actively pulls it in. See: <https://bugzilla.gnome.org/show_bug.cgi?id=728965> Cc: Pavel Šimerda <psimerda@redhat.com> Cc: Michal Sekletar <msekleta@redhat.com>
2014-05-12job: always add waiting jobs to run queue during coldplugMichael Marineau
commit 20a83d7bf was not equivalent to the original bug fix proposed by Michal Sekletar <msekleta@redhat.com>. The committed version only added the job to the run queue if the job had a timeout, which most jobs do not have. Just re-ordering the code gets us the intended functionality
2014-05-08core: check the right variable for failed open()Łukasz Stelmach
2014-05-07doc: corrections to words and formsJan Engelhardt
This patch exchange words which are inappropriate for a situation, deletes duplicated words, and adds particles where needed.
2014-05-06load-fragment: minor cleanupLennart Poettering
2014-05-05build-sys: move async.[ch] to src/sharedLennart Poettering
So that we can use it at multiple places.
2014-05-05core: require cgroups filesystem to be availableKay Sievers
We should no longer pretend that we can run in any sensible way without the kernel supporting us with cgroups functionality.
2014-05-02async: add asynchronous close() callLennart Poettering
2014-04-28machine-id: only look into KVM uuid when we are not running in aLennart Poettering
container
2014-04-26job: add waiting jobs to run queue in unit_coldplugBrandon Philips
When we have job installed and added to run queue for service which is still in dead state and systemd initiates reload then after reload we never add deserialized job to the run queue again. This is caused by check in service_coldplug() where we check if deserialized state is something else than dead state, which is not the case thus we never call service_set_state() and finally unit_notify() where we would have added job to the run queue. Thanks to Michal Sekletar <msekleta@redhat.com> for the original patch.
2014-04-26core: reindent {selinux, ima, smack}-setup.cWill Woods
7-space indentation is just too weird to leave alone. Make it 8 spaces, as per CODING_STYLE. No other changes.
2014-04-25core: expose CFS CPU time quota as high-level unit propertiesLennart Poettering
2014-04-25core: make sure we always write changed cgroup attributes to the cgroupfsLennart Poettering
2014-04-24service: rename StartLimitAction enum to FailureActionMichael Olbrich
It's used for the FailureAction property as well.
2014-04-24service: add FailureAction= optionMichael Olbrich
It has the same possible values as StartLimitAction= and is executed immediately if a service fails.
2014-04-21service: add support for reboot argument when triggered by StartLimitAction=Michael Olbrich
When rebooting with systemctl, an optional argument can be passed to the reboot system call. This makes it possible the specify the argument in a service file and use it when the service triggers a restart. This is useful to distinguish between manual reboots and reboots caused by failing services.
2014-04-19Handle Unix domain socket connections from outside our namespace v2Zbigniew Jędrzejewski-Szmek
This is a second attempt at 9754d56, reverted in 2f20a8e, because I lost a 'break;' when moving chunks around.
2014-04-19Revert "Handle Unix domain socket connections from outside our namespace"Kay Sievers
This reverts commit 9754d56e9b21bfe89fc18f47987d6bef491b8521. It causes a crash in PID1: Apr 19 13:49:32 lon systemd[1]: Code should not be reached 'Unhandled socket type.' at src/core/socket.c:684, function instance_from_socket(). Aborting. Apr 19 13:49:32 lon systemd[1]: Caught <ABRT>, dumped core as pid 336. Apr 19 13:49:32 lon systemd[1]: Freezing execution.
2014-04-17core: minor typo fixAli H. Caliskan
2014-04-16Handle Unix domain socket connections from outside our namespaceEelco Dolstra
NixOS uses Unix domain sockets for certain host <-> container interaction; i.e. the host connects to a socket visible in the container's directory tree, where the container uses a .socket unit to spawn the handler program on demand. This worked in systemd 203, but in 212 fails with "foo.socket failed to queue service startup job (Maybe the service file is missing or not a template unit?): No data available". The reason is that getpeercred() now returns ENODATA if it can't get the PID of the client, which happens in this case because the client is not in the same PID namespace. Since getpeercred() is only used to generate the instance name, this patch simply handles ENODATA by creating an instance name "<nr>-unknown". [zj: reorder clauses and remove (unsigned long) casts.]
2014-04-12core: Make sure a stamp file exists for all Persistent=true timersThomas Bächler
If a persistent timer has no stamp file yet, it behaves just like a normal timer until it runs for the first time. If the system is always shut down while the timer is supposed to run, a stamp file is never created and Peristent=true has no effect. This patch fixes this by creating a stamp file with the current time when the timer is first started.
2014-04-06reduce the amount of messages logged to /dev/kmsg when "debug" is specifiedKay Sievers
2014-03-26core: do not read system boot timestamps in systemd --user modeKay Sievers
Before: $ systemd-analyze --user Startup finished in 2.810s (firmware) + 48ms (loader) + 122ms (userspace) = 122ms After: $ systemd-analyze --user Startup finished in 122ms (userspace) = 122ms
2014-03-24core: don't try to relabel mounts before we loaded the policyLennart Poettering
2014-03-24core: remove tcpwrap supportLennart Poettering
tcpwrap is legacy code, that is barely maintained upstream. It's APIs are awful, and the feature set it exposes (such as DNS and IDENT access control) questionnable. We should not support this natively in systemd. Hence, let's remove the code. If people want to continue making use of this, they can do so by plugging in "tcpd" for the processes they start. With that scheme things are as well or badly supported as they were from traditional inetd, hence no functionality is really lost.
2014-03-24service: don't take chkconfig priority into accountLennart Poettering
Given that native services do not carry a sysv priority anyway it is pointless reading them from chkconfig headers, and pretend they'd work. So let's drop this.
2014-03-24core: add a setting to globally control the default for timer unit accuracyLennart Poettering
2014-03-24timer: support timers that can resume the system from suspendLennart Poettering
2014-03-24systemctl: show last trigger time in "systemctl list-timers"Lennart Poettering
2014-03-24util: replace close_pipe() with new safe_close_pair()Lennart Poettering
safe_close_pair() is more like safe_close(), except that it handles pairs of fds, and doesn't make and misleading allusion, as it works similarly well for socketpairs() as for pipe()s...
2014-03-24sd-event: rework API to support CLOCK_REALTIME_ALARM and ↵Lennart Poettering
CLOCK_BOOTTIME_ALARM, too
2014-03-21timer: add timer persistance (aka anacron-like behaviour)Lennart Poettering
2014-03-20unit: turn off mount propagation for udevdLennart Poettering
Keep mounts done by udev rules private to udevd. Also, document how MountFlags= may be used for this.
2014-03-19core: move notify sockets to /run and $XDG_RUNTIME_DIRLennart Poettering
A service with PrivateNetwork= cannot access abstract namespace sockets of the host anymore, hence let's better not use abstract namespace sockets for this, since we want to make sure that PrivateNetwork= is useful and doesn't break sd_notify().
2014-03-19core: make sure we can combine DevicePolicy=closed with PrivateDevices=yesLennart Poettering
if PrivateDevices=yes is used we need to make sure we can still create /dev/null and so on.
2014-03-19core: rework context initialization/destruction logicLennart Poettering
Let's automatically initialize the kill, exec and cgroup contexts of the various unit types when the object is constructed, instead of invididually in type-specific code. Also, when PrivateDevices= is set, set DevicePolicy= to closed.
2014-03-19core: when PrivateTmp= is set for a unit, make sure to order it after /tmp ↵Lennart Poettering
and /var/tmp are mounted
2014-03-19core: Beef up PrivateDevices=Lennart Poettering
Also mount /dev/kdbus, /dev/mqueue and /dev/hugepages into the /dev for namespaced services.
2014-03-19core: expose missing busname properties on the busLennart Poettering
2014-03-19core: by default .busname units should be activatingLennart Poettering
2014-03-19busname: introduce Activating directiveDaniel Mack
Add a new config 'Activating' directive which denotes whether a busname is actually registered on the bus. It defaults to 'yes'. If set to 'no', the .busname unit only uploads policy, which will remain active as long as the unit is running.
2014-03-18core: add new AcceptFD= setting to .busname unitsLennart Poettering
AcceptFD= defaults to true, thus making sure that by default fd passing is enabled for all activatable names. Since for normal bus connections fd passing is enabled too by default this makes sure fd passing works correctly regardless whether a service is already activated or not. Making this configurable on both busname units and in bus connections is messy, but unavoidable since busnames are established and may queue messages before the connection feature negotiation is done by the service eventually activated. Conversely, feature negotiation on bus connections takes place before the connection acquires its names. Of course, this means developers really should make sure to keep the settings in .busname units in sync with what they later intend to negotiate.
2014-03-18util: replace close_nointr_nofail() by a more useful safe_close()Lennart Poettering
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.
2014-03-18core: drop CAP_MKNOD when PrivateDevices= is setLennart Poettering
2014-03-18core: remount /sys/fs/cgroup/ read-only after we mounted all controllersLennart Poettering
Given that glibc searches for /dev/shm by just looking for any tmpfs we should be more careful with providing tmpfs instances arbitrary code might end up writing to.
2014-03-18cgroup: it's not OK to invoke alloca() in loopsLennart Poettering
2014-03-17core, libsystemd, systemd, timedate, udev: spelling fixesMiklos Vajna