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

19798 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
a0b1209c4a gpt-auto-generator: allow type check to fail
add_mount() is OK with unknow file type, but we have to initalize
the variable to NULL not to pass garbage on error.
2015-03-13 23:42:16 -04:00
Zbigniew Jędrzejewski-Szmek
7c5925a448 efi: widen operand to avoid overflow
CID #1287141.
2015-03-13 23:42:16 -04:00
Zbigniew Jędrzejewski-Szmek
9fff898181 core: issue error on oom we can do nothing about
CID #1287142.
2015-03-13 23:42:16 -04:00
Zbigniew Jędrzejewski-Szmek
d357562c48 µhttp-util: setup gnutls logs in one function 2015-03-13 23:42:16 -04:00
Tom Gundersen
1b14c3cfbe udev: make set_usec_initialized() internal to libudev
Instead introduce ensure_usec_initialized(), which copies the timestamp if possible otherwise
sets it to now(CLOCK_MONOTONIC).
2015-03-13 18:47:07 +01:00
Tom Gundersen
0964dcd772 sd-rtnl: read_message - don't set group if not needed 2015-03-13 16:15:03 +01:00
Tom Gundersen
f436aa11f7 sd-rtnl: process - only apply matches to broadcast messages 2015-03-13 16:13:24 +01:00
Tom Gundersen
3f42446d28 sd-rtnl: improve detection of broadcast messages
Do not rely on nl_pid == 0, but check the groups instead. We currently avoid using
nl_pid == 0 for unicast anyway, so this should be redundant, but let's try to be
correct.
2015-03-13 16:12:57 +01:00
Tom Gundersen
913b0eef1a sd-rtnl: never set serial to 0
In the unlikely event that we wrap the counter, skip 0 as this is used
for broadcasts.

Suggested by Richard Maw.
2015-03-13 15:56:08 +01:00
David Herrmann
15411c0cb1 tree-wide: there is no ENOTSUP on linux
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
2015-03-13 14:10:39 +01:00
David Herrmann
32a568fb90 bus: stop using EDEADLOCK
The error code is called EDEADLK, stop using legacy names like EDEADLOCK.
Note that _some_ weird architectures define them differently (namely, mips
and sparc), but on all sane architectures they're exactly the same. So
stay with the widely used code, which is EDEADLK.
2015-03-13 14:10:39 +01:00
David Herrmann
ff55c3c732 journal-remote: stop using EWOULDBLOCK
There is no reason to ever use EWOULDBLOCK. It's equivalent to EAGAIN on
all architectures on linux.
2015-03-13 14:10:35 +01:00
David Herrmann
ca2031fcc8 udev: dont use EWOULDBLOCK
EWOULDBLOCK is the same as EAGAIN, stop using it.
2015-03-13 14:09:55 +01:00
Mathieu Chevrier
d736e4f3e7 gpt-auto-generator: fix detection of /srv
https://bugs.freedesktop.org/show_bug.cgi?id=89226
2015-03-13 00:36:02 -04:00
Zbigniew Jędrzejewski-Szmek
9c8ca3f7a6 man: update example 2 in systemd.network(5)
none/both/v4/v6 are deprecated in favour of no/yes/ipv4/ipv6.

https://bugs.freedesktop.org/show_bug.cgi?id=89221
2015-03-13 00:26:03 -04:00
Alex Puchades
946c950fec po: add Spanish translation
https://bugs.freedesktop.org/show_bug.cgi?id=89559
2015-03-13 00:26:03 -04:00
Zbigniew Jędrzejewski-Szmek
a2360a467b sd-event: fix typo 2015-03-13 00:26:02 -04:00
Zbigniew Jędrzejewski-Szmek
043945b938 journal-remote: process events without delay
journal-remote buffers input, and then parses it handling one journal entry at a time.
It was possible for useful data to be left in the buffer after some entries were
processesed. But all data would be already read from the fd, so there would be
no reason for the event loop to call the handler again. After some new data came in,
the handler would be called again, and would then process the "old" data in the buffer.

Fix this by enabling a handler wherever we process input data and do not exhaust data
from the input buffer (i.e. when EAGAIN was not encountered). The handler runs until
we encounter EAGAIN.

Looping over the input data is done in this roundabout way to allow the event loop
to dispatch other events in the meanwhile. If the loop was inside the handler, a
source which produced data fast enough could completely monopolize the process.

https://bugs.freedesktop.org/show_bug.cgi?id=89516
2015-03-13 00:26:02 -04:00
Zbigniew Jędrzejewski-Szmek
f53f7c8fc4 journal-remote: check also for EWOULDBLOCK
This matches similar code elsewhere.
2015-03-13 00:26:02 -04:00
Zbigniew Jędrzejewski-Szmek
0e72da6fe8 journal-remote: downgrade routine messages to debug
https://bugs.freedesktop.org/show_bug.cgi?id=89486
2015-03-13 00:26:02 -04:00
Zbigniew Jędrzejewski-Szmek
c066b4746b sd-pppoe: workaround for incomplete include in old kernels 2015-03-12 20:50:08 -04:00
Richard Maw
d422e52a35 networkd: Begin with serial number 1 for netlink requests
"Notifications are of informal nature and no reply is expected, therefore the
sequence number is typically set to 0."[1]

If networkd is started soon after recent netlink activity, then there
will be messages with sequence number 0 in the buffer.

The first thing networkd does is to request a dump of all the links. If
it uses sequence number 0 for this, then it may confuse the dump request's
response with that of a notification.

This will result in it failing to properly enumerate all the links,
but more importantly, when it comes to enumerate all the addresses, it
will still have the link dump in progress, so the address enumeration
will fail with -EBUSY.

[1]: http://www.infradead.org/~tgr/libnl/doc/core.html#core_msg_types

[tomegun: sequence -> serial]
2015-03-12 19:34:35 +01:00
Kay Sievers
b83cbcb7d9 hwdb: update 2015-03-12 18:34:23 +01:00
Kay Sievers
a31a0c92cd build-sys: fix name of new rules file 2015-03-12 17:44:58 +01:00
Kay Sievers
1c5f4cb190 rules: merge tty and serial rules file 2015-03-12 17:22:19 +01:00
Kay Sievers
654b036ba7 rules: merge udev-late.rules files 2015-03-12 16:34:18 +01:00
Kay Sievers
757ba25a8f rules: default - remove legacy agpgart 2015-03-12 16:30:05 +01:00
Kay Sievers
ea7b52374c rules: systemd - remove legacy "ram" from block device blacklist 2015-03-12 16:28:38 +01:00
Kay Sievers
52346b5f54 rules: move block device rules to its own rules file 2015-03-12 16:09:46 +01:00
Kay Sievers
1aff20687f rules: storage - relace blacklist with explicit whitelist
Newly added kernel drivers repeatedly pass our blacklist and
cause trouble for the devices, because they do not expect to
be examined by udev's default rules which include blkid.

This turns the blacklist into a whitelist. Device type which
need support for additional symlinks need to be added to the
whitelist now.

Note, that the by-id, by-path symlinks are only intended for
hotpluggable devices. There is no reason for exotic, or for
statically configured devices to provide them.
2015-03-12 15:16:00 +01:00
Tom Gundersen
5e97472e78 TODO 2015-03-12 14:12:17 +01:00
David Herrmann
f407824d75 man: split paragraph
Explicitly put the "multiple EnvironmentFile=" description into its own
paragraph to make it much easier to find.
2015-03-12 12:48:22 +01:00
Tom Gundersen
103635db51 core: add missing words to my fix of explanation of associativity 2015-03-12 12:23:59 +01:00
Tom Gundersen
6969c349df udevd: improve handling of failed worker
The information in the db is stale, so it does not make sense to
expose it any longer. Also, don't drop the kernel event, but simply
pass it on to userspace without ammending it.
2015-03-12 12:03:50 +01:00
Tom Gundersen
090b6bc520 udevd: don't free event when killing the worker, wait until it has been reaped
This will allow us to clean up the device when we are notified about the worker being killed.
2015-03-12 12:03:50 +01:00
Tom Gundersen
8f0f13f045 libudev: introduce clone_with_db()
This allows us to move the db reading from udevd to libudev.
2015-03-12 12:03:50 +01:00
Tom Gundersen
a4445e88ce libudev: monitor - fix error path in send_device
Return -errno rather than -1 in case sendmsg() fails.
2015-03-12 12:03:50 +01:00
Tom Gundersen
3c0bab4aaf udevd: event - make db loading lazy in REMOVE event handling
We were explicitly eagerly loading the db, then deletenig the backing file and then processing the
rules/symlinks. Instead we delete the backnig db file as the last step and let the db loading be
lazy as everywhere else.

This may save us a bit of work in casese where the db is not needed, but more importantly it hides
some implementation details of libudev-device form udevd.
2015-03-12 12:03:50 +01:00
Tom Gundersen
1cd0a77022 libudev: introduce udev_device_properties_copy()
To copy properties from one device to another. Drop the equivalent functionality from udevd.
2015-03-12 11:59:04 +01:00
Kay Sievers
4db7e6d781 boot: efi - add config option to disable the command line editor 2015-03-11 23:33:53 +01:00
Umut Tezduyar Lindskog
510c4a0f1e cgtop: fix assert when not on tty
systemd-cgtop --dept=1 -b -n 10 -d 0.1 | cat

Assertion 'new_length >= 3' failed at src/shared/util.c:3 \
595, function ellipsize_mem(). Aborting.
Aborted (core dumped)

(David: add comment)
2015-03-11 16:59:53 +01:00
David Herrmann
f5b51ea7fc core: fix cgroups-agent match for kdbus
On kdbus, we get cgroups-agent messages via the system bus, not the
private systemd socket. Therefore, we must install the match properly or
we will never receive cgroup notifications.
2015-03-11 16:36:41 +01:00
David Herrmann
39881ed299 core: rewind message before forwarding it
Forwarding messages that are not rewinded will drop data. Fix this for
cgroups-agent messages that we might remarshal before forwarding to the
system bus.
2015-03-11 16:36:41 +01:00
David Herrmann
908b8a42e6 bus: remarshal kdbus messages received from the kernel
If we receive an sd_bus_message from the kernel, m->kdbus will contain
additional items that cannot be used when sending a message. Therefore,
always remarshal the message if it is used again.
2015-03-11 16:36:41 +01:00
David Herrmann
8b9972db83 bus: drop redundant assignment
This assignment is already done in the parent context, no need to do it
again.
2015-03-11 16:36:41 +01:00
Zbigniew Jędrzejewski-Szmek
16eb402488 man: fix links to compressors 2015-03-11 10:08:12 -04:00
Zbigniew Jędrzejewski-Szmek
fc25ad25e0 socket-util: refactor error handling in sockaddr_pretty 2015-03-11 10:08:12 -04:00
Tom Gundersen
48b4eab497 core: fix explanation of associativity 2015-03-11 14:55:18 +01:00
David Herrmann
ec2c7b5659 bus-proxy: complain only once about queue overflows
If the local peer does not dispatch its incoming queue, the bus-proxy will
slowly fill its outgoing queue. Once its full, it will continously
complain that it cannot forward its messages.

As it turns out, pulseaudio does have an idle background dbus connection
that is not integrated into any mainloop (and given that gdbus and
libdbus1 both support background shared connections, PA is probably not
the only example), therefore, the bus-proxy will loudly complain if it
cannot forward NameOwnerChanged events once the queue is full.

This commit makes the proxy track queue-state and complain only once the
queue runs full, not if it is already full.

A PA bug-report (and patch) has been filed, and other applications should
be fixed similarly. Hence, lets keep the error message, instead of
dropping it. It's unused resources we really want to get rid of, so
silencing the message does not really help (which is actually what
dbus-daemon does).
2015-03-11 13:57:38 +01:00
David Herrmann
b2068772f5 terminal/sysview: introduce SETTLE events
This introduces a new SYSVIEW_EVENT_SETTLE notification that is sent after
initial scanning via sysview is done. This is very handy to let the
application raise warnings in case requested resources are not found
during startup.

The SETTLE event is sent after systemd-logind and udev enumerations are
done. This event does in no way guarantee that a given resource is
available. All it does is notify the application that scanning is done!
You must not react to SETTLE if you don't have external synchronization
with the resource you're waiting for.

The main use-case for SETTLE is to run applications _inside_ of logind
sessions and startup sysview. You really want to make sure that the own
session you're running in was found during enumeration. If not, something
is seriously wrong.
2015-03-11 12:32:48 +01:00