Systemd/src/core
Lennart Poettering 8f8f05a919 bus: add sd_bus_track object for tracking peers, and port core over to it
This is primarily useful for services that need to track clients which
reference certain objects they maintain, or which explicitly want to
subscribe to certain events. Something like this is done in a large
number of services, and not trivial to do. Hence, let's unify this at
one place.

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

This also simplifies how we distribute messages to broadcast to the
direct busses: we only track subscriptions for the API bus and
implicitly assume that all direct busses are subscribed. This should be
a pretty OK simplification since clients connected via direct bus
connections are shortlived anyway.
2014-03-03 02:34:13 +01:00
..
.gitignore build-sys: move more files from core/ to share/ that are generic enough 2013-11-22 16:31:40 +01:00
async.c Make tmpdir removal asynchronous 2013-09-17 10:26:30 -05:00
async.h Make tmpdir removal asynchronous 2013-09-17 10:26:30 -05:00
audit-fd.c selinux: remove anything PID1-specific from selinux-access.[ch] so that we can reuse it in logind 2012-10-02 17:56:54 -04:00
audit-fd.h audit: turn the audit fd into a static variable 2012-10-02 17:40:09 -04:00
automount.c api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
automount.h core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
build.h core: Add AppArmor profile switching 2014-02-21 03:44:20 +01:00
busname.c api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
busname.h bus: add .busname unit type to implement kdbus-style bus activation 2013-12-02 23:32:34 +01:00
cgroup.c cgroup: certain cgroup attributes are not available in the root cgroup, hence don't bother 2014-02-24 03:38:58 +01:00
cgroup.h core: rework cgroup mask propagation 2014-02-17 15:49:21 +01:00
condition.c core: add new ConditionArchitecture() that checks the architecture returned by uname()'s machine field. 2014-02-21 02:43:14 +01:00
condition.h condition: split out most of condition handling into libsystemd-shard 2014-02-20 20:14:33 +01:00
dbus-automount.c core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-automount.h core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-busname.c core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-busname.h core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-cgroup.c cgroup: parse array cgroup properties correctly when they aren't at the end of the message 2014-02-24 03:38:58 +01:00
dbus-cgroup.h core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
dbus-device.c core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-device.h core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-execute.c core: add new RestrictAddressFamilies= switch 2014-02-26 02:19:28 +01:00
dbus-execute.h core: allow User=, Group=, Nice=, Environment=, Type= to be passed when creating a transient service 2014-02-05 02:03:10 +01:00
dbus-job.c bus: add sd_bus_track object for tracking peers, and port core over to it 2014-03-03 02:34:13 +01:00
dbus-job.h core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
dbus-kill.c includes: remove duplicate includes 2014-02-10 13:06:31 +01:00
dbus-kill.h core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
dbus-manager.c bus: add sd_bus_track object for tracking peers, and port core over to it 2014-03-03 02:34:13 +01:00
dbus-manager.h bus: add sd_bus_track object for tracking peers, and port core over to it 2014-03-03 02:34:13 +01:00
dbus-mount.c core: rework cgroup mask propagation 2014-02-17 15:49:21 +01:00
dbus-mount.h core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-path.c core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-path.h core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-scope.c api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
dbus-scope.h core: introduce new stop protocol for unit scopes 2014-01-31 17:48:36 +01:00
dbus-service.c core: rework cgroup mask propagation 2014-02-17 15:49:21 +01:00
dbus-service.h core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-slice.c core: rework cgroup mask propagation 2014-02-17 15:49:21 +01:00
dbus-slice.h core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
dbus-snapshot.c bus: decorate the various object vtables with SD_BUS_VTABLE_PROPERTY_CONST where appropriate 2013-12-22 03:50:52 +01:00
dbus-snapshot.h bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
dbus-socket.c core: rework cgroup mask propagation 2014-02-17 15:49:21 +01:00
dbus-socket.h core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-swap.c core: rework cgroup mask propagation 2014-02-17 15:49:21 +01:00
dbus-swap.h core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-target.c core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
dbus-target.h core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
dbus-timer.c dbus-timer: fix bus_timer_vtable to have the correct times 2014-02-23 23:53:25 -05:00
dbus-timer.h core: no need to list properties for PropertiesChanged messages anymore 2013-12-22 03:50:52 +01:00
dbus-unit.c bus: add sd_bus_track object for tracking peers, and port core over to it 2014-03-03 02:34:13 +01:00
dbus-unit.h bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
dbus.c bus: add sd_bus_track object for tracking peers, and port core over to it 2014-03-03 02:34:13 +01:00
dbus.h bus: add sd_bus_track object for tracking peers, and port core over to it 2014-03-03 02:34:13 +01:00
device.c api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
device.h core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
execute.c exec: imply NoNewPriviliges= only when seccomp filters are used in user mode 2014-02-26 02:28:52 +01:00
execute.h core: add new RestrictAddressFamilies= switch 2014-02-26 02:19:28 +01:00
hostname-setup.c hostname: only suppress setting of pretty hostname if it is non-equal to the static hostname and if the static hostname is set, too 2013-05-07 20:56:41 +02:00
hostname-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
ima-setup.c core: move mount_setup_early() to main.c 2013-03-07 20:53:14 +01:00
ima-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
job.c bus: add sd_bus_track object for tracking peers, and port core over to it 2014-03-03 02:34:13 +01:00
job.h bus: add sd_bus_track object for tracking peers, and port core over to it 2014-03-03 02:34:13 +01:00
kill.c core: introduce new KillMode=mixed which sends SIGTERM only to the main process, but SIGKILL to all daemon processes 2014-01-29 13:42:06 +01:00
kill.h core: introduce new KillMode=mixed which sends SIGTERM only to the main process, but SIGKILL to all daemon processes 2014-01-29 13:42:06 +01:00
killall.c shared: procfs_file_alloca: handle pid==0 2014-01-05 00:59:13 -05:00
killall.h core: fix order of parameters in broadcast_signal() 2013-11-25 23:03:03 +01:00
kmod-setup.c macro: introduce a nice macro for disabling -Wformat-nonliteral temporarily 2014-02-20 18:18:32 +01:00
kmod-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
load-dropin.c conf-parser: warn when we open configuration files with weird access bits 2014-02-03 19:59:18 +01:00
load-dropin.h Introspect and monitor dropin configuration 2013-04-01 23:43:49 -04:00
load-fragment-gperf.gperf.m4 core: add new RestrictAddressFamilies= switch 2014-02-26 02:19:28 +01:00
load-fragment.c core: add new RestrictAddressFamilies= switch 2014-02-26 02:19:28 +01:00
load-fragment.h core: add new RestrictAddressFamilies= switch 2014-02-26 02:19:28 +01:00
locale-setup.c local: fix memory leak when putting together locale settings 2013-10-01 00:17:21 +02:00
locale-setup.h rework systemd's own process environment handling/passing 2013-07-26 18:40:40 +02:00
loopback-setup.c api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
loopback-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
machine-id-setup.c build-sys: use -Og instead of -O0 to catch warnings 2013-10-21 15:46:00 +02:00
machine-id-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
macros.systemd.in rpm: add RPM macro for creating tmpfiles entries after package installation 2013-07-16 18:54:03 +02:00
main.c core: add global settings for enabling CPUAccounting=, MemoryAccounting=, BlockIOAccounting= for all units at once 2014-02-24 23:50:10 +01:00
Makefile build-sys: add stub makefiles to make emacs easier to use 2012-04-12 13:35:56 +02:00
manager.c bus: add sd_bus_track object for tracking peers, and port core over to it 2014-03-03 02:34:13 +01:00
manager.h bus: add sd_bus_track object for tracking peers, and port core over to it 2014-03-03 02:34:13 +01:00
mount-setup.c exec: introduce PrivateDevices= switch to provide services with a private /dev 2014-01-20 21:28:37 +01:00
mount-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
mount.c mount: don't fire PropertiesChanged signals for mounts that are stopped 2014-02-26 04:32:03 +01:00
mount.h service: add the ability for units to join other unit's PrivateNetwork= and PrivateTmp= namespaces 2013-11-27 20:28:48 +01:00
namespace.c exec: introduce PrivateDevices= switch to provide services with a private /dev 2014-01-20 21:28:37 +01:00
namespace.h exec: introduce PrivateDevices= switch to provide services with a private /dev 2014-01-20 21:28:37 +01:00
org.freedesktop.systemd1.conf systemctl: add commands set-default and get-default 2013-05-30 20:44:41 -04:00
org.freedesktop.systemd1.policy.in.in move more main systemd parts to core/ 2012-04-12 14:24:40 +02:00
org.freedesktop.systemd1.service move more main systemd parts to core/ 2012-04-12 14:24:40 +02:00
path.c api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
path.h core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
scope.c core: add global settings for enabling CPUAccounting=, MemoryAccounting=, BlockIOAccounting= for all units at once 2014-02-24 23:50:10 +01:00
scope.h core: watch SIGCHLD more closely to track processes of units with no reliable cgroup empty notifier 2014-02-07 15:14:36 +01:00
selinux-access.c bus: add new sd_bus_creds object to encapsulate process credentials 2013-11-28 18:42:18 +01:00
selinux-access.h bus: rework message handlers to always take an error argument 2013-11-21 21:12:36 +01:00
selinux-setup.c selinux: Don't attempt to load policy in initramfs if it doesn't exist 2014-02-21 03:30:18 +01:00
selinux-setup.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
service.c Remove dead lines in various places 2014-02-24 19:24:14 -05:00
service.h service: remove unneccesary Socket.got_socket_fd 2013-12-01 19:53:55 -05:00
shutdown.c Remove unused variable and two function stubs 2014-02-17 22:35:35 -05:00
slice.c core: add global settings for enabling CPUAccounting=, MemoryAccounting=, BlockIOAccounting= for all units at once 2014-02-24 23:50:10 +01:00
slice.h core: general cgroup rework 2013-06-27 04:17:34 +02:00
smack-setup.c smack: set loaded_policy in smack_setup() 2014-02-24 17:36:13 +01:00
smack-setup.h smack: set loaded_policy in smack_setup() 2014-02-24 17:36:13 +01:00
snapshot.c Use enums to make it obvious what boolean params mean 2013-12-26 15:49:54 -05:00
snapshot.h core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
socket.c core: add global settings for enabling CPUAccounting=, MemoryAccounting=, BlockIOAccounting= for all units at once 2014-02-24 23:50:10 +01:00
socket.h service: add the ability for units to join other unit's PrivateNetwork= and PrivateTmp= namespaces 2013-11-27 20:28:48 +01:00
swap.c core: add global settings for enabling CPUAccounting=, MemoryAccounting=, BlockIOAccounting= for all units at once 2014-02-24 23:50:10 +01:00
swap.h service: add the ability for units to join other unit's PrivateNetwork= and PrivateTmp= namespaces 2013-11-27 20:28:48 +01:00
switch-root.c switch-root: try pivot_root() before overmounting / 2012-11-16 18:21:09 +01:00
switch-root.h use #pragma once instead of foo*foo define guards 2013-11-18 20:28:54 -05:00
sysfs-show.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
system.conf core: add global settings for enabling CPUAccounting=, MemoryAccounting=, BlockIOAccounting= for all units at once 2014-02-24 23:50:10 +01:00
systemd.pc.in pkg-config: export systemd{system,user}generatordir and catalogdir 2013-08-03 09:20:12 -04:00
target.c core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
target.h Add __attribute__((const, pure, format)) in various places 2013-05-02 22:52:09 -04:00
tcpwrap.c relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
tcpwrap.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
timer.c api: in constructor function calls, always put the returned object pointer first (or second) 2014-02-20 00:03:10 +01:00
timer.h timer: make timer accuracy configurable 2013-11-21 22:08:20 +01:00
transaction.c transaction: print more information about conflicting jobs 2014-02-06 00:46:15 -05:00
transaction.h core: convert PID 1 to libsystemd-bus 2013-11-20 20:52:36 +01:00
umount.c core: more exact test on the procfs special string "(deleted)" 2014-02-17 19:03:07 -05:00
umount.h use #pragma once instead of foo*foo #define guards 2012-07-19 12:30:59 +02:00
unit-printf.c core: refuse doing %h, %s, %U specifier resolving in PID 1 2013-12-16 04:59:31 +01:00
unit-printf.h specifier: rework specifier calls to return proper error message 2013-09-17 10:06:50 -05:00
unit.c bus: add sd_bus_track object for tracking peers, and port core over to it 2014-03-03 02:34:13 +01:00
unit.h core: add global settings for enabling CPUAccounting=, MemoryAccounting=, BlockIOAccounting= for all units at once 2014-02-24 23:50:10 +01:00
user.conf core: add a system-wide SystemCallArchitectures= setting 2014-02-13 01:40:50 +01:00