| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\ |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
lldp: move public macros to sd-lldp.h and namespace them
|
| | |
| | |
| | |
| | |
| | |
| | | |
lldp.h contains definitions of LLDP types, subtypes and capabilities which
should be exposed in public headers. Get rid of the file and move those
definitions to sd-lldp.h with the SD_ prefix.
|
|\ \ \
| | | |
| | | | |
core: cgroup2 support
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
After receiving SIGCHLD, one of the ways manager_dispatch_sigchld() maps the
now zombie $PID to its unit is through manager_get_unit_by_pid_cgroup() which
reads /proc/$PID/cgroup and looks up the unit associated with the cgroup path.
On non-unified cgroup hierarchies, a process is immediately migrated to the
root cgroup on death and the cgroup lookup would always have returned the unit
associated with it, making it rather pointless but safe. On unified hierarchy,
a zombie remains associated with the cgroup that it was associated with at the
time of death and thus manager_get_unit_by_pid_cgroup() will look up the unit
properly.
However, by the time manager_dispatch_sigchld() is running, the original cgroup
may have become empty and it and its associated unit might already have been
removed. If the cgroup path doesn't yield a match, manager_dispatch_sigchld()
keeps pruning the leaf component. This means that the function may return a
slice unit for a pid and as a slice doesn't have ->sigchld_event() handler,
calling invoke_sigchld_event() on it causes a segfault.
This patch updates invoke_sigchld_event() so that it skips calling if the
handler is not set.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Earlier during the development of unified hierarchy, the populated event was
reported through by the dedicated "cgroup.populated" file; however, the
interface was updated so that it's reported through the "populated" field of
"cgroup.events" file. Update populated event handling logic accordingly.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Since Linux v4.4-rc1, __DEVEL__sane_behavior does not exist anymore and
is replaced by a new fstype "cgroup2".
With this patch, systemd no longer supports the old (unstable) way of
doing unified hierarchy with __DEVEL__sane_behavior and systemd now
requires Linux v4.4 for unified hierarchy.
Non-unified hierarchy is still the default and is unchanged by this
patch.
https://github.com/torvalds/linux/commit/67e9c74b8a873408c27ac9a8e4c1d1c8d72c93ff
|
| | | |
| | | |
| | | |
| | | | |
This is a follow-up for 947292eef
|
|\ \ \ \
| | | | |
| | | | | |
core: RuntimeWatchdogSec=infinity disables the watchdog logic
|
| |/ / / |
|
|\ \ \ \
| | | | |
| | | | | |
build-sys: fix build with libgrcypt disabled
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Move gcrypt.h include inside grcrypt-util.h.
- Allow gcrypt-util.[ch] to be compiled even without gcrypt.
This allows the logic in files using gcrypt to be simplified.
- Fix compilation of systemd-resolve without gcrypt.
systemd-resolved already supported that.
Fixes #2711.
|
|/ / / |
|
|\ \ \
| |/ /
|/| | |
Fix logind crash if shutdown is called from a non-tty
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It's possible that sd_bus_creds_get_tty() fails and thus
scheduled_shutdown_tty is NULL in method_schedule_shutdown().
Fix logind_wall_tty_filter() to get along with that, by showing the message on
all TTYs, instead of crashing in strcmp().
https://launchpad.net/bugs/1553040
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If kernel command line options for locale are given,
the output of 'localectl status' command is not aligned,
for example,
=============
Warning: Settings on kernel command line override system locale settings in /etc/locale.conf.
Command Line: LANG=C
System Locale: LANG=C
VC Keymap: n/a
X11 Layout: n/a
=============
This commit fixes the alignment.
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
If /etc/locale.conf is empty or does not exist, the output of
'localectl status' command includes an unnecessary line break
as follows:
=======================
System Locale: n/a
VC Keymap: n/a
X11 Layout: n/a
=======================
This commit removes the line break after the system locale.
|
|\
| |
| | |
core: Fix path for opening ffs endpoint ep0
|
| |
| |
| |
| |
| |
| |
| | |
usbffs_address_create() expects an absolute path to the file that is
supposed to be opened. The path specified only leads to the directory
containing the endpoint ep0 not the endpoint itself. This commit adds
the endpoints name to the path.
|
| |
| |
| |
| |
| |
| | |
If you start a unit with systemd-run you usually need its name to
inspect it or stop it. Removing the period makes copying the unit name
easier.
|
|\ \
| | |
| | | |
systemctl: no need to pass --all if inactive is explicitly requested …
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
list-units
If list-units command is explicitly asked to show inactive units
by using '--state=inactive' option, there's no need to force the user
to pass '--all' option to include inactive units in the search in
this case.
|
|\ \ \
| | | |
| | | | |
Ignore BOM in config files
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes #2823.
Also remove unnecessary feof check.
|
|\ \ \ \
| |_|_|/
|/| | | |
Add support for 3D printers to uaccess (ID_3DPRINTER).
|
| | | |
| | | |
| | | |
| | | | |
This is to support 3D printers, CNCs, laser cutters, 3D scanners, etc.
|
|\ \ \ \
| | | | |
| | | | | |
Add some simple tests for env_value_is_valid and env_assignment_is_valid
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Just to make sure everything works as expected in relation
to https://bugzilla.redhat.com/show_bug.cgi?id=1312384.
|
| | |/ /
| |/| | |
|
|\ \ \ \
| | | | |
| | | | | |
test-execute: fix execution of AmbientCapabilities tests
|
| |/ / /
| | | |
| | | |
| | | | |
Wrong tests were executed
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
copy_bytes() and the comparisons in test_copy_bytes_regular_file() expect an
uint64_t, not a size_t. On 32 bit architectures the latter is 32 bit, leading
to truncation errors.
Fixes regression from commit 7a827fcb.
|
|\ \ \
| | | |
| | | | |
core: set NoNewPrivileges for seccomp if we don't have CAP_SYS_ADMIN
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The manpage of seccomp specify that using seccomp with
SECCOMP_SET_MODE_FILTER will return EACCES if the caller do not have
CAP_SYS_ADMIN set, or if the no_new_privileges bit is not set. Hence,
without NoNewPrivilege set, it is impossible to use a SystemCall*
directive with a User directive set in system mode.
Now, NoNewPrivileges is set if we are in user mode, or if we are in
system mode and we don't have CAP_SYS_ADMIN, and SystemCall*
directives are used.
|
|\ \ \ \
| | | | |
| | | | | |
lldp: fix starting ttl timer for lldp neighbor
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
lldp_start_timer() was only called during sd_lldp_get_neighbors().
Ensure that the timer is (re-)started when a new neighbor appears.
Otherwise, the timer is not started when relying on the events alone.
Fixes: 34437b4f9c9c51b0a6f93788bdb9a105b8e46b66
|
|\ \ \ \ \
| | | | | |
| | | | | | |
nspawn: don't run nspawn --port=... without libiptc support
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We get
$ systemd-nspawn --image /dev/loop1 --port 8080:80 -n -b 3
--port= is not supported, compiled without libiptc support.
instead of a ping-nc-iptables debugging session
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Use sendfile smarter
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We have a bunch of syscall wrapper definitions and it's easier to
see that they follow the same pattern if they are not interspersed
with other defines.
Change the wrappers to be uniform:
- if __NR_XXX is not defined, do not bother to call the syscall,
and return -1/ENOSYS immediately.
- do not check __NR_XXX defines if we detect the symbol as defined,
since we don't need them anyway
- reindent stuff for readability
New file basic/missing_syscall.h is included at the end of missing.h
because it might make use of some of the definitions in missing.h.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
For btrfs, c_f_r() is like BTRFS_IOC_CLONE which we already used, but also
works when max_bytes is set. We do call copy_bytes in coredump code with
max_bytes set, and for large files, so we might see some benefit from using
c_f_r() on btrfs.
For other filesystems, c_f_r() falls back to do_splice_direct(), the same as
sendfile, which we already call, so there shouldn't be much difference.
Tested with test-copy and systemd-coredump on Linux 4.3 (w/o c_f_r)
and 4.5 (w/ c_f_r).
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
syscall numbers based on:
https://fedora.juszkiewicz.com.pl/syscalls.html
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
We called sendfile with 16kb (a.k.a. COPY_BUFFER_SIZE) as the maximum
number of bytes to copy. This seems rather inefficient, especially with
large files. Instead, call sendfile with a "large" maximum.
What "large" max means is a bit tricky: current file offset + max
must fit in loff_t. This means that as we call sendfile more than once,
we have to lower the max size.
With this patch, test-copy calls sendfile twice, e.g.:
sendfile(4, 3, NULL, 9223372036854775807) = 738760
sendfile(4, 3, NULL, 9223372036854037047) = 0
The second call is necessary to determine EOF.
|