Commit Graph

31859 Commits

Author SHA1 Message Date
Reverend Homer 8ac8c411d7 remove canonicalize_file_name() mention from TODO
canonicalize_file_name() invocations were replaced by chase_symlinks() in
Decemeber 2016 with PR #4694, so we don't need this mention in the TODO anymore
2018-01-22 15:49:45 +01:00
Lennart Poettering 47925d7f32
Merge pull request #7943 from yuwata/fix-chase_symlinks
fs-util: use `_cleanup_close_` attribute
2018-01-22 12:42:24 +01:00
Frantisek Sumsal 1dc52f56f9 journald-native: Fix typo in MANDLOCK message 2018-01-22 12:27:09 +01:00
Susant Sahani fb5c821664 networkd: DHCPv6 client allow to configure Rapid Commit (#6930)
The DHCPv6 client can obtain configuration parameters from a
DHCPv6 server through a rapid two-message exchange solicit and reply).
When the rapid commit option is enabled by both the DHCPv6 client and
the DHCPv6 server, the two-message exchange is used, rather than the default
four-method exchange (solicit, advertise, request, and reply). The two-message
exchange provides faster client configuration and is beneficial in environments
in which networks are under a heavy load.

Closes #5845
2018-01-22 17:09:18 +09:00
Yu Watanabe db52db4afa fuzz: cast to void when return value is ignored 2018-01-22 09:58:29 +09:00
Yu Watanabe 0f3da640de fuzz: check return value
Closes CID #1385306 and #1385300.
2018-01-22 09:55:38 +09:00
Yu Watanabe 7444956723 fuzz: fix coding style 2018-01-22 09:54:30 +09:00
Zbigniew Jędrzejewski-Szmek d8eb10d61a core: delay logging the taint string until after basic.target is reached (#7935)
This happens to be almost the same moment as when we send READY=1 in the user
instance, but the logic is slightly different, since we log taint when
basic.target is reached in the system manager, but we send the notification
only in the user manager. So add a separate flag for this and propagate it
across reloads.

Fixes #7683.
2018-01-21 21:17:54 +09:00
Yu Watanabe 48eae2e480 test-resolve: check return value
Closes CID #1385310.
2018-01-21 19:38:33 +09:00
Yu Watanabe 1eeddba492 sd-dhcp6-client: do not refer uninitialized variable
Fixes CID #1385308.
2018-01-21 19:27:30 +09:00
Yu Watanabe b539437a05 fs-util: chase_symlinks(): prevent double free
Fixes CID #1385316.
2018-01-21 19:19:28 +09:00
Yu Watanabe 2b6d2dda6b fs-util: use _cleanup_close_ attribute
The commit f14f1806e3 introduced CHASE_SAFE
flag. When the flag is set, then `fd_parent` may not be properly closed.
This sets `_cleanup_close_` attribute to `fd_parent`.
Thus, now `fd_parent` is always closed properly.
2018-01-21 19:07:14 +09:00
Zbigniew Jędrzejewski-Szmek 91ec71c162 man: document that sd_j_stream_fd is signal safe (#7942)
Fixes #7912.
2018-01-21 18:51:55 +09:00
Yu Watanabe 08fde561ba
Merge pull request #7938 from keszybz/get-fd-unsafe
man: document signal unsafeness of sd_journal_get_fd
2018-01-20 13:20:33 +09:00
Zbigniew Jędrzejewski-Szmek 89f552c0e2 man: document signal unsafeness of journal functions
Fixes #7912.
2018-01-20 15:11:54 +11:00
Zbigniew Jędrzejewski-Szmek 000b1ba561 NEWS: fix typo 2018-01-20 14:04:17 +11:00
Alan Jenkins bf105e38d5 man: sd_journal_stream_fd: no, fds are not shared (#7926)
sd_journal_stream_fd() does not return the same file descriptor across
different calls.  It can't possibly do so, because the file descriptor
is created using certain parameters passed by the caller.

Also the implementation clearly isn't doing this, it's just connecting
to a unix socket.

It opens exactly one file descriptor, and does not close it unless there
is a write failure.  Nothing like "temporarily multiple file descriptors
may be open".
2018-01-20 14:02:50 +11:00
Zbigniew Jędrzejewski-Szmek 18e3beac2f
Merge pull request #7936 from titanous/fuzz-dhcp-server
fuzz: add DHCP server fuzzer
2018-01-20 13:58:19 +11:00
Jonathan Rudenberg 33d62eba91 fuzz: simplify oss-fuzz build instructions in HACKING 2018-01-19 21:48:14 -05:00
Jonathan Rudenberg 2bd37c5be2 fuzz: add DHCP server fuzzer 2018-01-19 21:48:14 -05:00
Yu Watanabe fec0ccea86 man: fix typo (#7937)
Reported by Дилян Палаузов (https://github.com/dilyanpalauzov) in #7870.
2018-01-20 13:22:57 +11:00
Yu Watanabe 7e577c30d6
Merge pull request #7934 from keszybz/man-improvements
Man page improvements
2018-01-20 11:15:52 +09:00
Susant Sahani 09f5dfad2c networkd: add quickack option to route (#7896)
This patch adds quickack option to enable/disable TCP quick ack
mode for per-route.
2018-01-20 08:49:15 +09:00
Michal Sekletar 877dce40cb man: make clear that accessing network and mounting filesystems is not supported in udev rules (#7916)
These restrictions are implied by systemd options used for
systemd-udevd.service, i.e. MountFlags=slave and
IPAddressDeny=any. However, there are users out there getting tripped by
this, so let's make things clear in the man page so the actual
restrictions we implement by default have better visibility.
2018-01-20 08:47:27 +09:00
Zbigniew Jędrzejewski-Szmek 22a705631d man: clarify that Requires stop propagation only applies to explit requests
Follow-up for e79eabdb1b. There was an
apparent contradiction:

  man/systemd.unit says for Requires=:

  Besides, with or without specifying After=, this unit will be deactivated
  if one of the other units get deactivated.

  Also, some unit types may deactivate on their own (for example, a service
  process may decide to exit cleanly, or a device may be unplugged by the
  user), which is not propagated to units having a Requires= dependency.

Fixes #7870.
2018-01-20 10:45:02 +11:00
Susant Sahani 8cdc46e7ba networkd: ignore Static Routes option when Classless Static Routes is given (#7807)
When the DHCP server returns both a Classless Static Routes
option and a Static Routes option, the DHCP client MUST ignore the
Static Routes option.

Closes #7792
2018-01-20 08:42:45 +09:00
Zbigniew Jędrzejewski-Szmek 1317f55b9b man: alphabetize and move targets to proper sections in systemd.special 2018-01-20 10:38:09 +11:00
Zbigniew Jędrzejewski-Szmek 1655cdee04 man: fix example formatting in systemd.preset
Repeating "example" everywhere was not useful, so remove
that and improve the formatting a bit.
2018-01-20 10:37:34 +11:00
Zbigniew Jędrzejewski-Szmek c605bd00d2 man: document default for WakeOnLan 2018-01-20 10:33:15 +11:00
Zbigniew Jędrzejewski-Szmek 8eeaf79c86 man: add a note where coredump default values are
I don't want to include all the default values in the man page
because that's bound to get out of date…
2018-01-20 10:27:46 +11:00
Zbigniew Jędrzejewski-Szmek ee8f5a58b0 man: fix _STREAM_ID, _LINE_BREAK descriptions
Pointed out by Дилян Палаузов (https://github.com/dilyanpalauzov).
Fixes #7870.
2018-01-20 10:15:06 +11:00
Zbigniew Jędrzejewski-Szmek c3de717e51
Merge pull request #7675 from shawnl/unaligned
Issue #7654 (unaligned loads on sparc64)
2018-01-20 10:00:14 +11:00
Yu Watanabe 22bc57c58a fs-util: chase_symlinks(): support empty root
The commit b1bfb84804 makes chase_symlinks()
recognize empty string for root as an invalid parameter. However,
empty root is often used e.g. systemd-nspawn.
This makes chase_symlinks() support empty string safely.

Fixes #7927.
2018-01-19 11:41:28 +01:00
Zbigniew Jędrzejewski-Szmek 8f2e968659
Merge pull request #7923 from keszybz/resolved-generic-packet
Resolved generic packet
2018-01-19 17:42:29 +11:00
Alan Jenkins 68f7480b7e
Merge pull request #7913 from sourcejedi/devpts
3 nitpicks from core/namespace.c
2018-01-18 21:56:26 +00:00
jdkbx 51aa88268e hwdb: Add Lenovo IdeaPad Miix 320 sensor mount quirk (#7707) 2018-01-19 05:09:58 +09:00
Alan Jenkins a30504ed69 man: systemd-nspawn: fix list of default capabilities (#7925)
* Sort them alphabetically.
* Add CAP_MKNOD (commit 7f112f50fe added it).

the list is now in sync with the one at the top of nspawn.c
2018-01-19 04:11:11 +09:00
Alan Jenkins 0970be500d
Merge pull request #7924 from sourcejedi/devpts-regression-fix
core: un-break PrivateDevices= by allowing it to mknod /dev/ptmx
2018-01-18 19:04:12 +00:00
Alan Jenkins 225874dc9c core: clone_device_node(): add debug message
For people who use debug messages, maybe it is helpful to know that
PrivateDevices= failed due to mknod(), and which device node.

(The other (un-logged) failures could be while mounting filesystems e.g. no
CAP_SYS_ADMIN which is the common case, or missing /dev/shm or /dev/pts,
or missing /dev/ptmx).
2018-01-18 13:58:13 +00:00
Alan Jenkins 5a7f87a9e0 core: un-break PrivateDevices= by allowing it to mknod /dev/ptmx
#7886 caused PrivateDevices= to silently fail-open.
https://github.com/systemd/systemd/pull/7886#issuecomment-358542849

Allow PrivateDevices= to succeed, in creating /dev/ptmx, even though
DeviceControl=closed applies.

No specific justification was given for blocking mknod of /dev/ptmx.  Only
that we didn't seem to need it, because we weren't creating it correctly as
a device node.
2018-01-18 12:10:20 +00:00
Zbigniew Jędrzejewski-Szmek bfc1d7345f resolved: fix confusion with generic data in unparsable packets
Issue 5465.
2018-01-18 20:28:38 +11:00
Zbigniew Jędrzejewski-Szmek 4a49e560d4 resolved: split out parts of dns_packet_extract
This fairly complicated function was deeply nested and
hard to read...
2018-01-18 19:35:47 +11:00
Zbigniew Jędrzejewski-Szmek 0241c1c0ee bus-message: avoid -Wnull-pointer-arithmetic warning on new clang
We just need some pointer, so use alignment directly converted
to the right type.
2018-01-18 17:38:35 +11:00
Zbigniew Jędrzejewski-Szmek 1aaadf859b
Merge pull request #7876 from titanous/oss-fuzz
Add initial fuzzing infrastructure
2018-01-18 12:41:13 +11:00
Jonathan Rudenberg 8b53eb4d47 fuzz: add docs on creating fuzzer targets to HACKING 2018-01-17 13:57:06 -05:00
Jonathan Rudenberg 31e57a35dc fuzz: allow building fuzzers outside of oss-fuzz
Add a new -Dllvm-fuzz=true option that can be used to build against
libFuzzer and update the oss-fuzz script to work outside of the
oss-fuzz build environment.
2018-01-17 13:57:06 -05:00
Jonathan Rudenberg 7d941c0635 fuzz: rebuild everything during each oss-fuzz build
This avoids failures while using the oss-fuzz local testing
infrastructure.
2018-01-17 13:57:06 -05:00
Jonathan Rudenberg b4081f3ea2 fuzz: disable all deps when building with oss-fuzz
The fuzz targets are intended to be fast and only target systemd
code, so they don't need to call out to any dependencies. They also
shouldn't depend on shared libraries outside of libc, so we disable
every dependency when compiling against oss-fuzz. This also
simplifies the upstream build environment significantly.
2018-01-17 13:57:06 -05:00
Jonathan Rudenberg 7db7d5b733 fuzz: add initial fuzzing infrastructure
The fuzzers will be used by oss-fuzz to automatically and
continuously fuzz systemd.

This commit includes the build tooling necessary to build fuzz
targets, and a fuzzer for the DNS packet parser.
2018-01-17 13:57:06 -05:00
Lennart Poettering 52ffb3d2e9
Merge pull request #7903 from yuwata/fix-7863
network: create runtime sub-directories after drop_privileges()
2018-01-17 19:18:47 +01:00