Age | Commit message (Collapse) | Author |
|
Only unset the env var in the workers, but otherwise keep it around in the main daemon.
|
|
Only log about starting in daemon mode, rely on PID1 to log this in notify mode. Also
explicitly set the STATUS variable, as is done in notify mode as is done for other
serivecs.
|
|
This allows us to drop the special sigterm handling in spawn_wait()
as this will now be passed directly to the worker event loop.
We now log failing spawend processes at 'warning' level, and timeouts
are in terms of CLOCK_BOOTTIME when available, otherwise the behavior
is unchanged.
|
|
|
|
Rather than trying to schedule new events on every main-loop iteration, do it explicitly when
processing an event finishes, a worker is killed, a new uevent is received, or the event queue
is explicitly restarted.
|
|
Also move builtin and rules initialization from main loop to
event_queue_start().
No functional change.
|
|
The behavior is mostly unchanged, but rather than only ever calling these functions at
fixed points in the event loop, they are called directly whenever they are invoked.
|
|
This makes path_is_mount_point() consistent with fd_is_mount_point() wrt.
flags.
|
|
Commits 27cc6f166 and f25afeb broke path_is_mount_point() for files (such as
/etc/machine-id → /run/machine-id bind mounts) as with the factorization of
fd_is_mount_point() we lost the parent directory. We cannot determine that from
an fd only as openat(fd, "..") only works for directory fds.
Change fd_is_mount_point() to behave like openat(): It now takes a file
descriptor of the containing directory, a file name in it, and flags (which can
be 0 or AT_SYMLINK_FOLLOW). Unlike name_to_handle_at() or openat(), fstatat()
only accepts the inverse flag AT_SYMLINK_NOFOLLOW and complains with EINVAL
about AT_SYMLINK_FOLLOW; so we need to transform the flags for that fallback.
Adjust rm_rf_children() accordingly (only other caller of fd_is_mount_point()
aside from path_is_mount_point()).
Add test cases for files, links, and file bind mounts (the latter will only
work when running as root). Split out a new test_path_is_mount_point() test
case function as it got significantly larger now.
|
|
Previously we always ran distcheck with --disable-split-usr. This caused
test-path-util to fail with
Assertion 'fsck_exists("minix") == 0' failed at ../src/test/test-path-util.c:224, function test_fsck_exists(). Aborting.
as looking up fsck.minix would only look into DEFAULT_PATH_NORMAL, but on these
systems fsck is in /sbin/.
|
|
There is nothing like systemd_verify_* in Makefile.am. The bug has
been invisible because automake uses the default CFLAGS when component
CFLAGS are undefined.
|
|
Consistently move EXTRA_DIST out of conditional blocks. This would have
produced incomplete dist tarballs when being run in a built tree with not
every feature enabled, which can cause broken dist tarballs.
|
|
When Makefile.am is modified, make sure custom-entities.ent is rebuilt.
After all, $(substitutions) is defined there, so changes of that variable
must be reflected in the resulting file.
|
|
If there is both a SysV init.d script and a systemd unit for a given name, we
want to do the same enable/disable operation for both, instead of just on the
systemd unit. This keeps the enablement status in sync so that switching init
systems behaves as expected.
|
|
Introduce /usr/lib/systemd/systemd-sysv-install [--root=] <action> <name>
abstraction, replacing the direct calling of chkconfig. This allows
distributions to call their specific tools like update-rc.d without patching
systemd.
Ship systemd-sysv-install.SKELETON as an example for packagers how to implement
this.
Drop the --enable-chkconfig configure option.
Document this in README and point to it in NEWS.
|
|
Export the MOUNT_PATH and UMOUNT_PATH variables as XML entities and use them in
the systemctl.1 manpage instead of hardcoding the path in /usr/bin.
Tested:
- Ran ./configure ac_cv_path_MOUNT_PATH=/bin/mount (same for umount) and
rebuilt the manpages, confirmed that the correct path was in man/systemctl.1
- Rebuilt man/systemd.directives.xml and the man pages derived from it,
confirmed that the correct paths were there as well.
|
|
In particular, use /lib/systemd instead of /usr/lib/systemd in distributions
like Debian which still have not adopted a /usr merge setup.
Use XML entities from man/custom-entities.ent to replace configured paths while
doing XSLT processing of the original XML files. There was precedent of some
files (such as systemd.generator.xml) which were already using this approach.
This addresses most of the (manual) fixes from this patch:
http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/patches/Fix-paths-in-man-pages.patch?h=experimental-220
The idea of using generic XML entities was presented here:
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032240.html
This patch solves almost all the issues, with the exception of:
- Path to /bin/mount and /bin/umount.
- Generic statements about preference of /lib over /etc.
These will be handled separately by follow up patches.
Tested:
- With default configure settings, ran "make install" to two separate
directories and compared the output to confirm they matched exactly.
- Used a set of configure flags including $CONFFLAGS from Debian:
http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules
Installed the tree and confirmed the paths use /lib/systemd instead of
/usr/lib/systemd and that no other unexpected differences exist.
- Confirmed that `make distcheck` still passes.
|
|
This was a regression that broke
$ udevadm trigger -nv --property-match=DEVNAME=/dev/sda1 --attr-match=size=409600
Reported by David Reisner.
|
|
|
|
|
|
A NULL pointer was inserted as the first element of the strv.
This had the effect of always passing the empty environment to processes
spawned by udev.
Reported by Michał Bartoszkiewicz.
|
|
We were listening for SIGCHLD in the wrong process.
|
|
Otherwise building faild with kernel headers < v3.16
|
|
Make Coverity happy and tell it we're not interested in the return
value of these two calls.
|
|
When a scheduled is cancelled, make sure to remove /run/nologin.
This is a regression from the recent shutdownd removal and logind rework.
|
|
|
|
This partly reverts:
commit 6d1b1e0bc6bd020218afc5f05286bf372be283d5
Author: Tom Gundersen <teg@jklm.no>
Date: Sun May 24 15:10:04 2015 +0200
udevd: worker - fully clean up unnecessary fds
The inotify-fd _is_ used in the workers, so don't close it! Have a look at
udev-watch.c, which keeps track of the inotify-fd as a global variable
(ugh!).
|
|
Useful for downstream integration test cases.
|
|
Fixes CID CID 1299638 (use after free).
|
|
This was a typo, swapping prefix_root() in place of prefix_roota().
Fixes CID 1299640.
|
|
Simplify the code a bit, at the cost of potentially duplicating some
memory unneccessarily.
Fixes CID 1299641.
|
|
These have no effect.
Fixes CID 1299643.
|
|
A malformed manifest could in principle cause a NULL pointer dereference of. Check
for this and fail early.
Fixes CID 1299642.
|
|
Rather than checking the return of asprintf() we are checking if buf gets allocated,
make it clear that it is ok to ignore the return value.
Fixes CID 1299644.
|
|
Passing ipv6 options (even when they should be noops) caused IFF_UP to fail when
ipv6 was supported.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=90103
|
|
This patch simplify swapon usage in systemd. The command swapon(8)
since util-linux v2.26 supports "-o <list>". The idea is exactly the
same like for mount(8). The -o specifies options in fstab-compatible
way. For systemd it means that it does not have to care about things
like "discard" or another swapon specific options.
swapon -o <options-from-fstab>
For backward compatibility the code cares about "Priority:" swap unit
field (for a case when Priority: is set, but pri= in the Options: is
missing).
References: http://lists.freedesktop.org/archives/systemd-devel/2014-October/023576.html
|
|
|
|
[tomegun: fix
Makefile.am:5675: warning: nodist_systemd_resolved_SOURCES multiply defined in condition ENABLE_RESOLVED]
|
|
currently it would only be included if configure was ran with --enable-gnuefi
|
|
In generated systemd-fsck-root.service. This would break if rootprefix
is not /usr/lib/systemd.
[tomegun: flesh out commit message]
|
|
Allowed interface name is relatively small. Lets not make
users go in to the source code to figure out what happened.
--machine=debian-tree conflicts with
--machine=debian-tree2
ex: Failed to add new veth \
interfaces (host0, vb-debian-tree): File exists
|
|
We would enforce that events could only be added to the queue from the
main process, but that brake in daemonized mode. Relax the restriction
to only allow one process to add events to the queue.
Reported by Mantas Mikulėnas.
|
|
Initialize structs when declaring rather than using memzero().
|
|
These are only ever used in the parent process, so close them early in the worker.
|
|
|
|
|
|
Otherwise it will not show any error stored
|
|
The original code used fread(), which on some libc implementions
(ie glibc 2.17) would pre-read a full 4K (PAGE_SIZE) of the
PCI config space, when only 64 bytes were requested.
I have recently come across PCIe hardware which responds with
Completion Timeouts when accesses above 256 bytes are attempted.
This can cause server systems with GHES/AEPI support to cause
and immediate kernel panic due to the failed PCI transaction.
This change replaces the buffered fread() with an explict
unbuffered read() of 64 bytes, which corrects this issue by
only reading the guaranteed first 64 bytes of PCIe config space.
|
|
With the v221 release these APIs should be public, stable APIs, hence
let's install their headers by default now, and add their symbols to the
.sym file.
|
|
Ah, bummer, it's tagged an now I realize I didn't fix the date. Let's do
so now, post-commit.
|