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

14506 Commits

Author SHA1 Message Date
Lennart Poettering
543407517e getty-generator: verify ttys before we make use of them
The ttyS[0-3] devices are weird. They may be enumerated, but when one
actually tries to open and use them they return EIO, because they don't
actually exist. Because they may be enumerated they may be specified on
the kernel command line as console=. And some people do that as default.
As response to that we'll spawn a getty on the tty that will quickly
fail, and we retry a couple of time before giving up. That is quite
noisy.

With this new change we will validate all serial terminals configured
with console= on the kernel cmdline before adding gettys on them, and
remove the invalid ones. THis should remove the noise later on.

This should make Eric Paris happy!
2014-02-24 03:59:50 +01:00
Lennart Poettering
01efdf13a6 cgroup: certain cgroup attributes are not available in the root cgroup, hence don't bother 2014-02-24 03:38:58 +01:00
Lennart Poettering
c35fa384d0 core: gc half-created stub units 2014-02-24 03:38:58 +01:00
Lennart Poettering
b272b74dfd core: expose root control group on the bus
We expose the control group of the units on the bus, so let's also
expose the root control group.
2014-02-24 03:38:58 +01:00
Lennart Poettering
9e281251e9 update TODO 2014-02-24 03:38:58 +01:00
Lennart Poettering
9457ac5b4e nspawn: make use of the devices cgroup controller by default 2014-02-24 03:38:58 +01:00
Lennart Poettering
9c96019d31 cgroup: parse array cgroup properties correctly when they aren't at the end of the message 2014-02-24 03:38:58 +01:00
Tom Gundersen
55dab2ed83 sd-dhcp-client: respect TP_STATUS_CSUMNOTREADY
If an UDP packet has not passed through a hardware device, its checksum may not
have been computed. This is exposed through the TP_STATUS_CSUMNOTREADY sockopt.

When using raw sockets, skip checksum validation when TP_STATUS_CSUMNOTREADY
is set.

This is necessary for dhcp to work directly over a veth tunnel, e.g. as done
in systemd-nspawn.
2014-02-24 03:28:19 +01:00
Lennart Poettering
872c2ab3e2 update TODO 2014-02-24 02:31:15 +01:00
Zbigniew Jędrzejewski-Szmek
dfb08b0584 NEWS: mention 99-default.link and NamePolicy 2014-02-23 18:18:06 -05:00
Tom Gundersen
279efc7007 sd-dhcp-client: fix max size of REQUEST message 2014-02-23 23:00:18 +01:00
Tom Gundersen
0a1b6da821 sd-dhcp: message_init - only set secs in the client 2014-02-23 23:00:18 +01:00
Tom Gundersen
8fa2eeace7 sd-dhcp: don't reject packets with the 'wrong' source port
The RFC does not specify that the packets from the DHCP server must come from
the DHCP server port, only that that's where they should be sent.

This fixes a problem when running networkd in VirtualBox.

Thanks to Sébastien Luttringer for reporting the bug and very patiently testing
various fixes.
2014-02-23 22:59:43 +01:00
Tom Gundersen
5266a81ea2 sd-dhcp: use FIONREAD to get correct size of incoming DHCP packet
This avoids the problem of broken DHCP servers sending us too big packets that don't fit in our buffer.
2014-02-23 17:52:31 +01:00
Lennart Poettering
3bb621e1e6 journal: downgrade vaccuum message to debug level
https://bugzilla.redhat.com/show_bug.cgi?id=1047148
2014-02-23 17:05:37 +01:00
Lennart Poettering
8f03fd0891 man: document that per-interface sysctl variables are applied as network interfaces show up
https://bugzilla.redhat.com/show_bug.cgi?id=1062955
2014-02-23 16:43:19 +01:00
Tom Gundersen
06b44be71d sd-dhcp: equally verify udp and raw dhcp messages
Also be more explicit about why packages are ignored.
2014-02-23 16:16:09 +01:00
Lennart Poettering
eda8f06755 update TODO 2014-02-23 03:19:04 +01:00
Lennart Poettering
5556b5fe41 core: clean up some confusing regarding SI decimal and IEC binary suffixes for sizes
According to Wikipedia it is customary to specify hardware metrics and
transfer speeds to the basis 1000 (SI decimal), while software metrics
and physical volatile memory (RAM) sizes to the basis 1024 (IEC binary).
So far we specified everything in IEC, let's fix that and be more
true to what's otherwise customary. Since we don't want to parse "Mi"
instead of "M" we document each time what the context used is.
2014-02-23 03:19:04 +01:00
Zbigniew Jędrzejewski-Szmek
e342365c27 docs: add new gudev functions to documentation 2014-02-22 20:52:28 -05:00
Kay Sievers
f01de9656d src/shared/ cannot reference symbols from libraries
../src/shared/unit-name.c:462: error: undefined reference to 'sd_bus_label_escape'
../src/shared/unit-name.c:477: error: undefined reference to 'sd_bus_label_unescape'
collect2: error: ld returned 1 exit status
2014-02-23 01:53:40 +01:00
Tom Gundersen
ac4f16ab4d sd-dhcp: be more detailed about invalid headers
This may be a common problem, so let's make it simpler to debug,
at least for now.
2014-02-23 01:38:49 +01:00
David Herrmann
d8148cc59d build-sys: remove libsystemd.sym duplicate
sd_memfd_new is available twice. Remove the second one.
2014-02-23 00:26:29 +01:00
Kay Sievers
2cfcd95a4a build-sys: fix libsystemd --enable-kdbus symbol export 2014-02-22 23:54:38 +01:00
Kay Sievers
03e37dd767 build-sys: build compat libs from sources, avoiding the not generally available ifunc wrapping 2014-02-22 21:28:55 +01:00
Tom Gundersen
0c2f9b8469 networkd: handle SIGINT and SIGTERM 2014-02-22 21:24:36 +01:00
Tom Gundersen
12e0f830f5 test: always use assert_se in tests 2014-02-22 21:24:36 +01:00
Tom Gundersen
ee57a737a5 sd-dhcp: add very basic debug logging 2014-02-22 21:24:36 +01:00
Kay Sievers
41fd4c4c15 build-sys: add seccomp includes where needed 2014-02-22 18:48:01 +01:00
Andreas Fuchs
fcc70b92f4 gudev: add device::get_sysfs_attr_keys and device::has_sysfs_attr
For gudev -> gudevdevice:
- Add support for get_sysfs_attr_keys()
- Add support for has_sysfs_attr()
2014-02-22 18:48:01 +01:00
Tom Gundersen
733f7a2c69 udev: net - allow MTU and Speed to be specified with units
This also changes the names to MTUBytes and BitsPerSecond, respectively. Notice
that the speed was mistakenly documented to be in bytes before this change.
2014-02-22 18:29:43 +01:00
Tom Gundersen
dd4d2c1cd1 networkd/nspawn: enable dhcp client on veth device created in guest
When starting systemd-nspawn with --network-veth, we create a veth device called
host0 in the guest. Pick up on this and start a dhcp client on it. We will also
pick up host0 netdevs created by other containers should they chose to use the
same name.
2014-02-22 18:29:43 +01:00
Kay Sievers
0031ccd306 build-sys: create /var/log/journal/ in journald section 2014-02-22 18:12:39 +01:00
Armin K
df40be6a14 build-sys: Also move libsystemd-journal to rootlibdir 2014-02-22 17:12:46 +01:00
Marcel Holtmann
4b28cdeb23 hwdb: Update database of Bluetooth company identifiers 2014-02-21 21:41:01 -08:00
Lennart Poettering
90060676c4 cgroup: Extend DeviceAllow= syntax to whitelist groups of devices, not just particular devices nodes 2014-02-22 03:05:34 +01:00
Thomas Hindoe Paaboel Andersen
1620510ada update gitignore 2014-02-21 23:21:26 +01:00
Tom Gundersen
bf175aafd2 net-util: match on the driver as exposed by ethtool if DRIVER not set
Also fix a copy-paste error that broke matching on interface name.
2014-02-21 22:59:29 +01:00
Tom Gundersen
95f41b7298 udev: net_setup - import ID_NET_DRIVER
This will do until all net properties are imported.
2014-02-21 22:59:29 +01:00
Thomas Hindoe Paaboel Andersen
f0329635f8 Makefile: fix build on clang
needed after libsystemd-daemon was merged into libsystemd in
0ebee88184
2014-02-21 22:24:47 +01:00
Tom Gundersen
e8d842a0d0 update TODO 2014-02-21 21:41:48 +01:00
Tom Gundersen
6c0519c012 net: initialize structs when declaring 2014-02-21 21:32:38 +01:00
Lennart Poettering
61f3af4fed net: initialize structs when declaring them/do not clobber caller variables
Just two minor style fixes...
2014-02-21 21:23:40 +01:00
Lennart Poettering
ed4ba7e4f6 logind: when we wake up from suspend and the lid is still closed, go to sleep immediately again
This is quite useful on laptops such as the Lenovo Yoga, where the power
button is placed on the front side of the laptop and can be pressed by
accident even if the lid is closed.

This reworks a bit of the logind logic to repeatedly try to suspend the
system as long as a lid is closed. We use the new "post" event source
for this, so that we don't keep things busy.

This also adds some code to check the lid status on boot, so that a
powered-off machine that is accidentaly powered on goes into suspend
immediately.

Yay! From now on I can put my Yoga safely in my backpack without fearing
that it might turn itself on and drain the battery.
2014-02-21 21:13:53 +01:00
Lennart Poettering
6e9feda30d event: add new kind of event source called "post"
This new event source is triggered by the dispatching of any non-post
event source. It can thus be used to do clean-up or recheck work,
triggered by any other event source having been executed.

This is different from "defer" event source which are unconditionally
triggered as long as they are enabled. A "defer" event source that does
nothing will result in the event loop busy looping unless it is turned
off eventually. This is different for "post" event sources that will be
only triggered when some other non-post ran, and will thus not keep the
event loop busy on its own.
2014-02-21 21:13:53 +01:00
Thomas Hindoe Paaboel Andersen
d7c9a162f1 man: networkd typo fixes 2014-02-21 21:00:39 +01:00
Tom Gundersen
847a8a5fed udev - link-setup - expose ID_NET_DRIVER
This is the same as shown by 'ethtool -i <ifname>', and is sometimes
set even though DRIVER is not.
2014-02-21 21:00:39 +01:00
Jasper St. Pierre
a0eb2a751c logind-session: Fix invalid free in the error case
utf8 needs to be initialized to NULL for the free for the early return,
otherwise we try to free invalid data.
2014-02-21 19:50:38 +01:00
Jason A. Donenfeld
a2fef7701b install: networkd.service depend on !--disable
It doesn't make any sense to symlink this unit file into /etc when the
unit file itself isn't even installed, with --disable-networkd. This
moves the GENERAL_ALIASES logic into the right "if" block.
2014-02-21 19:24:17 +01:00
Lennart Poettering
96197df081 update TODO 2014-02-21 19:22:24 +01:00