summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1341
-rw-r--r--README4
-rw-r--r--configure.ac1
-rw-r--r--man/systemd-cgtop.xml23
-rw-r--r--man/udev.xml3
-rw-r--r--shell-completion/zsh/_systemctl.in15
-rw-r--r--src/basic/.gitignore (renamed from src/shared/.gitignore)0
l---------src/basic/Makefile (renamed from src/shared/Makefile)0
-rw-r--r--src/basic/MurmurHash2.c (renamed from src/shared/MurmurHash2.c)0
-rw-r--r--src/basic/MurmurHash2.h (renamed from src/shared/MurmurHash2.h)0
-rw-r--r--src/basic/af-list.c (renamed from src/shared/af-list.c)0
-rw-r--r--src/basic/af-list.h (renamed from src/shared/af-list.h)0
-rw-r--r--src/basic/arphrd-list.c (renamed from src/shared/arphrd-list.c)0
-rw-r--r--src/basic/arphrd-list.h (renamed from src/shared/arphrd-list.h)0
-rw-r--r--src/basic/async.c (renamed from src/shared/async.c)0
-rw-r--r--src/basic/async.h (renamed from src/shared/async.h)0
-rw-r--r--src/basic/audit.c (renamed from src/shared/audit.c)0
-rw-r--r--src/basic/audit.h (renamed from src/shared/audit.h)0
-rw-r--r--src/basic/barrier.c (renamed from src/shared/barrier.c)0
-rw-r--r--src/basic/barrier.h (renamed from src/shared/barrier.h)0
-rw-r--r--src/basic/blkid-util.h (renamed from src/shared/blkid-util.h)0
-rw-r--r--src/basic/btrfs-ctree.h (renamed from src/shared/btrfs-ctree.h)0
-rw-r--r--src/basic/btrfs-util.c (renamed from src/shared/btrfs-util.c)0
-rw-r--r--src/basic/btrfs-util.h (renamed from src/shared/btrfs-util.h)0
-rw-r--r--src/basic/build.h (renamed from src/shared/build.h)0
-rw-r--r--src/basic/bus-label.c (renamed from src/shared/bus-label.c)0
-rw-r--r--src/basic/bus-label.h (renamed from src/shared/bus-label.h)0
-rw-r--r--src/basic/calendarspec.c (renamed from src/shared/calendarspec.c)0
-rw-r--r--src/basic/calendarspec.h (renamed from src/shared/calendarspec.h)0
-rw-r--r--src/basic/cap-list.c (renamed from src/shared/cap-list.c)0
-rw-r--r--src/basic/cap-list.h (renamed from src/shared/cap-list.h)0
-rw-r--r--src/basic/capability.c (renamed from src/shared/capability.c)0
-rw-r--r--src/basic/capability.h (renamed from src/shared/capability.h)0
-rw-r--r--src/basic/cgroup-util.c (renamed from src/shared/cgroup-util.c)26
-rw-r--r--src/basic/cgroup-util.h (renamed from src/shared/cgroup-util.h)2
-rw-r--r--src/basic/clock-util.c (renamed from src/shared/clock-util.c)0
-rw-r--r--src/basic/clock-util.h (renamed from src/shared/clock-util.h)0
-rw-r--r--src/basic/conf-files.c (renamed from src/shared/conf-files.c)0
-rw-r--r--src/basic/conf-files.h (renamed from src/shared/conf-files.h)0
-rw-r--r--src/basic/copy.c (renamed from src/shared/copy.c)0
-rw-r--r--src/basic/copy.h (renamed from src/shared/copy.h)0
-rw-r--r--src/basic/def.h (renamed from src/shared/def.h)2
-rw-r--r--src/basic/device-nodes.c (renamed from src/shared/device-nodes.c)0
-rw-r--r--src/basic/device-nodes.h (renamed from src/shared/device-nodes.h)0
-rw-r--r--src/basic/env-util.c (renamed from src/shared/env-util.c)0
-rw-r--r--src/basic/env-util.h (renamed from src/shared/env-util.h)0
-rw-r--r--src/basic/errno-list.c (renamed from src/shared/errno-list.c)0
-rw-r--r--src/basic/errno-list.h (renamed from src/shared/errno-list.h)0
-rw-r--r--src/basic/ether-addr-util.h (renamed from src/shared/ether-addr-util.h)0
-rw-r--r--src/basic/exit-status.c (renamed from src/shared/exit-status.c)0
-rw-r--r--src/basic/exit-status.h (renamed from src/shared/exit-status.h)0
-rw-r--r--src/basic/fdset.c (renamed from src/shared/fdset.c)0
-rw-r--r--src/basic/fdset.h (renamed from src/shared/fdset.h)0
-rw-r--r--src/basic/fileio-label.c (renamed from src/shared/fileio-label.c)0
-rw-r--r--src/basic/fileio-label.h (renamed from src/shared/fileio-label.h)0
-rw-r--r--src/basic/fileio.c (renamed from src/shared/fileio.c)0
-rw-r--r--src/basic/fileio.h (renamed from src/shared/fileio.h)0
-rw-r--r--src/basic/gunicode.c (renamed from src/shared/gunicode.c)0
-rw-r--r--src/basic/gunicode.h (renamed from src/shared/gunicode.h)0
-rw-r--r--src/basic/hashmap.c (renamed from src/shared/hashmap.c)0
-rw-r--r--src/basic/hashmap.h (renamed from src/shared/hashmap.h)0
-rw-r--r--src/basic/hostname-util.c (renamed from src/shared/hostname-util.c)0
-rw-r--r--src/basic/hostname-util.h (renamed from src/shared/hostname-util.h)0
-rw-r--r--src/basic/in-addr-util.c (renamed from src/shared/in-addr-util.c)0
-rw-r--r--src/basic/in-addr-util.h (renamed from src/shared/in-addr-util.h)0
-rw-r--r--src/basic/ioprio.h (renamed from src/shared/ioprio.h)0
-rw-r--r--src/basic/json.c (renamed from src/shared/json.c)0
-rw-r--r--src/basic/json.h (renamed from src/shared/json.h)0
-rw-r--r--src/basic/label.c (renamed from src/shared/label.c)0
-rw-r--r--src/basic/label.h (renamed from src/shared/label.h)0
l---------src/basic/linux/Makefile (renamed from src/shared/linux/Makefile)0
-rw-r--r--src/basic/list.h (renamed from src/shared/list.h)0
-rw-r--r--src/basic/locale-util.c (renamed from src/shared/locale-util.c)0
-rw-r--r--src/basic/locale-util.h (renamed from src/shared/locale-util.h)0
-rw-r--r--src/basic/lockfile-util.c (renamed from src/shared/lockfile-util.c)0
-rw-r--r--src/basic/lockfile-util.h (renamed from src/shared/lockfile-util.h)0
-rw-r--r--src/basic/log.c (renamed from src/shared/log.c)0
-rw-r--r--src/basic/log.h (renamed from src/shared/log.h)0
-rw-r--r--src/basic/login-util.c (renamed from src/shared/login-shared.c)2
-rw-r--r--src/basic/login-util.h (renamed from src/shared/login-shared.h)0
-rw-r--r--src/basic/macro.h (renamed from src/shared/macro.h)3
-rw-r--r--src/basic/memfd-util.c (renamed from src/shared/memfd-util.c)0
-rw-r--r--src/basic/memfd-util.h (renamed from src/shared/memfd-util.h)0
-rw-r--r--src/basic/mempool.c (renamed from src/shared/mempool.c)0
-rw-r--r--src/basic/mempool.h (renamed from src/shared/mempool.h)0
-rw-r--r--src/basic/missing.h (renamed from src/shared/missing.h)0
-rw-r--r--src/basic/mkdir-label.c (renamed from src/shared/mkdir-label.c)0
-rw-r--r--src/basic/mkdir.c (renamed from src/shared/mkdir.c)0
-rw-r--r--src/basic/mkdir.h (renamed from src/shared/mkdir.h)0
-rw-r--r--src/basic/ordered-set.h (renamed from src/shared/ordered-set.h)0
-rw-r--r--src/basic/path-util.c (renamed from src/shared/path-util.c)0
-rw-r--r--src/basic/path-util.h (renamed from src/shared/path-util.h)0
-rw-r--r--src/basic/prioq.c (renamed from src/shared/prioq.c)0
-rw-r--r--src/basic/prioq.h (renamed from src/shared/prioq.h)0
-rw-r--r--src/basic/process-util.c (renamed from src/shared/process-util.c)0
-rw-r--r--src/basic/process-util.h (renamed from src/shared/process-util.h)0
-rw-r--r--src/basic/random-util.c (renamed from src/shared/random-util.c)0
-rw-r--r--src/basic/random-util.h (renamed from src/shared/random-util.h)0
-rw-r--r--src/basic/ratelimit.c (renamed from src/shared/ratelimit.c)0
-rw-r--r--src/basic/ratelimit.h (renamed from src/shared/ratelimit.h)0
-rw-r--r--src/basic/refcnt.h (renamed from src/shared/refcnt.h)0
-rw-r--r--src/basic/replace-var.c (renamed from src/shared/replace-var.c)0
-rw-r--r--src/basic/replace-var.h (renamed from src/shared/replace-var.h)0
-rw-r--r--src/basic/ring.c (renamed from src/shared/ring.c)0
-rw-r--r--src/basic/ring.h (renamed from src/shared/ring.h)0
-rw-r--r--src/basic/rm-rf.c (renamed from src/shared/rm-rf.c)0
-rw-r--r--src/basic/rm-rf.h (renamed from src/shared/rm-rf.h)0
-rw-r--r--src/basic/securebits.h (renamed from src/shared/securebits.h)0
-rw-r--r--src/basic/selinux-util.c (renamed from src/shared/selinux-util.c)0
-rw-r--r--src/basic/selinux-util.h (renamed from src/shared/selinux-util.h)0
-rw-r--r--src/basic/set.h (renamed from src/shared/set.h)0
-rw-r--r--src/basic/sigbus.c (renamed from src/shared/sigbus.c)0
-rw-r--r--src/basic/sigbus.h (renamed from src/shared/sigbus.h)0
-rw-r--r--src/basic/signal-util.c (renamed from src/shared/signal-util.c)0
-rw-r--r--src/basic/signal-util.h (renamed from src/shared/signal-util.h)0
-rw-r--r--src/basic/siphash24.c (renamed from src/shared/siphash24.c)0
-rw-r--r--src/basic/siphash24.h (renamed from src/shared/siphash24.h)0
-rw-r--r--src/basic/smack-util.c (renamed from src/shared/smack-util.c)0
-rw-r--r--src/basic/smack-util.h (renamed from src/shared/smack-util.h)0
-rw-r--r--src/basic/socket-label.c (renamed from src/shared/socket-label.c)0
-rw-r--r--src/basic/socket-util.c (renamed from src/shared/socket-util.c)0
-rw-r--r--src/basic/socket-util.h (renamed from src/shared/socket-util.h)0
-rw-r--r--src/basic/sparse-endian.h (renamed from src/shared/sparse-endian.h)0
-rw-r--r--src/basic/special.h (renamed from src/shared/special.h)0
-rw-r--r--src/basic/strbuf.c (renamed from src/shared/strbuf.c)0
-rw-r--r--src/basic/strbuf.h (renamed from src/shared/strbuf.h)0
-rw-r--r--src/basic/strv.c (renamed from src/shared/strv.c)0
-rw-r--r--src/basic/strv.h (renamed from src/shared/strv.h)0
-rw-r--r--src/basic/strxcpyx.c (renamed from src/shared/strxcpyx.c)0
-rw-r--r--src/basic/strxcpyx.h (renamed from src/shared/strxcpyx.h)0
-rw-r--r--src/basic/terminal-util.c (renamed from src/shared/terminal-util.c)0
-rw-r--r--src/basic/terminal-util.h (renamed from src/shared/terminal-util.h)0
-rw-r--r--src/basic/time-util.c (renamed from src/shared/time-util.c)0
-rw-r--r--src/basic/time-util.h (renamed from src/shared/time-util.h)0
-rw-r--r--src/basic/unaligned.h (renamed from src/shared/unaligned.h)0
-rw-r--r--src/basic/unit-name.c (renamed from src/shared/unit-name.c)0
-rw-r--r--src/basic/unit-name.h (renamed from src/shared/unit-name.h)0
-rw-r--r--src/basic/utf8.c (renamed from src/shared/utf8.c)0
-rw-r--r--src/basic/utf8.h (renamed from src/shared/utf8.h)0
-rw-r--r--src/basic/util.c (renamed from src/shared/util.c)4
-rw-r--r--src/basic/util.h (renamed from src/shared/util.h)0
-rw-r--r--src/basic/verbs.c (renamed from src/shared/verbs.c)0
-rw-r--r--src/basic/verbs.h (renamed from src/shared/verbs.h)0
-rw-r--r--src/basic/virt.c (renamed from src/shared/virt.c)0
-rw-r--r--src/basic/virt.h (renamed from src/shared/virt.h)0
-rw-r--r--src/basic/xml.c (renamed from src/shared/xml.c)0
-rw-r--r--src/basic/xml.h (renamed from src/shared/xml.h)0
-rw-r--r--src/cgtop/cgtop.c53
-rw-r--r--src/core/kmod-setup.c9
-rw-r--r--src/core/manager.c2
-rw-r--r--src/core/namespace.c3
-rw-r--r--src/core/service.c9
-rw-r--r--src/core/unit.c11
-rw-r--r--src/import/importd.c2
-rw-r--r--src/journal/journald-server.c204
-rw-r--r--src/journal/journald-syslog.c3
-rw-r--r--src/libsystemd-network/sd-dhcp-client.c2
-rw-r--r--src/libsystemd-network/sd-dhcp-lease.c12
-rw-r--r--src/libsystemd-network/sd-dhcp-server.c2
-rw-r--r--src/libsystemd-terminal/grdev-drm.c2
-rw-r--r--src/libsystemd-terminal/grdev.c2
-rw-r--r--src/libsystemd-terminal/idev.c2
-rw-r--r--src/libsystemd/sd-bus/bus-bloom.c10
-rw-r--r--src/libsystemd/sd-bus/bus-container.c2
-rw-r--r--src/libsystemd/sd-bus/bus-control.c23
-rw-r--r--src/libsystemd/sd-bus/bus-internal.c56
-rw-r--r--src/libsystemd/sd-bus/bus-internal.h2
-rw-r--r--src/libsystemd/sd-bus/bus-socket.c16
-rw-r--r--src/libsystemd/sd-bus/test-bus-kernel-bloom.c25
-rw-r--r--src/libsystemd/sd-bus/test-bus-signature.c13
-rw-r--r--src/libsystemd/sd-login/sd-login.c2
-rw-r--r--src/libsystemd/sd-network/sd-network.c67
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c48
-rw-r--r--src/libsystemd/sd-rtnl/sd-rtnl.c4
-rw-r--r--src/login/logind-session.h2
-rw-r--r--src/login/test-login-shared.c2
-rw-r--r--src/network/networkd-netdev-ipvlan.c10
-rw-r--r--src/network/networkd-netdev-macvlan.c10
-rw-r--r--src/network/networkd-network.c16
-rw-r--r--src/resolve/resolved-bus.c2
-rw-r--r--src/resolve/resolved-dns-answer.c2
-rw-r--r--src/resolve/resolved-dns-packet.c2
-rw-r--r--src/resolve/resolved-dns-question.c2
-rw-r--r--src/resolve/resolved-dns-rr.c2
-rw-r--r--src/resolve/resolved-dns-scope.c2
-rw-r--r--src/resolve/resolved-dns-stream.c3
-rw-r--r--src/resolve/resolved-dns-zone.c2
-rw-r--r--src/resolve/resolved-manager.c4
-rw-r--r--src/shared/bus-util.c (renamed from src/libsystemd/sd-bus/bus-util.c)25
-rw-r--r--src/shared/bus-util.h (renamed from src/libsystemd/sd-bus/bus-util.h)2
-rw-r--r--src/shared/dns-domain.c (renamed from src/resolve/resolved-dns-domain.c)2
-rw-r--r--src/shared/dns-domain.h (renamed from src/resolve/resolved-dns-domain.h)9
-rw-r--r--src/test/test-cgroup-util.c20
-rw-r--r--src/test/test-dns-domain.c (renamed from src/resolve/test-dns-domain.c)2
-rw-r--r--src/timesync/timesyncd-manager.c2
-rw-r--r--src/udev/udevd.c2
196 files changed, 1043 insertions, 1094 deletions
diff --git a/Makefile.am b/Makefile.am
index 5d30d7d51c..9c52dcb3e3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -211,8 +211,10 @@ AM_CPPFLAGS = \
-DROOTLIBEXECDIR=\"$(rootlibexecdir)\" \
-DTEST_DIR=\"$(abs_top_srcdir)/test\" \
-I $(top_srcdir)/src \
- -I $(top_builddir)/src/shared \
+ -I $(top_builddir)/src/basic \
+ -I $(top_srcdir)/src/basic \
-I $(top_srcdir)/src/shared \
+ -I $(top_builddir)/src/shared \
-I $(top_srcdir)/src/network \
-I $(top_srcdir)/src/login \
-I $(top_srcdir)/src/journal \
@@ -230,6 +232,7 @@ AM_CPPFLAGS = \
-I $(top_builddir)/src/udev \
-I $(top_srcdir)/src/libsystemd/sd-bus \
-I $(top_srcdir)/src/libsystemd/sd-event \
+ -I $(top_srcdir)/src/libsystemd/sd-login \
-I $(top_srcdir)/src/libsystemd/sd-rtnl \
-I $(top_srcdir)/src/libsystemd/sd-network \
-I $(top_srcdir)/src/libsystemd/sd-hwdb \
@@ -714,9 +717,9 @@ man/systemd.index.xml: $(top_srcdir)/tools/make-man-index.py $(NON_INDEX_XML_FIL
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
-man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py $(SOURCE_XML_FILES)
+man/systemd.directives.xml: $(top_srcdir)/tools/make-directive-index.py man/custom-entities.ent $(SOURCE_XML_FILES)
$(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)$(PYTHON) $< $@ $(filter-out $<,$^)
+ $(AM_V_GEN)$(PYTHON) $< $@ $(SOURCE_XML_FILES)
CLEANFILES += \
man/systemd.index.xml \
@@ -742,30 +745,180 @@ EXTRA_DIST += \
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
- libsystemd-shared.la
+ libbasic.la
+
+libbasic_la_SOURCES = \
+ src/basic/missing.h \
+ src/basic/capability.c \
+ src/basic/capability.h \
+ src/basic/conf-files.c \
+ src/basic/conf-files.h \
+ src/basic/hostname-util.h \
+ src/basic/hostname-util.c \
+ src/basic/unit-name.c \
+ src/basic/unit-name.h \
+ src/basic/ioprio.h \
+ src/basic/securebits.h \
+ src/basic/special.h \
+ src/basic/list.h \
+ src/basic/unaligned.h \
+ src/basic/macro.h \
+ src/basic/def.h \
+ src/basic/sparse-endian.h \
+ src/basic/refcnt.h \
+ src/basic/util.c \
+ src/basic/util.h \
+ src/basic/lockfile-util.c \
+ src/basic/lockfile-util.h \
+ src/basic/path-util.c \
+ src/basic/path-util.h \
+ src/basic/time-util.c \
+ src/basic/time-util.h \
+ src/basic/locale-util.c \
+ src/basic/locale-util.h \
+ src/basic/signal-util.c \
+ src/basic/signal-util.h \
+ src/basic/mempool.c \
+ src/basic/mempool.h \
+ src/basic/hashmap.c \
+ src/basic/hashmap.h \
+ src/basic/siphash24.c \
+ src/basic/siphash24.h \
+ src/basic/set.h \
+ src/basic/ordered-set.h \
+ src/basic/fdset.c \
+ src/basic/fdset.h \
+ src/basic/prioq.c \
+ src/basic/prioq.h \
+ src/basic/strv.c \
+ src/basic/strv.h \
+ src/basic/env-util.c \
+ src/basic/env-util.h \
+ src/basic/strbuf.c \
+ src/basic/strbuf.h \
+ src/basic/strxcpyx.c \
+ src/basic/strxcpyx.h \
+ src/basic/log.c \
+ src/basic/log.h \
+ src/basic/bus-label.c \
+ src/basic/bus-label.h \
+ src/basic/ratelimit.h \
+ src/basic/ratelimit.c \
+ src/basic/exit-status.c \
+ src/basic/exit-status.h \
+ src/basic/virt.c \
+ src/basic/virt.h \
+ src/basic/smack-util.c \
+ src/basic/smack-util.h \
+ src/basic/device-nodes.c \
+ src/basic/device-nodes.h \
+ src/basic/utf8.c \
+ src/basic/utf8.h \
+ src/basic/gunicode.c \
+ src/basic/gunicode.h \
+ src/basic/socket-util.c \
+ src/basic/socket-util.h \
+ src/basic/in-addr-util.c \
+ src/basic/in-addr-util.h \
+ src/basic/ether-addr-util.h \
+ src/basic/replace-var.c \
+ src/basic/replace-var.h \
+ src/basic/clock-util.c \
+ src/basic/clock-util.h \
+ src/basic/calendarspec.c \
+ src/basic/calendarspec.h \
+ src/basic/fileio.c \
+ src/basic/fileio.h \
+ src/basic/MurmurHash2.c \
+ src/basic/MurmurHash2.h \
+ src/basic/mkdir.c \
+ src/basic/mkdir.h \
+ src/basic/cgroup-util.c \
+ src/basic/cgroup-util.h \
+ src/basic/errno-list.c \
+ src/basic/errno-list.h \
+ src/basic/af-list.c \
+ src/basic/af-list.h \
+ src/basic/arphrd-list.c \
+ src/basic/arphrd-list.h \
+ src/basic/terminal-util.c \
+ src/basic/terminal-util.h \
+ src/basic/login-util.h \
+ src/basic/login-util.c \
+ src/basic/cap-list.c \
+ src/basic/cap-list.h \
+ src/basic/audit.c \
+ src/basic/audit.h \
+ src/basic/xml.c \
+ src/basic/xml.h \
+ src/basic/json.c \
+ src/basic/json.h \
+ src/basic/ring.c \
+ src/basic/ring.h \
+ src/basic/barrier.c \
+ src/basic/barrier.h \
+ src/basic/async.c \
+ src/basic/async.h \
+ src/basic/memfd-util.c \
+ src/basic/memfd-util.h \
+ src/basic/process-util.c \
+ src/basic/process-util.h \
+ src/basic/random-util.c \
+ src/basic/random-util.h \
+ src/basic/verbs.c \
+ src/basic/verbs.h \
+ src/basic/sigbus.c \
+ src/basic/sigbus.h \
+ src/basic/build.h \
+ src/basic/socket-label.c \
+ src/basic/label.c \
+ src/basic/label.h \
+ src/basic/btrfs-util.c \
+ src/basic/btrfs-util.h \
+ src/basic/btrfs-ctree.h \
+ src/basic/selinux-util.c \
+ src/basic/selinux-util.h \
+ src/basic/mkdir-label.c \
+ src/basic/fileio-label.c \
+ src/basic/fileio-label.h \
+ src/basic/rm-rf.c \
+ src/basic/rm-rf.h \
+ src/basic/copy.c \
+ src/basic/copy.h
+
+nodist_libbasic_la_SOURCES = \
+ src/basic/errno-from-name.h \
+ src/basic/errno-to-name.h \
+ src/basic/af-from-name.h \
+ src/basic/af-to-name.h \
+ src/basic/arphrd-from-name.h \
+ src/basic/arphrd-to-name.h \
+ src/basic/cap-from-name.h \
+ src/basic/cap-to-name.h
+
+libbasic_la_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(SELINUX_CFLAGS) \
+ $(CAP_CFLAGS) \
+ -pthread
+
+libbasic_la_LIBADD = \
+ $(SELINUX_LIBS) \
+ $(CAP_LIBS) \
+ -lm
-libsystemd_shared_la_SOURCES = \
- src/shared/capability.c \
- src/shared/capability.h \
+# -----------------------------------------------------------------------------
+noinst_LTLIBRARIES += \
+ libshared.la
+
+libshared_la_SOURCES = \
+ src/shared/output-mode.h \
+ src/shared/gpt.h \
+ src/shared/udev-util.h \
src/shared/linux/auto_dev-ioctl.h \
- src/shared/ioprio.h \
- src/shared/missing.h \
src/shared/initreq.h \
- src/shared/securebits.h \
- src/shared/special.h \
- src/shared/list.h \
- src/shared/unaligned.h \
- src/shared/macro.h \
- src/shared/def.h \
- src/shared/sparse-endian.h \
- src/shared/refcnt.h \
- src/shared/udev-util.h \
- src/shared/device-nodes.c \
- src/shared/device-nodes.h \
- src/shared/util.c \
- src/shared/util.h \
- src/shared/virt.c \
- src/shared/virt.h \
+ src/shared/dns-domain.c \
+ src/shared/dns-domain.h \
src/shared/architecture.c \
src/shared/architecture.h \
src/shared/efivars.c \
@@ -773,237 +926,122 @@ libsystemd_shared_la_SOURCES = \
src/shared/formats-util.h \
src/shared/fstab-util.c \
src/shared/fstab-util.h \
- src/shared/lockfile-util.c \
- src/shared/lockfile-util.h \
- src/shared/path-util.c \
- src/shared/path-util.h \
- src/shared/time-util.c \
- src/shared/time-util.h \
- src/shared/locale-util.c \
- src/shared/locale-util.h \
- src/shared/signal-util.c \
- src/shared/signal-util.h \
- src/shared/mempool.c \
- src/shared/mempool.h \
- src/shared/hashmap.c \
- src/shared/hashmap.h \
- src/shared/siphash24.c \
- src/shared/siphash24.h \
- src/shared/set.h \
- src/shared/ordered-set.h \
- src/shared/fdset.c \
- src/shared/fdset.h \
- src/shared/prioq.c \
- src/shared/prioq.h \
src/shared/sleep-config.c \
src/shared/sleep-config.h \
- src/shared/strv.c \
- src/shared/strv.h \
- src/shared/env-util.c \
- src/shared/env-util.h \
- src/shared/strbuf.c \
- src/shared/strbuf.h \
- src/shared/strxcpyx.c \
- src/shared/strxcpyx.h \
src/shared/conf-parser.c \
src/shared/conf-parser.h \
- src/shared/log.c \
- src/shared/log.h \
- src/shared/ratelimit.h \
- src/shared/ratelimit.c \
- src/shared/exit-status.c \
- src/shared/exit-status.h \
- src/shared/utf8.c \
- src/shared/utf8.h \
- src/shared/gunicode.c \
- src/shared/gunicode.h \
src/shared/pager.c \
src/shared/pager.h \
- src/shared/socket-util.c \
- src/shared/socket-util.h \
- src/shared/in-addr-util.c \
- src/shared/in-addr-util.h \
- src/shared/ether-addr-util.h \
- src/shared/conf-files.c \
- src/shared/conf-files.h \
- src/shared/cgroup-util.c \
- src/shared/cgroup-util.h \
- src/shared/cgroup-show.c \
- src/shared/cgroup-show.h \
- src/shared/unit-name.c \
- src/shared/unit-name.h \
- src/shared/utmp-wtmp.h \
- src/shared/watchdog.c \
- src/shared/watchdog.h \
- src/shared/spawn-ask-password-agent.c \
- src/shared/spawn-ask-password-agent.h \
- src/shared/replace-var.c \
- src/shared/replace-var.h \
src/shared/spawn-polkit-agent.c \
src/shared/spawn-polkit-agent.h \
- src/shared/clock-util.c \
- src/shared/clock-util.h \
- src/shared/calendarspec.c \
- src/shared/calendarspec.h \
- src/shared/fileio.c \
- src/shared/fileio.h \
- src/shared/output-mode.h \
- src/shared/MurmurHash2.c \
- src/shared/MurmurHash2.h \
- src/shared/acpi-fpdt.h \
- src/shared/acpi-fpdt.c \
- src/shared/boot-timestamps.h \
- src/shared/boot-timestamps.c \
- src/shared/mkdir.c \
- src/shared/mkdir.h \
- src/shared/smack-util.c \
- src/shared/smack-util.h \
src/shared/apparmor-util.c \
src/shared/apparmor-util.h \
src/shared/ima-util.c \
src/shared/ima-util.h \
src/shared/ptyfwd.c \
src/shared/ptyfwd.h \
- src/shared/errno-list.c \
- src/shared/errno-list.h \
- src/shared/af-list.c \
- src/shared/af-list.h \
- src/shared/arphrd-list.c \
- src/shared/arphrd-list.h \
- src/shared/cap-list.c \
- src/shared/cap-list.h \
- src/shared/audit.c \
- src/shared/audit.h \
- src/shared/xml.c \
- src/shared/xml.h \
- src/shared/json.c \
- src/shared/json.h \
- src/shared/bus-label.c \
- src/shared/bus-label.h \
- src/shared/gpt.h \
- src/shared/clean-ipc.h \
- src/shared/clean-ipc.c \
- src/shared/login-shared.c \
- src/shared/login-shared.h \
- src/shared/ring.c \
- src/shared/ring.h \
- src/shared/barrier.c \
- src/shared/barrier.h \
src/shared/pty.c \
src/shared/pty.h \
- src/shared/async.c \
- src/shared/async.h \
src/shared/base-filesystem.c \
src/shared/base-filesystem.h \
- src/shared/memfd-util.c \
- src/shared/memfd-util.h \
- src/shared/process-util.c \
- src/shared/process-util.h \
- src/shared/random-util.c \
- src/shared/random-util.h \
- src/shared/terminal-util.c \
- src/shared/terminal-util.h \
src/shared/uid-range.c \
src/shared/uid-range.h \
src/shared/nss-util.h \
- src/shared/verbs.c \
- src/shared/verbs.h \
- src/shared/sigbus.c \
- src/shared/sigbus.h \
- src/shared/build.h \
- src/shared/import-util.c \
- src/shared/import-util.h \
- src/shared/sysctl-util.c \
- src/shared/sysctl-util.h \
- src/shared/hostname-util.h \
- src/shared/hostname-util.c \
- src/shared/socket-label.c \
- src/shared/label.c \
- src/shared/label.h \
- src/shared/selinux-util.c \
- src/shared/selinux-util.h \
- src/shared/mkdir-label.c \
- src/shared/ask-password-api.c \
- src/shared/ask-password-api.h \
- src/shared/switch-root.h \
- src/shared/switch-root.c \
- src/shared/fileio-label.c \
- src/shared/fileio-label.h \
+ src/shared/install.c \
+ src/shared/install.h \
+ src/shared/install-printf.c \
+ src/shared/install-printf.h \
+ src/shared/path-lookup.c \
+ src/shared/path-lookup.h \
+ src/shared/specifier.c \
+ src/shared/specifier.h \
src/shared/dev-setup.c \
src/shared/dev-setup.h \
src/shared/dropin.c \
src/shared/dropin.h \
src/shared/condition.c \
src/shared/condition.h \
+ src/shared/clean-ipc.c \
+ src/shared/clean-ipc.h \
src/shared/generator.h \
src/shared/generator.c \
- src/shared/btrfs-util.c \
- src/shared/btrfs-util.h \
- src/shared/btrfs-ctree.h \
- src/shared/rm-rf.c \
- src/shared/rm-rf.h \
- src/shared/copy.c \
- src/shared/copy.h \
- src/shared/install.c \
- src/shared/install.h \
- src/shared/install-printf.c \
- src/shared/install-printf.h \
- src/shared/path-lookup.c \
- src/shared/path-lookup.h \
- src/shared/specifier.c \
- src/shared/specifier.h
+ src/shared/acpi-fpdt.h \
+ src/shared/acpi-fpdt.c \
+ src/shared/boot-timestamps.h \
+ src/shared/boot-timestamps.c \
+ src/shared/cgroup-show.c \
+ src/shared/cgroup-show.h \
+ src/shared/utmp-wtmp.h \
+ src/shared/watchdog.c \
+ src/shared/watchdog.h \
+ src/shared/spawn-ask-password-agent.c \
+ src/shared/spawn-ask-password-agent.h \
+ src/shared/ask-password-api.c \
+ src/shared/ask-password-api.h \
+ src/shared/switch-root.h \
+ src/shared/switch-root.c \
+ src/shared/import-util.c \
+ src/shared/import-util.h \
+ src/shared/sysctl-util.c \
+ src/shared/sysctl-util.h \
+ src/shared/bus-util.c \
+ src/shared/bus-util.h \
+ src/shared/logs-show.c \
+ src/shared/logs-show.h \
+ src/shared/machine-image.c \
+ src/shared/machine-image.h \
+ src/shared/machine-pool.c \
+ src/shared/machine-pool.h
if HAVE_UTMP
-libsystemd_shared_la_SOURCES += \
+libshared_la_SOURCES += \
src/shared/utmp-wtmp.c
endif
-nodist_libsystemd_shared_la_SOURCES = \
- src/shared/errno-from-name.h \
- src/shared/errno-to-name.h \
- src/shared/af-from-name.h \
- src/shared/af-to-name.h \
- src/shared/arphrd-from-name.h \
- src/shared/arphrd-to-name.h \
- src/shared/cap-from-name.h \
- src/shared/cap-to-name.h
-
-libsystemd_shared_la_CFLAGS = \
+if HAVE_SECCOMP
+libshared_la_SOURCES += \
+ src/shared/seccomp-util.h \
+ src/shared/seccomp-util.c
+endif
+
+if HAVE_ACL
+libshared_la_SOURCES += \
+ src/shared/acl-util.c \
+ src/shared/acl-util.h
+endif
+
+libshared_la_CFLAGS = \
$(AM_CFLAGS) \
$(SELINUX_CFLAGS) \
$(CAP_CFLAGS) \
+ $(ACL_CFLAGS) \
$(SECCOMP_CFLAGS) \
-pthread
-libsystemd_shared_la_LIBADD = \
+libshared_la_LIBADD = \
+ libsystemd-internal.la \
+ libsystemd-journal-internal.la \
$(SELINUX_LIBS) \
$(CAP_LIBS) \
+ $(ACL_LIBS) \
+ $(LIBIDN_LIBS) \
+ $(SECCOMP_LIBS) \
-lm
# -----------------------------------------------------------------------------
-noinst_LTLIBRARIES += \
- libsystemd-machine.la
-
-libsystemd_machine_la_SOURCES = \
- src/shared/machine-image.c \
- src/shared/machine-image.h \
- src/shared/machine-pool.c \
- src/shared/machine-pool.h
-
-# -----------------------------------------------------------------------------
if HAVE_LIBIPTC
noinst_LTLIBRARIES += \
- libsystemd-fw.la
+ libfirewall.la
-libsystemd_fw_la_SOURCES = \
+libfirewall_la_SOURCES = \
src/shared/fw-util.h \
src/shared/fw-util.c
-libsystemd_fw_la_CFLAGS = \
+libfirewall_la_CFLAGS = \
$(AM_CFLAGS) \
$(LIBIPTC_CFLAGS)
-libsystemd_fw_la_LIBADD = \
+libfirewall_la_LIBADD = \
$(LIBIPTC_LIBS)
endif
@@ -1017,53 +1055,10 @@ SYSINIT_TARGET_WANTS += \
endif
# ------------------------------------------------------------------------------
-
-if HAVE_SECCOMP
-noinst_LTLIBRARIES += \
- libsystemd-seccomp.la
-
-libsystemd_seccomp_la_SOURCES = \
- src/shared/seccomp-util.h \
- src/shared/seccomp-util.c
-
-libsystemd_seccomp_la_CFLAGS = \
- $(AM_CFLAGS) \
- $(SECCOMP_CFLAGS)
-
-libsystemd_seccomp_la_LIBADD = \
- $(SECCOMP_LIBS)
-endif
-
-# ------------------------------------------------------------------------------
-noinst_LTLIBRARIES += \
- libsystemd-logs.la
-
-libsystemd_logs_la_SOURCES = \
- src/shared/logs-show.c \
- src/shared/logs-show.h
-
-# ------------------------------------------------------------------------------
-if HAVE_ACL
-noinst_LTLIBRARIES += \
- libsystemd-acl.la
-
-libsystemd_acl_la_SOURCES = \
- src/shared/acl-util.c \
- src/shared/acl-util.h
-
-libsystemd_acl_la_CFLAGS = \
- $(AM_CFLAGS) \
- $(ACL_CFLAGS)
-
-libsystemd_acl_la_LIBADD = \
- $(ACL_LIBS)
-endif
-
-# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
- libsystemd-core.la
+ libcore.la
-libsystemd_core_la_SOURCES = \
+libcore_la_SOURCES = \
src/core/unit.c \
src/core/unit.h \
src/core/unit-printf.c \
@@ -1185,36 +1180,28 @@ libsystemd_core_la_SOURCES = \
src/core/failure-action.c \
src/core/failure-action.h
-nodist_libsystemd_core_la_SOURCES = \
+nodist_libcore_la_SOURCES = \
src/core/load-fragment-gperf.c \
src/core/load-fragment-gperf-nulstr.c
-libsystemd_core_la_CFLAGS = \
+libcore_la_CFLAGS = \
$(AM_CFLAGS) \
$(PAM_CFLAGS) \
$(AUDIT_CFLAGS) \
$(KMOD_CFLAGS) \
$(APPARMOR_CFLAGS) \
- $(SECCOMP_CFLAGS) \
$(MOUNT_CFLAGS) \
-pthread
-libsystemd_core_la_LIBADD = \
+libcore_la_LIBADD = \
libudev-internal.la \
- libsystemd-shared.la \
- libsystemd-internal.la \
+ libshared.la \
$(PAM_LIBS) \
$(AUDIT_LIBS) \
$(KMOD_LIBS) \
$(APPARMOR_LIBS) \
- $(SECCOMP_LIBS) \
$(MOUNT_LIBS)
-if HAVE_SECCOMP
-libsystemd_core_la_LIBADD += \
- libsystemd-seccomp.la
-endif
-
src/core/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@
@@ -1223,10 +1210,10 @@ gperf_gperf_m4_sources = \
src/core/load-fragment-gperf.gperf.m4
gperf_txt_sources = \
- src/shared/errno-list.txt \
- src/shared/af-list.txt \
- src/shared/arphrd-list.txt \
- src/shared/cap-list.txt
+ src/basic/errno-list.txt \
+ src/basic/af-list.txt \
+ src/basic/arphrd-list.txt \
+ src/basic/cap-list.txt
BUILT_SOURCES += \
$(gperf_gperf_m4_sources:-gperf.gperf.m4=-gperf.c) \
@@ -1256,50 +1243,50 @@ CLEANFILES += \
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_$(notdir $*) -H hash_$(notdir $*)_name -p -C <$< >$@
-src/shared/errno-list.txt:
+src/basic/errno-list.txt:
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@
-src/shared/errno-to-name.h: src/shared/errno-list.txt
+src/basic/errno-to-name.h: src/basic/errno-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} !/EDEADLOCK/ && !/EWOULDBLOCK/ && !/ENOTSUP/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
-src/shared/af-list.txt:
+src/basic/af-list.txt:
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/socket.h - </dev/null | grep -v AF_UNSPEC | grep -v AF_MAX | $(AWK) '/^#define[ \t]+AF_[^ \t]+[ \t]+PF_[^ \t]/ { print $$2; }' >$@
-src/shared/af-to-name.h: src/shared/af-list.txt
+src/basic/af-to-name.h: src/basic/af-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const af_names[] = { "} !/AF_FILE/ && !/AF_ROUTE/ && !/AF_LOCAL/ { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
-src/shared/arphrd-list.txt:
+src/basic/arphrd-list.txt:
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include net/if_arp.h - </dev/null | $(AWK) '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $$2; }' | sed -e 's/ARPHRD_//' >$@
-src/shared/arphrd-to-name.h: src/shared/arphrd-list.txt
+src/basic/arphrd-to-name.h: src/basic/arphrd-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const arphrd_names[] = { "} !/CISCO/ { printf "[ARPHRD_%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' <$< >$@
-src/shared/arphrd-from-name.gperf: src/shared/arphrd-list.txt
+src/basic/arphrd-from-name.gperf: src/basic/arphrd-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@
-src/shared/cap-list.txt:
+src/basic/cap-list.txt:
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@
-src/shared/cap-to-name.h: src/shared/cap-list.txt
+src/basic/cap-to-name.h: src/basic/cap-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@
-src/shared/cap-from-name.gperf: src/shared/cap-list.txt
+src/basic/cap-from-name.gperf: src/basic/cap-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct capability_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' <$< >$@
-src/shared/cap-from-name.h: src/shared/cap-from-name.gperf
+src/basic/cap-from-name.h: src/basic/cap-from-name.gperf
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@
@@ -1333,12 +1320,8 @@ src/resolve/dns_type-from-name.gperf: src/resolve/dns_type-list.txt
systemd_SOURCES = \
src/core/main.c
-systemd_CFLAGS = \
- $(AM_CFLAGS) \
- $(SECCOMP_CFLAGS)
-
systemd_LDADD = \
- libsystemd-core.la \
+ libcore.la \
$(RT_LIBS)
dist_pkgsysconf_DATA += \
@@ -1446,7 +1429,8 @@ tests += \
test-copy \
test-cap-list \
test-sigbus \
- test-verbs
+ test-verbs \
+ test-dns-domain
EXTRA_DIST += \
test/a.service \
@@ -1531,7 +1515,7 @@ test_device_nodes_SOURCES = \
src/test/test-device-nodes.c
test_device_nodes_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_engine_SOURCES = \
src/test/test-engine.c
@@ -1541,7 +1525,7 @@ test_engine_CFLAGS = \
$(SECCOMP_CFLAGS)
test_engine_LDADD = \
- libsystemd-core.la \
+ libcore.la \
$(RT_LIBS)
test_job_type_SOURCES = \
@@ -1552,7 +1536,7 @@ test_job_type_CFLAGS = \
$(SECCOMP_CFLAGS)
test_job_type_LDADD = \
- libsystemd-core.la \
+ libcore.la \
$(RT_LIBS)
test_ns_SOURCES = \
@@ -1563,19 +1547,27 @@ test_ns_CFLAGS = \
$(SECCOMP_CFLAGS)
test_ns_LDADD = \
- libsystemd-core.la
+ libcore.la
test_loopback_SOURCES = \
src/test/test-loopback.c
test_loopback_LDADD = \
- libsystemd-core.la
+ libcore.la
test_hostname_SOURCES = \
src/test/test-hostname.c
test_hostname_LDADD = \
- libsystemd-core.la
+ libcore.la
+
+test_dns_domain_SOURCES = \
+ src/test/test-dns-domain.c
+
+test_dns_domain_LDADD = \
+ libsystemd-network.la \
+ libshared.la \
+ $(LIBIDN_LIBS)
if ENABLE_EFI
manual_tests += \
@@ -1585,7 +1577,7 @@ test_boot_timestamp_SOURCES = \
src/test/test-boot-timestamps.c
test_boot_timestamp_LDADD = \
- libsystemd-shared.la
+ libshared.la
endif
test_unit_name_SOURCES = \
@@ -1596,7 +1588,7 @@ test_unit_name_CFLAGS = \
$(SECCOMP_CFLAGS)
test_unit_name_LDADD = \
- libsystemd-core.la \
+ libcore.la \
$(RT_LIBS)
test_unit_file_SOURCES = \
@@ -1607,137 +1599,135 @@ test_unit_file_CFLAGS = \
$(SECCOMP_CFLAGS)
test_unit_file_LDADD = \
- libsystemd-core.la \
+ libcore.la \
$(RT_LIBS)
test_utf8_SOURCES = \
src/test/test-utf8.c
test_utf8_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_capability_SOURCES = \
src/test/test-capability.c
test_capability_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_async_SOURCES = \
src/test/test-async.c
test_async_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_locale_util_SOURCES = \
src/test/test-locale-util.c
test_locale_util_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_copy_SOURCES = \
src/test/test-copy.c
test_copy_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_sigbus_SOURCES = \
src/test/test-sigbus.c
test_sigbus_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_condition_SOURCES = \
src/test/test-condition.c
test_condition_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
test_fdset_SOURCES = \
src/test/test-fdset.c
test_fdset_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
test_fstab_util_SOURCES = \
src/test/test-fstab-util.c
test_fstab_util_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_ratelimit_SOURCES = \
src/test/test-ratelimit.c
test_ratelimit_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_util_SOURCES = \
src/test/test-util.c
test_util_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_process_util_SOURCES = \
src/test/test-process-util.c
test_process_util_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_terminal_util_SOURCES = \
src/test/test-terminal-util.c
test_terminal_util_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_path_lookup_SOURCES = \
src/test/test-path-lookup.c
test_path_lookup_LDADD = \
-lm \
- libsystemd-shared.la
+ libshared.la
test_uid_range_SOURCES = \
src/test/test-uid-range.c
test_uid_range_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_cap_list_SOURCES = \
src/test/test-cap-list.c
test_cap_list_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_socket_util_SOURCES = \
src/test/test-socket-util.c
test_socket_util_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_ring_SOURCES = \
src/test/test-ring.c
test_ring_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_barrier_SOURCES = \
src/test/test-barrier.c
test_barrier_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_pty_SOURCES = \
src/test/test-pty.c
test_pty_LDADD = \
- libsystemd-core.la
+ libcore.la
test_tmpfiles_SOURCES = \
src/test/test-tmpfiles.c
test_tmpfiles_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_namespace_SOURCES = \
src/test/test-namespace.c
@@ -1746,10 +1736,10 @@ test_verbs_SOURCES = \
src/test/test-verbs.c
test_verbs_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_namespace_LDADD = \
- libsystemd-core.la
+ libcore.la
BUILT_SOURCES += \
src/test/test-hashmap-ordered.c
@@ -1771,34 +1761,34 @@ test_hashmap_SOURCES = \
src/test/test-hashmap-plain.c
test_hashmap_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_set_SOURCES = \
src/test/test-set.c
test_set_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_xml_SOURCES = \
src/test/test-xml.c
test_xml_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_json_SOURCES = \
src/test/test-json.c
test_json_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_list_SOURCES = \
src/test/test-list.c
test_list_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_unaligned_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_unaligned_SOURCES = \
src/test/test-unaligned.c
@@ -1820,10 +1810,9 @@ test_tables_CFLAGS = \
$(SECCOMP_CFLAGS)
test_tables_LDADD = \
- libsystemd-logs.la \
libsystemd-journal-internal.la \
- libsystemd-journal-core.la \
- libsystemd-core.la \
+ libjournal-core.la \
+ libcore.la \
libudev-core.la \
$(RT_LIBS)
@@ -1831,44 +1820,44 @@ test_prioq_SOURCES = \
src/test/test-prioq.c
test_prioq_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_fileio_SOURCES = \
src/test/test-fileio.c
test_fileio_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_time_SOURCES = \
src/test/test-time.c
test_time_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_architecture_SOURCES = \
src/test/test-architecture.c
test_architecture_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_log_SOURCES = \
src/test/test-log.c
test_log_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_ipcrm_SOURCES = \
src/test/test-ipcrm.c
test_ipcrm_LDADD = \
- libsystemd-shared.la \
+ libshared.la \
-lrt
test_btrfs_SOURCES = \
src/test/test-btrfs.c
test_btrfs_LDADD = \
- libsystemd-shared.la
+ libshared.la
if HAVE_LIBIPTC
test_fw_util_SOURCES = \
@@ -1879,8 +1868,8 @@ test_fw_util_CFLAGS = \
$(LIBIPTC_CFLAGS)
test_fw_util_LDADD = \
- libsystemd-fw.la \
- libsystemd-shared.la \
+ libfirewall.la \
+ libshared.la \
$(LIBIPTC_LIBS)
endif
@@ -1892,59 +1881,56 @@ test_rtnl_manual_CFLAGS = \
$(KMOD_CFLAGS)
test_rtnl_manual_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(KMOD_LIBS)
test_ellipsize_SOURCES = \
src/test/test-ellipsize.c
test_ellipsize_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_date_SOURCES = \
src/test/test-date.c
test_date_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_sleep_SOURCES = \
src/test/test-sleep.c
test_sleep_LDADD = \
- libsystemd-core.la
+ libcore.la
test_replace_var_SOURCES = \
src/test/test-replace-var.c
test_replace_var_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_calendarspec_SOURCES = \
src/test/test-calendarspec.c
test_calendarspec_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_strip_tab_ansi_SOURCES = \
src/test/test-strip-tab-ansi.c
test_strip_tab_ansi_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_daemon_SOURCES = \
src/test/test-daemon.c
test_daemon_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_cgroup_SOURCES = \
src/test/test-cgroup.c
test_cgroup_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
test_cgroup_mask_SOURCES = \
src/test/test-cgroup-mask.c
@@ -1957,40 +1943,38 @@ test_cgroup_mask_CFLAGS = \
$(SECCOMP_CFLAGS)
test_cgroup_mask_LDADD = \
- libsystemd-core.la \
+ libcore.la \
$(RT_LIBS)
test_cgroup_util_SOURCES = \
src/test/test-cgroup-util.c
test_cgroup_util_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
test_env_replace_SOURCES = \
src/test/test-env-replace.c
test_env_replace_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_strbuf_SOURCES = \
src/test/test-strbuf.c
test_strbuf_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_strv_SOURCES = \
src/test/test-strv.c
test_strv_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
test_path_util_SOURCES = \
src/test/test-path-util.c
test_path_util_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_path_SOURCES = \
src/test/test-path.c
@@ -1999,7 +1983,7 @@ test_path_CFLAGS = \
$(AM_CFLAGS)
test_path_LDADD = \
- libsystemd-core.la
+ libcore.la
test_execute_SOURCES = \
src/test/test-execute.c
@@ -2008,26 +1992,25 @@ test_execute_CFLAGS = \
$(AM_CFLAGS)
test_execute_LDADD = \
- libsystemd-core.la
+ libcore.la
test_strxcpyx_SOURCES = \
src/test/test-strxcpyx.c
test_strxcpyx_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_install_SOURCES = \
src/test/test-install.c
test_install_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
test_watchdog_SOURCES = \
src/test/test-watchdog.c
test_watchdog_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_sched_prio_SOURCES = \
src/test/test-sched-prio.c
@@ -2040,28 +2023,27 @@ test_sched_prio_CFLAGS = \
$(SECCOMP_CFLAGS)
test_sched_prio_LDADD = \
- libsystemd-core.la \
+ libcore.la \
$(RT_LIBS)
test_conf_files_SOURCES = \
src/test/test-conf-files.c
test_conf_files_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_conf_parser_SOURCES = \
src/test/test-conf-parser.c
test_conf_parser_LDADD = \
- libsystemd-shared.la
+ libshared.la
test_bus_policy_SOURCES = \
src/bus-proxyd/test-bus-xml-policy.c
test_bus_policy_LDADD = \
- libsystemd-proxy.la \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libbus-proxy-core.la \
+ libshared.la
# ------------------------------------------------------------------------------
## .PHONY so it always rebuilds it
@@ -2113,9 +2095,7 @@ systemd_analyze_CFLAGS = \
$(SECCOMP_CFLAGS)
systemd_analyze_LDADD = \
- libsystemd-core.la \
- libsystemd-shared.la \
- libsystemd-internal.la \
+ libcore.la \
$(RT_LIBS)
# ------------------------------------------------------------------------------
@@ -2123,8 +2103,7 @@ systemd_initctl_SOURCES = \
src/initctl/initctl.c
systemd_initctl_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_update_utmp_SOURCES = \
@@ -2135,8 +2114,7 @@ systemd_update_utmp_CFLAGS = \
$(AUDIT_CFLAGS)
systemd_update_utmp_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(AUDIT_LIBS)
# ------------------------------------------------------------------------------
@@ -2144,8 +2122,7 @@ systemd_update_done_SOURCES = \
src/update-done/update-done.c
systemd_update_done_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_shutdown_SOURCES = \
@@ -2159,8 +2136,7 @@ systemd_shutdown_SOURCES = \
systemd_shutdown_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
if HAVE_KMOD
@@ -2172,7 +2148,7 @@ systemd_modules_load_CFLAGS = \
$(KMOD_CFLAGS)
systemd_modules_load_LDADD = \
- libsystemd-shared.la \
+ libshared.la \
$(KMOD_LIBS)
rootlibexec_PROGRAMS += \
@@ -2203,13 +2179,7 @@ systemd_tmpfiles_SOURCES = \
src/tmpfiles/tmpfiles.c
systemd_tmpfiles_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
-
-if HAVE_ACL
-systemd_tmpfiles_LDADD += \
- libsystemd-acl.la
-endif
+ libshared.la
rootbin_PROGRAMS += \
systemd-tmpfiles
@@ -2266,8 +2236,7 @@ systemd_sysusers_SOURCES = \
src/sysusers/sysusers.c
systemd_sysusers_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
rootbin_PROGRAMS += \
systemd-sysusers
@@ -2307,8 +2276,7 @@ systemd_firstboot_SOURCES = \
src/firstboot/firstboot.c
systemd_firstboot_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la \
+ libshared.la \
-lcrypt
rootbin_PROGRAMS += \
@@ -2331,22 +2299,21 @@ systemd_machine_id_setup_SOURCES = \
src/core/machine-id-setup.h
systemd_machine_id_setup_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_sysctl_SOURCES = \
src/sysctl/sysctl.c
systemd_sysctl_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_sleep_SOURCES = \
src/sleep/sleep.c
systemd_sleep_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_fsck_SOURCES = \
@@ -2354,8 +2321,7 @@ systemd_fsck_SOURCES = \
systemd_fsck_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_machine_id_commit_SOURCES = \
@@ -2364,8 +2330,7 @@ systemd_machine_id_commit_SOURCES = \
src/core/machine-id-setup.h
systemd_machine_id_commit_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
SYSINIT_TARGET_WANTS += \
systemd-machine-id-commit.service
@@ -2376,15 +2341,14 @@ systemd_ac_power_SOURCES = \
systemd_ac_power_LDADD = \
libudev-internal.la \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_detect_virt_SOURCES = \
src/detect-virt/detect-virt.c
systemd_detect_virt_LDADD = \
- libsystemd-shared.la
+ libshared.la
INSTALL_EXEC_HOOKS += \
systemd-detect-virt-install-hook
@@ -2394,21 +2358,21 @@ systemd_delta_SOURCES = \
src/delta/delta.c
systemd_delta_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_getty_generator_SOURCES = \
src/getty-generator/getty-generator.c
systemd_getty_generator_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_debug_generator_SOURCES = \
src/debug-generator/debug-generator.c
systemd_debug_generator_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_fstab_generator_SOURCES = \
@@ -2416,14 +2380,14 @@ systemd_fstab_generator_SOURCES = \
src/core/mount-setup.c
systemd_fstab_generator_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_system_update_generator_SOURCES = \
src/system-update-generator/system-update-generator.c
systemd_system_update_generator_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
if ENABLE_HIBERNATE
@@ -2437,14 +2401,13 @@ systemd_hibernate_resume_SOURCES = \
src/hibernate-resume/hibernate-resume.c
systemd_hibernate_resume_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
systemd_hibernate_resume_generator_SOURCES = \
src/hibernate-resume/hibernate-resume-generator.c
systemd_hibernate_resume_generator_LDADD = \
- libsystemd-shared.la
+ libshared.la
dist_systemunit_DATA += \
units/hibernate.target \
@@ -2470,7 +2433,7 @@ systemd_efi_boot_generator_SOURCES = \
src/efi-boot-generator/efi-boot-generator.c
systemd_efi_boot_generator_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
if HAVE_BLKID
@@ -2487,8 +2450,7 @@ bootctl_CFLAGS = \
$(BLKID_CFLAGS)
bootctl_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la \
+ libshared.la \
$(BLKID_LIBS)
bin_PROGRAMS += \
@@ -2662,12 +2624,11 @@ systemgenerator_PROGRAMS += \
systemd_gpt_auto_generator_SOURCES = \
src/gpt-auto-generator/gpt-auto-generator.c \
- src/shared/blkid-util.h
+ src/basic/blkid-util.h
systemd_gpt_auto_generator_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(BLKID_LIBS)
systemd_gpt_auto_generator_CFLAGS = \
@@ -2684,8 +2645,7 @@ systemd_dbus1_generator_SOURCES = \
src/dbus1-generator/dbus1-generator.c
systemd_dbus1_generator_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
dbus1-generator-install-hook:
$(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
@@ -2707,15 +2667,14 @@ systemd_sysv_generator_SOURCES = \
src/sysv-generator/sysv-generator.c
systemd_sysv_generator_LDADD = \
- libsystemd-core.la \
- libsystemd-shared.la
+ libcore.la
# ------------------------------------------------------------------------------
systemd_rc_local_generator_SOURCES = \
src/rc-local-generator/rc-local-generator.c
systemd_rc_local_generator_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_remount_fs_SOURCES = \
@@ -2724,77 +2683,71 @@ systemd_remount_fs_SOURCES = \
src/core/mount-setup.h
systemd_remount_fs_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_cgroups_agent_SOURCES = \
src/cgroups-agent/cgroups-agent.c
systemd_cgroups_agent_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_escape_SOURCES = \
src/escape/escape.c
systemd_escape_LDADD = \
- libsystemd-shared.la
+ libshared.la
# -----------------------------------------------------------------------------
systemctl_SOURCES = \
src/systemctl/systemctl.c
systemctl_LDADD = \
- libsystemd-logs.la \
libsystemd-journal-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_notify_SOURCES = \
src/notify/notify.c
systemd_notify_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_path_SOURCES = \
src/path/path.c
systemd_path_LDADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_ask_password_SOURCES = \
src/ask-password/ask-password.c
systemd_ask_password_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_reply_password_SOURCES = \
src/reply-password/reply-password.c
systemd_reply_password_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_cgls_SOURCES = \
src/cgls/cgls.c
systemd_cgls_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_cgtop_SOURCES = \
src/cgtop/cgtop.c
systemd_cgtop_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_nspawn_SOURCES = \
@@ -2806,25 +2759,16 @@ systemd_nspawn_SOURCES = \
systemd_nspawn_CFLAGS = \
$(AM_CFLAGS) \
- $(SECCOMP_CFLAGS) \
$(BLKID_CFLAGS)
systemd_nspawn_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-machine.la \
- libsystemd-shared.la \
+ libshared.la \
$(BLKID_LIBS)
-if HAVE_SECCOMP
-systemd_nspawn_LDADD += \
- libsystemd-seccomp.la \
- $(SECCOMP_LIBS)
-endif
-
if HAVE_LIBIPTC
systemd_nspawn_LDADD += \
- libsystemd-fw.la
+ libfirewall.la
endif
# ------------------------------------------------------------------------------
@@ -2832,14 +2776,13 @@ systemd_run_SOURCES = \
src/run/run.c
systemd_run_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
- libsystemd-proxy.la
+ libbus-proxy-core.la
-libsystemd_proxy_la_SOURCES = \
+libbus_proxy_core_la_SOURCES = \
src/bus-proxyd/bus-xml-policy.c \
src/bus-proxyd/bus-xml-policy.h \
src/bus-proxyd/driver.c \
@@ -2849,13 +2792,12 @@ libsystemd_proxy_la_SOURCES = \
src/bus-proxyd/synthesize.c \
src/bus-proxyd/synthesize.h
-libsystemd_proxy_la_CFLAGS = \
+libbus_proxy_core_la_CFLAGS = \
$(AM_CFLAGS) \
-pthread
-libsystemd_proxy_la_LIBADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+libbus_proxy_core_la_LIBADD = \
+ libshared.la
systemd_bus_proxyd_SOURCES = \
src/bus-proxyd/bus-proxyd.c
@@ -2865,17 +2807,15 @@ systemd_bus_proxyd_CFLAGS = \
-pthread
systemd_bus_proxyd_LDADD = \
- libsystemd-proxy.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libbus-proxy-core.la \
+ libshared.la
systemd_stdio_bridge_SOURCES = \
src/bus-proxyd/stdio-bridge.c
systemd_stdio_bridge_LDADD = \
- libsystemd-proxy.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libbus-proxy-core.la \
+ libshared.la
if ENABLE_KDBUS
nodist_systemunit_DATA += \
@@ -2907,7 +2847,7 @@ systemd_tty_ask_password_agent_SOURCES = \
src/tty-ask-password-agent/tty-ask-password-agent.c
systemd_tty_ask_password_agent_LDADD = \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
libsystemd_internal_la_SOURCES = \
@@ -2961,12 +2901,12 @@ libsystemd_internal_la_SOURCES = \
src/libsystemd/sd-bus/bus-convenience.c \
src/libsystemd/sd-bus/bus-track.c \
src/libsystemd/sd-bus/bus-track.h \
- src/libsystemd/sd-bus/bus-util.c \
- src/libsystemd/sd-bus/bus-util.h \
src/libsystemd/sd-bus/bus-slot.c \
src/libsystemd/sd-bus/bus-slot.h \
src/libsystemd/sd-bus/bus-protocol.h \
src/libsystemd/sd-bus/kdbus.h \
+ src/libsystemd/sd-bus/bus-dump.c \
+ src/libsystemd/sd-bus/bus-dump.h \
src/libsystemd/sd-utf8/sd-utf8.c \
src/libsystemd/sd-event/sd-event.c \
src/libsystemd/sd-event/event-util.h \
@@ -3005,6 +2945,7 @@ libsystemd_internal_la_CFLAGS = \
-pthread
libsystemd_internal_la_LIBADD = \
+ libbasic.la \
$(RT_LIBS)
libsystemd_resolve_la_SOURCES = \
@@ -3022,13 +2963,6 @@ noinst_LTLIBRARIES += \
libsystemd-internal.la \
libsystemd-resolve.la
-libsystemd_dump_la_SOURCES = \
- src/libsystemd/sd-bus/bus-dump.c \
- src/libsystemd/sd-bus/bus-dump.h
-
-noinst_LTLIBRARIES += \
- libsystemd-dump.la
-
EXTRA_DIST += \
src/libsystemd/libsystemd.sym.m4 \
src/libsystemd/libsystemd.pc.in \
@@ -3057,7 +2991,6 @@ libsystemd_la_LDFLAGS = \
-Wl,--version-script=$(top_builddir)/src/libsystemd/libsystemd.sym
libsystemd_la_LIBADD = \
- libsystemd-shared.la \
$(libsystemd_internal_la_LIBADD) \
$(libsystemd_journal_internal_la_LIBADD) \
$(libsystemd_resolve_la_LIBADD)
@@ -3122,9 +3055,7 @@ test_bus_marshal_SOURCES = \
src/libsystemd/sd-bus/test-bus-marshal.c
test_bus_marshal_LDADD = \
- libsystemd-dump.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(GLIB_LIBS) \
$(DBUS_LIBS)
@@ -3137,8 +3068,7 @@ test_bus_signature_SOURCES = \
src/libsystemd/sd-bus/test-bus-signature.c
test_bus_signature_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_bus_chat_SOURCES = \
src/libsystemd/sd-bus/test-bus-chat.c
@@ -3148,8 +3078,7 @@ test_bus_chat_CFLAGS = \
-pthread
test_bus_chat_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_bus_cleanup_SOURCES = \
src/libsystemd/sd-bus/test-bus-cleanup.c
@@ -3159,8 +3088,7 @@ test_bus_cleanup_CFLAGS = \
$(SECCOMP_CFLAGS)
test_bus_cleanup_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_bus_server_SOURCES = \
src/libsystemd/sd-bus/test-bus-server.c
@@ -3170,8 +3098,7 @@ test_bus_server_CFLAGS = \
-pthread
test_bus_server_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_bus_objects_SOURCES = \
src/libsystemd/sd-bus/test-bus-objects.c
@@ -3181,24 +3108,19 @@ test_bus_objects_CFLAGS = \
-pthread
test_bus_objects_LDADD = \
- libsystemd-dump.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_bus_error_SOURCES = \
src/libsystemd/sd-bus/test-bus-error.c
test_bus_error_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_bus_gvariant_SOURCES = \
src/libsystemd/sd-bus/test-bus-gvariant.c
test_bus_gvariant_LDADD = \
- libsystemd-dump.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(GLIB_LIBS)
test_bus_gvariant_CFLAGS = \
@@ -3209,82 +3131,68 @@ test_bus_creds_SOURCES = \
src/libsystemd/sd-bus/test-bus-creds.c
test_bus_creds_LDADD = \
- libsystemd-dump.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_bus_match_SOURCES = \
src/libsystemd/sd-bus/test-bus-match.c
test_bus_match_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_bus_kernel_SOURCES = \
src/libsystemd/sd-bus/test-bus-kernel.c
test_bus_kernel_LDADD = \
- libsystemd-dump.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_bus_kernel_bloom_SOURCES = \
src/libsystemd/sd-bus/test-bus-kernel-bloom.c
test_bus_kernel_bloom_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_bus_benchmark_SOURCES = \
src/libsystemd/sd-bus/test-bus-benchmark.c
test_bus_benchmark_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_bus_zero_copy_SOURCES = \
src/libsystemd/sd-bus/test-bus-zero-copy.c
test_bus_zero_copy_LDADD = \
- libsystemd-dump.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_bus_introspect_SOURCES = \
src/libsystemd/sd-bus/test-bus-introspect.c
test_bus_introspect_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_event_SOURCES = \
src/libsystemd/sd-event/test-event.c
test_event_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_rtnl_SOURCES = \
src/libsystemd/sd-rtnl/test-rtnl.c
test_rtnl_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_local_addresses_SOURCES = \
src/libsystemd/sd-rtnl/test-local-addresses.c
test_local_addresses_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_resolve_SOURCES = \
src/libsystemd/sd-resolve/test-resolve.c
test_resolve_LDADD = \
libsystemd-resolve.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_resolve_CFLAGS = \
$(AM_CFLAGS) \
@@ -3296,9 +3204,7 @@ busctl_SOURCES = \
src/libsystemd/sd-bus/busctl-introspect.h
busctl_LDADD = \
- libsystemd-dump.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
noinst_LTLIBRARIES += \
@@ -3358,9 +3264,6 @@ libsystemd_network_la_SOURCES = \
src/libsystemd-network/sd-lldp.c
libsystemd_network_la_LIBADD = \
- libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
$(KMOD_LIBS)
test_dhcp_option_SOURCES = \
@@ -3370,8 +3273,7 @@ test_dhcp_option_SOURCES = \
test_dhcp_option_LDADD = \
libsystemd-network.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_dhcp_client_SOURCES = \
src/systemd/sd-dhcp-client.h \
@@ -3381,16 +3283,16 @@ test_dhcp_client_SOURCES = \
test_dhcp_client_LDADD = \
libsystemd-network.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libudev-internal.la \
+ libshared.la \
+ $(LIBIDN_LIBS)
test_dhcp_server_SOURCES = \
src/libsystemd-network/test-dhcp-server.c
test_dhcp_server_LDADD = \
libsystemd-network.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_ipv4ll_SOURCES = \
src/systemd/sd-ipv4ll.h \
@@ -3399,8 +3301,7 @@ test_ipv4ll_SOURCES = \
test_ipv4ll_LDADD = \
libsystemd-network.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_pppoe_SOURCES = \
src/systemd/sd-pppoe.h \
@@ -3408,7 +3309,7 @@ test_pppoe_SOURCES = \
test_pppoe_LDADD = \
libsystemd-network.la \
- libsystemd-shared.la
+ libshared.la
test_icmp6_rs_SOURCES = \
src/systemd/sd-dhcp6-client.h \
@@ -3420,8 +3321,8 @@ test_icmp6_rs_SOURCES = \
test_icmp6_rs_LDADD = \
libsystemd-network.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libudev.la \
+ libshared.la
test_dhcp6_client_SOURCES = \
src/systemd/sd-dhcp6-client.h \
@@ -3432,19 +3333,18 @@ test_dhcp6_client_SOURCES = \
test_dhcp6_client_LDADD = \
libsystemd-network.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libudev.la \
+ libshared.la
test_lldp_SOURCES = \
- src/libsystemd-network/lldp.h \
- src/libsystemd-network/lldp-tlv.h \
- src/libsystemd-network/lldp-tlv.c \
- src/libsystemd-network/test-lldp.c
+ src/libsystemd-network/lldp.h \
+ src/libsystemd-network/lldp-tlv.h \
+ src/libsystemd-network/lldp-tlv.c \
+ src/libsystemd-network/test-lldp.c
test_lldp_LDADD = \
libsystemd-network.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
tests += \
test-dhcp-option \
@@ -3519,8 +3419,7 @@ libsystemd_terminal_la_SOURCES = \
libsystemd_terminal_la_LIBADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(TERMINAL_LIBS)
systemd_consoled_CFLAGS = \
@@ -3538,8 +3437,7 @@ systemd_consoled_SOURCES = \
systemd_consoled_LDADD = \
libsystemd-terminal.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(TERMINAL_LIBS)
systemd_evcat_CFLAGS = \
@@ -3551,8 +3449,7 @@ systemd_evcat_SOURCES = \
systemd_evcat_LDADD = \
libsystemd-terminal.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(TERMINAL_LIBS)
systemd_modeset_CFLAGS = \
@@ -3564,8 +3461,7 @@ systemd_modeset_SOURCES = \
systemd_modeset_LDADD = \
libsystemd-terminal.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(TERMINAL_LIBS)
systemd_subterm_SOURCES = \
@@ -3573,36 +3469,35 @@ systemd_subterm_SOURCES = \
systemd_subterm_LDADD = \
libsystemd-terminal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_term_page_SOURCES = \
src/libsystemd-terminal/test-term-page.c
test_term_page_LDADD = \
libsystemd-terminal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_term_parser_SOURCES = \
src/libsystemd-terminal/test-term-parser.c
test_term_parser_LDADD = \
libsystemd-terminal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_unifont_SOURCES = \
src/libsystemd-terminal/test-unifont.c
test_unifont_LDADD = \
libsystemd-terminal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
src/libsystemd-terminal/unifont-glyph-array.bin: tools/compile-unifont.py $(UNIFONT)
$(AM_V_GEN)$(PYTHON) $< <$(UNIFONT) >$@
+EXTRA_DIST += \
+ tools/compile-unifont.py
+
# ------------------------------------------------------------------------------
include_HEADERS += \
src/libudev/libudev.h
@@ -3634,8 +3529,7 @@ libudev_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/libudev/libudev.sym
libudev_la_LIBADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-internal.la
pkgconfiglib_DATA += \
src/libudev/libudev.pc
@@ -3779,9 +3673,8 @@ libudev_core_la_CFLAGS = \
libudev_core_la_LIBADD = \
libudev-internal.la \
- libsystemd-internal.la \
libsystemd-network.la \
- libsystemd-shared.la \
+ libshared.la \
$(BLKID_LIBS) \
$(KMOD_LIBS)
@@ -3804,9 +3697,6 @@ libudev_core_la_SOURCES += \
src/login/logind-acl.c \
src/libsystemd/sd-login/sd-login.c \
src/systemd/sd-login.h
-
-libudev_core_la_LIBADD += \
- libsystemd-acl.la
endif
systemd_udevd_SOURCES = \
@@ -3842,8 +3732,7 @@ systemd_hwdb_SOURCES = \
systemd_hwdb_LDADD = \
libudev-internal.la \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
rootbin_PROGRAMS += \
systemd-hwdb
@@ -3911,8 +3800,8 @@ test_libudev_SOURCES = \
test_libudev_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la \
+ $(ACL_LIBS)
test_udev_SOURCES = \
src/test/test-udev.c
@@ -3921,12 +3810,8 @@ test_udev_LDADD = \
libudev-core.la \
$(BLKID_LIBS) \
$(KMOD_LIBS) \
- $(SELINUX_LIBS)
-
-if HAVE_ACL
-test_udev_LDADD += \
- libsystemd-acl.la
-endif
+ $(SELINUX_LIBS) \
+ $(ACL_LIBS)
check_DATA += \
test/sys
@@ -3955,8 +3840,7 @@ ata_id_SOURCES = \
ata_id_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
udevlibexec_PROGRAMS += \
ata_id
@@ -3967,8 +3851,7 @@ cdrom_id_SOURCES = \
cdrom_id_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
udevlibexec_PROGRAMS += \
cdrom_id
@@ -3982,8 +3865,7 @@ collect_SOURCES = \
collect_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
udevlibexec_PROGRAMS += \
collect
@@ -3997,8 +3879,7 @@ scsi_id_SOURCES =\
scsi_id_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
udevlibexec_PROGRAMS += \
scsi_id
@@ -4012,8 +3893,7 @@ v4l_id_SOURCES = \
v4l_id_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
udevlibexec_PROGRAMS += \
v4l_id
@@ -4027,8 +3907,7 @@ accelerometer_SOURCES = \
accelerometer_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
udevlibexec_PROGRAMS += \
accelerometer
@@ -4053,8 +3932,7 @@ test_id128_SOURCES = \
src/test/test-id128.c
test_id128_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
tests += \
test-id128
@@ -4068,8 +3946,7 @@ systemd_activate_SOURCES = \
src/activate/activate.c
systemd_activate_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
# ------------------------------------------------------------------------------
systemd_journald_SOURCES = \
@@ -4077,15 +3954,14 @@ systemd_journald_SOURCES = \
src/journal/journald-server.h
systemd_journald_LDADD = \
- libsystemd-journal-core.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libjournal-core.la \
+ libshared.la
systemd_cat_SOURCES = \
src/journal/cat.c
systemd_cat_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
if HAVE_MICROHTTPD
rootlibexec_PROGRAMS += \
@@ -4100,8 +3976,7 @@ systemd_journal_remote_SOURCES = \
src/journal-remote/journal-remote.c
systemd_journal_remote_LDADD = \
- libsystemd-internal.la \
- libsystemd-journal-core.la
+ libjournal-core.la
systemd_journal_remote_SOURCES += \
src/journal-remote/microhttpd-util.h \
@@ -4167,9 +4042,8 @@ systemd_journal_upload_CFLAGS = \
$(LIBCURL_CFLAGS)
systemd_journal_upload_LDADD = \
- libsystemd-internal.la \
libsystemd-journal-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(LIBCURL_LIBS)
nodist_systemunit_DATA += \
@@ -4193,14 +4067,7 @@ journalctl_SOURCES = \
journalctl_LDADD = \
libsystemd-journal-internal.la \
- libsystemd-internal.la \
- libsystemd-logs.la \
- libsystemd-shared.la
-
-if HAVE_ACL
-journalctl_LDADD += \
- libsystemd-acl.la
-endif
+ libshared.la
if HAVE_QRENCODE
journalctl_SOURCES += \
@@ -4218,67 +4085,67 @@ test_journal_SOURCES = \
src/journal/test-journal.c
test_journal_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
test_journal_send_SOURCES = \
src/journal/test-journal-send.c
test_journal_send_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
test_journal_syslog_SOURCES = \
src/journal/test-journal-syslog.c
test_journal_syslog_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
test_journal_match_SOURCES = \
src/journal/test-journal-match.c
test_journal_match_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
test_journal_enum_SOURCES = \
src/journal/test-journal-enum.c
test_journal_enum_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
test_journal_stream_SOURCES = \
src/journal/test-journal-stream.c
test_journal_stream_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
test_journal_flush_SOURCES = \
src/journal/test-journal-flush.c
test_journal_flush_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
test_journal_init_SOURCES = \
src/journal/test-journal-init.c
test_journal_init_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
test_journal_verify_SOURCES = \
src/journal/test-journal-verify.c
test_journal_verify_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
test_journal_interleaving_SOURCES = \
src/journal/test-journal-interleaving.c
test_journal_interleaving_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
test_mmap_cache_SOURCES = \
src/journal/test-mmap-cache.c
test_mmap_cache_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
test_catalog_SOURCES = \
src/journal/test-catalog.c
@@ -4288,29 +4155,29 @@ test_catalog_CPPFLAGS = \
-DCATALOG_DIR=\"$(abs_top_srcdir)/catalog\"
test_catalog_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
test_compress_SOURCES = \
src/journal/test-compress.c
test_compress_LDADD = \
libsystemd-journal-internal.la \
- libsystemd-shared.la
+ libshared.la
test_compress_benchmark_SOURCES = \
src/journal/test-compress-benchmark.c
test_compress_benchmark_LDADD = \
libsystemd-journal-internal.la \
- libsystemd-shared.la
+ libshared.la
test_audit_type_SOURCES = \
src/journal/test-audit-type.c
test_audit_type_LDADD = \
- libsystemd-journal-core.la
+ libjournal-core.la
-libsystemd_journal_core_la_SOURCES = \
+libjournal_core_la_SOURCES = \
src/journal/journald-kmsg.c \
src/journal/journald-kmsg.h \
src/journal/journald-syslog.c \
@@ -4331,22 +4198,16 @@ libsystemd_journal_core_la_SOURCES = \
src/journal/journald-rate-limit.h \
src/journal/journal-internal.h
-nodist_libsystemd_journal_core_la_SOURCES = \
+nodist_libjournal_core_la_SOURCES = \
src/journal/journald-gperf.c
-libsystemd_journal_core_la_LIBADD = \
+libjournal_core_la_LIBADD = \
libsystemd-journal-internal.la \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
-
-if HAVE_ACL
-libsystemd_journal_core_la_LIBADD += \
- libsystemd-acl.la
-endif
+ libshared.la
noinst_LTLIBRARIES += \
- libsystemd-journal-core.la
+ libjournal-core.la
journal-install-hook:
-$(MKDIR_P) $(DESTDIR)/var/log/journal
@@ -4533,10 +4394,8 @@ systemd_journal_gatewayd_SOURCES = \
src/journal-remote/microhttpd-util.c
systemd_journal_gatewayd_LDADD = \
- libsystemd-logs.la \
libsystemd-journal-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(MICROHTTPD_LIBS)
if HAVE_GNUTLS
@@ -4572,10 +4431,8 @@ systemd_socket_proxyd_SOURCES = \
src/socket-proxy/socket-proxyd.c
systemd_socket_proxyd_LDADD = \
- libsystemd-logs.la \
- libsystemd-internal.la \
libsystemd-journal-internal.la \
- libsystemd-shared.la \
+ libshared.la \
libsystemd-resolve.la
# ------------------------------------------------------------------------------
@@ -4587,8 +4444,7 @@ systemd_coredump_SOURCES = \
systemd_coredump_LDADD = \
libsystemd-journal-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
if HAVE_ELFUTILS
systemd_coredump_SOURCES += \
@@ -4605,18 +4461,12 @@ rootlibexec_PROGRAMS += \
dist_pkgsysconf_DATA += \
src/journal/coredump.conf
-if HAVE_ACL
-systemd_coredump_LDADD += \
- libsystemd-acl.la
-endif
-
coredumpctl_SOURCES = \
src/journal/coredumpctl.c
coredumpctl_LDADD = \
libsystemd-journal-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
bin_PROGRAMS += \
coredumpctl
@@ -4630,8 +4480,7 @@ test_coredump_vacuum_SOURCES = \
src/journal/coredump-vacuum.h
test_coredump_vacuum_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
dist_bashcompletion_DATA += \
shell-completion/bash/coredumpctl
@@ -4655,7 +4504,7 @@ systemd_binfmt_SOURCES = \
src/binfmt/binfmt.c
systemd_binfmt_LDADD = \
- libsystemd-shared.la
+ libshared.la
rootlibexec_PROGRAMS += \
systemd-binfmt
@@ -4686,7 +4535,7 @@ systemd_vconsole_setup_SOURCES = \
src/vconsole/vconsole-setup.c
systemd_vconsole_setup_LDADD = \
- libsystemd-shared.la
+ libshared.la
rootlibexec_PROGRAMS += \
systemd-vconsole-setup
@@ -4717,7 +4566,7 @@ systemd_bootchart_SOURCES = \
systemd_bootchart_LDADD = \
libsystemd-journal-internal.la \
- libsystemd-shared.la
+ libshared.la
rootlibexec_PROGRAMS += \
systemd-bootchart
@@ -4744,7 +4593,7 @@ systemd_quotacheck_SOURCES = \
src/quotacheck/quotacheck.c
systemd_quotacheck_LDADD = \
- libsystemd-shared.la
+ libshared.la
endif
EXTRA_DIST += \
@@ -4765,7 +4614,7 @@ systemd_random_seed_SOURCES = \
src/random-seed/random-seed.c
systemd_random_seed_LDADD = \
- libsystemd-shared.la
+ libshared.la
SYSINIT_TARGET_WANTS += \
systemd-random-seed.service
@@ -4788,8 +4637,7 @@ systemd_backlight_SOURCES = \
systemd_backlight_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
endif
EXTRA_DIST += \
@@ -4808,8 +4656,7 @@ systemd_rfkill_SOURCES = \
systemd_rfkill_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
endif
EXTRA_DIST += \
@@ -4836,15 +4683,14 @@ systemd_cryptsetup_CFLAGS = \
systemd_cryptsetup_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(LIBCRYPTSETUP_LIBS)
systemd_cryptsetup_generator_SOURCES = \
src/cryptsetup/cryptsetup-generator.c
systemd_cryptsetup_generator_LDADD = \
- libsystemd-shared.la
+ libshared.la
SYSINIT_TARGET_WANTS += \
cryptsetup.target
@@ -4857,8 +4703,7 @@ systemd_hostnamed_SOURCES = \
src/hostname/hostnamed.c
systemd_hostnamed_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
rootlibexec_PROGRAMS += \
systemd-hostnamed
@@ -4888,8 +4733,7 @@ hostnamectl_SOURCES = \
src/hostname/hostnamectl.c
hostnamectl_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
bin_PROGRAMS += \
hostnamectl
@@ -4921,8 +4765,7 @@ systemd_localed_SOURCES = \
src/locale/localed.c
systemd_localed_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(XKBCOMMON_LIBS)
systemd_localed_CFLAGS = \
@@ -4961,8 +4804,7 @@ localectl_SOURCES = \
src/locale/localectl.c
localectl_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
bin_PROGRAMS += \
localectl
@@ -4989,8 +4831,7 @@ systemd_timedated_SOURCES = \
src/timedate/timedated.c
systemd_timedated_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
rootlibexec_PROGRAMS += \
systemd-timedated
@@ -5020,8 +4861,7 @@ timedatectl_SOURCES = \
src/timedate/timedatectl.c
timedatectl_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
bin_PROGRAMS += \
timedatectl
@@ -5059,8 +4899,7 @@ gperf_gperf_sources += \
systemd_timesyncd_LDADD = \
libsystemd-resolve.la \
libsystemd-network.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
rootlibexec_PROGRAMS += \
systemd-timesyncd
@@ -5097,8 +4936,8 @@ libnss_myhostname_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/nss-myhostname/nss-myhostname.sym
libnss_myhostname_la_LIBADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
+#libsystemd-network.la
lib_LTLIBRARIES += \
libnss_myhostname.la
@@ -5111,12 +4950,12 @@ systemd_machined_SOURCES = \
src/machine/machined.h
systemd_machined_LDADD = \
- libsystemd-machine-core.la
+ libmachine-core.la
rootlibexec_PROGRAMS += \
systemd-machined
-libsystemd_machine_core_la_SOURCES = \
+libmachine_core_la_SOURCES = \
src/machine/machine.c \
src/machine/machine.h \
src/machine/machined-dbus.c \
@@ -5125,23 +4964,19 @@ libsystemd_machine_core_la_SOURCES = \
src/machine/image-dbus.c \
src/machine/image-dbus.h
-libsystemd_machine_core_la_LIBADD = \
+libmachine_core_la_LIBADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-machine.la \
- libsystemd-shared.la
+ libshared.la
noinst_LTLIBRARIES += \
- libsystemd-machine-core.la
+ libmachine-core.la
machinectl_SOURCES = \
src/machine/machinectl.c
machinectl_LDADD = \
- libsystemd-internal.la \
- libsystemd-logs.la \
libsystemd-journal-internal.la \
- libsystemd-shared.la
+ libshared.la
rootbin_PROGRAMS += \
machinectl
@@ -5153,7 +4988,7 @@ test_machine_tables_SOURCES = \
src/machine/test-machine-tables.c
test_machine_tables_LDADD = \
- libsystemd-machine-core.la
+ libmachine-core.la
tests += \
test-machine-tables
@@ -5200,8 +5035,7 @@ libnss_mymachines_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/nss-mymachines/nss-mymachines.sym
libnss_mymachines_la_LIBADD = \
- libsystemd-shared.la \
- libsystemd-internal.la
+ libshared.la
lib_LTLIBRARIES += \
libnss_mymachines.la
@@ -5239,9 +5073,7 @@ systemd_importd_CFLAGS = \
-D SYSTEMD_EXPORT_PATH=\"$(rootlibexecdir)/systemd-export\"
systemd_importd_LDADD = \
- libsystemd-machine.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
systemd_pull_SOURCES = \
src/import/pull.c \
@@ -5276,9 +5108,7 @@ systemd_pull_CFLAGS = \
-D USER_KEYRING_PATH=\"$(pkgsysconfdir)/import-pubring.gpg\"
systemd_pull_LDADD = \
- libsystemd-machine.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(LIBCURL_LIBS) \
$(XZ_LIBS) \
$(ZLIB_LIBS) \
@@ -5304,9 +5134,7 @@ systemd_import_CFLAGS = \
$(ZLIB_CFLAGS)
systemd_import_LDADD = \
- libsystemd-machine.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(XZ_LIBS) \
$(ZLIB_LIBS) \
-lbz2
@@ -5328,9 +5156,7 @@ systemd_export_CFLAGS = \
$(ZLIB_CFLAGS)
systemd_export_LDADD = \
- libsystemd-machine.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(XZ_LIBS) \
$(ZLIB_LIBS) \
-lbz2
@@ -5372,8 +5198,7 @@ test_qcow2_CFLAGS = \
$(ZLIB_CFLAGS)
test_qcow2_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(ZLIB_LIBS)
endif
@@ -5405,8 +5230,6 @@ systemd_resolved_SOURCES = \
src/resolve/resolved-link.h \
src/resolve/resolved-link.c \
src/resolve/resolved-def.h \
- src/resolve/resolved-dns-domain.h \
- src/resolve/resolved-dns-domain.c \
src/resolve/resolved-dns-rr.h \
src/resolve/resolved-dns-rr.c \
src/resolve/resolved-dns-question.h \
@@ -5445,8 +5268,7 @@ gperf_txt_sources += \
systemd_resolved_LDADD = \
libsystemd-network.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(LIBIDN_LIBS)
rootlibexec_PROGRAMS += \
@@ -5479,17 +5301,6 @@ nodist_pkgsysconf_DATA += \
tests += \
test-dns-domain
-test_dns_domain_SOURCES = \
- src/resolve/resolved-dns-domain.h \
- src/resolve/resolved-dns-domain.c \
- src/resolve/test-dns-domain.c
-
-test_dns_domain_LDADD = \
- libsystemd-network.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
- $(LIBIDN_LIBS)
-
libnss_resolve_la_SOURCES = \
src/nss-resolve/nss-resolve.sym \
src/nss-resolve/nss-resolve.c
@@ -5504,8 +5315,7 @@ libnss_resolve_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/nss-resolve/nss-resolve.sym
libnss_resolve_la_LIBADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
lib_LTLIBRARIES += \
libnss_resolve.la
@@ -5520,8 +5330,6 @@ systemd_resolve_host_SOURCES = \
src/resolve/resolved-dns-answer.h \
src/resolve/resolved-dns-question.c \
src/resolve/resolved-dns-question.h \
- src/resolve/resolved-dns-domain.c \
- src/resolve/resolved-dns-domain.h \
src/resolve/dns-type.c \
src/resolve/dns-type.h
@@ -5530,8 +5338,7 @@ nodist_systemd_resolve_host_SOURCES = \
src/resolve/dns_type-to-name.h
systemd_resolve_host_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(LIBIDN_LIBS)
rootlibexec_PROGRAMS += \
@@ -5551,20 +5358,21 @@ systemd_networkd_SOURCES = \
src/network/networkd.c
systemd_networkd_LDADD = \
- libsystemd-networkd-core.la
+ libnetworkd-core.la \
+ $(LIBIDN_LIBS)
if HAVE_LIBIPTC
systemd_networkd_LDADD += \
- libsystemd-fw.la
+ libfirewall.la
endif
noinst_LTLIBRARIES += \
- libsystemd-networkd-core.la
+ libnetworkd-core.la
-libsystemd_networkd_core_la_CFLAGS = \
+libnetworkd_core_la_CFLAGS = \
$(AM_CFLAGS)
-libsystemd_networkd_core_la_SOURCES = \
+libnetworkd_core_la_SOURCES = \
src/libsystemd-network/network-internal.h \
src/network/networkd.h \
src/network/networkd-link.h \
@@ -5604,15 +5412,14 @@ libsystemd_networkd_core_la_SOURCES = \
src/network/networkd-fdb.c \
src/network/networkd-address-pool.c
-nodist_libsystemd_networkd_core_la_SOURCES = \
+nodist_libnetworkd_core_la_SOURCES = \
src/network/networkd-network-gperf.c \
src/network/networkd-netdev-gperf.c
-libsystemd_networkd_core_la_LIBADD = \
+libnetworkd_core_la_LIBADD = \
libudev-internal.la \
- libsystemd-internal.la \
libsystemd-network.la \
- libsystemd-shared.la
+ libshared.la
rootlibexec_PROGRAMS += \
systemd-networkd-wait-online
@@ -5631,8 +5438,7 @@ systemd_networkd_wait_online_SOURCES = \
systemd_networkd_wait_online_LDADD = \
libsystemd-network.la \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
rootbin_PROGRAMS += \
networkctl
@@ -5642,19 +5448,19 @@ networkctl_SOURCES = \
networkctl_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
libsystemd-network.la
test_network_SOURCES = \
src/network/test-network.c
test_network_LDADD = \
- libsystemd-networkd-core.la
+ libnetworkd-core.la \
+ $(LIBIDN_LIBS)
if HAVE_LIBIPTC
test_network_LDADD += \
- libsystemd-fw.la
+ libfirewall.la
endif
test_network_tables_SOURCES = \
@@ -5662,12 +5468,12 @@ test_network_tables_SOURCES = \
src/shared/test-tables.h
test_network_tables_LDADD = \
- libsystemd-networkd-core.la \
+ libnetworkd-core.la \
libudev-core.la
if HAVE_LIBIPTC
test_network_tables_LDADD += \
- libsystemd-fw.la
+ libfirewall.la
endif
tests += \
@@ -5720,9 +5526,9 @@ nodist_systemd_logind_SOURCES = \
src/login/logind-gperf.c
systemd_logind_LDADD = \
- libsystemd-logind-core.la
+ liblogind-core.la
-libsystemd_logind_core_la_SOURCES = \
+liblogind_core_la_SOURCES = \
src/login/logind-core.c \
src/login/logind-device.c \
src/login/logind-device.h \
@@ -5747,21 +5553,17 @@ libsystemd_logind_core_la_SOURCES = \
src/login/logind-utmp.c \
src/login/logind-acl.h
-libsystemd_logind_core_la_LIBADD = \
+liblogind_core_la_LIBADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
if HAVE_ACL
-libsystemd_logind_core_la_SOURCES += \
+liblogind_core_la_SOURCES += \
src/login/logind-acl.c
-
-libsystemd_logind_core_la_LIBADD += \
- libsystemd-acl.la
endif
noinst_LTLIBRARIES += \
- libsystemd-logind-core.la
+ liblogind-core.la
rootlibexec_PROGRAMS += \
systemd-logind
@@ -5773,10 +5575,8 @@ loginctl_SOURCES = \
loginctl_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-logs.la \
libsystemd-journal-internal.la \
- libsystemd-shared.la
+ libshared.la
rootbin_PROGRAMS += \
loginctl
@@ -5792,8 +5592,7 @@ systemd_inhibit_SOURCES = \
src/login/inhibit.c
systemd_inhibit_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
rootbin_PROGRAMS += \
systemd-inhibit
@@ -5802,28 +5601,25 @@ test_login_SOURCES = \
src/libsystemd/sd-login/test-login.c
test_login_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_login_shared_SOURCES = \
src/login/test-login-shared.c
test_login_shared_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_inhibit_SOURCES = \
src/login/test-inhibit.c
test_inhibit_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
test_login_tables_SOURCES = \
src/login/test-login-tables.c
test_login_tables_LDADD = \
- libsystemd-logind-core.la
+ liblogind-core.la
manual_tests += \
test-login \
@@ -5852,8 +5648,7 @@ pam_systemd_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/login/pam_systemd.sym
pam_systemd_la_LIBADD = \
- libsystemd-internal.la \
- libsystemd-shared.la \
+ libshared.la \
$(PAM_LIBS)
pamlib_LTLIBRARIES = \
@@ -5925,7 +5720,7 @@ systemd_user_sessions_SOURCES = \
src/user-sessions/user-sessions.c
systemd_user_sessions_LDADD = \
- libsystemd-shared.la
+ libshared.la
rootlibexec_PROGRAMS += \
systemd-user-sessions
@@ -5991,7 +5786,7 @@ id128_la_LDFLAGS = \
id128_la_LIBADD = \
$(PYTHON_DEVEL_LIBS) \
- libsystemd-shared.la \
+ libshared.la \
libsystemd.la
_daemon_la_SOURCES = \
@@ -6013,7 +5808,7 @@ _daemon_la_LDFLAGS = \
_daemon_la_LIBADD = \
$(PYTHON_DEVEL_LIBS) \
- libsystemd-shared.la \
+ libshared.la \
libsystemd.la
_reader_la_SOURCES = \
@@ -6034,7 +5829,7 @@ _reader_la_LDFLAGS = \
_reader_la_LIBADD = \
$(PYTHON_DEVEL_LIBS) \
- libsystemd-shared.la \
+ libshared.la \
libsystemd.la
login_la_SOURCES = \
@@ -6055,7 +5850,7 @@ login_la_LDFLAGS = \
login_la_LIBADD = \
$(PYTHON_DEVEL_LIBS) \
- libsystemd-shared.la \
+ libshared.la \
libsystemd.la
dist_pkgpyexec_PYTHON = \
@@ -6127,8 +5922,7 @@ libsystemd_journal_la_LDFLAGS = \
libsystemd_journal_la_LIBADD = \
libsystemd-journal-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-internal.la
libsystemd_login_la_SOURCES = \
libsystemd-login.c \
@@ -6144,8 +5938,7 @@ libsystemd_login_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-login.sym
libsystemd_login_la_LIBADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
libsystemd_id128_la_SOURCES = \
libsystemd-id128.c \
@@ -6161,8 +5954,7 @@ libsystemd_id128_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-id128.sym
libsystemd_id128_la_LIBADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
libsystemd_daemon_la_SOURCES = \
libsystemd-daemon.c \
@@ -6178,8 +5970,7 @@ libsystemd_daemon_la_LDFLAGS = \
-Wl,--version-script=$(top_srcdir)/src/compat-libs/libsystemd-daemon.sym
libsystemd_daemon_la_LIBADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libshared.la
lib_LTLIBRARIES += \
libsystemd-journal.la \
diff --git a/README b/README
index 777b34335e..651aa98377 100644
--- a/README
+++ b/README
@@ -30,8 +30,8 @@ AUTHOR:
LICENSE:
LGPLv2.1+ for all code
- - except src/shared/MurmurHash2.c which is Public Domain
- - except src/shared/siphash24.c which is CC0 Public Domain
+ - except src/basic/MurmurHash2.c which is Public Domain
+ - except src/basic/siphash24.c which is CC0 Public Domain
- except src/journal/lookup3.c which is Public Domain
- except src/udev/* which is (currently still) GPLv2, GPLv2+
diff --git a/configure.ac b/configure.ac
index 878b23b061..344bfe1e21 100644
--- a/configure.ac
+++ b/configure.ac
@@ -173,6 +173,7 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-Wwrite-strings \
-Wno-unused-parameter \
-Wno-missing-field-initializers \
+ -Wno-unused-result \
-Wno-format-signedness \
-Werror=overflow \
-Wdate-time \
diff --git a/man/systemd-cgtop.xml b/man/systemd-cgtop.xml
index b0c88001d4..d14564480d 100644
--- a/man/systemd-cgtop.xml
+++ b/man/systemd-cgtop.xml
@@ -65,10 +65,12 @@
groups of the local Linux control group hierarchy, ordered by
their CPU, memory, or disk I/O load. The display is refreshed in
regular intervals (by default every 1s), similar in style to
- <citerefentry project='man-pages'><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
- If <command>systemd-cgtop</command> is not connected to a tty,
- only one iteration is performed and no columns headers are
- printed. This mode is suitable for scripting.</para>
+ <citerefentry project='man-pages'><refentrytitle>top</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
+
+ <para>If <command>systemd-cgtop</command> is not connected to a tty, no
+ column headers are printed and the default is to only run one iteration.
+ The <varname>--iterations</varname> argument, if given, is still honored.
+ This mode is suitable for scripting.</para>
<para>Resource usage is only accounted for control groups in the
relevant hierarchy, i.e. CPU usage is only accounted for control
@@ -143,11 +145,20 @@
</varlistentry>
<varlistentry>
+ <term><option>-r</option></term>
+ <term><option>--raw</option></term>
+
+ <listitem><para>Format byte counts (as in memory usage and IO metrics)
+ with raw numeric values rather than human-readable
+ numbers.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>-n</option></term>
<term><option>--iterations=</option></term>
- <listitem><para>Perform only this many iterations.
- </para></listitem>
+ <listitem><para>Perform only this many iterations. A value of 0
+ indicates that the program should run indefinitely.</para></listitem>
</varlistentry>
<varlistentry>
diff --git a/man/udev.xml b/man/udev.xml
index d5d8a17cdb..70f4f59c08 100644
--- a/man/udev.xml
+++ b/man/udev.xml
@@ -472,7 +472,8 @@
<varlistentry>
<term><literal>program</literal></term>
<listitem>
- <para>Execute an external program specified as the assigned value and
+ <para>Execute an external program specified as the assigned
+ value and if it returns successfully
import its output, which must be in environment key
format. Path specification, command/argument separation,
and quoting work like in <varname>RUN</varname>.</para>
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index 17736de01c..4bf306aacb 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -127,16 +127,11 @@ _systemctl_really_all_units()
_filter_units_by_property() {
local property=$1 value=$2 ; shift ; shift
local -a units ; units=($*)
- local prop unit
- for ((i=1; $i <= ${#units[*]}; i++)); do
- # FIXME: "Failed to issue method call: Unknown unit" errors are ignored for
- # now (related to DBUS_ERROR_UNKNOWN_OBJECT). in the future, we need to
- # revert to calling 'systemctl show' once for all units, which is way
- # faster
- unit=${units[i]}
- prop=${(f)"$(_call_program units "$service show --no-pager --property="$property" ${unit} 2>/dev/null")"}
- if [[ "${prop}" = "$property=$value" ]]; then
- echo -E - " ${unit}"
+ local props
+ for props in ${(ps:\n\n:)"$(_call_program units "$service show --no-pager --property="Id,$property" -- ${units} 2>/dev/null")"}; do
+ props=(${(f)props})
+ if [[ "${props[2]}" = "$property=$value" ]]; then
+ echo -E - " ${props[1]#Id=}"
fi
done
}
diff --git a/src/shared/.gitignore b/src/basic/.gitignore
index e22411e484..e22411e484 100644
--- a/src/shared/.gitignore
+++ b/src/basic/.gitignore
diff --git a/src/shared/Makefile b/src/basic/Makefile
index d0b0e8e008..d0b0e8e008 120000
--- a/src/shared/Makefile
+++ b/src/basic/Makefile
diff --git a/src/shared/MurmurHash2.c b/src/basic/MurmurHash2.c
index 2f4149dbe9..2f4149dbe9 100644
--- a/src/shared/MurmurHash2.c
+++ b/src/basic/MurmurHash2.c
diff --git a/src/shared/MurmurHash2.h b/src/basic/MurmurHash2.h
index 93362dd485..93362dd485 100644
--- a/src/shared/MurmurHash2.h
+++ b/src/basic/MurmurHash2.h
diff --git a/src/shared/af-list.c b/src/basic/af-list.c
index f396115a34..f396115a34 100644
--- a/src/shared/af-list.c
+++ b/src/basic/af-list.c
diff --git a/src/shared/af-list.h b/src/basic/af-list.h
index e346ab87f5..e346ab87f5 100644
--- a/src/shared/af-list.h
+++ b/src/basic/af-list.h
diff --git a/src/shared/arphrd-list.c b/src/basic/arphrd-list.c
index 284043cd90..284043cd90 100644
--- a/src/shared/arphrd-list.c
+++ b/src/basic/arphrd-list.c
diff --git a/src/shared/arphrd-list.h b/src/basic/arphrd-list.h
index 5ca182c9e8..5ca182c9e8 100644
--- a/src/shared/arphrd-list.h
+++ b/src/basic/arphrd-list.h
diff --git a/src/shared/async.c b/src/basic/async.c
index 7725e6d7d3..7725e6d7d3 100644
--- a/src/shared/async.c
+++ b/src/basic/async.c
diff --git a/src/shared/async.h b/src/basic/async.h
index 7f1ef79532..7f1ef79532 100644
--- a/src/shared/async.h
+++ b/src/basic/async.h
diff --git a/src/shared/audit.c b/src/basic/audit.c
index 54148fcf18..54148fcf18 100644
--- a/src/shared/audit.c
+++ b/src/basic/audit.c
diff --git a/src/shared/audit.h b/src/basic/audit.h
index 6de331c73e..6de331c73e 100644
--- a/src/shared/audit.h
+++ b/src/basic/audit.h
diff --git a/src/shared/barrier.c b/src/basic/barrier.c
index 436ba95989..436ba95989 100644
--- a/src/shared/barrier.c
+++ b/src/basic/barrier.c
diff --git a/src/shared/barrier.h b/src/basic/barrier.h
index b8954694d3..b8954694d3 100644
--- a/src/shared/barrier.h
+++ b/src/basic/barrier.h
diff --git a/src/shared/blkid-util.h b/src/basic/blkid-util.h
index c689310324..c689310324 100644
--- a/src/shared/blkid-util.h
+++ b/src/basic/blkid-util.h
diff --git a/src/shared/btrfs-ctree.h b/src/basic/btrfs-ctree.h
index d3ae57331c..d3ae57331c 100644
--- a/src/shared/btrfs-ctree.h
+++ b/src/basic/btrfs-ctree.h
diff --git a/src/shared/btrfs-util.c b/src/basic/btrfs-util.c
index 49528dbf01..49528dbf01 100644
--- a/src/shared/btrfs-util.c
+++ b/src/basic/btrfs-util.c
diff --git a/src/shared/btrfs-util.h b/src/basic/btrfs-util.h
index a7eb895c93..a7eb895c93 100644
--- a/src/shared/btrfs-util.h
+++ b/src/basic/btrfs-util.h
diff --git a/src/shared/build.h b/src/basic/build.h
index 24873ab9d7..24873ab9d7 100644
--- a/src/shared/build.h
+++ b/src/basic/build.h
diff --git a/src/shared/bus-label.c b/src/basic/bus-label.c
index ccc9f2bf8e..ccc9f2bf8e 100644
--- a/src/shared/bus-label.c
+++ b/src/basic/bus-label.c
diff --git a/src/shared/bus-label.h b/src/basic/bus-label.h
index ed1dc4e0a7..ed1dc4e0a7 100644
--- a/src/shared/bus-label.h
+++ b/src/basic/bus-label.h
diff --git a/src/shared/calendarspec.c b/src/basic/calendarspec.c
index 2fde3e107e..2fde3e107e 100644
--- a/src/shared/calendarspec.c
+++ b/src/basic/calendarspec.c
diff --git a/src/shared/calendarspec.h b/src/basic/calendarspec.h
index 7baf318249..7baf318249 100644
--- a/src/shared/calendarspec.h
+++ b/src/basic/calendarspec.h
diff --git a/src/shared/cap-list.c b/src/basic/cap-list.c
index bd5bffbfa5..bd5bffbfa5 100644
--- a/src/shared/cap-list.c
+++ b/src/basic/cap-list.c
diff --git a/src/shared/cap-list.h b/src/basic/cap-list.h
index 9824fad70f..9824fad70f 100644
--- a/src/shared/cap-list.h
+++ b/src/basic/cap-list.h
diff --git a/src/shared/capability.c b/src/basic/capability.c
index 58f00e6dae..58f00e6dae 100644
--- a/src/shared/capability.c
+++ b/src/basic/capability.c
diff --git a/src/shared/capability.h b/src/basic/capability.h
index 4eb5c2a835..4eb5c2a835 100644
--- a/src/shared/capability.h
+++ b/src/basic/capability.h
diff --git a/src/shared/cgroup-util.c b/src/basic/cgroup-util.c
index 9988e5c574..66857f118f 100644
--- a/src/shared/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -40,7 +40,7 @@
#include "fileio.h"
#include "special.h"
#include "mkdir.h"
-#include "login-shared.h"
+#include "login-util.h"
int cg_enumerate_processes(const char *controller, const char *path, FILE **_f) {
_cleanup_free_ char *fs = NULL;
@@ -441,9 +441,7 @@ static const char *normalize_controller(const char *controller) {
assert(controller);
- if (streq(controller, SYSTEMD_CGROUP_CONTROLLER))
- return "systemd";
- else if (startswith(controller, "name="))
+ if (startswith(controller, "name="))
return controller + 5;
else
return controller;
@@ -483,7 +481,7 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
assert(fs);
- if (controller && !cg_controller_is_valid(controller, true))
+ if (controller && !cg_controller_is_valid(controller))
return -EINVAL;
if (_unlikely_(!good)) {
@@ -526,7 +524,7 @@ int cg_get_path_and_check(const char *controller, const char *path, const char *
assert(fs);
- if (!cg_controller_is_valid(controller, true))
+ if (!cg_controller_is_valid(controller))
return -EINVAL;
/* Normalize the controller syntax */
@@ -742,7 +740,7 @@ int cg_pid_get_path(const char *controller, pid_t pid, char **path) {
assert(pid >= 0);
if (controller) {
- if (!cg_controller_is_valid(controller, true))
+ if (!cg_controller_is_valid(controller))
return -EINVAL;
controller = normalize_controller(controller);
@@ -971,7 +969,7 @@ int cg_split_spec(const char *spec, char **controller, char **path) {
e = strchr(spec, ':');
if (!e) {
- if (!cg_controller_is_valid(spec, true))
+ if (!cg_controller_is_valid(spec))
return -EINVAL;
if (controller) {
@@ -994,7 +992,7 @@ int cg_split_spec(const char *spec, char **controller, char **path) {
t = strdup(normalize_controller(v));
if (!t)
return -ENOMEM;
- if (!cg_controller_is_valid(t, true)) {
+ if (!cg_controller_is_valid(t)) {
free(t);
return -EINVAL;
}
@@ -1610,17 +1608,15 @@ char *cg_unescape(const char *p) {
DIGITS LETTERS \
"_"
-bool cg_controller_is_valid(const char *p, bool allow_named) {
+bool cg_controller_is_valid(const char *p) {
const char *t, *s;
if (!p)
return false;
- if (allow_named) {
- s = startswith(p, "name=");
- if (s)
- p = s;
- }
+ s = startswith(p, "name=");
+ if (s)
+ p = s;
if (*p == 0 || *p == '_')
return false;
diff --git a/src/shared/cgroup-util.h b/src/basic/cgroup-util.h
index cbf7201370..fd72e9e5c5 100644
--- a/src/shared/cgroup-util.h
+++ b/src/basic/cgroup-util.h
@@ -122,7 +122,7 @@ int cg_path_decode_unit(const char *cgroup, char **unit);
char *cg_escape(const char *p);
char *cg_unescape(const char *p) _pure_;
-bool cg_controller_is_valid(const char *p, bool allow_named);
+bool cg_controller_is_valid(const char *p);
int cg_slice_to_path(const char *unit, char **ret);
diff --git a/src/shared/clock-util.c b/src/basic/clock-util.c
index e4e03df1e4..e4e03df1e4 100644
--- a/src/shared/clock-util.c
+++ b/src/basic/clock-util.c
diff --git a/src/shared/clock-util.h b/src/basic/clock-util.h
index 8c2d235430..8c2d235430 100644
--- a/src/shared/clock-util.h
+++ b/src/basic/clock-util.h
diff --git a/src/shared/conf-files.c b/src/basic/conf-files.c
index da8745b284..da8745b284 100644
--- a/src/shared/conf-files.c
+++ b/src/basic/conf-files.c
diff --git a/src/shared/conf-files.h b/src/basic/conf-files.h
index 3169a907f1..3169a907f1 100644
--- a/src/shared/conf-files.h
+++ b/src/basic/conf-files.h
diff --git a/src/shared/copy.c b/src/basic/copy.c
index 1282cb88be..1282cb88be 100644
--- a/src/shared/copy.c
+++ b/src/basic/copy.c
diff --git a/src/shared/copy.h b/src/basic/copy.h
index 8de0cfba32..8de0cfba32 100644
--- a/src/shared/copy.h
+++ b/src/basic/copy.h
diff --git a/src/shared/def.h b/src/basic/def.h
index a3d9fcf388..011c7c667e 100644
--- a/src/shared/def.h
+++ b/src/basic/def.h
@@ -35,7 +35,7 @@
* the watchdog pings will keep the loop busy. */
#define DEFAULT_EXIT_USEC (30*USEC_PER_SEC)
-#define SYSTEMD_CGROUP_CONTROLLER "name=systemd"
+#define SYSTEMD_CGROUP_CONTROLLER "systemd"
#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
#define SIGNALS_IGNORE SIGPIPE
diff --git a/src/shared/device-nodes.c b/src/basic/device-nodes.c
index 9d5af72d27..9d5af72d27 100644
--- a/src/shared/device-nodes.c
+++ b/src/basic/device-nodes.c
diff --git a/src/shared/device-nodes.h b/src/basic/device-nodes.h
index 04ba4897e5..04ba4897e5 100644
--- a/src/shared/device-nodes.h
+++ b/src/basic/device-nodes.h
diff --git a/src/shared/env-util.c b/src/basic/env-util.c
index ac7bbdc711..ac7bbdc711 100644
--- a/src/shared/env-util.c
+++ b/src/basic/env-util.c
diff --git a/src/shared/env-util.h b/src/basic/env-util.h
index 803aa61cad..803aa61cad 100644
--- a/src/shared/env-util.h
+++ b/src/basic/env-util.h
diff --git a/src/shared/errno-list.c b/src/basic/errno-list.c
index 34d1331486..34d1331486 100644
--- a/src/shared/errno-list.c
+++ b/src/basic/errno-list.c
diff --git a/src/shared/errno-list.h b/src/basic/errno-list.h
index ba533294e6..ba533294e6 100644
--- a/src/shared/errno-list.h
+++ b/src/basic/errno-list.h
diff --git a/src/shared/ether-addr-util.h b/src/basic/ether-addr-util.h
index 7033138788..7033138788 100644
--- a/src/shared/ether-addr-util.h
+++ b/src/basic/ether-addr-util.h
diff --git a/src/shared/exit-status.c b/src/basic/exit-status.c
index c09efdd2cb..c09efdd2cb 100644
--- a/src/shared/exit-status.c
+++ b/src/basic/exit-status.c
diff --git a/src/shared/exit-status.h b/src/basic/exit-status.h
index 7259cd1d18..7259cd1d18 100644
--- a/src/shared/exit-status.h
+++ b/src/basic/exit-status.h
diff --git a/src/shared/fdset.c b/src/basic/fdset.c
index 6101b628ec..6101b628ec 100644
--- a/src/shared/fdset.c
+++ b/src/basic/fdset.c
diff --git a/src/shared/fdset.h b/src/basic/fdset.h
index 340438d7c4..340438d7c4 100644
--- a/src/shared/fdset.h
+++ b/src/basic/fdset.h
diff --git a/src/shared/fileio-label.c b/src/basic/fileio-label.c
index bec988ca78..bec988ca78 100644
--- a/src/shared/fileio-label.c
+++ b/src/basic/fileio-label.c
diff --git a/src/shared/fileio-label.h b/src/basic/fileio-label.h
index 25fa351be2..25fa351be2 100644
--- a/src/shared/fileio-label.h
+++ b/src/basic/fileio-label.h
diff --git a/src/shared/fileio.c b/src/basic/fileio.c
index ff6b1a7ed7..ff6b1a7ed7 100644
--- a/src/shared/fileio.c
+++ b/src/basic/fileio.c
diff --git a/src/shared/fileio.h b/src/basic/fileio.h
index 5ae51c1e28..5ae51c1e28 100644
--- a/src/shared/fileio.h
+++ b/src/basic/fileio.h
diff --git a/src/shared/gunicode.c b/src/basic/gunicode.c
index d89a2f3ed9..d89a2f3ed9 100644
--- a/src/shared/gunicode.c
+++ b/src/basic/gunicode.c
diff --git a/src/shared/gunicode.h b/src/basic/gunicode.h
index e70818fdd7..e70818fdd7 100644
--- a/src/shared/gunicode.h
+++ b/src/basic/gunicode.h
diff --git a/src/shared/hashmap.c b/src/basic/hashmap.c
index 20d599d04b..20d599d04b 100644
--- a/src/shared/hashmap.c
+++ b/src/basic/hashmap.c
diff --git a/src/shared/hashmap.h b/src/basic/hashmap.h
index a03ee5812a..a03ee5812a 100644
--- a/src/shared/hashmap.h
+++ b/src/basic/hashmap.h
diff --git a/src/shared/hostname-util.c b/src/basic/hostname-util.c
index e336f269fa..e336f269fa 100644
--- a/src/shared/hostname-util.c
+++ b/src/basic/hostname-util.c
diff --git a/src/shared/hostname-util.h b/src/basic/hostname-util.h
index 0c4763cf5a..0c4763cf5a 100644
--- a/src/shared/hostname-util.h
+++ b/src/basic/hostname-util.h
diff --git a/src/shared/in-addr-util.c b/src/basic/in-addr-util.c
index d88864b598..d88864b598 100644
--- a/src/shared/in-addr-util.c
+++ b/src/basic/in-addr-util.c
diff --git a/src/shared/in-addr-util.h b/src/basic/in-addr-util.h
index 51af08868c..51af08868c 100644
--- a/src/shared/in-addr-util.h
+++ b/src/basic/in-addr-util.h
diff --git a/src/shared/ioprio.h b/src/basic/ioprio.h
index e5c71d0043..e5c71d0043 100644
--- a/src/shared/ioprio.h
+++ b/src/basic/ioprio.h
diff --git a/src/shared/json.c b/src/basic/json.c
index be40a0d203..be40a0d203 100644
--- a/src/shared/json.c
+++ b/src/basic/json.c
diff --git a/src/shared/json.h b/src/basic/json.h
index e0b4d810b5..e0b4d810b5 100644
--- a/src/shared/json.h
+++ b/src/basic/json.h
diff --git a/src/shared/label.c b/src/basic/label.c
index 82f10b21bd..82f10b21bd 100644
--- a/src/shared/label.c
+++ b/src/basic/label.c
diff --git a/src/shared/label.h b/src/basic/label.h
index 8070bcb021..8070bcb021 100644
--- a/src/shared/label.h
+++ b/src/basic/label.h
diff --git a/src/shared/linux/Makefile b/src/basic/linux/Makefile
index d0b0e8e008..d0b0e8e008 120000
--- a/src/shared/linux/Makefile
+++ b/src/basic/linux/Makefile
diff --git a/src/shared/list.h b/src/basic/list.h
index 2939216adb..2939216adb 100644
--- a/src/shared/list.h
+++ b/src/basic/list.h
diff --git a/src/shared/locale-util.c b/src/basic/locale-util.c
index 61db9a8125..61db9a8125 100644
--- a/src/shared/locale-util.c
+++ b/src/basic/locale-util.c
diff --git a/src/shared/locale-util.h b/src/basic/locale-util.h
index e48aa3d9af..e48aa3d9af 100644
--- a/src/shared/locale-util.h
+++ b/src/basic/locale-util.h
diff --git a/src/shared/lockfile-util.c b/src/basic/lockfile-util.c
index 05e16d1caa..05e16d1caa 100644
--- a/src/shared/lockfile-util.c
+++ b/src/basic/lockfile-util.c
diff --git a/src/shared/lockfile-util.h b/src/basic/lockfile-util.h
index 38d47094bd..38d47094bd 100644
--- a/src/shared/lockfile-util.h
+++ b/src/basic/lockfile-util.h
diff --git a/src/shared/log.c b/src/basic/log.c
index b96afc4de4..b96afc4de4 100644
--- a/src/shared/log.c
+++ b/src/basic/log.c
diff --git a/src/shared/log.h b/src/basic/log.h
index 569762d083..569762d083 100644
--- a/src/shared/log.h
+++ b/src/basic/log.h
diff --git a/src/shared/login-shared.c b/src/basic/login-util.c
index 64650a9134..e25437f0f4 100644
--- a/src/shared/login-shared.c
+++ b/src/basic/login-util.c
@@ -19,7 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include "login-shared.h"
+#include "login-util.h"
#include "def.h"
bool session_id_valid(const char *id) {
diff --git a/src/shared/login-shared.h b/src/basic/login-util.h
index a79f20c1b1..a79f20c1b1 100644
--- a/src/shared/login-shared.h
+++ b/src/basic/login-util.h
diff --git a/src/shared/macro.h b/src/basic/macro.h
index 7ae1ed80b6..cc1c9e73c0 100644
--- a/src/shared/macro.h
+++ b/src/basic/macro.h
@@ -467,4 +467,7 @@ do { \
} \
struct __useless_struct_to_allow_trailing_semicolon__
+#define CMSG_FOREACH(cmsg, mh) \
+ for ((cmsg) = CMSG_FIRSTHDR(mh); (cmsg); (cmsg) = CMSG_NXTHDR((mh), (cmsg)))
+
#include "log.h"
diff --git a/src/shared/memfd-util.c b/src/basic/memfd-util.c
index e99a738e1f..e99a738e1f 100644
--- a/src/shared/memfd-util.c
+++ b/src/basic/memfd-util.c
diff --git a/src/shared/memfd-util.h b/src/basic/memfd-util.h
index 3ed551fb37..3ed551fb37 100644
--- a/src/shared/memfd-util.h
+++ b/src/basic/memfd-util.h
diff --git a/src/shared/mempool.c b/src/basic/mempool.c
index d5d98d8829..d5d98d8829 100644
--- a/src/shared/mempool.c
+++ b/src/basic/mempool.c
diff --git a/src/shared/mempool.h b/src/basic/mempool.h
index 42f473bee1..42f473bee1 100644
--- a/src/shared/mempool.h
+++ b/src/basic/mempool.h
diff --git a/src/shared/missing.h b/src/basic/missing.h
index be7f6186fc..be7f6186fc 100644
--- a/src/shared/missing.h
+++ b/src/basic/missing.h
diff --git a/src/shared/mkdir-label.c b/src/basic/mkdir-label.c
index 76bbc1edda..76bbc1edda 100644
--- a/src/shared/mkdir-label.c
+++ b/src/basic/mkdir-label.c
diff --git a/src/shared/mkdir.c b/src/basic/mkdir.c
index 7ee4546988..7ee4546988 100644
--- a/src/shared/mkdir.c
+++ b/src/basic/mkdir.c
diff --git a/src/shared/mkdir.h b/src/basic/mkdir.h
index 2392d1fd1b..2392d1fd1b 100644
--- a/src/shared/mkdir.h
+++ b/src/basic/mkdir.h
diff --git a/src/shared/ordered-set.h b/src/basic/ordered-set.h
index 766a1f2e83..766a1f2e83 100644
--- a/src/shared/ordered-set.h
+++ b/src/basic/ordered-set.h
diff --git a/src/shared/path-util.c b/src/basic/path-util.c
index 537705446a..537705446a 100644
--- a/src/shared/path-util.c
+++ b/src/basic/path-util.c
diff --git a/src/shared/path-util.h b/src/basic/path-util.h
index 1eac89c51b..1eac89c51b 100644
--- a/src/shared/path-util.h
+++ b/src/basic/path-util.h
diff --git a/src/shared/prioq.c b/src/basic/prioq.c
index b89888be0e..b89888be0e 100644
--- a/src/shared/prioq.c
+++ b/src/basic/prioq.c
diff --git a/src/shared/prioq.h b/src/basic/prioq.h
index 1c044b135c..1c044b135c 100644
--- a/src/shared/prioq.h
+++ b/src/basic/prioq.h
diff --git a/src/shared/process-util.c b/src/basic/process-util.c
index cfc876567d..cfc876567d 100644
--- a/src/shared/process-util.c
+++ b/src/basic/process-util.c
diff --git a/src/shared/process-util.h b/src/basic/process-util.h
index 07431d043b..07431d043b 100644
--- a/src/shared/process-util.h
+++ b/src/basic/process-util.h
diff --git a/src/shared/random-util.c b/src/basic/random-util.c
index b230044f50..b230044f50 100644
--- a/src/shared/random-util.c
+++ b/src/basic/random-util.c
diff --git a/src/shared/random-util.h b/src/basic/random-util.h
index f7862c8c8b..f7862c8c8b 100644
--- a/src/shared/random-util.h
+++ b/src/basic/random-util.h
diff --git a/src/shared/ratelimit.c b/src/basic/ratelimit.c
index 81fc9c19ff..81fc9c19ff 100644
--- a/src/shared/ratelimit.c
+++ b/src/basic/ratelimit.c
diff --git a/src/shared/ratelimit.h b/src/basic/ratelimit.h
index 58efca7df1..58efca7df1 100644
--- a/src/shared/ratelimit.h
+++ b/src/basic/ratelimit.h
diff --git a/src/shared/refcnt.h b/src/basic/refcnt.h
index 0502c20a2e..0502c20a2e 100644
--- a/src/shared/refcnt.h
+++ b/src/basic/refcnt.h
diff --git a/src/shared/replace-var.c b/src/basic/replace-var.c
index 478fc43a38..478fc43a38 100644
--- a/src/shared/replace-var.c
+++ b/src/basic/replace-var.c
diff --git a/src/shared/replace-var.h b/src/basic/replace-var.h
index 7eaee93a3e..7eaee93a3e 100644
--- a/src/shared/replace-var.h
+++ b/src/basic/replace-var.h
diff --git a/src/shared/ring.c b/src/basic/ring.c
index 6814918464..6814918464 100644
--- a/src/shared/ring.c
+++ b/src/basic/ring.c
diff --git a/src/shared/ring.h b/src/basic/ring.h
index a7c44d1b56..a7c44d1b56 100644
--- a/src/shared/ring.h
+++ b/src/basic/ring.h
diff --git a/src/shared/rm-rf.c b/src/basic/rm-rf.c
index bafd483be2..bafd483be2 100644
--- a/src/shared/rm-rf.c
+++ b/src/basic/rm-rf.c
diff --git a/src/shared/rm-rf.h b/src/basic/rm-rf.h
index 96579eb182..96579eb182 100644
--- a/src/shared/rm-rf.h
+++ b/src/basic/rm-rf.h
diff --git a/src/shared/securebits.h b/src/basic/securebits.h
index 98fbe0d433..98fbe0d433 100644
--- a/src/shared/securebits.h
+++ b/src/basic/securebits.h
diff --git a/src/shared/selinux-util.c b/src/basic/selinux-util.c
index 7c58985cd2..7c58985cd2 100644
--- a/src/shared/selinux-util.c
+++ b/src/basic/selinux-util.c
diff --git a/src/shared/selinux-util.h b/src/basic/selinux-util.h
index 8467185291..8467185291 100644
--- a/src/shared/selinux-util.h
+++ b/src/basic/selinux-util.h
diff --git a/src/shared/set.h b/src/basic/set.h
index 4dffecd39d..4dffecd39d 100644
--- a/src/shared/set.h
+++ b/src/basic/set.h
diff --git a/src/shared/sigbus.c b/src/basic/sigbus.c
index 0108603fe8..0108603fe8 100644
--- a/src/shared/sigbus.c
+++ b/src/basic/sigbus.c
diff --git a/src/shared/sigbus.h b/src/basic/sigbus.h
index 23edc6d9cb..23edc6d9cb 100644
--- a/src/shared/sigbus.h
+++ b/src/basic/sigbus.h
diff --git a/src/shared/signal-util.c b/src/basic/signal-util.c
index 84cf42b285..84cf42b285 100644
--- a/src/shared/signal-util.c
+++ b/src/basic/signal-util.c
diff --git a/src/shared/signal-util.h b/src/basic/signal-util.h
index 9dc8a28726..9dc8a28726 100644
--- a/src/shared/signal-util.h
+++ b/src/basic/signal-util.h
diff --git a/src/shared/siphash24.c b/src/basic/siphash24.c
index f68bd283a1..f68bd283a1 100644
--- a/src/shared/siphash24.c
+++ b/src/basic/siphash24.c
diff --git a/src/shared/siphash24.h b/src/basic/siphash24.h
index 62e1168a79..62e1168a79 100644
--- a/src/shared/siphash24.h
+++ b/src/basic/siphash24.h
diff --git a/src/shared/smack-util.c b/src/basic/smack-util.c
index 2e24b1ea99..2e24b1ea99 100644
--- a/src/shared/smack-util.c
+++ b/src/basic/smack-util.c
diff --git a/src/shared/smack-util.h b/src/basic/smack-util.h
index 50f55b1f4b..50f55b1f4b 100644
--- a/src/shared/smack-util.h
+++ b/src/basic/smack-util.h
diff --git a/src/shared/socket-label.c b/src/basic/socket-label.c
index cbe3ff216e..cbe3ff216e 100644
--- a/src/shared/socket-label.c
+++ b/src/basic/socket-label.c
diff --git a/src/shared/socket-util.c b/src/basic/socket-util.c
index e8bb10dc9b..e8bb10dc9b 100644
--- a/src/shared/socket-util.c
+++ b/src/basic/socket-util.c
diff --git a/src/shared/socket-util.h b/src/basic/socket-util.h
index 538cf59174..538cf59174 100644
--- a/src/shared/socket-util.h
+++ b/src/basic/socket-util.h
diff --git a/src/shared/sparse-endian.h b/src/basic/sparse-endian.h
index c913fda8c5..c913fda8c5 100644
--- a/src/shared/sparse-endian.h
+++ b/src/basic/sparse-endian.h
diff --git a/src/shared/special.h b/src/basic/special.h
index e51310eb6d..e51310eb6d 100644
--- a/src/shared/special.h
+++ b/src/basic/special.h
diff --git a/src/shared/strbuf.c b/src/basic/strbuf.c
index 01a076c2ba..01a076c2ba 100644
--- a/src/shared/strbuf.c
+++ b/src/basic/strbuf.c
diff --git a/src/shared/strbuf.h b/src/basic/strbuf.h
index fbc4e5f2a1..fbc4e5f2a1 100644
--- a/src/shared/strbuf.h
+++ b/src/basic/strbuf.h
diff --git a/src/shared/strv.c b/src/basic/strv.c
index d44a72fc48..d44a72fc48 100644
--- a/src/shared/strv.c
+++ b/src/basic/strv.c
diff --git a/src/shared/strv.h b/src/basic/strv.h
index 22f8f98fda..22f8f98fda 100644
--- a/src/shared/strv.h
+++ b/src/basic/strv.h
diff --git a/src/shared/strxcpyx.c b/src/basic/strxcpyx.c
index 6542c0abf5..6542c0abf5 100644
--- a/src/shared/strxcpyx.c
+++ b/src/basic/strxcpyx.c
diff --git a/src/shared/strxcpyx.h b/src/basic/strxcpyx.h
index ccc7e52f37..ccc7e52f37 100644
--- a/src/shared/strxcpyx.h
+++ b/src/basic/strxcpyx.h
diff --git a/src/shared/terminal-util.c b/src/basic/terminal-util.c
index 042b88f222..042b88f222 100644
--- a/src/shared/terminal-util.c
+++ b/src/basic/terminal-util.c
diff --git a/src/shared/terminal-util.h b/src/basic/terminal-util.h
index 188714f228..188714f228 100644
--- a/src/shared/terminal-util.h
+++ b/src/basic/terminal-util.h
diff --git a/src/shared/time-util.c b/src/basic/time-util.c
index 12f1b193be..12f1b193be 100644
--- a/src/shared/time-util.c
+++ b/src/basic/time-util.c
diff --git a/src/shared/time-util.h b/src/basic/time-util.h
index 7a64d454a0..7a64d454a0 100644
--- a/src/shared/time-util.h
+++ b/src/basic/time-util.h
diff --git a/src/shared/unaligned.h b/src/basic/unaligned.h
index d6181dd9a9..d6181dd9a9 100644
--- a/src/shared/unaligned.h
+++ b/src/basic/unaligned.h
diff --git a/src/shared/unit-name.c b/src/basic/unit-name.c
index bf52463d81..bf52463d81 100644
--- a/src/shared/unit-name.c
+++ b/src/basic/unit-name.c
diff --git a/src/shared/unit-name.h b/src/basic/unit-name.h
index b2043d0870..b2043d0870 100644
--- a/src/shared/unit-name.h
+++ b/src/basic/unit-name.h
diff --git a/src/shared/utf8.c b/src/basic/utf8.c
index 800884ffee..800884ffee 100644
--- a/src/shared/utf8.c
+++ b/src/basic/utf8.c
diff --git a/src/shared/utf8.h b/src/basic/utf8.h
index e745649f06..e745649f06 100644
--- a/src/shared/utf8.h
+++ b/src/basic/utf8.h
diff --git a/src/shared/util.c b/src/basic/util.c
index a20e7bb2ef..6f6906f877 100644
--- a/src/shared/util.c
+++ b/src/basic/util.c
@@ -5520,7 +5520,7 @@ int openpt_in_namespace(pid_t pid, int flags) {
if (recvmsg(pair[0], &mh, MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) < 0)
return -errno;
- for (cmsg = CMSG_FIRSTHDR(&mh); cmsg; cmsg = CMSG_NXTHDR(&mh, cmsg))
+ CMSG_FOREACH(cmsg, &mh)
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
int *fds;
unsigned n_fds;
@@ -5908,7 +5908,7 @@ void cmsg_close_all(struct msghdr *mh) {
assert(mh);
- for (cmsg = CMSG_FIRSTHDR(mh); cmsg; cmsg = CMSG_NXTHDR(mh, cmsg))
+ CMSG_FOREACH(cmsg, mh)
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS)
close_many((int*) CMSG_DATA(cmsg), (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(int));
}
diff --git a/src/shared/util.h b/src/basic/util.h
index 467ae234a0..467ae234a0 100644
--- a/src/shared/util.h
+++ b/src/basic/util.h
diff --git a/src/shared/verbs.c b/src/basic/verbs.c
index c7beccc2dc..c7beccc2dc 100644
--- a/src/shared/verbs.c
+++ b/src/basic/verbs.c
diff --git a/src/shared/verbs.h b/src/basic/verbs.h
index d59e4d59b8..d59e4d59b8 100644
--- a/src/shared/verbs.h
+++ b/src/basic/verbs.h
diff --git a/src/shared/virt.c b/src/basic/virt.c
index 1299a75ed5..1299a75ed5 100644
--- a/src/shared/virt.c
+++ b/src/basic/virt.c
diff --git a/src/shared/virt.h b/src/basic/virt.h
index 7194ab2bf7..7194ab2bf7 100644
--- a/src/shared/virt.h
+++ b/src/basic/virt.h
diff --git a/src/shared/xml.c b/src/basic/xml.c
index 15c629b188..15c629b188 100644
--- a/src/shared/xml.c
+++ b/src/basic/xml.c
diff --git a/src/shared/xml.h b/src/basic/xml.h
index b256b0ba10..b256b0ba10 100644
--- a/src/shared/xml.h
+++ b/src/basic/xml.h
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index a390cf3256..d630e35882 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -60,8 +60,9 @@ typedef struct Group {
} Group;
static unsigned arg_depth = 3;
-static unsigned arg_iterations = 0;
+static unsigned arg_iterations = (unsigned)-1;
static bool arg_batch = false;
+static bool arg_raw = false;
static usec_t arg_delay = 1*USEC_PER_SEC;
static enum {
@@ -96,6 +97,16 @@ static void group_hashmap_free(Hashmap *h) {
hashmap_free(h);
}
+static const char *maybe_format_bytes(char *buf, size_t l, bool is_valid, off_t t) {
+ if (!is_valid)
+ return "-";
+ if (arg_raw) {
+ snprintf(buf, l, "%jd", t);
+ return buf;
+ }
+ return format_bytes(buf, l, t);
+}
+
static int process(const char *controller, const char *path, Hashmap *a, Hashmap *b, unsigned iteration) {
Group *g;
int r;
@@ -270,11 +281,10 @@ static int process(const char *controller, const char *path, Hashmap *a, Hashmap
yr = rd - g->io_input;
yw = wr - g->io_output;
- if (yr > 0 || yw > 0) {
+ if (g->io_input > 0 || g->io_output > 0) {
g->io_input_bps = (yr * 1000000000ULL) / x;
g->io_output_bps = (yw * 1000000000ULL) / x;
g->io_valid = true;
-
}
}
@@ -532,18 +542,9 @@ static int display(Hashmap *a) {
} else
printf(" %*s", maxtcpu, format_timespan(buffer, sizeof(buffer), (nsec_t) (g->cpu_usage / NSEC_PER_USEC), 0));
- if (g->memory_valid)
- printf(" %8s", format_bytes(buffer, sizeof(buffer), g->memory));
- else
- fputs(" -", stdout);
-
- if (g->io_valid) {
- printf(" %8s",
- format_bytes(buffer, sizeof(buffer), g->io_input_bps));
- printf(" %8s",
- format_bytes(buffer, sizeof(buffer), g->io_output_bps));
- } else
- fputs(" - -", stdout);
+ printf(" %8s", maybe_format_bytes(buffer, sizeof(buffer), g->memory_valid, g->memory));
+ printf(" %8s", maybe_format_bytes(buffer, sizeof(buffer), g->io_valid, g->io_input_bps));
+ printf(" %8s", maybe_format_bytes(buffer, sizeof(buffer), g->io_valid, g->io_output_bps));
putchar('\n');
}
@@ -561,6 +562,7 @@ static void help(void) {
" -c Order by CPU load\n"
" -m Order by memory load\n"
" -i Order by IO load\n"
+ " -r --raw Provide raw (not human-readable) numbers\n"
" --cpu[=TYPE] Show CPU usage as time or percentage (default)\n"
" -d --delay=DELAY Delay between updates\n"
" -n --iterations=N Run for N iterations before exiting\n"
@@ -583,6 +585,7 @@ static int parse_argv(int argc, char *argv[]) {
{ "delay", required_argument, NULL, 'd' },
{ "iterations", required_argument, NULL, 'n' },
{ "batch", no_argument, NULL, 'b' },
+ { "raw", no_argument, NULL, 'r' },
{ "depth", required_argument, NULL, ARG_DEPTH },
{ "cpu", optional_argument, NULL, ARG_CPU_TYPE},
{}
@@ -594,7 +597,7 @@ static int parse_argv(int argc, char *argv[]) {
assert(argc >= 1);
assert(argv);
- while ((c = getopt_long(argc, argv, "hptcmin:bd:", options, NULL)) >= 0)
+ while ((c = getopt_long(argc, argv, "hptcmin:brd:", options, NULL)) >= 0)
switch (c) {
@@ -649,6 +652,10 @@ static int parse_argv(int argc, char *argv[]) {
arg_batch = true;
break;
+ case 'r':
+ arg_raw = true;
+ break;
+
case 'p':
arg_order = ORDER_PATH;
break;
@@ -707,8 +714,8 @@ int main(int argc, char *argv[]) {
signal(SIGWINCH, columns_lines_cache_reset);
- if (!on_tty())
- arg_iterations = 1;
+ if (arg_iterations == (unsigned)-1)
+ arg_iterations = on_tty() ? 0 : 1;
while (!quit) {
Hashmap *c;
@@ -741,6 +748,10 @@ int main(int argc, char *argv[]) {
if (arg_iterations && iteration >= arg_iterations)
break;
+ if (!on_tty()) /* non-TTY: Empty newline as delimiter between polls */
+ fputs("\n", stdout);
+ fflush(stdout);
+
if (arg_batch) {
usleep(last_refresh + arg_delay - t);
} else {
@@ -754,8 +765,10 @@ int main(int argc, char *argv[]) {
}
}
- fputs("\r \r", stdout);
- fflush(stdout);
+ if (on_tty()) { /* TTY: Clear any user keystroke */
+ fputs("\r \r", stdout);
+ fflush(stdout);
+ }
if (arg_batch)
continue;
diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c
index cf543c81a3..f5584b6b14 100644
--- a/src/core/kmod-setup.c
+++ b/src/core/kmod-setup.c
@@ -117,9 +117,12 @@ int kmod_setup(void) {
log_info("Inserted module '%s'", kmod_module_get_name(mod));
else if (r == KMOD_PROBE_APPLY_BLACKLIST)
log_info("Module '%s' is blacklisted", kmod_module_get_name(mod));
- else
- log_full((kmod_table[i].warn_if_unavailable || (r < 0 && r != -ENOENT)) ? LOG_ERR : LOG_DEBUG,
- "Failed to insert module '%s'", kmod_module_get_name(mod));
+ else {
+ bool print_warning = kmod_table[i].warn_if_unavailable || (r < 0 && r != -ENOSYS);
+
+ log_full_errno(print_warning ? LOG_WARNING : LOG_DEBUG, r,
+ "Failed to insert module '%s': %m", kmod_module_get_name(mod));
+ }
kmod_module_unref(mod);
}
diff --git a/src/core/manager.c b/src/core/manager.c
index 564fb5d579..eb80dd1b46 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1546,7 +1546,7 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t
return -errno;
}
- for (cmsg = CMSG_FIRSTHDR(&msghdr); cmsg; cmsg = CMSG_NXTHDR(&msghdr, cmsg)) {
+ CMSG_FOREACH(cmsg, &msghdr) {
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
fd_array = (int*) CMSG_DATA(cmsg);
diff --git a/src/core/namespace.c b/src/core/namespace.c
index 01a817bf23..045321e1d4 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -696,12 +696,11 @@ int setup_netns(int netns_storage_socket[2]) {
} else {
/* Yay, found something, so let's join the namespace */
- for (cmsg = CMSG_FIRSTHDR(&mh); cmsg; cmsg = CMSG_NXTHDR(&mh, cmsg)) {
+ CMSG_FOREACH(cmsg, &mh)
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
assert(cmsg->cmsg_len == CMSG_LEN(sizeof(int)));
netns = *(int*) CMSG_DATA(cmsg);
}
- }
if (setns(netns, CLONE_NEWNET) < 0) {
r = -errno;
diff --git a/src/core/service.c b/src/core/service.c
index c7e65772ea..71252e29e2 100644
--- a/src/core/service.c
+++ b/src/core/service.c
@@ -2008,6 +2008,7 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) {
unit_serialize_item_format(u, f, "main-pid", PID_FMT, s->main_pid);
unit_serialize_item(u, f, "main-pid-known", yes_no(s->main_pid_known));
+ unit_serialize_item(u, f, "bus-name-good", yes_no(s->bus_name_good));
if (s->status_text) {
_cleanup_free_ char *c = NULL;
@@ -2131,6 +2132,14 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
log_unit_debug(u, "Failed to parse main-pid-known value: %s", value);
else
s->main_pid_known = b;
+ } else if (streq(key, "bus-name-good")) {
+ int b;
+
+ b = parse_boolean(value);
+ if (b < 0)
+ log_unit_debug(u, "Failed to parse bus-name-good value: %s", value);
+ else
+ s->bus_name_good = b;
} else if (streq(key, "status-text")) {
char *t;
diff --git a/src/core/unit.c b/src/core/unit.c
index e380276d49..7bb2afc9f2 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2596,6 +2596,7 @@ int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs) {
if (u->cgroup_path)
unit_serialize_item(u, f, "cgroup", u->cgroup_path);
+ unit_serialize_item(u, f, "cgroup-realized", yes_no(u->cgroup_realized));
if (serialize_jobs) {
if (u->job) {
@@ -2806,6 +2807,16 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) {
log_unit_debug_errno(u, r, "Failed to set cgroup path %s, ignoring: %m", v);
continue;
+ } else if (streq(l, "cgroup-realized")) {
+ int b;
+
+ b = parse_boolean(v);
+ if (b < 0)
+ log_unit_debug(u, "Failed to parse cgroup-realized bool %s, ignoring.", v);
+ else
+ u->cgroup_realized = b;
+
+ continue;
}
if (unit_can_serialize(u)) {
diff --git a/src/import/importd.c b/src/import/importd.c
index e2df44ad26..05a619ac0c 100644
--- a/src/import/importd.c
+++ b/src/import/importd.c
@@ -599,7 +599,7 @@ static int manager_on_notify(sd_event_source *s, int fd, uint32_t revents, void
cmsg_close_all(&msghdr);
- for (cmsg = CMSG_FIRSTHDR(&msghdr); cmsg; cmsg = CMSG_NXTHDR(&msghdr, cmsg)) {
+ CMSG_FOREACH(cmsg, &msghdr) {
if (cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_CREDENTIALS &&
cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred))) {
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index 3353024f4e..d0d670f36e 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -1104,6 +1104,42 @@ finish:
int server_process_datagram(sd_event_source *es, int fd, uint32_t revents, void *userdata) {
Server *s = userdata;
+ struct ucred *ucred = NULL;
+ struct timeval *tv = NULL;
+ struct cmsghdr *cmsg;
+ char *label = NULL;
+ size_t label_len = 0, m;
+ struct iovec iovec;
+ ssize_t n;
+ int *fds = NULL, v = 0;
+ unsigned n_fds = 0;
+
+ union {
+ struct cmsghdr cmsghdr;
+
+ /* We use NAME_MAX space for the SELinux label
+ * here. The kernel currently enforces no
+ * limit, but according to suggestions from
+ * the SELinux people this will change and it
+ * will probably be identical to NAME_MAX. For
+ * now we use that, but this should be updated
+ * one day when the final limit is known. */
+ uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) +
+ CMSG_SPACE(sizeof(struct timeval)) +
+ CMSG_SPACE(sizeof(int)) + /* fd */
+ CMSG_SPACE(NAME_MAX)]; /* selinux label */
+ } control = {};
+
+ union sockaddr_union sa = {};
+
+ struct msghdr msghdr = {
+ .msg_iov = &iovec,
+ .msg_iovlen = 1,
+ .msg_control = &control,
+ .msg_controllen = sizeof(control),
+ .msg_name = &sa,
+ .msg_namelen = sizeof(sa),
+ };
assert(s);
assert(fd == s->native_fd || fd == s->syslog_fd || fd == s->audit_fd);
@@ -1113,119 +1149,79 @@ int server_process_datagram(sd_event_source *es, int fd, uint32_t revents, void
return -EIO;
}
- for (;;) {
- struct ucred *ucred = NULL;
- struct timeval *tv = NULL;
- struct cmsghdr *cmsg;
- char *label = NULL;
- size_t label_len = 0;
- struct iovec iovec;
-
- union {
- struct cmsghdr cmsghdr;
-
- /* We use NAME_MAX space for the SELinux label
- * here. The kernel currently enforces no
- * limit, but according to suggestions from
- * the SELinux people this will change and it
- * will probably be identical to NAME_MAX. For
- * now we use that, but this should be updated
- * one day when the final limit is known. */
- uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) +
- CMSG_SPACE(sizeof(struct timeval)) +
- CMSG_SPACE(sizeof(int)) + /* fd */
- CMSG_SPACE(NAME_MAX)]; /* selinux label */
- } control = {};
- union sockaddr_union sa = {};
- struct msghdr msghdr = {
- .msg_iov = &iovec,
- .msg_iovlen = 1,
- .msg_control = &control,
- .msg_controllen = sizeof(control),
- .msg_name = &sa,
- .msg_namelen = sizeof(sa),
- };
-
- ssize_t n;
- int *fds = NULL;
- unsigned n_fds = 0;
- int v = 0;
- size_t m;
-
- /* Try to get the right size, if we can. (Not all
- * sockets support SIOCINQ, hence we just try, but
- * don't rely on it. */
- (void) ioctl(fd, SIOCINQ, &v);
-
- /* Fix it up, if it is too small. We use the same fixed value as auditd here. Awful! */
- m = PAGE_ALIGN(MAX3((size_t) v + 1,
- (size_t) LINE_MAX,
- ALIGN(sizeof(struct nlmsghdr)) + ALIGN((size_t) MAX_AUDIT_MESSAGE_LENGTH)) + 1);
-
- if (!GREEDY_REALLOC(s->buffer, s->buffer_size, m))
- return log_oom();
-
- iovec.iov_base = s->buffer;
- iovec.iov_len = s->buffer_size - 1; /* Leave room for trailing NUL we add later */
-
- n = recvmsg(fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC);
- if (n < 0) {
- if (errno == EINTR || errno == EAGAIN)
- return 0;
-
- log_error_errno(errno, "recvmsg() failed: %m");
- return -errno;
- }
+ /* Try to get the right size, if we can. (Not all
+ * sockets support SIOCINQ, hence we just try, but
+ * don't rely on it. */
+ (void) ioctl(fd, SIOCINQ, &v);
- for (cmsg = CMSG_FIRSTHDR(&msghdr); cmsg; cmsg = CMSG_NXTHDR(&msghdr, cmsg)) {
-
- if (cmsg->cmsg_level == SOL_SOCKET &&
- cmsg->cmsg_type == SCM_CREDENTIALS &&
- cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred)))
- ucred = (struct ucred*) CMSG_DATA(cmsg);
- else if (cmsg->cmsg_level == SOL_SOCKET &&
- cmsg->cmsg_type == SCM_SECURITY) {
- label = (char*) CMSG_DATA(cmsg);
- label_len = cmsg->cmsg_len - CMSG_LEN(0);
- } else if (cmsg->cmsg_level == SOL_SOCKET &&
- cmsg->cmsg_type == SO_TIMESTAMP &&
- cmsg->cmsg_len == CMSG_LEN(sizeof(struct timeval)))
- tv = (struct timeval*) CMSG_DATA(cmsg);
- else if (cmsg->cmsg_level == SOL_SOCKET &&
- cmsg->cmsg_type == SCM_RIGHTS) {
- fds = (int*) CMSG_DATA(cmsg);
- n_fds = (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(int);
- }
- }
+ /* Fix it up, if it is too small. We use the same fixed value as auditd here. Awful! */
+ m = PAGE_ALIGN(MAX3((size_t) v + 1,
+ (size_t) LINE_MAX,
+ ALIGN(sizeof(struct nlmsghdr)) + ALIGN((size_t) MAX_AUDIT_MESSAGE_LENGTH)) + 1);
- /* And a trailing NUL, just in case */
- s->buffer[n] = 0;
+ if (!GREEDY_REALLOC(s->buffer, s->buffer_size, m))
+ return log_oom();
- if (fd == s->syslog_fd) {
- if (n > 0 && n_fds == 0)
- server_process_syslog_message(s, strstrip(s->buffer), ucred, tv, label, label_len);
- else if (n_fds > 0)
- log_warning("Got file descriptors via syslog socket. Ignoring.");
+ iovec.iov_base = s->buffer;
+ iovec.iov_len = s->buffer_size - 1; /* Leave room for trailing NUL we add later */
- } else if (fd == s->native_fd) {
- if (n > 0 && n_fds == 0)
- server_process_native_message(s, s->buffer, n, ucred, tv, label, label_len);
- else if (n == 0 && n_fds == 1)
- server_process_native_file(s, fds[0], ucred, tv, label, label_len);
- else if (n_fds > 0)
- log_warning("Got too many file descriptors via native socket. Ignoring.");
+ n = recvmsg(fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC);
+ if (n < 0) {
+ if (errno == EINTR || errno == EAGAIN)
+ return 0;
- } else {
- assert(fd == s->audit_fd);
+ return log_error_errno(errno, "recvmsg() failed: %m");
+ }
- if (n > 0 && n_fds == 0)
- server_process_audit_message(s, s->buffer, n, ucred, &sa, msghdr.msg_namelen);
- else if (n_fds > 0)
- log_warning("Got file descriptors via audit socket. Ignoring.");
+ CMSG_FOREACH(cmsg, &msghdr) {
+
+ if (cmsg->cmsg_level == SOL_SOCKET &&
+ cmsg->cmsg_type == SCM_CREDENTIALS &&
+ cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred)))
+ ucred = (struct ucred*) CMSG_DATA(cmsg);
+ else if (cmsg->cmsg_level == SOL_SOCKET &&
+ cmsg->cmsg_type == SCM_SECURITY) {
+ label = (char*) CMSG_DATA(cmsg);
+ label_len = cmsg->cmsg_len - CMSG_LEN(0);
+ } else if (cmsg->cmsg_level == SOL_SOCKET &&
+ cmsg->cmsg_type == SO_TIMESTAMP &&
+ cmsg->cmsg_len == CMSG_LEN(sizeof(struct timeval)))
+ tv = (struct timeval*) CMSG_DATA(cmsg);
+ else if (cmsg->cmsg_level == SOL_SOCKET &&
+ cmsg->cmsg_type == SCM_RIGHTS) {
+ fds = (int*) CMSG_DATA(cmsg);
+ n_fds = (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(int);
}
+ }
+
+ /* And a trailing NUL, just in case */
+ s->buffer[n] = 0;
+
+ if (fd == s->syslog_fd) {
+ if (n > 0 && n_fds == 0)
+ server_process_syslog_message(s, strstrip(s->buffer), ucred, tv, label, label_len);
+ else if (n_fds > 0)
+ log_warning("Got file descriptors via syslog socket. Ignoring.");
+
+ } else if (fd == s->native_fd) {
+ if (n > 0 && n_fds == 0)
+ server_process_native_message(s, s->buffer, n, ucred, tv, label, label_len);
+ else if (n == 0 && n_fds == 1)
+ server_process_native_file(s, fds[0], ucred, tv, label, label_len);
+ else if (n_fds > 0)
+ log_warning("Got too many file descriptors via native socket. Ignoring.");
- close_many(fds, n_fds);
+ } else {
+ assert(fd == s->audit_fd);
+
+ if (n > 0 && n_fds == 0)
+ server_process_audit_message(s, s->buffer, n, ucred, &sa, msghdr.msg_namelen);
+ else if (n_fds > 0)
+ log_warning("Got file descriptors via audit socket. Ignoring.");
}
+
+ close_many(fds, n_fds);
+ return 0;
}
static int dispatch_sigusr1(sd_event_source *es, const struct signalfd_siginfo *si, void *userdata) {
diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
index 90b7530946..ffba451955 100644
--- a/src/journal/journald-syslog.c
+++ b/src/journal/journald-syslog.c
@@ -234,7 +234,8 @@ size_t syslog_parse_identifier(const char **buf, char **identifier, char **pid)
if (t)
*identifier = t;
- e += strspn(p + e, WHITESPACE);
+ if (strchr(WHITESPACE, p[e]))
+ e++;
*buf = p + e;
return e;
}
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
index 0193e42d65..6853038b67 100644
--- a/src/libsystemd-network/sd-dhcp-client.c
+++ b/src/libsystemd-network/sd-dhcp-client.c
@@ -1588,7 +1588,7 @@ static int client_receive_message_raw(sd_event_source *s, int fd,
} else if ((size_t)len < sizeof(DHCPPacket))
return 0;
- for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+ CMSG_FOREACH(cmsg, &msg) {
if (cmsg->cmsg_level == SOL_PACKET &&
cmsg->cmsg_type == PACKET_AUXDATA &&
cmsg->cmsg_len == CMSG_LEN(sizeof(struct tpacket_auxdata))) {
diff --git a/src/libsystemd-network/sd-dhcp-lease.c b/src/libsystemd-network/sd-dhcp-lease.c
index 8a4220621b..d8bc76edda 100644
--- a/src/libsystemd-network/sd-dhcp-lease.c
+++ b/src/libsystemd-network/sd-dhcp-lease.c
@@ -32,6 +32,7 @@
#include "dhcp-lease-internal.h"
#include "sd-dhcp-lease.h"
#include "network-internal.h"
+#include "dns-domain.h"
int sd_dhcp_lease_get_address(sd_dhcp_lease *lease, struct in_addr *addr) {
assert_return(lease, -EINVAL);
@@ -504,9 +505,18 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const uint8_t *option,
if (e)
*e = 0;
- if (!hostname_is_valid(domainname) || is_localhost(domainname))
+ if (is_localhost(domainname))
break;
+ r = dns_name_is_valid(domainname);
+ if (r <= 0) {
+ if (r < 0)
+ log_error_errno(r, "Failed to validate domain name: %s: %m", domainname);
+ if (r == 0)
+ log_warning("Domain name is not valid, ignoring: %s", domainname);
+ break;
+ }
+
free(lease->domainname);
lease->domainname = domainname;
domainname = NULL;
diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c
index a0a2320efa..cc5e032344 100644
--- a/src/libsystemd-network/sd-dhcp-server.c
+++ b/src/libsystemd-network/sd-dhcp-server.c
@@ -902,7 +902,7 @@ static int server_receive_message(sd_event_source *s, int fd,
else if ((size_t)len < sizeof(DHCPMessage))
return 0;
- for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
+ CMSG_FOREACH(cmsg, &msg) {
if (cmsg->cmsg_level == IPPROTO_IP &&
cmsg->cmsg_type == IP_PKTINFO &&
cmsg->cmsg_len == CMSG_LEN(sizeof(struct in_pktinfo))) {
diff --git a/src/libsystemd-terminal/grdev-drm.c b/src/libsystemd-terminal/grdev-drm.c
index 4cee95f469..30c1a726eb 100644
--- a/src/libsystemd-terminal/grdev-drm.c
+++ b/src/libsystemd-terminal/grdev-drm.c
@@ -30,7 +30,7 @@
#include <unistd.h>
/* Yuck! DRM headers need system headers included first.. but we have to
- * include it before shared/missing.h to avoid redefining ioctl bits */
+ * include it before util/missing.h to avoid redefining ioctl bits */
#include <drm.h>
#include <drm_fourcc.h>
#include <drm_mode.h>
diff --git a/src/libsystemd-terminal/grdev.c b/src/libsystemd-terminal/grdev.c
index c386e65982..71f0bd31e7 100644
--- a/src/libsystemd-terminal/grdev.c
+++ b/src/libsystemd-terminal/grdev.c
@@ -25,7 +25,7 @@
#include "sd-bus.h"
#include "sd-event.h"
#include "hashmap.h"
-#include "login-shared.h"
+#include "login-util.h"
#include "macro.h"
#include "util.h"
#include "grdev.h"
diff --git a/src/libsystemd-terminal/idev.c b/src/libsystemd-terminal/idev.c
index b187934977..b92a393b69 100644
--- a/src/libsystemd-terminal/idev.c
+++ b/src/libsystemd-terminal/idev.c
@@ -25,7 +25,7 @@
#include "sd-bus.h"
#include "sd-event.h"
#include "hashmap.h"
-#include "login-shared.h"
+#include "login-util.h"
#include "macro.h"
#include "util.h"
#include "idev.h"
diff --git a/src/libsystemd/sd-bus/bus-bloom.c b/src/libsystemd/sd-bus/bus-bloom.c
index 3556774074..91fab90cb0 100644
--- a/src/libsystemd/sd-bus/bus-bloom.c
+++ b/src/libsystemd/sd-bus/bus-bloom.c
@@ -116,11 +116,19 @@ void bloom_add_prefixes(uint64_t filter[], size_t size, unsigned k, const char *
p = stpcpy(stpcpy(c, a), ":");
strcpy(p, b);
+ bloom_add_data(filter, size, k, c, n);
+
for (;;) {
char *e;
e = strrchr(p, sep);
- if (!e || e == p)
+ if (!e)
+ break;
+
+ *(e + 1) = 0;
+ bloom_add_data(filter, size, k, c, e - c + 1);
+
+ if (e == p)
break;
*e = 0;
diff --git a/src/libsystemd/sd-bus/bus-container.c b/src/libsystemd/sd-bus/bus-container.c
index f157c25bba..fa7a207448 100644
--- a/src/libsystemd/sd-bus/bus-container.c
+++ b/src/libsystemd/sd-bus/bus-container.c
@@ -222,7 +222,7 @@ int bus_container_connect_kernel(sd_bus *b) {
if (recvmsg(pair[0], &mh, MSG_NOSIGNAL|MSG_CMSG_CLOEXEC) < 0)
return -errno;
- for (cmsg = CMSG_FIRSTHDR(&mh); cmsg; cmsg = CMSG_NXTHDR(&mh, cmsg))
+ CMSG_FOREACH(cmsg, &mh)
if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) {
int *fds;
unsigned n_fds;
diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c
index 1103903358..7a59702cb2 100644
--- a/src/libsystemd/sd-bus/bus-control.c
+++ b/src/libsystemd/sd-bus/bus-control.c
@@ -1291,10 +1291,8 @@ int bus_add_match_internal_kernel(
break;
case BUS_MATCH_PATH_NAMESPACE:
- if (!streq(c->value_str, "/")) {
- bloom_add_pair(bloom, bus->bloom_size, bus->bloom_n_hash, "path-slash-prefix", c->value_str);
- using_bloom = true;
- }
+ bloom_add_pair(bloom, bus->bloom_size, bus->bloom_n_hash, "path-slash-prefix", c->value_str);
+ using_bloom = true;
break;
case BUS_MATCH_ARG...BUS_MATCH_ARG_LAST: {
@@ -1310,11 +1308,18 @@ int bus_add_match_internal_kernel(
}
case BUS_MATCH_ARG_PATH...BUS_MATCH_ARG_PATH_LAST: {
- char buf[sizeof("arg")-1 + 2 + sizeof("-slash-prefix")];
-
- xsprintf(buf, "arg%i-slash-prefix", c->type - BUS_MATCH_ARG_PATH);
- bloom_add_pair(bloom, bus->bloom_size, bus->bloom_n_hash, buf, c->value_str);
- using_bloom = true;
+ /*
+ * XXX: DBus spec defines arg[0..63]path= matching to be
+ * a two-way glob. That is, if either string is a prefix
+ * of the other, it matches.
+ * This is really hard to realize in bloom-filters, as
+ * we would have to create a bloom-match for each prefix
+ * of @c->value_str. This is excessive, hence we just
+ * ignore all those matches and accept everything from
+ * the kernel. People should really avoid those matches.
+ * If they're used in real-life some day, we will have
+ * to properly support multiple-matches here.
+ */
break;
}
diff --git a/src/libsystemd/sd-bus/bus-internal.c b/src/libsystemd/sd-bus/bus-internal.c
index 91b288cd25..fea796cd30 100644
--- a/src/libsystemd/sd-bus/bus-internal.c
+++ b/src/libsystemd/sd-bus/bus-internal.c
@@ -19,6 +19,7 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
+#include "bus-message.h"
#include "bus-internal.h"
bool object_path_is_valid(const char *p) {
@@ -211,6 +212,17 @@ bool member_name_is_valid(const char *p) {
return true;
}
+/*
+ * Complex pattern match
+ * This checks whether @a is a 'complex-prefix' of @b, or @b is a
+ * 'complex-prefix' of @a, based on strings that consist of labels with @c as
+ * spearator. This function returns true if:
+ * - both strings are equal
+ * - either is a prefix of the other and ends with @c
+ * The second rule makes sure that either string needs to be fully included in
+ * the other, and the string which is considered the prefix needs to end with a
+ * separator.
+ */
static bool complex_pattern_check(char c, const char *a, const char *b) {
bool separator = false;
@@ -222,9 +234,7 @@ static bool complex_pattern_check(char c, const char *a, const char *b) {
for (;;) {
if (*a != *b)
- return (separator && (*a == 0 || *b == 0)) ||
- (*a == 0 && *b == c && b[1] == 0) ||
- (*b == 0 && *a == c && a[1] == 0);
+ return (separator && (*a == 0 || *b == 0));
if (*a == 0)
return true;
@@ -243,7 +253,18 @@ bool path_complex_pattern(const char *pattern, const char *value) {
return complex_pattern_check('/', pattern, value);
}
+/*
+ * Simple pattern match
+ * This checks whether @a is a 'simple-prefix' of @b, based on strings that
+ * consist of labels with @c as separator. This function returns true, if:
+ * - if @a and @b are equal
+ * - if @a is a prefix of @b, and the first following character in @b (or the
+ * last character in @a) is @c
+ * The second rule basically makes sure that if @a is a prefix of @b, then @b
+ * must follow with a new label separated by @c. It cannot extend the label.
+ */
static bool simple_pattern_check(char c, const char *a, const char *b) {
+ bool separator = false;
if (!a && !b)
return true;
@@ -253,11 +274,13 @@ static bool simple_pattern_check(char c, const char *a, const char *b) {
for (;;) {
if (*a != *b)
- return *a == 0 && *b == c;
+ return *a == 0 && (*b == c || separator);
if (*a == 0)
return true;
+ separator = *a == c;
+
a++, b++;
}
}
@@ -323,3 +346,28 @@ char *bus_address_escape(const char *v) {
*b = 0;
return r;
}
+
+int bus_maybe_reply_error(sd_bus_message *m, int r, sd_bus_error *error) {
+ assert(m);
+
+ if (r < 0) {
+ if (m->header->type == SD_BUS_MESSAGE_METHOD_CALL)
+ sd_bus_reply_method_errno(m, r, error);
+
+ } else if (sd_bus_error_is_set(error)) {
+ if (m->header->type == SD_BUS_MESSAGE_METHOD_CALL)
+ sd_bus_reply_method_error(m, error);
+ } else
+ return r;
+
+ log_debug("Failed to process message [type=%s sender=%s path=%s interface=%s member=%s signature=%s]: %s",
+ bus_message_type_to_string(m->header->type),
+ strna(m->sender),
+ strna(m->path),
+ strna(m->interface),
+ strna(m->member),
+ strna(m->root_container.signature),
+ bus_error_message(error, r));
+
+ return 1;
+}
diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h
index 2ee0eabc02..88c058889a 100644
--- a/src/libsystemd/sd-bus/bus-internal.h
+++ b/src/libsystemd/sd-bus/bus-internal.h
@@ -390,3 +390,5 @@ int bus_set_address_system_machine(sd_bus *b, const char *machine);
int bus_remove_match_by_string(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata);
int bus_get_root_path(sd_bus *bus);
+
+int bus_maybe_reply_error(sd_bus_message *m, int r, sd_bus_error *error);
diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c
index 9f3756f0c2..322d57ddbb 100644
--- a/src/libsystemd/sd-bus/bus-socket.c
+++ b/src/libsystemd/sd-bus/bus-socket.c
@@ -502,7 +502,6 @@ static int bus_socket_read_auth(sd_bus *b) {
struct cmsghdr cmsghdr;
uint8_t buf[CMSG_SPACE(sizeof(int) * BUS_FDS_MAX)];
} control;
- struct cmsghdr *cmsg;
bool handle_cmsg = false;
assert(b);
@@ -552,8 +551,10 @@ static int bus_socket_read_auth(sd_bus *b) {
b->rbuffer_size += k;
- if (handle_cmsg)
- for (cmsg = CMSG_FIRSTHDR(&mh); cmsg; cmsg = CMSG_NXTHDR(&mh, cmsg))
+ if (handle_cmsg) {
+ struct cmsghdr *cmsg;
+
+ CMSG_FOREACH(cmsg, &mh)
if (cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_RIGHTS) {
int j;
@@ -567,6 +568,7 @@ static int bus_socket_read_auth(sd_bus *b) {
} else
log_debug("Got unexpected auxiliary data with level=%d and type=%d",
cmsg->cmsg_level, cmsg->cmsg_type);
+ }
r = bus_socket_auth_verify(b);
if (r != 0)
@@ -916,7 +918,6 @@ int bus_socket_read_message(sd_bus *bus) {
struct cmsghdr cmsghdr;
uint8_t buf[CMSG_SPACE(sizeof(int) * BUS_FDS_MAX)];
} control;
- struct cmsghdr *cmsg;
bool handle_cmsg = false;
assert(bus);
@@ -961,8 +962,10 @@ int bus_socket_read_message(sd_bus *bus) {
bus->rbuffer_size += k;
- if (handle_cmsg)
- for (cmsg = CMSG_FIRSTHDR(&mh); cmsg; cmsg = CMSG_NXTHDR(&mh, cmsg))
+ if (handle_cmsg) {
+ struct cmsghdr *cmsg;
+
+ CMSG_FOREACH(cmsg, &mh)
if (cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_RIGHTS) {
int n, *f;
@@ -990,6 +993,7 @@ int bus_socket_read_message(sd_bus *bus) {
} else
log_debug("Got unexpected auxiliary data with level=%d and type=%d",
cmsg->cmsg_level, cmsg->cmsg_type);
+ }
r = bus_socket_read_message_need(bus, &need);
if (r < 0)
diff --git a/src/libsystemd/sd-bus/test-bus-kernel-bloom.c b/src/libsystemd/sd-bus/test-bus-kernel-bloom.c
index b11c43bd7b..90eb1f2a33 100644
--- a/src/libsystemd/sd-bus/test-bus-kernel-bloom.c
+++ b/src/libsystemd/sd-bus/test-bus-kernel-bloom.c
@@ -26,6 +26,14 @@
#include "bus-kernel.h"
#include "bus-util.h"
+static int test_match(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
+ int *found = userdata;
+
+ *found = 1;
+
+ return 0;
+}
+
static void test_one(
const char *path,
const char *interface,
@@ -39,7 +47,7 @@ static void test_one(
_cleanup_free_ char *name = NULL, *bus_name = NULL, *address = NULL;
_cleanup_bus_message_unref_ sd_bus_message *m = NULL;
sd_bus *a, *b;
- int r;
+ int r, found = 0;
assert_se(asprintf(&name, "deine-mutter-%u", (unsigned) getpid()) >= 0);
@@ -71,7 +79,7 @@ static void test_one(
assert_se(r >= 0);
log_debug("match");
- r = sd_bus_add_match(b, NULL, match, NULL, NULL);
+ r = sd_bus_add_match(b, NULL, match, test_match, &found);
assert_se(r >= 0);
log_debug("signal");
@@ -83,7 +91,7 @@ static void test_one(
assert_se(r >= 0);
r = sd_bus_process(b, &m);
- assert_se(r >= 0 && (good == !!m));
+ assert_se(r >= 0 && good == !!found);
sd_bus_unref(a);
sd_bus_unref(b);
@@ -115,6 +123,17 @@ int main(int argc, char *argv[]) {
test_one("/foo/bar/waldo", "waldo.com", "Piep", false, "foobar", "path_namespace='/foo'", true);
test_one("/foo/bar/waldo", "waldo.com", "Piep", false, "foobar", "path_namespace='/'", true);
test_one("/foo/bar/waldo", "waldo.com", "Piep", false, "foobar", "path_namespace='/quux'", false);
+ test_one("/", "waldo.com", "Piep", false, "foobar", "path_namespace='/'", true);
+
+ test_one("/foo/bar/waldo", "waldo.com", "Piep", false, "foobar", "path='/foo/bar/waldo/'", false);
+ test_one("/foo/bar/waldo", "waldo.com", "Piep", false, "foobar", "path='/foo/'", false);
+ test_one("/foo/bar/waldo", "waldo.com", "Piep", false, "foobar", "path_namespace='/foo/bar/waldo/'", false);
+ test_one("/foo/bar/waldo", "waldo.com", "Piep", false, "foobar", "path_namespace='/foo/'", true);
+
+ test_one("/foo/bar/waldo", "waldo.com", "Piep", false, "/foo/bar/waldo", "arg0path='/foo/'", true);
+ test_one("/foo/bar/waldo", "waldo.com", "Piep", false, "/foo", "arg0path='/foo'", true);
+ test_one("/foo/bar/waldo", "waldo.com", "Piep", false, "/foo", "arg0path='/foo/bar/waldo'", false);
+ test_one("/foo/bar/waldo", "waldo.com", "Piep", false, "/foo/", "arg0path='/foo/bar/waldo'", true);
return 0;
}
diff --git a/src/libsystemd/sd-bus/test-bus-signature.c b/src/libsystemd/sd-bus/test-bus-signature.c
index 4165c9273a..17c6188ca0 100644
--- a/src/libsystemd/sd-bus/test-bus-signature.c
+++ b/src/libsystemd/sd-bus/test-bus-signature.c
@@ -95,23 +95,28 @@ int main(int argc, char *argv[]) {
assert_se(!namespace_complex_pattern("foo.", ""));
assert_se(path_complex_pattern("", ""));
- assert_se(path_complex_pattern("", "/"));
- assert_se(path_complex_pattern("/", ""));
+ assert_se(!path_complex_pattern("", "/"));
+ assert_se(!path_complex_pattern("/", ""));
assert_se(path_complex_pattern("/", "/"));
assert_se(path_complex_pattern("/foobar/", "/"));
- assert_se(path_complex_pattern("/foobar/", "/foobar"));
+ assert_se(!path_complex_pattern("/foobar/", "/foobar"));
assert_se(path_complex_pattern("/foobar", "/foobar"));
- assert_se(path_complex_pattern("/foobar", "/foobar/"));
+ assert_se(!path_complex_pattern("/foobar", "/foobar/"));
assert_se(!path_complex_pattern("/foobar", "/foobar/waldo"));
assert_se(path_complex_pattern("/foobar/", "/foobar/waldo"));
+ assert_se(path_complex_pattern("/foobar/waldo", "/foobar/"));
+
+ assert_se(path_simple_pattern("/foo/", "/foo/bar/waldo"));
assert_se(namespace_simple_pattern("", ""));
+ assert_se(namespace_simple_pattern("", ".foobar"));
assert_se(namespace_simple_pattern("foobar", "foobar"));
assert_se(namespace_simple_pattern("foobar.waldo", "foobar.waldo"));
assert_se(namespace_simple_pattern("foobar", "foobar.waldo"));
assert_se(!namespace_simple_pattern("foobar.waldo", "foobar"));
assert_se(!namespace_simple_pattern("", "foo"));
assert_se(!namespace_simple_pattern("foo", ""));
+ assert_se(namespace_simple_pattern("foo.", "foo.bar.waldo"));
assert_se(streq(object_path_startswith("/foo/bar", "/foo"), "bar"));
assert_se(streq(object_path_startswith("/foo", "/foo"), ""));
diff --git a/src/libsystemd/sd-login/sd-login.c b/src/libsystemd/sd-login/sd-login.c
index ed8aa0952a..e3885ecba6 100644
--- a/src/libsystemd/sd-login/sd-login.c
+++ b/src/libsystemd/sd-login/sd-login.c
@@ -30,7 +30,7 @@
#include "macro.h"
#include "strv.h"
#include "fileio.h"
-#include "login-shared.h"
+#include "login-util.h"
#include "formats-util.h"
#include "sd-login.h"
diff --git a/src/libsystemd/sd-network/sd-network.c b/src/libsystemd/sd-network/sd-network.c
index 587941497d..b63fdf8fcb 100644
--- a/src/libsystemd/sd-network/sd-network.c
+++ b/src/libsystemd/sd-network/sd-network.c
@@ -297,8 +297,31 @@ static inline sd_network_monitor* FD_TO_MONITOR(int fd) {
return (sd_network_monitor*) (unsigned long) (fd + 1);
}
+static int monitor_add_inotify_watch(int fd) {
+ int k;
+
+ k = inotify_add_watch(fd, "/run/systemd/netif/links/", IN_MOVED_TO|IN_DELETE);
+ if (k >= 0)
+ return 0;
+ else if (errno != ENOENT)
+ return -errno;
+
+ k = inotify_add_watch(fd, "/run/systemd/netif/", IN_CREATE|IN_ISDIR);
+ if (k >= 0)
+ return 0;
+ else if (errno != ENOENT)
+ return -errno;
+
+ k = inotify_add_watch(fd, "/run/systemd/", IN_CREATE|IN_ISDIR);
+ if (k < 0)
+ return -errno;
+
+ return 0;
+}
+
_public_ int sd_network_monitor_new(sd_network_monitor **m, const char *category) {
- int fd, k;
+ _cleanup_close_ int fd = -1;
+ int k;
bool good = false;
assert_return(m, -EINVAL);
@@ -308,21 +331,19 @@ _public_ int sd_network_monitor_new(sd_network_monitor **m, const char *category
return -errno;
if (!category || streq(category, "links")) {
- k = inotify_add_watch(fd, "/run/systemd/netif/links/", IN_MOVED_TO|IN_DELETE);
- if (k < 0) {
- safe_close(fd);
- return -errno;
- }
+ k = monitor_add_inotify_watch(fd);
+ if (k < 0)
+ return k;
good = true;
}
- if (!good) {
- close_nointr(fd);
+ if (!good)
return -EINVAL;
- }
*m = FD_TO_MONITOR(fd);
+ fd = -1;
+
return 0;
}
@@ -338,10 +359,36 @@ _public_ sd_network_monitor* sd_network_monitor_unref(sd_network_monitor *m) {
}
_public_ int sd_network_monitor_flush(sd_network_monitor *m) {
+ union inotify_event_buffer buffer;
+ struct inotify_event *e;
+ ssize_t l;
+ int fd, k;
assert_return(m, -EINVAL);
- return flush_fd(MONITOR_TO_FD(m));
+ fd = MONITOR_TO_FD(m);
+
+ l = read(fd, &buffer, sizeof(buffer));
+ if (l < 0) {
+ if (errno == EAGAIN || errno == EINTR)
+ return 0;
+
+ return -errno;
+ }
+
+ FOREACH_INOTIFY_EVENT(e, buffer, l) {
+ if (e->mask & IN_ISDIR) {
+ k = monitor_add_inotify_watch(fd);
+ if (k < 0)
+ return k;
+
+ k = inotify_rm_watch(fd, e->wd);
+ if (k < 0)
+ return -errno;
+ }
+ }
+
+ return 0;
}
_public_ int sd_network_monitor_get_fd(sd_network_monitor *m) {
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index bab2a4ff08..79e67f6953 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -24,6 +24,7 @@
#include <unistd.h>
#include "util.h"
+#include "socket-util.h"
#include "formats-util.h"
#include "refcnt.h"
#include "missing.h"
@@ -1415,17 +1416,18 @@ int socket_write_message(sd_rtnl *nl, sd_rtnl_message *m) {
}
static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool peek) {
- uint8_t cred_buffer[CMSG_SPACE(sizeof(struct ucred)) +
- CMSG_SPACE(sizeof(struct nl_pktinfo))];
+ union sockaddr_union sender;
+ uint8_t cmsg_buffer[CMSG_SPACE(sizeof(struct nl_pktinfo))];
struct msghdr msg = {
.msg_iov = iov,
.msg_iovlen = 1,
- .msg_control = cred_buffer,
- .msg_controllen = sizeof(cred_buffer),
+ .msg_name = &sender,
+ .msg_namelen = sizeof(sender),
+ .msg_control = cmsg_buffer,
+ .msg_controllen = sizeof(cmsg_buffer),
};
struct cmsghdr *cmsg;
uint32_t group = 0;
- bool auth = false;
int r;
assert(fd >= 0);
@@ -1442,29 +1444,10 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool
return (errno == EAGAIN || errno == EINTR) ? 0 : -errno;
}
- for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) {
- if (cmsg->cmsg_level == SOL_SOCKET &&
- cmsg->cmsg_type == SCM_CREDENTIALS &&
- cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred))) {
- struct ucred *ucred = (void *)CMSG_DATA(cmsg);
-
- /* from the kernel */
- if (ucred->pid == 0)
- auth = true;
- else
- log_debug("rtnl: ignoring message from PID "PID_FMT, ucred->pid);
- } else if (cmsg->cmsg_level == SOL_NETLINK &&
- cmsg->cmsg_type == NETLINK_PKTINFO &&
- cmsg->cmsg_len == CMSG_LEN(sizeof(struct nl_pktinfo))) {
- struct nl_pktinfo *pktinfo = (void *)CMSG_DATA(cmsg);
-
- /* multi-cast group */
- group = pktinfo->group;
- }
- }
-
- if (!auth) {
+ if (sender.nl.nl_pid != 0) {
/* not from the kernel, ignore */
+ log_debug("rtnl: ignoring message from portid %"PRIu32, sender.nl.nl_pid);
+
if (peek) {
/* drop the message */
r = recvmsg(fd, &msg, 0);
@@ -1475,6 +1458,17 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool
return 0;
}
+ CMSG_FOREACH(cmsg, &msg) {
+ if (cmsg->cmsg_level == SOL_NETLINK &&
+ cmsg->cmsg_type == NETLINK_PKTINFO &&
+ cmsg->cmsg_len == CMSG_LEN(sizeof(struct nl_pktinfo))) {
+ struct nl_pktinfo *pktinfo = (void *)CMSG_DATA(cmsg);
+
+ /* multi-cast group */
+ group = pktinfo->group;
+ }
+ }
+
if (_group)
*_group = group;
diff --git a/src/libsystemd/sd-rtnl/sd-rtnl.c b/src/libsystemd/sd-rtnl/sd-rtnl.c
index 40dea1252f..ae9a40c0fe 100644
--- a/src/libsystemd/sd-rtnl/sd-rtnl.c
+++ b/src/libsystemd/sd-rtnl/sd-rtnl.c
@@ -136,10 +136,6 @@ static int rtnl_open_fd_ap(sd_rtnl **ret, int fd, unsigned n_groups, va_list ap)
if (r < 0)
return r;
- r = setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one));
- if (r < 0)
- return -errno;
-
r = setsockopt(fd, SOL_NETLINK, NETLINK_PKTINFO, &one, sizeof(one));
if (r < 0)
return -errno;
diff --git a/src/login/logind-session.h b/src/login/logind-session.h
index 7a329b94ad..4bf739a44d 100644
--- a/src/login/logind-session.h
+++ b/src/login/logind-session.h
@@ -26,7 +26,7 @@ typedef enum KillWho KillWho;
#include "list.h"
#include "logind-user.h"
-#include "login-shared.h"
+#include "login-util.h"
typedef enum SessionState {
SESSION_OPENING, /* Session scope is being created */
diff --git a/src/login/test-login-shared.c b/src/login/test-login-shared.c
index d29d7e7921..4c4275d124 100644
--- a/src/login/test-login-shared.c
+++ b/src/login/test-login-shared.c
@@ -20,7 +20,7 @@
***/
#include "macro.h"
-#include "login-shared.h"
+#include "login-util.h"
static void test_session_id_valid(void) {
assert_se(session_id_valid("c1"));
diff --git a/src/network/networkd-netdev-ipvlan.c b/src/network/networkd-netdev-ipvlan.c
index 5189000c1f..f1c8e0ccdb 100644
--- a/src/network/networkd-netdev-ipvlan.c
+++ b/src/network/networkd-netdev-ipvlan.c
@@ -42,13 +42,9 @@ static int netdev_ipvlan_fill_message_create(NetDev *netdev, Link *link, sd_rtnl
assert(netdev->ifname);
if (m->mode != _NETDEV_IPVLAN_MODE_INVALID) {
- r = sd_rtnl_message_append_u16(req, IFLA_IPVLAN_MODE, m->mode);
- if (r < 0) {
- log_netdev_error(netdev,
- "Could not append IFLA_IPVLAN_MODE attribute: %s",
- strerror(-r));
- return r;
- }
+ r = sd_rtnl_message_append_u16(req, IFLA_IPVLAN_MODE, m->mode);
+ if (r < 0)
+ return log_netdev_error_errno(netdev, r, "Could not append IFLA_IPVLAN_MODE attribute: %m");
}
return 0;
diff --git a/src/network/networkd-netdev-macvlan.c b/src/network/networkd-netdev-macvlan.c
index 5f41f1c865..a8bf6e6bb7 100644
--- a/src/network/networkd-netdev-macvlan.c
+++ b/src/network/networkd-netdev-macvlan.c
@@ -44,13 +44,9 @@ static int netdev_macvlan_fill_message_create(NetDev *netdev, Link *link, sd_rtn
assert(netdev->ifname);
if (m->mode != _NETDEV_MACVLAN_MODE_INVALID) {
- r = sd_rtnl_message_append_u32(req, IFLA_MACVLAN_MODE, m->mode);
- if (r < 0) {
- log_netdev_error(netdev,
- "Could not append IFLA_MACVLAN_MODE attribute: %s",
- strerror(-r));
- return r;
- }
+ r = sd_rtnl_message_append_u32(req, IFLA_MACVLAN_MODE, m->mode);
+ if (r < 0)
+ return log_netdev_error_errno(netdev, r, "Could not append IFLA_MACVLAN_MODE attribute: %m");
}
return 0;
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 5947084106..6f32e5f4a4 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -30,6 +30,7 @@
#include "networkd-netdev.h"
#include "networkd-link.h"
#include "network-internal.h"
+#include "dns-domain.h"
static int network_load_one(Manager *manager, const char *filename) {
_cleanup_network_free_ Network *network = NULL;
@@ -466,11 +467,16 @@ int config_parse_domains(const char *unit,
STRV_FOREACH(domain, *domains) {
if (is_localhost(*domain))
log_syntax(unit, LOG_ERR, filename, line, EINVAL, "'localhost' domain names may not be configured, ignoring assignment: %s", *domain);
- else if (!hostname_is_valid(*domain)) {
- if (!streq(*domain, "*"))
- log_syntax(unit, LOG_ERR, filename, line, EINVAL, "domain name is not valid, ignoring assignment: %s", *domain);
- } else
- continue;
+ else {
+ r = dns_name_is_valid(*domain);
+ if (r <= 0 && !streq(*domain, "*")) {
+ if (r < 0)
+ log_error_errno(r, "Failed to validate domain name: %s: %m", *domain);
+ if (r == 0)
+ log_warning("Domain name is not valid, ignoring assignment: %s", *domain);
+ } else
+ continue;
+ }
strv_remove(*domains, *domain);
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c
index 171141e3a4..6db12511f9 100644
--- a/src/resolve/resolved-bus.c
+++ b/src/resolve/resolved-bus.c
@@ -22,7 +22,7 @@
#include "bus-common-errors.h"
#include "bus-util.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
#include "resolved-bus.h"
#include "resolved-def.h"
diff --git a/src/resolve/resolved-dns-answer.c b/src/resolve/resolved-dns-answer.c
index e08eb667cc..f77b98e505 100644
--- a/src/resolve/resolved-dns-answer.c
+++ b/src/resolve/resolved-dns-answer.c
@@ -20,7 +20,7 @@
***/
#include "resolved-dns-answer.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
DnsAnswer *dns_answer_new(unsigned n) {
DnsAnswer *a;
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
index 21756f566f..bb74b1828e 100644
--- a/src/resolve/resolved-dns-packet.c
+++ b/src/resolve/resolved-dns-packet.c
@@ -23,7 +23,7 @@
#include "util.h"
#include "strv.h"
#include "unaligned.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
#include "resolved-dns-packet.h"
int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
diff --git a/src/resolve/resolved-dns-question.c b/src/resolve/resolved-dns-question.c
index 45bcbbf23a..4d71f5e3d4 100644
--- a/src/resolve/resolved-dns-question.c
+++ b/src/resolve/resolved-dns-question.c
@@ -20,7 +20,7 @@
***/
#include "resolved-dns-question.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
DnsQuestion *dns_question_new(unsigned n) {
DnsQuestion *q;
diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c
index 78d9e4a412..c1818eef9c 100644
--- a/src/resolve/resolved-dns-rr.c
+++ b/src/resolve/resolved-dns-rr.c
@@ -23,7 +23,7 @@
#include "strv.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
#include "resolved-dns-rr.h"
#include "resolved-dns-packet.h"
#include "dns-type.h"
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c
index 7369cbf50f..c25ac2216d 100644
--- a/src/resolve/resolved-dns-scope.c
+++ b/src/resolve/resolved-dns-scope.c
@@ -27,7 +27,7 @@
#include "af-list.h"
#include "random-util.h"
#include "hostname-util.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
#include "resolved-dns-scope.h"
#define MULTICAST_RATELIMIT_INTERVAL_USEC (1*USEC_PER_SEC)
diff --git a/src/resolve/resolved-dns-stream.c b/src/resolve/resolved-dns-stream.c
index 4c0b557bad..7f47e7223a 100644
--- a/src/resolve/resolved-dns-stream.c
+++ b/src/resolve/resolved-dns-stream.c
@@ -113,7 +113,8 @@ static int dns_stream_identify(DnsStream *s) {
mh.msg_control = &control;
mh.msg_controllen = sl;
- for (cmsg = CMSG_FIRSTHDR(&mh); cmsg; cmsg = CMSG_NXTHDR(&mh, cmsg)) {
+
+ CMSG_FOREACH(cmsg, &mh) {
if (cmsg->cmsg_level == IPPROTO_IPV6) {
assert(s->peer.sa.sa_family == AF_INET6);
diff --git a/src/resolve/resolved-dns-zone.c b/src/resolve/resolved-dns-zone.c
index a4c9b7d7af..32d771a954 100644
--- a/src/resolve/resolved-dns-zone.c
+++ b/src/resolve/resolved-dns-zone.c
@@ -22,7 +22,7 @@
#include "list.h"
#include "resolved-dns-zone.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
#include "resolved-dns-packet.h"
/* Never allow more than 1K entries */
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
index 52695376f0..f8d4db7aad 100644
--- a/src/resolve/resolved-manager.c
+++ b/src/resolve/resolved-manager.c
@@ -34,7 +34,7 @@
#include "random-util.h"
#include "hostname-util.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
#include "resolved-conf.h"
#include "resolved-bus.h"
#include "resolved-manager.h"
@@ -920,7 +920,7 @@ int manager_recv(Manager *m, int fd, DnsProtocol protocol, DnsPacket **ret) {
} else
return -EAFNOSUPPORT;
- for (cmsg = CMSG_FIRSTHDR(&mh); cmsg; cmsg = CMSG_NXTHDR(&mh, cmsg)) {
+ CMSG_FOREACH(cmsg, &mh) {
if (cmsg->cmsg_level == IPPROTO_IPV6) {
assert(p->family == AF_INET6);
diff --git a/src/libsystemd/sd-bus/bus-util.c b/src/shared/bus-util.c
index 99937799b3..8fcc289957 100644
--- a/src/libsystemd/sd-bus/bus-util.c
+++ b/src/shared/bus-util.c
@@ -1330,31 +1330,6 @@ int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
&u->job_path);
}
-int bus_maybe_reply_error(sd_bus_message *m, int r, sd_bus_error *error) {
- assert(m);
-
- if (r < 0) {
- if (m->header->type == SD_BUS_MESSAGE_METHOD_CALL)
- sd_bus_reply_method_errno(m, r, error);
-
- } else if (sd_bus_error_is_set(error)) {
- if (m->header->type == SD_BUS_MESSAGE_METHOD_CALL)
- sd_bus_reply_method_error(m, error);
- } else
- return r;
-
- log_debug("Failed to process message [type=%s sender=%s path=%s interface=%s member=%s signature=%s]: %s",
- bus_message_type_to_string(m->header->type),
- strna(m->sender),
- strna(m->path),
- strna(m->interface),
- strna(m->member),
- strna(m->root_container.signature),
- bus_error_message(error, r));
-
- return 1;
-}
-
int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignment) {
const char *eq, *field;
int r;
diff --git a/src/libsystemd/sd-bus/bus-util.h b/src/shared/bus-util.h
index 999a372cdd..d8dba584d6 100644
--- a/src/libsystemd/sd-bus/bus-util.h
+++ b/src/shared/bus-util.h
@@ -188,8 +188,6 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_track*, sd_bus_track_unref);
SD_BUS_PROPERTY(name, "t", bus_property_get_usec, (offset) + offsetof(struct dual_timestamp, realtime), (flags)), \
SD_BUS_PROPERTY(name "Monotonic", "t", bus_property_get_usec, (offset) + offsetof(struct dual_timestamp, monotonic), (flags))
-int bus_maybe_reply_error(sd_bus_message *m, int r, sd_bus_error *error);
-
int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignment);
typedef struct BusWaitForJobs BusWaitForJobs;
diff --git a/src/resolve/resolved-dns-domain.c b/src/shared/dns-domain.c
index e1eb3ddfe5..20a44ce4e1 100644
--- a/src/resolve/resolved-dns-domain.c
+++ b/src/shared/dns-domain.c
@@ -24,7 +24,7 @@
#include <stringprep.h>
#endif
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
int dns_label_unescape(const char **name, char *dest, size_t sz) {
const char *n;
diff --git a/src/resolve/resolved-dns-domain.h b/src/shared/dns-domain.h
index 516d244f7a..00caf5d700 100644
--- a/src/resolve/resolved-dns-domain.h
+++ b/src/shared/dns-domain.h
@@ -35,6 +35,15 @@ int dns_label_apply_idna(const char *encoded, size_t encoded_size, char *decoded
int dns_label_undo_idna(const char *encoded, size_t encoded_size, char *decoded, size_t decoded_max);
int dns_name_normalize(const char *s, char **_ret);
+static inline int dns_name_is_valid(const char *s) {
+ int r;
+ r = dns_name_normalize(s, NULL);
+ if (r == -EINVAL)
+ return 0;
+ if (r < 0)
+ return r;
+ return 1;
+}
unsigned long dns_name_hash_func(const void *s, const uint8_t hash_key[HASH_KEY_SIZE]);
int dns_name_compare_func(const void *a, const void *b);
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c
index 4a89f64518..ecc9d70bf4 100644
--- a/src/test/test-cgroup-util.c
+++ b/src/test/test-cgroup-util.c
@@ -244,16 +244,16 @@ static void test_escape(void) {
}
static void test_controller_is_valid(void) {
- assert_se(cg_controller_is_valid("foobar", false));
- assert_se(cg_controller_is_valid("foo_bar", false));
- assert_se(cg_controller_is_valid("name=foo", true));
- assert_se(!cg_controller_is_valid("", false));
- assert_se(!cg_controller_is_valid("name=", true));
- assert_se(!cg_controller_is_valid("=", false));
- assert_se(!cg_controller_is_valid("cpu,cpuacct", false));
- assert_se(!cg_controller_is_valid("_", false));
- assert_se(!cg_controller_is_valid("_foobar", false));
- assert_se(!cg_controller_is_valid("tatü", false));
+ assert_se(cg_controller_is_valid("foobar"));
+ assert_se(cg_controller_is_valid("foo_bar"));
+ assert_se(cg_controller_is_valid("name=foo"));
+ assert_se(!cg_controller_is_valid(""));
+ assert_se(!cg_controller_is_valid("name="));
+ assert_se(!cg_controller_is_valid("="));
+ assert_se(!cg_controller_is_valid("cpu,cpuacct"));
+ assert_se(!cg_controller_is_valid("_"));
+ assert_se(!cg_controller_is_valid("_foobar"));
+ assert_se(!cg_controller_is_valid("tatü"));
}
static void test_slice_to_path_one(const char *unit, const char *path, int error) {
diff --git a/src/resolve/test-dns-domain.c b/src/test/test-dns-domain.c
index c3208abc78..527cdd3b54 100644
--- a/src/resolve/test-dns-domain.c
+++ b/src/test/test-dns-domain.c
@@ -20,7 +20,7 @@
***/
#include "macro.h"
-#include "resolved-dns-domain.h"
+#include "dns-domain.h"
static void test_dns_label_unescape_one(const char *what, const char *expect, size_t buffer_sz, int ret) {
char buffer[buffer_sz];
diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c
index 88e9cf98ed..40e0fd31fe 100644
--- a/src/timesync/timesyncd-manager.c
+++ b/src/timesync/timesyncd-manager.c
@@ -528,7 +528,7 @@ static int manager_receive_response(sd_event_source *source, int fd, uint32_t re
}
recv_time = NULL;
- for (cmsg = CMSG_FIRSTHDR(&msghdr); cmsg; cmsg = CMSG_NXTHDR(&msghdr, cmsg)) {
+ CMSG_FOREACH(cmsg, &msghdr) {
if (cmsg->cmsg_level != SOL_SOCKET)
continue;
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 26aae89990..2affb5944a 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -875,7 +875,7 @@ static int on_worker(sd_event_source *s, int fd, uint32_t revents, void *userdat
continue;
}
- for (cmsg = CMSG_FIRSTHDR(&msghdr); cmsg; cmsg = CMSG_NXTHDR(&msghdr, cmsg)) {
+ CMSG_FOREACH(cmsg, &msghdr) {
if (cmsg->cmsg_level == SOL_SOCKET &&
cmsg->cmsg_type == SCM_CREDENTIALS &&
cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred)))