summaryrefslogtreecommitdiffstats
path: root/coccinelle (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-05-05core/path: use escaped path in serializationMichael Chapman1-1/+1
2020-05-04mkosi: Fix openSUSE image declarationMichal Koutný1-0/+4
User accounts of given names are necessary for the build script and tests to succeed. (Fixup of #15527, too keen cleaning of dependencies and cached image caused this.)
2020-05-04Add Kensington SlimBlade TrackballLukas Klingsbo1-0/+4
2020-05-04catalog,po: update Polish translationPiotr Drąg2-10/+40
2020-05-04test: fix potential use-after-freeFrantisek Sumsal1-1/+1
CID#1428676.
2020-05-04install libzstd-dev for CI buildsNorbert Lange5-1/+10
2020-05-04coredump: add zstandard support for coredumpsNorbert Lange11-58/+347
this will hook libzstd into coredump, using this format as default.
2020-05-04basic: add STRCASE_IN_SET() which is to STR_IN_SET() what strcaseeq() is to ↵Lennart Poettering5-19/+60
streq()
2020-05-03man: fix few spelling errorsFrantisek Sumsal3-3/+3
Reported by Fossies.org.
2020-05-02test: Fix build with !HAVE_LZ4 && HAVE_XZMichal Koutný1-1/+2
HUGE_SIZE was defined inconsistently. > In file included from ../src/basic/alloc-util.h:9, > from ../src/journal/test-compress.c:9: > ../src/journal/test-compress.c: In function ‘main’: > ../src/journal/test-compress.c:280:33: error: ‘HUGE_SIZE’ undeclared (first use in this function) > 280 | assert_se(huge = malloc(HUGE_SIZE));
2020-05-02cifuzz: upload artifacts only when the "run fuzzers" step failsEvgeny Vereshchagin1-1/+2
2020-05-01repart: fix partition maximum size segfaultEmmanuel Garette1-1/+1
Discovered, tracked down and fix proposed by Emmanuel Garette. See: https://lists.freedesktop.org/archives/systemd-devel/2020-April/044435.html (Lennart turned this into a PR) Fixes: #15608
2020-04-30man: sd_notify() race is gone with sd_notify_barrier()Kumar Kartikeya Dwivedi3-11/+33
Add note for change of behaviour in systemd-notify, where parent pid trick is only used when --no-block is passed, and with enough privileges ofcourse. Also, fix a small error in systemd(1).
2020-04-30Introduce sd_notify_barrierKumar Kartikeya Dwivedi6-1/+130
This adds the sd_notify_barrier function, to allow users to synchronize against the reception of sd_notify(3) status messages. It acts as a synchronization point, and a successful return gurantees that all previous messages have been consumed by the manager. This can be used to eliminate race conditions where the sending process exits too early for systemd to associate its PID to a cgroup and attribute the status message to a unit correctly. systemd-notify now uses this function for proper notification delivery and be useful for NotifyAccess=all units again in user mode, or in cases where it doesn't have a control process as parent. Fixes: #2739
2020-04-30test: find path for systemd-journal-remoteDan Streetman1-4/+5
As Debian/Ubuntu use /lib/systemd instead of /usr/lib/systemd, add systemd-journal-remote to the list of programs that test-functions detects the correct path to, and replace its direct usage with $SYSTEMD_JOURNAL_REMOTE Also use $JOURNALCTL instead of journalctl. Also minor correction in install_plymouth() to look in /lib/... as well as /usr/lib/... and /etc/...
2020-04-30Add SetType method to login Session interfaceCorey Hinshaw5-2/+68
2020-04-30core: (De-)Serialize poll flag for fds in fdstoreKenny Levinsen2-18/+26
This replaces manual string splitting and unescaping with extract_first_word.
2020-04-30core: Add optional FDPOLL=0 argument to fdstoreKenny Levinsen2-14/+26
A service can specify FDSTORE=1 FDPOLL=0 to request that PID1 does not poll the fd to remove them on error. If set, fds will only be removed on FDSTOREREMOVE=1 or when the service is done. Fixes: #12086
2020-04-30Fix Chromebook Caroline board accelerometer not having correct orientationMadMcCrow1-0/+4
2020-04-30test: add test for cgroup v2 freezer supportMichal Sekletár6-0/+310
2020-04-30core: introduce support for cgroup freezerMichal Sekletár19-14/+566
With cgroup v2 the cgroup freezer is implemented as a cgroup attribute called cgroup.freeze. cgroup can be frozen by writing "1" to the file and kernel will send us a notification through "cgroup.events" after the operation is finished and processes in the cgroup entered quiescent state, i.e. they are not scheduled to run. Writing "0" to the attribute file does the inverse and process execution is resumed. This commit exposes above low-level functionality through systemd's DBus API. Each unit type must provide specialized implementation for these methods, otherwise, we return an error. So far only service, scope, and slice unit types provide the support. It is possible to check if a given unit has the support using CanFreeze() DBus property. Note that DBus API has a synchronous behavior and we dispatch the reply to freeze/thaw requests only after the kernel has notified us that requested operation was completed.
2020-04-30notify: beef up --pid= logicLennart Poettering2-12/+56
Prompted by the discussions on #15547.
2020-04-30docs: Change prefix for desktop applications to app-Benjamin Berg1-9/+9
We need both a slice name and a prefix for application units. For consistency we tried to use the same name and ended up standardising on "apps.slice" and and "apps-" prefix for the units. However, "app-" would be a more natural prefix for applications. And it is no problem to simply also name the slice "app.slice" for consistency rather than keeping the current "apps.slice".
2020-04-30efi: honour SYSTEMD_EFI_OPTIONS even if we wouldn't honour SystemdOptions ↵Lennart Poettering2-14/+25
EFI var due to SecureBoot Fixes: #14864
2020-04-30efi: cache test results of boolean EFI state functionsLennart Poettering1-5/+21
EFI variable access is nowadays subject to rate limiting by the kernel. Thus, let's cache the results of checking them, in order to minimize how often we access them. Fixes: #14828
2020-04-29link: Allow configuring RX mini and jumbo ring sizes, toonabijaczleweli6-1/+39
This now covers all ethtool_ringparam configurables (as of v5.6; https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/ethtool.h?h=v5.6#n488)
2020-04-29link: Add units and fix typo in (Rx|Tx)BufferSize= manpage. Clean up the ↵nabijaczleweli2-12/+10
implementation slightly
2020-04-29basic/cgroup-util: introduce cg_get_keyed_attribute_full()Michal Sekletár3-4/+53
Callers of cg_get_keyed_attribute_full() can now specify via the flag whether the missing keyes in cgroup attribute file are OK or not. Also the wrappers for both strict and graceful version are provided.
2020-04-29docs: reorder the section about security reporting to emphasize the sekrit listZbigniew Jędrzejewski-Szmek1-1/+3
2020-04-29home: make sure whenever we touch the 'secret' part of a user record, we set ↵Lennart Poettering1-1/+8
the the sensitive flag on it
2020-04-29home: mark various bus messages we write user records to as sensitiveLennart Poettering2-0/+6
let's make sure that when we append potentially sensitive data to a bus message we set the sensitive flag on the message object.
2020-04-29json: when making a copy of a json variant, propagate the sensitive bitLennart Poettering2-1/+31
Let's make sure we never lose the bit when copying a variant, after all the data contained is still going to be sensitive after the copy.
2020-04-29selinux: do preprocessor check only in selinux-access.cMichal Sekletár1-9/+0
This has the advantage that mac_selinux_access_check() can be used as a function in all contexts. For example, parameters passed to it won't be reported as unused if the "function" call is replaced with 0 on SELinux disabled builds.
2020-04-29tmpfiles: remove unnecessary assertLennart Poettering1-3/+1
if we parse an xattr line that has no valid assignment, we might end up with an empty ->xattr list. Don't hit assert on that, just go on. Fixes: #15610
2020-04-29tmpfiles: use log_syntax() for all parse errorsLennart Poettering1-47/+36
2020-04-28update TODOLennart Poettering1-3/+0
2020-04-28man: document new specifiersLennart Poettering5-8/+69
2020-04-28tree-wide: support a bunch of additional specifiersLennart Poettering9-12/+112
2020-04-28update TODOLennart Poettering1-0/+2
2020-04-28main: bump RLIMIT_MEMLOCK by physical RAM sizeLennart Poettering1-2/+6
Let's allow more memory to be locked on beefy machines than on small ones. The previous limit of 64M is the lower bound still. This effectively means on a 4GB machine we can lock 512M, which should be more than enough, but still not lock up the machine entirely under pressure. Fixes: #15053
2020-04-28nspawn: be more careful with creating/chowning directories to overmountLennart Poettering2-19/+22
We should never re-chown selinuxfs. Fixes: #15475
2020-04-28update TODOLennart Poettering1-4/+3
2020-04-28sd-bus: Add sd_bus_query_sender_creds/privilege docsDaan De Meyer4-2/+138
2020-04-28sd-bus: Add sd_bus_get_creds_mask docsDaan De Meyer3-46/+68
2020-04-28Revert "detect-virt: also detect "microsoft" as WSL"Luca Boccassi1-4/+2
WSL2 will soon (TM) include the "WSL2" string in /proc/sys/kernel/osrelease so the workaround will no longer be necessary. We have several different cloud images which do include the "microsoft" string already, which would break this detection. They are for internal usage at the moment, but the userspace side can come from all over the place so it would be quite hard to track and downstream-patch to avoid breakages. This reverts commit a2f838d59075a49b012f9b7056664f7ffeed44d2.
2020-04-28homectl: say "home area" in more placesZbigniew Jędrzejewski-Szmek1-12/+12
Follow-up for b5947b5b100f694c93857a82018fb0656d08be34.
2020-04-28meson: test userdbctl and homectl --helpZbigniew Jędrzejewski-Szmek1-2/+2
2020-04-28userdbctl: make --help fit in 80 columnsZbigniew Jędrzejewski-Szmek1-16/+16
2020-04-28meson: modernize indentationZbigniew Jędrzejewski-Szmek1-1078/+1151
By using a newline after executable( and run_target(, we get less indentation and the indentation level does not change when the returned object is saved to a variable.
2020-04-28efivars: retry open and read operationsZbigniew Jędrzejewski-Szmek1-6/+27
On my laptop (Lenovo X1carbo 4th) I very occasionally see test-boot-timestamps fail with this tb: 262/494 test-boot-timestamps FAIL 0.7348453998565674 s (killed by signal 6 SIGABRT) 08:12:48 SYSTEMD_LANGUAGE_FALLBACK_MAP='/home/zbyszek/src/systemd/src/locale/language-fallback-map' SYSTEMD_KBD_MODEL_MAP='/home/zbyszek/src/systemd/src/locale/kbd-model-map' PATH='/home/zbyszek/src/systemd/build:/home/zbyszek/.local/bin:/usr/lib64/qt-3.3/bin:/usr/share/Modules/bin:/usr/condabin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/zbyszek/bin:/var/lib/snapd/snap/bin' /home/zbyszek/src/systemd/build/test-boot-timestamps --- stderr --- Failed to read $container of PID 1, ignoring: Permission denied Found container virtualization none. Failed to get SystemdOptions EFI variable, ignoring: Interrupted system call Failed to read ACPI FPDT: Permission denied Failed to read LoaderTimeInitUSec: Interrupted system call Failed to read EFI loader data: Interrupted system call Assertion 'q >= 0' failed at src/test/test-boot-timestamps.c:84, function main(). Aborting. Normally it takes ~0.02s, but here there's a slowdown to 0.73 and things fail with EINTR. This happens only occasionally, and I haven't been able to capture a strace. It would be to ignore that case in test-boot-timestamps or always translate EINTR to -ENODATA. Nevertheless, I think it's better to retry, since this gives as more resilient behaviour and avoids a transient failure. See https://github.com/torvalds/linux/blob/master/fs/efivarfs/file.c#L75 and https://github.com/torvalds/linux/commit/bef3efbeb897b56867e271cdbc5f8adaacaeb9cd.