1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-28 20:25:25 +03:00
Commit Graph

15990 Commits

Author SHA1 Message Date
Michal Sekletar
ffc90a1196 dhcp-network: make clear that we are ANDing Fragment offset field with mask
Reading BPF assembly written as C macros is inherently difficult. Don't
make it harder than necessary and provide clearer explanation in the
comment.
2014-07-07 15:59:13 +02:00
Michal Sekletar
b064329fd8 dhcp-network: ignore IP packets with More Fragments (MF) flag set
We already ignore IP fragments, because we expect that Fragment
offset (FO) field is not set. However first fragment in a fragmented IP
flow will have all zeroes in FO field. We should ignore such packet as
well, thus we need to look at MF flag in the IP header. Checking MF flag
will filter out all except last packet in fragmented flows. Last one
will be ruled out by next check for value of FO.
2014-07-07 15:32:12 +02:00
Lennart Poettering
418b9be500 firstboot: add new component to query basic system settings on first boot, or when creating OS images offline
A new tool "systemd-firstboot" can be used either interactively on boot,
where it will query basic locale, timezone, hostname, root password
information and set it. Or it can be used non-interactively from the
command line when prepareing disk images for booting. When used
non-inertactively the tool can either copy settings from the host, or
take settings on the command line.

$ systemd-firstboot --root=/path/to/my/new/root --copy-locale --copy-root-password --hostname=waldi

The tool will be automatically invoked (interactively) now on first boot
if /etc is found unpopulated.

This also creates the infrastructure for generators to be notified via
an environment variable whether they are running on the first boot, or
not.
2014-07-07 15:25:55 +02:00
Lennart Poettering
037c26d0ae architecture: add string table entries for mips-le archs which were missing 2014-07-07 15:25:55 +02:00
Lennart Poettering
ac8ddf8c96 man: chroot jails are no longer detected by ConditionVirtualization= 2014-07-07 15:25:55 +02:00
Lennart Poettering
f1e4d93f57 man: add missing archs to ConditionArchitecture= description 2014-07-07 15:25:55 +02:00
Lennart Poettering
736937e5aa fileio: simplify write_env_file() 2014-07-07 15:25:55 +02:00
Lennart Poettering
6294aa76d8 util: don't consider tabs special in string_has_cc() anymore
Instead, take a list of exceptions to our usual CC check
2014-07-07 15:25:55 +02:00
Lennart Poettering
7568345034 shared: make timezone and locale enumeration and validation generic
This way we can reuse it other code thatn just localectl/localed +
timedatectl/timedated.
2014-07-07 15:25:55 +02:00
Lennart Poettering
a940778fb1 update TODO 2014-07-07 15:25:55 +02:00
Lennart Poettering
3408ba015a main: explain our /etc empty check a bit in a comment 2014-07-07 15:25:55 +02:00
Lennart Poettering
3a8a916338 util: consider 0x7F a control chracter (which it is: DEL)
Let's better be safe than sorry.
2014-07-07 15:25:55 +02:00
Tom Gundersen
a669ea9860 udev: link_config - ignore errors due to missing MAC address
Otherwis, we get misleading error messages on links with MACs.

Reported by Leonid Isaev.
2014-07-07 15:03:12 +02:00
Zbigniew Jędrzejewski-Szmek
3dde3f8197 vconsole-setup: fix inverted error messages
Introduced in abee28c56d.

Pointed-out-by: Werner Fink <werner@suse.de>
2014-07-07 08:55:58 -04:00
Tom Gundersen
1a43ddc8b1 man: network - document Peer key 2014-07-07 14:24:07 +02:00
Tom Gundersen
e04468dec0 networkd: netdev - add missing refs
Without this, the underlying device would get freed (and hence
fail).
2014-07-07 14:18:33 +02:00
Susant Sahani
c081882f07 networkd: add support for peer address
This patch adds peer address support for
networkd . In the  [Address]  a new configurable
param is Peer.

[Match]
Name=ipip-tun

[Address]
Address=10.0.0.1/32
Peer=10.0.0.2/32
2014-07-07 13:32:14 +02:00
Michal Sekletar
58587a7a0c dhcp-network: add check for DHCP.chaddr
Check that received DHCP packets actually include our MAC address in
chaddr field. BPF interpreter has 32 bit wide registers but MAC address
is 48 bits long so we have to do check in two steps.
2014-07-07 12:17:55 +02:00
Zbigniew Jędrzejewski-Szmek
31cda3d175 coredumpctl: show a useful error on permission problems 2014-07-06 19:06:03 -04:00
Zbigniew Jędrzejewski-Szmek
fd53fee04b compress: add benchmark-style test
This is useful to test the behaviour of the compressor for various buffer
sizes.

Time is limited to a minute per compression, since otherwise, when LZ4
takes more than a second which is necessary to reduce the noise, XZ
takes more than 10 minutes.

% build/test-compress-benchmark (without time limit)
XZ: compressed & decompressed 2535300963 bytes in 794.57s (3.04MiB/s), mean compresion 99.95%, skipped 3570 bytes
LZ4: compressed & decompressed 2535303543 bytes in 1.56s (1550.07MiB/s), mean compresion 99.60%, skipped 990 bytes

% build/test-compress-benchmark (with time limit)
XZ: compressed & decompressed 174321481 bytes in 60.02s (2.77MiB/s), mean compresion 99.76%, skipped 3570 bytes
LZ4: compressed & decompressed 2535303543 bytes in 1.63s (1480.83MiB/s), mean compresion 99.60%, skipped 990 bytes

 It appears that there's a bug in lzma_end where it leaks 32 bytes.
2014-07-06 19:06:03 -04:00
Zbigniew Jędrzejewski-Szmek
d89c8fdf48 journal: add LZ4 as optional compressor
Add liblz4 as an optional dependency when requested with --enable-lz4,
and use it in preference to liblzma for journal blob and coredump
compression. To retain backwards compatibility, XZ is used to
decompress old blobs.

Things will function correctly only with lz4-119.

Based on the benchmarks found on the web, lz4 seems to be the best
choice for "quick" compressors atm.

For pkg-config status, see http://code.google.com/p/lz4/issues/detail?id=135.
2014-07-06 19:06:03 -04:00
Zbigniew Jędrzejewski-Szmek
5e592c66bd journal/compress: return early in uncompress_startswith
uncompress_startswith would always decode the whole stream, even
if it did not start with the given prefix.

Reallocation policy was also strange.
2014-07-06 19:06:02 -04:00
Zbigniew Jędrzejewski-Szmek
abee28c56d vconsole-setup: run setfont before loadkeys
https://bugs.freedesktop.org/show_bug.cgi?id=80685
2014-07-06 19:06:02 -04:00
Ronny Chevalier
bce415edca sysusers: fix uninitialized warning 2014-07-06 14:16:16 +02:00
Tom Gundersen
f14aa1f1b2 machine: don't return uninitialized variable
Repotred by Ronny Chevalier
2014-07-06 14:12:28 +02:00
Lennart Poettering
108e8cd11e man: document nspawn's new --volatile switch 2014-07-04 12:56:57 +02:00
Steven Noonan
c38d2eb828 networkd: accept section DHCP in systemd.network files 2014-07-04 11:34:43 +02:00
Steven Noonan
b1e1238fb3 networkd: don't clear dhcpv6 lease timers if there's no previous lease
If client->lease is NULL, dhcp6_lease_clear_timers will cause a segmentation
fault.
2014-07-04 11:34:43 +02:00
Lennart Poettering
4d9f07b492 nspawn: add new --volatile switch for booting containers in volatile (ephemeral) mode
Two modes are supported: --volatile=yes mounts only /usr into the
container, and a tmpfs as root directory. --volatile=state mounts the
full OS tree in, but overmounts /var with a tmpfs.

--volatile=yes hence boots with an unpopulated /etc and /var, starting
with pristine configuration and state.

--volatile=state hence boots with an unpopulated /var, only starting
with pristine state.
2014-07-04 03:24:42 +02:00
Lennart Poettering
baa1bdf70f main: change check whether /etc is unpopulated to look for /etc/machine-id
Previously, we checked whether /etc was completely empty. This makes it
difficult though for container managers such as nspawn to install a
small number of files (such as /etc/timezone), and have the system
otherwise populate its own tree.

Hence, change this by looking for /etc/machine-id, which should be a
good sign whether /etc is populated or not.
2014-07-04 03:24:42 +02:00
Lennart Poettering
fa229d0928 units: conditionalize configfs and debugfs with CAP_SYS_RAWIO
We really don't want these in containers as they provide a too lowlevel
look on the system.

Conditionalize them with CAP_SYS_RAWIO since that's required to access
/proc/kcore, /dev/kmem and similar, which feel similar in style. Also,
npsawn containers lack that capability.
2014-07-04 03:24:42 +02:00
Lennart Poettering
e0c74691c4 units: conditionalize static device node logic on CAP_SYS_MODULES instead of CAP_MKNOD
npsawn containers generally have CAP_MKNOD, since this is required
to make PrviateDevices= work. Thus, it's not useful anymore to
conditionalize the kmod static device node units.

Use CAP_SYS_MODULES instead which is not available for nspawn
containers. However, the static device node logic is only done for being
able to autoload modules with it, and if we can't do that there's no
point in doing it.
2014-07-04 03:24:41 +02:00
Tom Gundersen
54f601debc man: netdev - mention tun and tap
Reported by Moviuro <moviuro@gmail.com>
2014-07-04 01:26:58 +02:00
Tom Gundersen
4958aee497 networkd: properly track addresses when first added
When doing a NEWADDR, the reply we get back is the NEWADDR itself, rather
than just an empty ack (unlike how NEWLINK works). For this reason, the
process that did the NEWADDR does not get the broadcast message.

We were only listening for broadcast messages, and hence not tracking the
addresses we added ourselves. This went unnoticed as the kernel will usually
send NEWADDR messages from time to time anyway, so things would mostly work,
but in the worst case we would not notice that a routable address was available
and consider ourselves offline.
2014-07-03 22:55:05 +02:00
Tom Gundersen
393c0c5e64 networkd: link - improve link tracking logging 2014-07-03 22:55:05 +02:00
Lennart Poettering
bc4bc52bc3 architecture: remove "cris" from uname list
the only correct name appears to be "crisv32"...

http://lists.freedesktop.org/archives/systemd-devel/2014-July/020899.html
2014-07-03 22:52:44 +02:00
Umut Tezduyar Lindskog
0c74488672 sd-path: add missing header 2014-07-03 16:41:52 -04:00
Zbigniew Jędrzejewski-Szmek
9c5dcb68b0 man: add link to Open Group Base Specifications 2014-07-03 16:41:52 -04:00
Lennart Poettering
252ff40a38 build-sys: bump package and library versions 2014-07-03 20:48:40 +02:00
Lennart Poettering
c7435cc911 NEWS: prepare for release 2014-07-03 20:46:35 +02:00
Lennart Poettering
db6d9e8640 man: document that systemctl's -H may now be used to connect directly to a container on a remote host 2014-07-03 20:37:10 +02:00
Lennart Poettering
8d90c8a8d6 machine: properly distuingish created and registered machines 2014-07-03 20:19:58 +02:00
Lennart Poettering
8225488bec update TODO 2014-07-03 19:55:18 +02:00
Lennart Poettering
a12b0cc34d sysusers: add new line type "m" to add users as members to groups 2014-07-03 19:54:46 +02:00
Lennart Poettering
aaf86f95a0 update TODO 2014-07-03 17:54:24 +02:00
Lennart Poettering
717603e391 machinectl: show /etc/os-release information of container in status output 2014-07-03 17:54:24 +02:00
Kay Sievers
98be1a746a hwdb: update 2014-07-03 16:28:57 +02:00
Lennart Poettering
664064d60c namespace: make sure /tmp, /var/tmp and /dev are writable in namespaces we set up 2014-07-03 16:28:26 +02:00
Lennart Poettering
002b226843 namespace: fix uninitialized memory access 2014-07-03 16:28:26 +02:00
Marcel Holtmann
063e36db8a hwdb: Update database of Bluetooth company identifiers 2014-07-03 16:13:48 +02:00