Commit graph

2417 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 87057e244b resolved: support libidn2 in addition to libidn
libidn2 2.0.0 supports IDNA2008, in contrast to libidn which supports IDNA2003.

https://bugzilla.redhat.com/show_bug.cgi?id=1449145
From that bug report:

Internationalized domain names exist for quite some time (IDNA2003), although
the protocols describing them have evolved in an incompatible way (IDNA2008).
These incompatibilities will prevent applications written for IDNA2003 to
access certain problematic domain names defined with IDNA2008, e.g., faß.de is
translated to domain xn--fa-hia.de with IDNA2008, while in IDNA2003 it is
translated to fass.de domain. That not only causes incompatibility problems,
but may be used as an attack vector to redirect users to different web sites.

v2:
- keep libidn support
- require libidn2 >= 2.0.0
v3:
- keep dns_name_apply_idna caller dumb, and keep the #ifdefs inside of the
  function.
- use both ±IDN and ±IDN2 in the version string
2017-05-11 14:25:01 -04:00
Max Resch b2bb40ce9a sd-boot: added shim signature/MOK validation (#5702)
Adds support for booting in a SecureBoot environment with shim as a
preloader. Install an appropriate UEFI security policy to check PE
signature of a chained kernel or UEFI application (using LoadImage())
against the MOK database maintained by shim, using shim's installed
BootServices.

Implementation details for installing the security policy are based on
code from the LinuxFoundation's SecureBoot PreLoader, part of efitools
licensed under LGPL 2.1

Current signed (by Microsoft) versions of shim (Versions 0.8 & 0.9)
so not install a security policy by themselves, future Versions of
shim might (a compile time switch exists in rectent git versions),
so in the future this PR might become unnecessary.
2017-05-09 20:57:40 +02:00
John Paul Adrian Glaubitz 15f82677a6 build: Add missing SECCOMP_CFLAGS to test-seccomp and test-execute targets (#5924) 2017-05-09 19:31:38 +02:00
Michael Biebl db374ff564 build-sys: don't generate index.html with --disable-manpages (#5865)
Don't generate man/index.html and the dependent man/systemd.index.html
if man pages have been disabled.

Closes #5854
2017-04-30 18:21:59 +02:00
Lennart Poettering ccefd046c6 Merge pull request #5529 from ssahani/label
networkd / sd-netlink: add support for address label
2017-04-29 13:42:09 +02:00
userwithuid d8431fc3f4 build-sys: only install libexecdir/resolv.conf if resolved is enabled (#5826)
as mentioned in https://github.com/systemd/systemd/pull/5811
2017-04-27 13:22:40 -04:00
Susant Sahani 95b74ef6ea networkd: add support for address label
IPv6 address labels are used for address selection; they are described in RFC 3484.
Precedence is managed by userspace, and only the label itself is stored in the kernel.

enp0s25.network

[Match]
Name=enp0s25

[Network]
DHCP=yes
Address = 2001:db8:f00:baa::b

[AddressLabel]
Label=199
Prefix=2001:db8:41::/64

[AddressLabel]
Label=11
Prefix=2001:db8:31::/64

[AddressLabel]
Label=123
Prefix=2001:db8:21::/64

[AddressLabel]
Label=124
Prefix=2001:db8:11::/64
[sus@maximus label]$ ip addrlabel list

prefix ::1/128 label 0
prefix ::/96 label 3
prefix ::ffff:0.0.0.0/96 label 4
prefix 2001:db8:41::/64 dev enp0s25 label 199
prefix 2001:db8:31::/64 dev enp0s25 label 11
prefix 2001:db8:21::/64 dev enp0s25 label 123
prefix 2001:db8:11::/64 dev enp0s25 label 124
prefix 2001::/32 label 6
prefix 2001:10::/28 label 7
prefix 3ffe::/16 label 12
prefix 2002::/16 label 2
prefix fec0::/10 label 11
prefix fc00::/7 label 5
prefix ::/0 label 1
2017-04-26 16:00:44 +05:30
Evgeny Vereshchagin d5d5e06086 Merge pull request #5704 from keszybz/meson
meson: build systemd using meson
2017-04-25 16:10:15 +03:00
Susant Sahani 6598e04641 networkd: Introduce GENEVE netdev
This work enables cration of geneve tunnel
2017-04-25 10:34:15 +05:30
Lennart Poettering 8ea9aa9e88 Merge pull request #5354 from msekletar/issue-518
service: serialize information about currently executing command
2017-04-24 19:51:34 +02:00
Zbigniew Jędrzejewski-Szmek d83f4f506d test-efi-create-disk.sh: allow running from separate build dir, hook up to meson
This allow test-efi-disk.img to be created under meson.
The invocation of qemu is not converted yet, in particular because the
command-line used in Makefile.am is outdated.
2017-04-23 21:47:29 -04:00
Zbigniew Jędrzejewski-Szmek abba22c51c meson: add hwdb/update target 2017-04-23 21:47:29 -04:00
Zbigniew Jędrzejewski-Szmek 521e7c3aea journal/fsprg: set -Wno-pointer-arithm only for that file
Both gcc and clang issue a host of warnings about void pointers used in
arithmetic. The warning must be ignored in that file to avoid multiple
warnings.

Makefile.am used to set this for all libsystemd-journal-internal.a sources,
because there's no finer granularity for warnings. Let's just set it for
this one file.
2017-04-23 21:47:26 -04:00
Zbigniew Jędrzejewski-Szmek d0e6ea7d5b Makefile.am: remove duplicated rules for efi
Specifying the same rule with a slightly different dep list was not useful,
since make cannot distinguish rules with the same input / output. (It possibly
could have two rules with different dependency list, but here all dependencies
that are different between the two rules are always present, so the two rules
are effectively the same.)
2017-04-21 12:05:55 -04:00
Zbigniew Jędrzejewski-Szmek fb369a5bdf Makefile.am: link dbus-org.freedesktop.network1 alias in /etc
This makes dbus-org.freedesktop.network1.service like dbus-org.freedesktop.resolve1.service.
When systemd-networkd.service is disabled, the alias is also removed.
2017-04-19 19:27:01 -04:00
Lennart Poettering 948a3241de Merge pull request #5708 from vcatechnology/arm-cross-compile
ARM32 cross-compile fixes
2017-04-17 15:49:06 +02:00
Michal Sekletar 123d672e85 tests: add new test for issue #518 2017-04-11 09:22:29 +02:00
Matt Clarkson cf8e2953b5 build-sys: correct ARM32 GNU EFI boot binary build
Due to ARM not having an EFI capable objcopy we need to use the binary
output argument. This is correctly set up for AArch64 but is missed
when building for ARM32. This patch adds the ARCH_ARM automake define
which can then be used in the makefile to determine if to use the
correct linker flags.

The addition of the ARM32 flags is a copy and paste from the AArch64 to
create a logical OR for the ARCH_AARCH64 and ARCH_ARM variables. I
couldn't figure out a better way to create the conditional with basic
Make language constructs.
2017-04-06 14:33:02 +01:00
Zbigniew Jędrzejewski-Szmek cc566cd06c build-sys: drop obsolete hook from Makefile.am 2017-04-04 22:39:30 -04:00
Zbigniew Jędrzejewski-Szmek 65fbd93915 udev: rename gperf struct name to match other headers
This makes it easier to use the same generator script as for other
gperf scripts. With automake each gperf file had it's own rule, but
with meson I'm trying to use one script, and this inconsistency made
that harder.
2017-04-04 20:36:09 -04:00
Zbigniew Jędrzejewski-Szmek 948aaa7c52 tree-wide: standardize on $(PACKAGE_VERSION) for the version string
We defined both $(VERSION) and $(PACKAGE_VERSION) with the same contents.
$(PACKAGE_VERSION) is slightly more descriptive, so settle on that, and
drop the other define.
2017-04-04 20:36:09 -04:00
Zbigniew Jędrzejewski-Szmek 1b81e156c5 build-sys: drop undefined target ref from Makefile.am 2017-04-04 20:36:09 -04:00
Zbigniew Jędrzejewski-Szmek f52df9bff3 build-sys: drop undefined var ref from Makefile.am 2017-04-04 20:36:09 -04:00
Zbigniew Jędrzejewski-Szmek 3bcaf458f6 Move busctl sources to src/busctl
busctl is not part of libsystemd, and should not be stored under libsystemd.
In particular this is confusing because busctl is linked with libshared, but
stuff in libsystemd is not supposed to depend on libshared.
2017-04-04 20:36:09 -04:00
Zbigniew Jędrzejewski-Szmek 61d1a5a25c test-sizeof: do not link with libsystemd-shared
This makes it much quicker to compile.
2017-03-29 21:31:21 -04:00
Zbigniew Jędrzejewski-Szmek 5a664ca10f rules: add a rule to set /dev/kvm access mode and ownership (#5597)
Kernel default mode is 0600, but distributions change it to group kvm, mode
either 0660 (e.g. Debian) or 0666 (e.g. Fedora). Both approaches have valid
reasons (a stricter mode limits exposure to bugs in the kvm subsystem, a looser
mode makes libvirt and other virtualization mechanisms work out of the box for
unprivileged users over ssh).

In Fedora the qemu package carries the relevant rule, but it's nicer to have it
in systemd, so that the permissions are not dependent on the qemu package being
installed. Use of packaged qemu binaries is not required to make use of
/dev/kvm, e.g. it's possible to use a self-compiled qemu or some alternative.

https://bugzilla.redhat.com/show_bug.cgi?id=1431876

To accomodate both approaches, add a rule to set the mode in 50-udev-default.rules,
but allow the mode to be overridden with a --with-dev-kvm-mode configure rule.
The default is 0660, as the (slightly) more secure option.
2017-03-27 12:34:24 +02:00
Thomas Haller 1539a651a9 basic: don't link "libm.so" into "libbasic.so" (#5628)
Very few parts of the systemd source require <math.h> or "libm.so".
Linking libbasic with -lm drags the mathematical library in for all
systemd components, and in turn for all users of systemd libraries.

It's just unneeded.
2017-03-24 15:36:06 +01:00
Michael Biebl 29f3265584 units: simplify rescue.service and emergency.service (#5623)
The emergency.service and rescue.service units have become rather
convoluted. We spawn multiple shells and the help text spans multiple lines
which makes the units hard to read.

Move the logic into a single shell script and call that via ExecStart.
2017-03-22 23:37:06 -04:00
Michael Biebl 1de2fef652 build-sys: minor indentation fix 2017-03-22 18:59:09 +01:00
steelman ff2e33db54 build-sys: make RPM macros installation path configurable (#5564)
--with-rpmmacrosdir=no disables installation of the macros.
2017-03-14 19:16:47 -04:00
Zbigniew Jędrzejewski-Szmek 1e7a425100 build-sys: add helper command to sign tarballs 2017-03-11 19:17:38 -05:00
Zbigniew Jędrzejewski-Szmek 92f58d6647 build-sys: simplify git tar invocation
git is nowadays nice enough to compress based on the output file suffix,
let's make use of that.
2017-03-11 19:09:27 -05:00
Zbigniew Jędrzejewski-Szmek d5e15d2fd7 build-sys: make more targets .PHONY 2017-03-11 19:01:43 -05:00
Martin Pitt 37377227ff build-sys: only install legacy *.pkla files with old polkit versions (#5555)
The legacy *.pkla files are not required when running against polkit ≥ 106,
and we want to avoid shipping files in /var if possible (but pkla files
can only be in /etc/ or /var).

Only install the *.pkla files if we detect an old polkit version during
configure. Don't install them if polkit isn't installed during build, as
distributions other than Debian-based ones have moved to the new polkit
long ago.

Fixes #5523
2017-03-08 08:20:11 -05:00
AsciiWolf 7ebf71ee03 sd-bus: drop kdbus-related docs (#5533) 2017-03-07 07:51:35 +01:00
Michael Biebl dcce98a4bd Avoid strict DM interface version dependencies (#5519)
Compiling against the dm-ioctl.h header as provided by the Linux kernel
will embed the DM interface version number. Running an older kernel can
result in an error like this on shutdown:

Could not detach DM dm-11: ioctl mismatch, kernel(4.34.4), user(4.35.4)

Work around this by shipping a local copy of dm-ioctl.h. We need at
least the version from 3.13 for DM_DEFERRED_REMOVE [1], so bump the
requirements in README accordingly.

[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=2c140a246dc0bc085b98eddde978060fcec1080c

Fixes: #5492
2017-03-02 19:11:37 +01:00
Zbigniew Jędrzejewski-Szmek 09c1102496 build-sys: do not require everything to be rebuild to push man pages (#5521)
When the doc-sync target was created, we didn't have man target yet.
2017-03-02 17:55:45 +01:00
Zbigniew Jędrzejewski-Szmek 4317cf9026 Revert "environment.d: fix date"
This reverts commit 46987593cc.

Pushed to the wrong repo, sorry.
2017-03-01 19:27:54 -05:00
Zbigniew Jędrzejewski-Szmek 46987593cc environment.d: fix date 2017-03-01 19:27:09 -05:00
Zbigniew Jędrzejewski-Szmek 4f37cbd911 journalctl: move access_check() to shared/
The only functional change is that log_notice("No journal files were found.")
is not printed any more with --quiet. log_error("No journal files were opened
due to insufficient permissions.") is still printed.

I wasn't quite sure where to put this function, but shared/ seems to be the
right place and none of the existing files seem to fit too well.

v2: rename journal_access_check to journal_access_check_and_warn.
2017-02-28 21:37:35 -05:00
Lennart Poettering b90ef60fbc Revert "udev: Introduce UDEV_PROPAGATE_LOG macro (#5302)"
This reverts commit c22569eeea.

Let's revert this for now, since it apparently doesn't fix the problem
at hand.
2017-02-23 12:36:25 +01:00
Lennart Poettering 070251f36b Revert "Makefile.am: add a \ (#5422)"
This reverts commit 00d1e0c9de.
2017-02-23 12:36:04 +01:00
Susant Sahani 00d1e0c9de Makefile.am: add a \ (#5422)
fixes: #5419
2017-02-21 23:04:02 -05:00
Susant Sahani c22569eeea udev: Introduce UDEV_PROPAGATE_LOG macro (#5302)
As per commit 25e773e "udev: switch to systemd logging functions"
Now log_set_max_level() in udev_new() overwites system wide log level.

Propagate the udev.conf setting to log_set_max_level()
only if udev_new() is called from within udevd or one of its helpers.

Introduce a UDEV_PROPAGATE_LOG macro that we set with -D on
the gcc command line for all udev binaries we build, but not
for any others. The log_set_max_level() call is guarded by an
ifdef check for that macro, so that it only effects the various
udev binaries.

closes: #4525
2017-02-22 00:16:13 +01:00
Lennart Poettering e7034ee0ad build-sys: bump package version 2017-02-21 14:01:09 +01:00
Lennart Poettering a4dde27d73 Merge pull request #5131 from keszybz/environment-generators
Environment generators
2017-02-21 11:11:44 +01:00
Zbigniew Jędrzejewski-Szmek 51e76f7cd1 build-sys: make environment.d support conditional
We have ./configure switches for various parts of non-essential functionality,
let's add one for this new stuff too. Support for environment generators is
not conditional — if you don't want them, just don't install any.
2017-02-20 23:32:53 -05:00
Ray Strode 79d615d56c build-sys,man: load /etc/environment and describe the new environment.d syntax
Add support for /etc/environment and document the changes to the user manager
to automatically import environment *.conf files from:

        ~/.config/environment.d/
        /etc/environment.d/
        /run/environment.d/
        /usr/local/lib/environment.d/
        /usr/lib/environment.d/
        /etc/environment
2017-02-20 18:49:14 -05:00
Zbigniew Jędrzejewski-Szmek f63c4aabb2 environment-generator: new generator to peruse environment.d
Why the strange name: the prefix is necessary to follow our own advice that
environment generators should have numerical prefixes. I also put -d- in the
name because otherwise the name was very easy to mistake with
systemd.environment-generator. This additional letter clarifies that this
on special generator that supports environment.d files.
2017-02-20 18:49:14 -05:00
Zbigniew Jędrzejewski-Szmek 1bd2d4e31b man: add systemd.environment-generator(7) with two examples
v2:
  - add example files to EXTRA_DIST
v3:
  - rework for the new scheme where nothing is written to disk
v4:
  - use separate dirs for system and user env generators
2017-02-20 18:49:14 -05:00