Commit Graph

44995 Commits

Author SHA1 Message Date
Lennart Poettering
6cba41ab0d blockdev: propagate one more unexpected error 2020-05-18 18:41:56 +02:00
Lennart Poettering
34d16bad2d update TODO 2020-05-18 18:41:14 +02:00
Zbigniew Jędrzejewski-Szmek
b3d15d90c0
Merge pull request #15804 from poettering/hostnamed-instant-part1
four likely safe commits split out of #15624
2020-05-18 15:26:24 +02:00
Zbigniew Jędrzejewski-Szmek
d7d892e694
Merge pull request #15494 from ssahani/dhcpv6-request-options
DHCPv6: Allow to add arbitrary request option
2020-05-18 13:14:36 +02:00
Zbigniew Jędrzejewski-Szmek
d0e3e76bb1
Merge pull request #15165 from ssahani/bonding
network: Move common functions of bonding to bond-util
2020-05-18 08:52:13 +02:00
Dimitri John Ledkov
6dbf352cfb meson: initialize time-epoch to reproducible builds compatible value
Debian Policy encourages to preserve timestamps whenever possible in the
tarballs, thus stable release updates of systemd usually do not bump NEWS file
timestamp. And thus time-epoch remains the same for the lifetime of a release.

It would be better, if each new stable release rebuild of systemd would bump
the time epoch a bit. But at the same time remain
reproducible. SOURCE_DATE_EPOCH is an environmnet variable defined for this
purpose. Thus if available, prefer that, instead of the NEWS file modification
time.

For example, on Debian/Ubuntu under the reproducible builds the
SOURCE_DATE_EPOCH is set to the timestamp from the packaging metadata, thus it
is incremented on every new stable release update, whilst preserving
reproducible builds capability.

Reference: https://reproducible-builds.org/docs/timestamps/
2020-05-18 08:45:01 +02:00
Susant Sahani
28a060688f dhcpv6 tests: Update since we allow arbitrary options to be set 2020-05-17 11:18:46 +02:00
Susant Sahani
35f6a5cb44 network: DHCPv6 - Add support set arbitary request options 2020-05-17 11:18:29 +02:00
Susant Sahani
2b20ca653c sd-dhcp6: Allow to add arbitary request option 2020-05-17 10:54:43 +02:00
Frantisek Sumsal
7a57256c73 test: introduce TEST_PARALLELIZE to support running tests in parallel
Support running tests in parallel by switching to copying of the
base image instead of symlinking it..

This still requires some setup steps, like running `make setup` on tests
which have unique $IMAGE_NAME beforehand (and sequentially), otherwise
they'll all try to create the same base image when started in parallel,
leading to nasty issues. However, as running the integration tests in
parallel is such an unusual use case it should be good enough, for now.
2020-05-17 10:48:16 +02:00
Frantisek Sumsal
e89450921f test: fix public/private image detection and prefer the latter one 2020-05-17 10:46:34 +02:00
Frantisek Sumsal
3be6f50117 test: unify quotation around image names 2020-05-17 10:43:08 +02:00
Susant Sahani
b55818fd12 networkctl: Use bond util common functions 2020-05-17 10:02:03 +02:00
Susant Sahani
5fe5908eed network: Introduce bond util 2020-05-17 10:02:03 +02:00
Susant Sahani
22ae6c7d9a networkctl: VXLan - display more properties 2020-05-17 09:54:25 +02:00
Susant Sahani
35072050e6 network: Introduce ipvlan util
Move ipvlan common to shared
2020-05-17 05:34:19 +02:00
Eric DeVolder
f00c36641a pstore: introduce tmpfiles.d/systemd-pstore.conf
The systemd pstore service archives the contents of /sys/fs/pstore
upon boot so that there is room for a subsequent dump.  The issue is
that while the service is present, the kernel still needs to be
configured to write data into the pstore. The kernel has two
parameters, crash_kexec_post_notifiers and printk.always_kmsg_dump,
that control writes into pstore.

The crash_kexec_post_notifiers parameter enables the kernel to write
dmesg (including stack trace) into pstore upon a panic, and
printk.always_kmsg_dump parameter enables the kernel to write dmesg
upon a shutdown (shutdown, reboot, halt).

As it stands today, these parameters are not managed/manipulated by
the systemd pstore service, and are solely reliant upon the user [to
have the foresight] to set them on the kernel command line at boot, or
post boot via sysfs. Furthermore, the user would need to set these
parameters in a persistent fashion so that that they are enabled on
subsequent reboots.

This patch introduces the setting of these two kernel parameters via
the systemd tmpfiles technique.
2020-05-15 23:15:26 +02:00
Topi Miettinen
b4e1563ffb Increase size of /run to 20%
For low memory machines (256MB), 10% of RAM for /run may not be enough for
re-exec of PID1 because 16MB of free space is required and /run may already
contain something.
2020-05-15 21:40:22 +02:00
Zbigniew Jędrzejewski-Szmek
154962d348 docs: policy for systemd-security subscriptions
Replaces #14325.
2020-05-15 20:40:58 +02:00
Lennart Poettering
18fbb567a8
Merge pull request #15817 from poettering/more-conditions
Add ConditionEnvironment= and ConditionIsEncrypted=
2020-05-15 20:25:34 +02:00
Lennart Poettering
cb1277fa3b udev: get rid of "Could not set flow control of" message on "lo" interface
When setting flow control attributes of an interface we first acquire
the current settings and then add in the new settings before applying
them again. This only works on interfaces that implement the ethtool
ioctls. on others we'll see an ugly "Could not set flow control of"
message, simply because we issue the SIOCETHTOOL ioctl once, for getting
the data. In particular we'll get it for the "lo" interface all the
time, which sucks hard. Let's get rid of it.
2020-05-15 17:58:53 +02:00
Frantisek Sumsal
c07f18ffd4 shared: fix integer overflow in calendarspec
Fixes: oss-fuzz#22208

```
test/fuzz/fuzz-calendarspec/oss-fuzz-22208... ../src/shared/calendarspec.c:666:48: runtime error: signed integer overflow: 2147000000 + 1000000 cannot be represented in type 'int'
    #0 0x7f0b9f6cc56a in prepend_component ../src/shared/calendarspec.c:666
    #1 0x7f0b9f6cd03a in parse_chain ../src/shared/calendarspec.c:718
    #2 0x7f0b9f6cea1c in parse_calendar_time ../src/shared/calendarspec.c:845
    #3 0x7f0b9f6d1397 in calendar_spec_from_string ../src/shared/calendarspec.c:1084
    #4 0x401570 in LLVMFuzzerTestOneInput ../src/fuzz/fuzz-calendarspec.c:17
    #5 0x401ae0 in main ../src/fuzz/fuzz-main.c:39
    #6 0x7f0b9e31b1a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)
    #7 0x40122d in _start (/home/fsumsal/repos/systemd/build/fuzz-calendarspec+0x40122d)

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/shared/calendarspec.c:666:48 in
```
2020-05-15 16:07:29 +02:00
Lennart Poettering
bccba5249a update TODO 2020-05-15 16:05:33 +02:00
Lennart Poettering
410abf8304 man: document the two new condition types 2020-05-15 16:05:33 +02:00
Lennart Poettering
a0b191b705 condition: add ConditionEnvironment=
Prompted by the discussions in #15180.

This is a bit more complex than I hoped, since for PID 1 we need to pass
in the synethetic environment block in we generate on demand.
2020-05-15 16:05:33 +02:00
Lennart Poettering
7cd9e4f8a0 limit-util: quieten a very common debug message that is misleading 2020-05-15 15:50:09 +02:00
Lennart Poettering
411e835c50 condition: return (Condition*) NULL from condition_free()
Follow our usual coding style.
2020-05-15 15:50:09 +02:00
Lennart Poettering
dce719f6c1 condition: introduce generic function type for condition_to_string()-like functions
Let's add a typedef for a function type we use at multiple places.
2020-05-15 15:50:09 +02:00
Lennart Poettering
7f19247b5e condition: add ConditionPathIsEncrypted=
It's easy to add, and should be pretty useful, in particular as in
AssertPathIsEncrypted= as it can be used for checking that
some path is encrypted before some service is invoked that might want to
place secure material there.
2020-05-15 15:50:09 +02:00
Susant Sahani
89fe653544 network: Add support to group links.
Link groups are similar to port ranges found in managed switches.
You can add network interfaces to a numbered group and perform operations
on all the interfaces from that group at once.
2020-05-15 15:27:07 +02:00
Zbigniew Jędrzejewski-Szmek
bf896ca628
Merge pull request #15792 from poettering/repart-allocate
repart: add --size= and --empty=create options for growing/creating disk images from scratch
2020-05-15 11:40:24 +02:00
Lennart Poettering
e1e214c56b
Merge pull request #15265 from fbuihuu/mount-fixes
Mount fixes
2020-05-15 11:13:45 +02:00
Zbigniew Jędrzejewski-Szmek
214ffe64fc
Merge pull request #15052 from jaankit/journal-send
journal-send: Fix the limitation of LINE_MAX
2020-05-15 10:42:25 +02:00
Zbigniew Jędrzejewski-Szmek
f5b04551b8
Merge pull request #15812 from poettering/deprecate-stdout-syslog
Get rid of StandardOutput=syslog
2020-05-15 09:23:24 +02:00
Frantisek Sumsal
b0eb3d6ed2 hwdb: fix microphone shortcut on HP EliteBook 840 G1
Fixes: #15774
2020-05-15 09:09:08 +02:00
Lennart Poettering
f3dc6af20f core: automatically update StandardOuput=syslog to =journal (and similar for StandardError=)
Let's go one step further and upgrade implicitly. Usually =syslog
assignments are historic artifacts only. Let's upgrade the lines
automatically, and politely suggest people update their unit
files/configuration (and drop the lines altogether, without
replacement).

Fixes: #15807
2020-05-15 00:05:46 +02:00
Lennart Poettering
d2b843554a man: drop some left-over mentions of StandardOutput=syslog
We dropped them from the StandardOuput= documentation long ago, but
elswhere some references where lurking.
2020-05-15 00:05:46 +02:00
Lennart Poettering
157644119b update TODO 2020-05-14 23:59:23 +02:00
Lennart Poettering
96deebbcda man: document new --empty=create and --size= switches to repart 2020-05-14 23:59:23 +02:00
Lennart Poettering
05ae606b79 test: update tests to use new repart features 2020-05-14 23:59:23 +02:00
Lennart Poettering
a26f4a49f4 repart: add support for create/growing loopback files
This adds --empty=create and --size= for creating loopback files from
scratch of a specified size, or growing loopback files to the specified
size when they already exist.

This is useful when operating on disk image files, as a manual
invocation of fallocate(1) becomes unnecessary.
2020-05-14 23:59:23 +02:00
Lennart Poettering
9a1deb8578 repart: suppress complaints about lack of BLKRRPART when operating on regular file 2020-05-14 23:01:09 +02:00
Lennart Poettering
e2d65cd299 repart: explain when we exit early and don't do a thing 2020-05-14 23:00:52 +02:00
Andreas Rammhold
32fcf399bf sd-netlink: remove unused RTNL_WQUEUE_MAX define
While investigating why some of my netlink calls would timeout I
stumbled upon the definition of the max write queue length. Finding this
constant made me believe we still had a write queue in the code - which
isn't true. The netlink write queue code was removed in #189.
2020-05-14 22:27:03 +02:00
Lennart Poettering
c53ce14dfc sysctl: check correct error code 2020-05-14 20:49:21 +02:00
Ankit Jain
2eaf435a16 journal-send: Fix the limitation of LINE_MAX
- If length of formatted string >= LONG_LINE_MAX then return -ENOBUFS
- Normal Case:
  - length of formatted string < POSIX defined LINE_MAX
  - Allocate sbuf to accomodate the message
- Rare case:
  - LINE_MAX < length of formatted string < LONG_LINE_MAX
  - Allocate the required length using alloca()
2020-05-14 17:15:34 +00:00
Zbigniew Jędrzejewski-Szmek
969d329490 test-journal-send: send printing of long lines 2020-05-14 17:15:14 +00:00
Rubens Figueiredo
4df4df5b56 network: allow setting VLAN protocol on bridges
Signed-off-by: Rubens Figueiredo <rubens.figueiredo@bisdn.de>
2020-05-14 17:59:57 +02:00
Susant Sahani
cf217a0922 networkctl: Add support to display macvlan/macvtap mode 2020-05-14 17:35:56 +02:00
Susant Sahani
d51674806a network: Introduce macvlan util 2020-05-14 17:35:56 +02:00