1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00
Commit Graph

23856 Commits

Author SHA1 Message Date
Lennart Poettering
703e4f5e39 resolved: don't claim DnsQuestion have to have the same names
Wen DnsQuestion objects are used for DnsQuery objects all contained keys
have to share the same name, but otherwise they generally don't have to,
and this can actually happen in real-life because DnsPacket objects for
mDNS use DnsQuestion for the question section.

Hence, rename:

dns_question_is_valid() to dns_question_is_valid_for_query(), since the
name uniqueness check it does is only relevant when used for a query.

Similar, rename dns_question_name() to dns_question_first_name(),
to be more accurate, as this difference matters if we keys don#t have to
share the same name.
2015-11-25 21:58:32 +01:00
Franck Bui
0d3d3be1e2 fstab-gen: post can't be NULL 2015-11-25 21:21:44 +01:00
Tom Gundersen
ac7653a433 Merge pull request #2024 from eworm-de/net
networkd: link - do not drop config for loopback device
2015-11-25 20:56:46 +01:00
Christian Hesse
e5d44b34cc networkd: link - do not drop config for loopback device
Commit 5e5b137a (networkd: link - drop foreign config when configuring
link) introduced a regression where addresses (including 127.0.0.1) are
removed from loopback device.
Do not handle loopback device when removing foreign configs.

Signed-off-by: Christian Hesse <mail@eworm.de>
2015-11-25 20:02:53 +01:00
Evgeny Vereshchagin
cd949ee734 tests: don't run tests on incomplete setup 2015-11-25 17:51:17 +00:00
Tom Gundersen
f693e9b38f sd-dhcp: parse error message in DECLINE or NAK
If a client sends a DECLINE or a server sends a NAK, they can include
a string with a message to explain the error. Parse this and print it
at debug level.
2015-11-25 18:30:31 +01:00
Tom Gundersen
cddf4d81ea sd-ndisc: better validate RA packets
Verify the hoplimit and that the received packet is large enough for the RA
header.

See <http://tools.ietf.org/html/rfc4861#section-6.1.2>.
2015-11-25 18:30:31 +01:00
Tom Gundersen
6d06ac1faa sd-ndisc: always send the link-layer address
We never send packets without first knowing the link-local L3 address,
so we should always include the L2 address in RS packets.
2015-11-25 18:30:31 +01:00
Tom Gundersen
0d43d2fcb7 libsystemd-network: clean up recv functions 2015-11-25 18:30:31 +01:00
Daniel Mack
af143e3b69 Merge pull request #2027 from evverx/remove-unnecessary-cgroup-systemd-checking
tests: remove unnecessary /sys/fs/cgroup/systemd checking
2015-11-25 14:44:48 +01:00
Evgeny Vereshchagin
55161d41eb tests: remove unnecessary /sys/fs/cgroup/systemd checking
A unified hierarchy obsoletes this checking
2015-11-25 11:43:58 +00:00
Karel Zak
91518d20dd core: support <soft:hard> ranges for RLIMIT options
The new parser supports:

 <value>       - specify both limits to the same value
 <soft:hard>   - specify both limits

the size or time specific suffixes are supported, for example

  LimitRTTIME=1sec
  LimitAS=4G:16G

The patch introduces parse_rlimit_range() and rlim type (size, sec,
usec, etc.) specific parsers. No code is duplicated now.

The patch also sync docs for DefaultLimitXXX= and LimitXXX=.

References: https://github.com/systemd/systemd/issues/1769
2015-11-25 12:03:32 +01:00
Lennart Poettering
91f5f21332 Merge pull request #2020 from evverx/signals-completion
bash-completion: list valid signal names
2015-11-24 23:07:10 +01:00
Tom Gundersen
dd6f132af4 Merge pull request #2021 from phomes/minor-fixes2
resolved: remove unused variable
2015-11-24 18:43:59 +01:00
Nicolas Cornu
cc8454d522 man: Add a not that mount unit cannot be templated 2015-11-24 18:24:57 +01:00
Thomas Hindoe Paaboel Andersen
6617082bc8 resolved: remove unused variable 2015-11-24 17:10:32 +01:00
Evgeny Vereshchagin
c2af810150 bash-completion: list valid signal names
this is a follow-up for commit 18540892d1
2015-11-24 16:05:42 +00:00
Lennart Poettering
aad2652326 Merge pull request #1991 from evverx/use-systems-nspawn
tests: don't rely on system's machined
2015-11-24 16:24:24 +01:00
Lennart Poettering
68e038572b Merge pull request #2018 from keszybz/kill-signal
bash-completion: list only valid signal names
2015-11-24 16:21:47 +01:00
Zbigniew Jędrzejewski-Szmek
18540892d1 bash-completion: list only valid signal names
Fixup for #1999.
2015-11-24 09:39:49 -05:00
Evgeny Vereshchagin
2c393ed761 tests: don't rely on system's machined
Fixes backward/forward incompatibility errors on spawning.

For example:
$ sudo make run
...
Failed to register machine: Cannot set property TasksMax, or unknown
property.

$ ../../systemd-nspawn --version
systemd 228

$ systemd-nspawn --version
systemd 225
2015-11-24 14:33:16 +00:00
Lennart Poettering
8c191eecd4 Merge pull request #1957 from zonque/qemu-test
test: make QEMU tests work on Semaphore
2015-11-24 15:02:20 +01:00
Lennart Poettering
e3d85eeae2 Merge pull request #1976 from ssahani/word3
core: mount flags remove FOREACH_WORD_SEPARATOR
2015-11-24 14:16:50 +01:00
Harald Hoyer
9d06297e26 core: Do not bind a mount unit to a device, if it was from mountinfo
If a mount unit is bound to a device, systemd tries to umount the
mount point, if it thinks the device has gone away.

Due to the uevent queue and inotify of /proc/self/mountinfo being two
different sources, systemd can never get the ordering reliably correct.

It can happen, that in the uevent queue ADD,REMOVE,ADD is queued
and an inotify of mountinfo (or libmount event) happend with the
device in question.

systemd cannot know, at which point of time the mount happend in the
ADD,REMOVE,ADD sequence.

The real ordering might have been ADD,REMOVE,ADD,mount
and systemd might think ADD,mount,REMOVE,ADD and would umount the
mountpoint.

A test script which triggered this behaviour is:
rm -f test-efi-disk.img
dd if=/dev/null of=test-efi-disk.img bs=1M seek=512 count=1
parted --script test-efi-disk.img \
  "mklabel gpt" \
  "mkpart ESP fat32 1MiB 511MiB" \
  "set 1 boot on"
LOOP=$(losetup --show -f -P test-efi-disk.img)
udevadm settle
mkfs.vfat -F32 ${LOOP}p1
mkdir -p mnt
mount ${LOOP}p1 mnt
... <dostuffwith mnt>

Without the "udevadm settle" systemd unmounted mnt while the script was
operating on mnt.

Of course the question is, why there was a REMOVE in the first place,
but this is not part of this patch.
2015-11-24 14:08:50 +01:00
Lennart Poettering
0d8fdbb53e Merge pull request #2013 from martinpitt/statfs-type
basic: fix build on architectures with small long
2015-11-24 13:53:14 +01:00
Helmut Grohne
d6cd08464d basic: fix build on architectures with small long
The x32 architecture has a small "long" type which is not enough to hold
struct statfs.f_type.
2015-11-24 06:49:10 +01:00
Susant Sahani
e28bb14a80 core: mount flags remove FOREACH_WORD_SEPARATOR
FOREACH_WORD_SEPARATOR is no need here since we only
apply only one mount flag. The rvalue is sufficient for
this.
2015-11-24 07:11:01 +05:30
Tom Gundersen
e35a7876b4 Merge pull request #2011 from poettering/resolve-dname
Implement client-side DNAME RR resolving
2015-11-24 00:46:15 +01:00
Lennart Poettering
ccc3e8a104 update TODO 2015-11-24 00:20:39 +01:00
Lennart Poettering
58db254ade resolved: implement client-side DNAME resolution
Most servers apparently always implicitly convert DNAME to CNAME, but
some servers don't, hence implement this properly, as this is required
by edns0.
2015-11-24 00:20:39 +01:00
Lennart Poettering
5ce1946f4d question: drop dns_question_is_superset() which we don't use anymore 2015-11-24 00:20:39 +01:00
Tom Gundersen
556f107f95 Merge pull request #1984 from phomes/networkd-routes-parse
networkd: link - fix reading routes
2015-11-23 22:54:08 +01:00
Tom Gundersen
1f233d4c24 Merge pull request #2007 from poettering/resolve-srv
resolved: add support for resolving plain SRV and DNS-SD services
2015-11-23 22:53:30 +01:00
Lennart Poettering
45ec7efb6c resolved: add ResolveService() bus call for resolving SRV and DNS-SD services
This also adds client-side support for this to systemd-resolve-host.

Note that the ResolveService() API can deal both with DNS-SD service
(consisting of service name, type and domain), as well as classic SRV
services (consisting just of a type and a domain), all exposed in the
same call.

This patch also reworks CNAME handling in order to reuse it between
hostname, RR and service lookups.

In contrast to Avahi and Bonjour, this new API will actually reolve the
A/AAAA RRs the SRV RRs point to in one go (unless this is explicitly
disabled). This normally comes for free, as these RRs are sent along
the SRV responses anyway, hence let's make use of that. This makes the
API considerably easier to use, as a single ResolveService() invocation
will return all necessary data to pick a server and connect() to it.

Note that this only implements the DNS-SD resolving step, it does not
implement DNS-SD browsing, as that makes sense primarily on mDNS, due to
its continuous nature.
2015-11-23 21:31:29 +01:00
Lennart Poettering
a564ca2fd1 resolved: fix minor memory leak when shuttin down
We need to free the rtnl watch too.
2015-11-23 21:31:29 +01:00
Lennart Poettering
0e8eedbb49 dns-domain: add calls to join/split SRV/DNS-SD service domains
This adds dns_service_join() and dns_service_split() which may be used
to concatenate a DNS-SD service name, am SRV service type string, and a
domain name into a full resolvable DNS domain name string. If the
service name is specified as NULL, only the type and domain are
appended, to implement classic, non-DNS-SD SRV lookups.

The reverse is dns_service_split() which takes the full name, and split
it into the three components again.
2015-11-23 21:31:29 +01:00
Lennart Poettering
a5ef363808 escape: add cescape_length() call as generalization of cescape() 2015-11-23 21:31:29 +01:00
Lennart Poettering
2001c80560 resolved: accept TXT records with non-UTF8 strings
RFC 6763 is very clear that TXT RRs should allow arbitrary binary
content, hence let's actually accept that. This also means accepting NUL
bytes in the middle of strings.
2015-11-23 21:31:28 +01:00
Lennart Poettering
0a49b6b6dc dns-domain: add code for verifying validity of DNS-SD service names and types 2015-11-23 21:31:28 +01:00
Lennart Poettering
e429762faa Merge pull request #2003 from eworm-de/virt
virt: add comment about order in virtualization detection
2015-11-23 21:01:01 +01:00
Lennart Poettering
8f00f8d6d7 Merge pull request #2006 from keszybz/mymachines-overflow
nss-mymachines: do not allow overlong machine names
2015-11-23 20:51:57 +01:00
Daniel Mack
3a7f4776cc Merge pull request #2005 from eworm-de/vimrc
vimrc: add warning about dangerous exrc mode
2015-11-23 20:25:22 +01:00
Zbigniew Jędrzejewski-Szmek
cb31827d62 nss-mymachines: do not allow overlong machine names
https://github.com/systemd/systemd/issues/2002
2015-11-23 13:59:43 -05:00
Christian Hesse
f1d075ff06 vimrc: add warning about dangerous exrc mode 2015-11-23 19:31:00 +01:00
Christian Hesse
f6875b0a63 virt: add comment about order in virtualization detection 2015-11-23 19:15:25 +01:00
Lennart Poettering
681c8d81bd Merge pull request #1997 from fbuihuu/fix-swap-unit-ordering-dep
make sure all swap units are ordered before the swap target
2015-11-23 18:24:17 +01:00
Lennart Poettering
062fc6d775 Merge pull request #1998 from eworm-de/virt
virt: detect dmi before cpuid
2015-11-23 18:21:06 +01:00
Daniel Mack
9e6a4d57b6 Merge pull request #1996 from eworm-de/editorconfig
add editorconfig configuration
2015-11-23 18:17:57 +01:00
Zbigniew Jędrzejewski-Szmek
3719f851e3 Merge pull request #1999 from evverx/nspawn-kill-signal-completion
bash-completion: nspawn: add completion for --kill-signal
2015-11-23 12:17:06 -05:00
Zbigniew Jędrzejewski-Szmek
8a421d50e0 Merge pull request #1986 from tjanez/fix-systemd_user_post
rpm: fix %systemd_user_post() macro.
2015-11-23 12:06:11 -05:00