Commit Graph

34833 Commits

Author SHA1 Message Date
Todd Walton eaaec6cc12 man: fix RFC ref in resolved.conf man page (#9976)
This is a simple one-character fix to reference the correct RFC for
LLMNR, which is RFC 4795, not RFC 4794.
2018-08-30 09:47:07 +09:00
Alan Jenkins 8f8112f916 resolve: update comment, avoid alarming wrongness
`systemd-resolved.service` runs as `User=systemd-resolved`, and uses certain
Capabilit{y,ies} magic. By my understanding, this means it is started with a
number of "privileges".  Indeed, `capabilities(7)` explains

> Linux divides  the  privileges  traditionally
> associated  with  superuser into distinct units, known as capabilities,
> which can be independently enabled and disabled."

This situation appears to contradict our current code comment which said

> If we are not running as root we assume all privileges are already dropped.

This appears to be a confusion in the comment only.  The rest of the code
tells a much clearer story.  (Don't ask me if the story is correct.
`capabilities(7)` scares me).  Let's tweak the comment to make it consistent
and avoid worrying readers about this.
2018-08-29 18:07:06 +02:00
Sjoerd Simons 9e2acd1d24 fd-util: accept that kcmp might fail with EPERM/EACCES
In a container the kcmp call might well be blocked; Accept that and fall
back to fstat in that case.
2018-08-29 17:53:00 +02:00
Samuel Morris c68867da32 systemctl: if no logind, don't try to schedule shutdown
If logind is not supported, don't try to schedule a shutdown,
immediately poweroff. This is the behavior indicated by the current
message given to the user, but the command is returning an error. I
believe this was broken on this commit:
7f96539d45
2018-08-29 17:51:53 +02:00
Sylvain Plantefève a204d54b8e po: update French translation 2018-08-29 17:47:35 +02:00
Zbigniew Jędrzejewski-Szmek 31e775ec38
Merge pull request #9959 from yuwata/small-fixes
tiny fixes and a cleanup
2018-08-29 17:47:00 +02:00
Yu Watanabe efa1463693 test: fix a memleak
Follow-up for #9901.

Fixes #9968.
2018-08-29 17:45:37 +02:00
Dimitri John Ledkov a9fc640671 cryptsetup: add support for sector-size= option (#9936)
Bug-Ubuntu: https://launchpad.net/bugs/1776626

Closes #8881.
2018-08-29 23:38:09 +09:00
Yu Watanabe a2b635eb39 sd-boot: fix header guard
Follow-up for a42d7cf165.
2018-08-29 23:05:15 +09:00
Yu Watanabe 3343021755 dynamic-user: drop unnecessary initialization 2018-08-29 23:04:26 +09:00
Zbigniew Jędrzejewski-Szmek 030836923d
Merge pull request #9901 from peterbaouoft/pr/preset_enable_multiple_instances
install: allow instantiated units to be enabled via presets
2018-08-29 14:22:27 +02:00
Yu Watanabe 22ac37aa00 string-table: do not ignore 'scope' argument 2018-08-28 12:40:25 +09:00
Yu Watanabe e094eb1188
Merge pull request #9950 from yuwata/macro-ref-unref
tree-wide: introduce macros to define *_ref() and *_unref() functions
2018-08-28 10:43:25 +09:00
Ruixin Bao 1e475a0ab4 install: small refactor to combine two function calls into one function
Combine consecutive function calls of install_info_discover and
install_info_may_process into one short helper function.
2018-08-27 23:56:31 +00:00
Ruixin Bao 4c9565eea5 install: allow instantiated units to be enabled via presets
This patch implements https://github.com/systemd/systemd/issues/9421.

The .preset file now is able to take a rule in the format of:(e.g)
enable foo@.service bar0 bar1 bar2

In the above example, when preset-all is called, all three instances of
foo@bar0.service, foo@bar1.service and foo@bar2.service will be enabled.

When preset is called on a single service(e.g: foo@bar1.service), only
the mentioned one(foo@bar1.service) will be enabled.

Tests are added for future regression.
2018-08-27 23:56:24 +00:00
Yu Watanabe 4005d3215e sd-device: sd_device_enumerator_get_subsystem_next() requests the device list is uptodate 2018-08-28 05:09:40 +09:00
Yu Watanabe 6116d2b275 sd-device: use structured initializers 2018-08-28 05:09:40 +09:00
Yu Watanabe 1c71f7f329 libsystemd: use DEFINE_ATOMIC_REF_UNREF_FUNC or frineds where applicable 2018-08-28 05:09:40 +09:00
Yu Watanabe 1d3044e275 refcnt: introduce DEFINE_ATOMIC_REF_UNREF_FUNC() macro and friends 2018-08-28 05:09:40 +09:00
Yu Watanabe 6b6e07415c sd-netlink: fix indentation 2018-08-28 05:09:40 +09:00
Yu Watanabe 61e21d4ca1 sd-hwdb: drop unused variable 2018-08-28 05:09:40 +09:00
Yu Watanabe 288ca7af8c dynamic-user: fix potential segfault 2018-08-28 05:09:00 +09:00
Zbigniew Jędrzejewski-Szmek 649010a53d
Merge pull request #9935 from pfl/dhcp6_pd_assignment_fix
Dhcp6 pd assignment fix
2018-08-27 14:49:11 +02:00
Lucas Werkmeister e12f397683 tools: use print function in Python 3 code
This GDB script was converted to use Python 3 along with all other
Python scripts in commit b95f5528cc, but still used the Python 2 print
statement syntax instead of the Python 3 print function. Fix that.

We also add the Python 2 compatibility statement, just in case some GDB
still uses Python 2 instead of Python 3.
2018-08-27 14:22:32 +02:00
Thomas Haller 3301f9eb97 link: allocate correct number of bytes in ethtool_set_features()
sfeatures is a "struct ethtool_sfeatures". Use sizeof() on the correct
data type.

Since "struct ethtool_gstrings" is larger than "struct ethtool_sfeatures",
this had no serious consequences.

Fixes: 50725d10e3
2018-08-27 14:14:30 +02:00
Marcin Skarbek 274f0dbeb5 don't ignore zd* block devices 2018-08-27 14:13:25 +02:00
dj-kaktus 6d6d25272e hwdb: Added values for another WALTOP Tablet 2018-08-27 14:10:08 +02:00
Yu Watanabe 8301aa0bf1 tree-wide: use DEFINE_TRIVIAL_REF_UNREF_FUNC() macro or friends where applicable 2018-08-27 14:01:46 +09:00
Yu Watanabe a6a08596ef macro: introduce DEFINE_TRIVIAL_REF_UNREF_FUNC() macro and friends 2018-08-27 14:01:27 +09:00
Yu Watanabe cf4b2f9906 tree-wide: use unsigned for refcount 2018-08-27 13:48:04 +09:00
Patrik Flykt eb75b919e8 networkd-dhcp6: Improve logging on DHCPv6 PD assignment
Print out prefixes assigned to links in addition to the DHCPv6
prefix it was delegated from.
2018-08-24 09:53:46 -06:00
Patrik Flykt ef5df4e5c5 networkd-dhcp6: Fix logging of DHCPv6 prefix
Pretty-print log messages with DHCPv6 prefixes after the prefixes
have been set instead of some random unassigned stack values.
2018-08-24 09:53:46 -06:00
Patrik Flykt 37f52406d9 networkd-dhcp6: Fix PD prefix length for subnet assignment
When computing the next network prefix to assign, compute the next
prefix to allocate based on the intended /64 assignment, not the
given prefix length for the whole prefix, e.g. /48, given to
systemd-networkd.

Fixes #9626.
2018-08-24 09:53:46 -06:00
Patrik Flykt 3ec8303fdc networkd-dhcp6: Log warning with PD prefixes shorter than 48
Log a warning message in case the network prefix delegated is shorter
than /48.
2018-08-24 09:53:45 -06:00
Yu Watanabe 56663345df po: update Japanese translation 2018-08-24 16:53:50 +02:00
Piotr Drąg e358d98ca7 po: update Polish translation 2018-08-24 16:53:22 +02:00
Yu Watanabe 7ecc4799a9
dissect: rescan devices before creating partition list (#9930)
Fixes #9924 which is caused by 3c1f2cee0a.
2018-08-24 22:34:13 +09:00
Franck Bui 49679ff70f logind: make use of vtnr_from_tty() in seat_read_active_vt() (#9923)
No functional changes.
2018-08-24 16:20:51 +09:00
Yu Watanabe 593a5213ce
Merge pull request #9917 from keszybz/cleanups
Some unrelated fixups for recent PRs
2018-08-24 10:43:41 +09:00
Lucas Werkmeister f16eb8b083 man: use singular “they”
For an example where we already use it, see man:sd-login(3):

> A session is defined by the time a user is logged in until they log out.

As far as I can tell, this removes the only remaining occurrences of
referring to users by gendered pronouns in our documentation (though
some still survive in code comments and the NEWS and TODO files):

    git grep '\b\(he\|him\|his\|she\|her\|hers\)\b' man/
2018-08-23 15:54:46 -07:00
Daniel Kahn Gillmor 74053ff282 doc: fix resolvectl(1) per-interface DNS configuration documentation
You can only have one listitem in each varlistentry.

xmllint says:

    resolvectl.xml:269: element varlistentry: validity error : Element varlistentry content does not follow the DTD, expecting (term+ , listitem), got (term term term term term term term listitem listitem listitem )
2018-08-23 14:47:43 -07:00
Daniel Kahn Gillmor b87613ecce doc: fix udev(7) documentation about ATTR{} and SYSCTL{}
Without this fix, udev(7) munges the two items together, like so:

       ATTR{filename}, SYSCTL{kernel parameter}
           Match sysfs attribute values of the event device. Trailing
           whitespace in the attribute values is ignored unless the specified
           match value itself contains trailing whitespace.  Match a kernel
           parameter value.

You're not allowed to have a <term> element after a <listitem> element within a
<varlistentry>.

xmllint complains:

    udev.xml:192: element varlistentry: validity error : Element varlistentry content does not follow the DTD, expecting (term+ , listitem), got (term listitem term listitem )
2018-08-23 14:47:43 -07:00
Zbigniew Jędrzejewski-Szmek e6a2feb57d
Merge pull request #8135 from shawnl/arg_host
sd-bus: rework host handling
2018-08-23 13:46:54 +02:00
Zbigniew Jędrzejewski-Szmek e3bb989b6f network: adjust some error messages
The option is now called simply "Encapsulation=".

Also, "ignoring" is rather misleading, because we use to to mean that some line
is being ignored. Here the whole tunnel is dropped.
2018-08-23 11:43:28 +02:00
Zbigniew Jędrzejewski-Szmek ab4dd98476 network: reword some error messages
Use "falling back" instead of "fallback".

Also, it's not an application-specific machine ID, but rather an
application-and-machine-specific ID.  Let's call it "app-machine-speicific" for
short.
2018-08-23 11:32:55 +02:00
Zbigniew Jędrzejewski-Szmek 181c4ba750 test-socket-util: avoid "memleak" reported by valgrind
valgrind reports the allocation done in the short-lived child as a leak.
Let's restructure the code to avoid this.
2018-08-23 11:30:57 +02:00
Zbigniew Jędrzejewski-Szmek b5d6f7ead6 analyze: use temporary var to simplify code 2018-08-23 11:30:57 +02:00
Susant Sahani 53cb501a13 networkd and sd-netlink: add support for Generic netlink And FooOverUDP to IPIP tunnel
This work add support to generic netlink to sd-netlink.
See https://lwn.net/Articles/208755/

networkd: add support FooOverUDP support to IPIP tunnel netdev
https://lwn.net/Articles/614348/

Example conf:

/lib/systemd/network/1-fou-tunnel.netdev
```
[NetDev]
Name=fou-tun
Kind=fou

[FooOverUDP]
Port=5555
Protocol=4

```

/lib/systemd/network/ipip-tunnel.netdev
```
[NetDev]
Name=ipip-tun
Kind=ipip

[Tunnel]
Independent=true
Local=10.65.208.212
Remote=10.65.208.211
FooOverUDP=true
FOUDestinationPort=5555
```

$ ip -d link show ipip-tun
```
5: ipip-tun@NONE: <POINTOPOINT,NOARP> mtu 1472 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ipip 10.65.208.212 peer 10.65.208.211 promiscuity 0
    ipip remote 10.65.208.211 local 10.65.208.212 ttl inherit pmtudisc encap fou encap-sport auto encap-dport 5555 noencap-csum noencap-csum6 noencap-remcsum numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
```
2018-08-23 11:30:37 +02:00
Zbigniew Jędrzejewski-Szmek c07fe6d0df Merge pull request #9406 from yuwata/rfe-9228
Trivial conflict solved in merge and include net/if_arp.h added.
2018-08-23 11:11:13 +02:00
Susant Sahani 708c425d0a Networkd: Start DHCP server when link is up.
Closes #9479
2018-08-23 10:03:30 +02:00