Commit Graph

44406 Commits

Author SHA1 Message Date
Norbert Lange 84cb27086f Improve help for clang-format
The comments lack the most important usecase: fixing up your commits.
2020-04-25 09:39:31 +02:00
Frantisek Sumsal 3b4ea094e2 ci: introduce CIFuzz
Per-PR fuzzing provided by OSS-Fuzz using GH workflows.

See: https://google.github.io/oss-fuzz/getting-started/continuous-integration/
2020-04-24 14:06:21 +03:00
Thomas Haller feb7d7a212 dhcp6: make string argument to sd_dhcp6_client_set_request_mud_url() const 2020-04-24 10:13:33 +02:00
Zbigniew Jędrzejewski-Szmek c13f4643f4 Merge pull request #15579 from DaanDeMeyer/sd-bus-get-name/owner-creds-docs 2020-04-24 08:29:41 +02:00
Zbigniew Jędrzejewski-Szmek e2697253c8
Merge pull request #15564 from poettering/tmpfiles-no-proc
util-lib: check for /proc being mounted in some really basic fs operations
2020-04-24 08:16:22 +02:00
Daan De Meyer 425d5cecbe sd-bus: Add sd_bus_get_name/owner_creds docs 2020-04-24 08:15:05 +02:00
Zbigniew Jędrzejewski-Szmek 11f9379866
Merge pull request #15570 from poettering/cmsg-find
CMSG_FIND_DATA() and cmsg_find() work
2020-04-24 07:45:07 +02:00
Lennart Poettering 41ab8c67eb tree-wide: use structured initialization at various places 2020-04-24 07:44:42 +02:00
Lennart Poettering 2efa5bc6fa dhcp-server: port to recvmsg_safe()
Split out of #15457, let's see if this is the culprit of the CI failure.
2020-04-24 07:43:42 +02:00
Lennart Poettering 2adfd1bda1 icmp6-util: port to recvmsg_safe()
Split out of #15457, let's see if this is the culprit of the CI failure.
2020-04-24 07:41:32 +02:00
Lennart Poettering 84b5d3e532 dhcp-client: port to recvmsg_safe()
Split out of #15457, let's see if this is the culprit of the CI failure.

(also setting green label here, since @keszybz already greenlit it in that other PR)
2020-04-24 07:40:32 +02:00
Frantisek Sumsal a8af7f6a5c fuzzit: make the submit phase a bit more robust
The submit phase of the Fuzzit Travis job has been spuriously failing
for some time with various (and usually pretty hidden) errors, like:

```
./fuzzit create job --type regression ...
2020/04/23 17:02:12 please set env variable FUZZIT_API_KEY or pass --api-key. API Key for you account: ...
```

```
./fuzzit create job --type regression ...
2020/04/23 11:36:53 Creating job...
2020/04/23 11:36:54 Uploading fuzzer...
2020/04/23 11:36:54 Job created successfully
2020/04/23 11:36:54 Get https://...&action=create: read tcp x.x.x.x:39674->x.x.x.x:443: read: connection reset by peer
```

```
./fuzzit create job --type regression ...
2020/04/22 18:09:15 Creating job...
2020/04/22 18:09:16 Uploading fuzzer...
2020/04/22 18:09:37 Job created successfully
2020/04/22 18:09:37 500 Internal Server Error
```

etc.

Let's retry each submit job up to three times to (hopefully) mitigate this.
2020-04-24 01:58:37 +03:00
Lennart Poettering 9494da41c2 nss-systemd: don't synthesize root/nobody when iterating
Fixes: #15160
2020-04-23 23:07:08 +02:00
Daan De Meyer 68b5003bc1 sd-bus: Add sd_bus_message_get_creds docs 2020-04-23 22:56:10 +02:00
Daan De Meyer 0e4305eeea sd-bus: Add sd_bus_get_name_machine_id docs 2020-04-23 22:40:20 +02:00
Daan De Meyer d7fbc6804e sd-bus: Add sd_bus_send_to docs 2020-04-23 22:38:44 +02:00
Lennart Poettering bf39cb7b92
Merge pull request #15566 from poettering/destroy-binfmt
unregister binary formats during shutdown
2020-04-23 21:15:22 +02:00
Lennart Poettering 113a51d221 home: fix strv NUL termination
Fixes: #15559
2020-04-23 21:15:02 +02:00
Zbigniew Jędrzejewski-Szmek 927cffd57f Merge pull request #15569 from DaanDeMeyer/sd-bus-message-peek-type-docs 2020-04-23 20:11:14 +02:00
Lennart Poettering b2cdefad3a networkd: don't do lldp rx nor tx on bond devices
Fixes: #15146
2020-04-23 20:01:30 +02:00
Zbigniew Jędrzejewski-Szmek 37f446eab7
Merge pull request #15550 from DaanDeMeyer/sd-bus-open/close/enter/exit-container-docs
sd-bus: Add sd_bus_open/close/enter/exit_container docs
2020-04-23 19:58:43 +02:00
Zbigniew Jędrzejewski-Szmek 9d569d5fcb man: add a description of handling of single-label names
It turns out that our man page didn't describe the handling of single-label
names almost at all. This probably adds to the confusion regarding the subject.
So let's first describe what our current implementation is doing.

Quoting https://www.iab.org/documents/correspondence-reports-documents/2013-2/iab-statement-dotless-domains-considered-harmful/:
> Applications and platforms that apply a suffix search list to a single-label
> name are in conformance with IETF standards track RFCs. Furthermore,
> applications and platforms that do not query DNS for a TLD are in conformance
> with IETF standards track recommendations

Current behaviour is in line with that recommendation.

For #13763.
2020-04-23 19:54:52 +02:00
Lennart Poettering 035e3cb9f9
Merge pull request #15563 from keszybz/wait-callback-tweak
Add NULL callback check in one more place
2020-04-23 19:50:36 +02:00
Lennart Poettering 08508c4862
Merge pull request #15561 from poettering/udev-memdup-fix
udev: nulstr NUL termination fix
2020-04-23 19:50:12 +02:00
Lennart Poettering 371d72e05b socket-util: introduce type-safe, dereferencing wrapper CMSG_FIND_DATA around cmsg_find()
let's take this once step further, and add type-safety to cmsg_find(),
and imply the CMSG_DATA() macro for finding the cmsg payload.
2020-04-23 19:41:15 +02:00
Lennart Poettering dac556fa7b tree-wide: use cmsg_find() helper at various places where appropriate 2020-04-23 19:41:15 +02:00
Daan De Meyer 3df22bb5c8 sd-bus: Add sd_bus_message_peek_type docs 2020-04-23 19:37:21 +02:00
Daan De Meyer 7cd40caa66 sd-bus: Add sd_bus_message_open/close/enter/exit_container docs 2020-04-23 18:30:40 +02:00
Daan De Meyer 31e4abd1a6 sd-bus: Fix typo in sd_bus_message_append_array docs 2020-04-23 18:27:34 +02:00
Lennart Poettering 0f4a141744
Merge pull request #15504 from poettering/cmsg-find-pure
just the recvmsg_safe() stuff from #15457
2020-04-23 17:28:19 +02:00
Lennart Poettering cd9aa8f0f9 man: document binfmt's new --unregister switch 2020-04-23 17:14:54 +02:00
Lennart Poettering 846acb6798 binfmt: also unregister binfmt entries from unit
We unregister binfmt_misc twice during shutdown with this change:

1. A previous commit added support for doing that in the final shutdown
   phase, i.e. when we do the aggressive umount loop. This is the robust
   thing to do, in case the earlier ("clean") shutdown phase didn't work
   for some reason.

2. This commit adds support for doing that when systemd-binfmt.service
   is stopped. This is a good idea so that people can order mounts
   before the service if they want to register binaries from such
   mounts, as in that case we'll undo the registration on shutdown
   again, before unmounting those mounts.

And all that, just because of that weird "F" flag the kernel introduced
that can pin files...

Fixes: #14981
2020-04-23 17:14:45 +02:00
Lennart Poettering f3670df13e binfmt: modernize code a bit
Let's just copy out the bit of the string we need, and let's make sure
we refuse rules called "status" and "register", since those are special
files in binfmt_misc's file system.
2020-04-23 17:14:41 +02:00
Lennart Poettering 0282c0285a shutdown: unregister all binfmt_misc entries before entering shutdown loop
Apparently if the new "F" flag is used they might pin files, which
blocks us from unmounting things. Let's hence clear this up explicitly.
Before entering our umount loop.

Fixes: #14981
2020-04-23 17:14:38 +02:00
Lennart Poettering 965cc99416 shared: add common helper for unregistering all binfmt entries 2020-04-23 17:13:50 +02:00
Lennart Poettering a9ab5cdb50
Merge pull request #15472 from keszybz/dbus-api-docs
A few more dbus api documentation updates
2020-04-23 17:01:11 +02:00
Lennart Poettering 185924ab63 update TODO 2020-04-23 16:01:46 +02:00
Zbigniew Jędrzejewski-Szmek d3d53e5cd1 shared: add NULL callback check in one more place
Follow-up for 9f65637308.
2020-04-23 14:53:54 +02:00
Lennart Poettering f8606626ed tmpfiles: if we get ENOENT when opening /proc/self/fd/, check if /proc is mounted
let's return ENOSYS in that case, to make things a bit less confusng.

Previously we'd just propagate ENOENT, which people might mistake as
applying to the object being modified rather than /proc/ just not being
there.

Let's return ENOSYS instead, i.e. an error clearly indicating that some
kernel API is not available. This hopefully should put people on a
better track.

Note that we only do the procfs check in the error path, which hopefully
means it's the less likely path.

We probably can add similar bits to more suitable codepaths dealing with
/proc/self/fd, but for now, let's pick to the ones noticed in #14745.

Fixes: #14745
2020-04-23 14:52:10 +02:00
Lennart Poettering 883fff25f4 stat-util: add simpler helper for checking if /proc/ is mounted 2020-04-23 14:51:08 +02:00
Lennart Poettering 6d965610bd stat-util: no need to open a file to check fs type 2020-04-23 14:50:53 +02:00
Lennart Poettering 0f7e4b2888 sysusers,tmpfiles: always mention error when failing to replace specifiers 2020-04-23 14:50:07 +02:00
Lennart Poettering 2230e8f29d sysusers: add accidentally forgotten 'return' 2020-04-23 14:49:14 +02:00
Zbigniew Jędrzejewski-Szmek 8f3e342fa9 core: fix unused variable warning when !HAVE_SECCOMP 2020-04-23 14:42:09 +02:00
Lennart Poettering 9663ed378e udev: use STR_IN_SET() wher eit makes sense 2020-04-23 13:56:21 +02:00
Lennart Poettering cd3c8a117c udev: prepare memory for extra NUL termination for NULSTR
Fixes: #15162
2020-04-23 13:56:21 +02:00
Lennart Poettering 2d69cf6eb0
Merge pull request #15543 from poettering/fix-ubsan-sd-bus
sd-bus: work around ubsan warning
2020-04-23 13:39:58 +02:00
Balint Reczey 9f65637308 shared: Don't try calling NULL callback in bus_wait_for_units_clear
BugLink: https://bugs.launchpad.net/bugs/1870930
2020-04-23 12:25:20 +02:00
Lennart Poettering b70cc80ffb
Merge pull request #15544 from poettering/fix-journalctl-namespace
sd-journal: fix namespace check
2020-04-23 12:19:25 +02:00
Lennart Poettering a5f0f46f1a
Merge pull request #15538 from poettering/nspawn-no-netns
nspawn: politely refuse --image= when run inside non-host netns
2020-04-23 11:11:11 +02:00