1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-08-04 12:22:39 +03:00
Commit Graph

50198 Commits

Author SHA1 Message Date
d229704743 Reword and reindent comment
Follow-up for 0e557eef37.
2021-03-22 21:48:17 +01:00
de0b89913c Partially revert "correct incorrect command in NEWS (#19048)"
This reverts commit 6d18c13e79.

The syntax like "0666" is very unclear. It only makes sense for some subset of
people who do C programming. Let's use the much more sensible modern python
syntax instead.
2021-03-22 21:33:03 +01:00
965984240e Merge pull request #19058 from bugaevc/log-open-protect-errno
Save errno over log_open() calls
2021-03-22 21:28:28 +01:00
c23bb96b38 shell-completion: systemd-run: add missing options
Closes #19044.
2021-03-22 21:20:17 +01:00
24063ba16a update TODO 2021-03-22 21:17:58 +01:00
7e7b0e2198 update TODO 2021-03-22 19:07:34 +01:00
fbdacd7268 homework: use FORK_CLOSE_ALL_FDS in a few more places
And make sure to reopen the log appropriately.
2021-03-22 19:34:07 +03:00
7e0ed2e9a2 tree-wide: reopen log after fork when needed
This follows up on 0b1f3c768c, adding more places
where we should reopen the log after forking with FORK_CLOSE_ALL_FDS.

When immediately calling exec in the child, prefer to explicitly reopen the log
after exec fails. In other cases, just use FORK_REOPEN_LOG.
2021-03-22 19:34:07 +03:00
0e557eef37 log: protect errno in log_open()
Commit 0b1f3c768c has introduced log_open()
calls after exec fails post-fork. However, the log_open() call itself could
change the value of errno, which, for me, manifested in:

$ coredumpctl gdb
...
Failed to invoke gdb: Success

Fix this by using PROTECT_ERRNO in log_open().
2021-03-22 19:34:03 +03:00
dcb6061e1c meson: fix warning about comparison between different types
Follow-up for e39288193f.
2021-03-22 14:40:46 +01:00
17e9000164 logs-show: add missing newline in warning message 2021-03-21 17:52:07 +00:00
fcc3c20ca3 meson: fix build error of test-dnssec-complex
Fixes #19065.
2021-03-21 13:18:44 +01:00
e39288193f systemd-boot: LLVM/lld does not support PE/COFF relocations. Bail out with an error message 2021-03-19 19:42:47 +00:00
c68fc3514d blockdev-util: fix access to possibly invalidated dirent struct
Let's copy out the string we need from the dirent, there's no reason to
believe the dirent struct might live for longer than one loop iteration.
2021-03-19 18:13:17 +01:00
f9b3afae96 repart: make sure to grow partition table after growing backing loopback file
This fixes the --size= switch, i.e. where we grow a disk image: after
growing it we need to expand the partition table so that its idea of the
the medium size matches the new reality. Otherwise our disk size
calculations in the subsequent steps might still use the original
ungrown size.

(This used to work, I guess this was borked when libfdisk learnt the
concept of "minimized" partition tables)
2021-03-19 18:11:26 +01:00
6d18c13e79 correct incorrect command in NEWS (#19048)
* for /dev/vsock a file permission of 0o666 was mentioned but 0666 is probably better understood, so let's use that
* correct non existing command 'ip dev'
2021-03-19 11:38:53 +01:00
6f50c94dfd Wrong index in error message 2021-03-19 09:53:25 +00:00
5cdb3f70eb udev: do not try to assign invalid ifname
Fixes #19038.
2021-03-19 09:52:21 +00:00
7f966edbda homepage: fix year in footer to 2021
(And while we are at it, let's fix the "Sources" link in the footer to point to the right git repo subdir)
2021-03-18 23:31:55 +01:00
dc4c1d4434 Merge pull request #19030 from dtardon/rhel9-covscan
a bunch of small fixes and clenups based on initial RHEL-9 covscan run
2021-03-18 16:28:46 +00:00
12854a6ed5 Merge pull request #19036 from mrc0mmand/cocci-fixes
tree-wide: coccinelle fixes
2021-03-18 14:26:04 +00:00
eba1eb9066 resolved-dns-rr: drop unneeded braces 2021-03-18 13:19:13 +01:00
037e5b1547 resolved-dns-rr: use already existing variable 2021-03-18 13:19:13 +01:00
516a00e9cf resolved-dns-rr: avoid unnecessary reassignment 2021-03-18 13:19:00 +01:00
bc83340176 resolved-dns-rr: don't leak s if base64_append fails 2021-03-18 13:13:04 +01:00
ca21d59a3f coccinelle: filter out a couple of 'false-positive' transformations
* flag-set.cocci: perform the transformation only if the second
    argument is a constant
  * sd-journal/lookup3.c: skip the cocci completely for this file, since
    it's not "ours"
  * strjoina.cocci: skip the transformation on the "test_strjoina" test,
    since it intentionally tests the "incorrect" expression we're trying to
    transform (the same thing was already done in strjoin.cocci)
2021-03-18 11:59:53 +01:00
57ac6959f5 tree-wide: coccinelle fixes
Another batch of fixes (mostly) generated by Coccinelle.
2021-03-18 11:59:31 +01:00
2c0c1b095c shutdown: fix typo 2021-03-18 09:43:08 +00:00
8f3e1b9d01 systemctl-edit: don't leak the old value of contents 2021-03-18 09:41:49 +01:00
c4a2d475f1 journal-upload: use _cleanup_ for curl_slist 2021-03-18 09:41:49 +01:00
3851069709 journal-upload: make the curl_slist cleanup actually work
If h is NULL, it is pointless to call curl_slist_free_all() on it...
2021-03-18 09:41:49 +01:00
a6f575a1e8 journal-upload: cleanup CURL* on error 2021-03-18 09:41:49 +01:00
c60d95ca4f journal-gatewayd: use automatic cleanup 2021-03-18 09:41:46 +01:00
22bf8ff8e0 Merge pull request #19011 from anitazha/pgscanrate
oomd: update pressure based kills to use pgscan rate
v248-rc4
2021-03-17 23:26:49 +01:00
52b501c976 Merge pull request #19034 from poettering/read-virtual-file-fix
read_virtual_file() tweaks
2021-03-17 22:45:16 +01:00
77b04c0a6c oomd: clean up error handling
- Log debug if we're going to ignore an error
- Add %m if we use log_*_errno()
- log_oom() when checking ENOMEM
2021-03-17 13:07:11 -07:00
b7beefbdde Merge pull request #19031 from poettering/hwdb-248
prepare 248-rc4
2021-03-17 21:03:02 +01:00
18da936481 resolved: simplify min_ttl check
rr is asserted upon a few lines above, no need to check for null.
Coverity-found issue, CID 1450844

  CID 1450844:  Null pointer dereferences  (REVERSE_INULL)
  Null-checking "rr" suggests that it may be null, but it has already
    been dereferenced on all paths leading to the check.
2021-03-17 18:56:33 +00:00
c5384931b7 fileio: add missing overflow checks to read_full_virtual_file()
given the source is trusted this is probably not a biggie, but let's
better be safe than sorry.
2021-03-17 18:48:01 +01:00
b235b03138 fileio: don't use realloc() in read_full_virtual_file()
We aren't interested in the data previousl read, hence free() followed
by malloc() is typically better since it means libc doesn't have to
restore the contained data needlessly.
2021-03-17 18:47:56 +01:00
be81e45c74 systemctl: pecify read_full_file() size argument as NULL
If it is specified as NULL read_full_file() assumes the caller wants a C
string, and it looks for embedded NUL bytes to ensure that works. Given
we don#t actually use the size argument here, let's drop it.

(in one case the size argument is used, but not for actually processing
the full returned data, but just as a shortcut to compare things with
the original string. Let's drop use of that there, too given the risk of
embedded NUL bytes in the data read.)
2021-03-17 18:44:51 +01:00
627055ce9a tree-wide: use read_full_virtual_file() where appropriate
Wherever we read virtual files we better should use
read_full_virtual_file(), to make sure we get a consistent response
given how weird the kernel's handling with partial read on such file
systems is.
2021-03-17 18:43:42 +01:00
bb08124092 oomctl: show last_pgscan 2021-03-17 10:17:05 -07:00
88e47952af oomd: sort by pgscan rate not pgscan
For pressure based killing we want to target who has the highest
increase in pgscan from the previous interval (vs. the previous logic
which used raw pgscan). This will prevent biasing towards long running
cgroups as mentioned in #19007.
2021-03-17 10:17:03 -07:00
04820600e7 update TODO 2021-03-17 18:13:51 +01:00
d94d261c56 update NEWS for rc4 2021-03-17 16:53:18 +01:00
1ab4edae12 tools: exclude Weblate bot from "ninja git-contrib"
Bots are not people, no reason to say thanks to them and list them as
authors or contributors.
2021-03-17 16:53:14 +01:00
264f1e5c3d mailmap: merge Weblate bot commiter into one 2021-03-17 16:53:10 +01:00
cd10a4f5ec meson.build: bump version of libudev
It didn't receive new API calls, bit it was changed, hence bump the
version accordingly.
2021-03-17 16:53:01 +01:00
4b7a051d92 hwdb: ninja update-hwdb 2021-03-17 16:52:57 +01:00