Commit graph

19550 commits

Author SHA1 Message Date
Lennart Poettering 88b28381ef fsck: rename functions to reflect some object orientation
Let's clean up the function naming scheme and put the object they
operate on first in the name, the way OO programming usually does it.

Also, let's make sure can properly destroy half-initialized Manager
objects.
2015-03-09 19:23:36 +01:00
Lennart Poettering df4573e851 fsck: don't read invalid data 2015-03-09 18:58:05 +01:00
Lennart Poettering 0b02c7c36d fsckd: internaly check if a client already was cancelled 2015-03-09 18:57:58 +01:00
Lennart Poettering f8824a5129 fsck: simplify client destruction logic 2015-03-09 18:57:11 +01:00
Lennart Poettering 7046313698 fsckd: rework plymouth connection management
- the even source should not be freed before the fd for it is closed

- read() returns an ssize_t and we need to handle it as such

- properly handle errors from read()

- reuse on_plymouth_disconnect() whenever we disconnect from plymouth,
  and rename it plymouth_disconnect hence()
2015-03-09 18:45:50 +01:00
Lennart Poettering e9d2527ff4 fscd: fix error handling 2015-03-09 18:30:37 +01:00
Lennart Poettering 3963cea3b0 fsck: no need for a temporary variable 2015-03-09 18:30:18 +01:00
Lennart Poettering d2268a20a0 fsckd: fix error handling when sending cancel request to fsck client 2015-03-09 18:29:08 +01:00
Lennart Poettering 705778ad6a fsck: unify exit path for connect_plymouth() 2015-03-09 18:21:34 +01:00
Lennart Poettering a922c18bce fsck: use only a single exit code ternary operator 2015-03-09 18:19:56 +01:00
Lennart Poettering 76bb3afd81 fsck: simplification 2015-03-09 18:19:23 +01:00
Lennart Poettering adfe5671ef fsckd: the error code is actually returned in 'fd'
Also, we don't use {} for single-line if-blocks.
2015-03-09 18:16:56 +01:00
Lennart Poettering 2de68ed95d fsckd: simplify code a bit 2015-03-09 18:16:36 +01:00
Lennart Poettering c011cc2669 fsckd: make use of safe_close()'s return value 2015-03-09 18:16:20 +01:00
Lennart Poettering b481de3b22 man: document that ExecStartPre= is not the place to start long-running processes 2015-03-09 18:02:23 +01:00
Lennart Poettering 2c971c6fef build-sys: add one more Makefile symlink 2015-03-09 18:02:23 +01:00
Lennart Poettering 587fec427c importd: add API for exporting container/VM images
Also, expose it in machinectl.
2015-03-09 18:02:23 +01:00
Lennart Poettering ea79e73b8a udev: use inttypes.h types wherever appropriate 2015-03-09 18:02:22 +01:00
Lennart Poettering 885fdebc13 tree-wide: use _packed_ macro instead of raw gcc __attribute__ 2015-03-09 18:02:22 +01:00
Tom Gundersen db93e063bd udevd: close race in udev settle
The udev-settle guarantees that udevd is no longer processing any of the
events casued by udev-trigger. The way this works is that it sends a
synchronous PING to udevd after udev-trigger has ran, and when that returns
it knows that udevd has started processing the events from udev-trigger.
udev-settle will then wait for the event queue to empty before returning.

However, there was a race here, as we would only update the /run state at
the beginning of the event loop, before reading out new events and before
processing the ping.

That means that if the first uevent arrived in the same event-loop iteration
as the PING, we would return the ping before updating the queue state in /run
(which would happen on the next iteration).

The race window here is tiny (as the /run state would probably get updated
before udev-settle got a chance to read /run), but still a possibility.

Fix the problem by updating the /run state as the last step before returning
the PING.

We must still update it at the beginning of the loop as well, otherwise we
risk being stuck in poll() with a stale state in /run.

Reported-by: Daniel Drake <drake@endlessm.com>
2015-03-09 17:55:16 +01:00
Michael Olbrich cf1755bac0 missing.h: add NDA_*
This is necessary to build with older kernel headers. NDA_VLAN was
introduced in v3.9 and NDA_PORT, NDA_VNI and NDA_IFINDEX in v3.10
2015-03-09 14:06:20 +01:00
Torstein Husebø 4a6970c535 Fix typos 2015-03-09 13:38:53 +01:00
Sergey Ptashnick 27a9986b20 po: update Russian translation - pluralize fsckd
Correctly pluralize strings for fsckd.
2015-03-08 12:19:33 -04:00
Zbigniew Jędrzejewski-Szmek 7b300be75e sd-journal: return error when we cannot open a file
Lack of this caused journalctl not to display a hint about missing groups
properly when the user lacks permissions.
2015-03-08 11:11:50 -04:00
Zbigniew Jędrzejewski-Szmek 05c1853093 journalctl: update hint now that we set ACL everywhere 2015-03-08 11:04:59 -04:00
Sergey Ptashnick 93b06fd0f0 po: update Russian translation - importd
Add strings for importd, by analogy with 1eb37584a8.
2015-03-08 10:46:41 -04:00
Zbigniew Jędrzejewski-Szmek bcf88fc3f1 bus: fix leak in error path
CID #1271349.
2015-03-07 15:05:50 -05:00
Zbigniew Jędrzejewski-Szmek 2558691285 systemctl: remove dead check
r could never be less than zero.

CID #1271350.
2015-03-07 15:00:22 -05:00
Zbigniew Jędrzejewski-Szmek d4ad27a104 core/load-fragment: safe_close() protects errno 2015-03-07 14:36:14 -05:00
Zbigniew Jędrzejewski-Szmek 33f1b0aeea libsystemd-terminal: use at most LOG_ERR for XKB errors
XKB errors aren't *that* important.

Coverity complained that the same action is taken in multiple
branches, which is semi-valid, so is fixed too (CID #1256582).
2015-03-07 14:30:56 -05:00
Zbigniew Jędrzejewski-Szmek dcee01125d login: fix copy-pasto in error path
CID #1256583.
2015-03-07 14:23:38 -05:00
Zbigniew Jędrzejewski-Szmek 8a16a7b4e7 nspawn: fix use-after-free and leak in error paths
CID #1257765.
2015-03-07 14:19:20 -05:00
Zbigniew Jędrzejewski-Szmek 5eed9d0d85 core/dbus-manager: remove dead check
CID #1257766.
2015-03-07 14:16:18 -05:00
Zbigniew Jędrzejewski-Szmek 42115af0c3 bus-util: remove stray errno assignment 2015-03-07 14:09:50 -05:00
Zbigniew Jędrzejewski-Szmek b4e3d5e14c networkctl: avoid leak if a field was specified twice
The input data would have to be borked, so this is unlikely to happen,
but since we have a nice helper function to do it properly... why not?

CID #1261390.
2015-03-07 14:06:35 -05:00
Zbigniew Jędrzejewski-Szmek 2c07315225 machine: do not rely on asprintf setting arg on error
Strictly speaking, the output variable is undefined if asprintf fails.
We use the return value not the arg everywhere, and should we do here.
2015-03-07 14:01:45 -05:00
Zbigniew Jędrzejewski-Szmek fadce6caf5 v4l_id: use standard option parsing loop
Not terribly important, but the loop wasn't an actual loop,
making coverity unhappy.

CID #1261725.
2015-03-07 13:54:32 -05:00
Zbigniew Jędrzejewski-Szmek 132764a223 shared/machine-pool: remove unnecessary check
CID #128739.
2015-03-07 13:40:48 -05:00
Ivan Shapovalov c5abf22514 sysusers: do not reject users with already present /etc/shadow entries
This is needed to interoperate firstboot and sysusers. The former one is started
first, and it writes only /etc/shadow when it is told to set the root password.
It's better to relax checks here than to duplicate functionality in firstboot.
2015-03-07 13:09:36 -05:00
Ivan Shapovalov ad525df851 firstboot: set all spwd fields to -1 for consistency with sysusers 2015-03-07 09:08:47 -05:00
Ivan Shapovalov 6e392c9c45 core: do not spawn jobs or touch other units during coldplugging
Because the order of coldplugging is not defined, we can reference a
not-yet-coldplugged unit and read its state while it has not yet been
set to a meaningful value.

This way, already active units may get started again.

We fix this by deferring such actions until all units have been at
least somehow coldplugged.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=88401
2015-03-07 08:44:57 -05:00
Shawn Landden 6829cec4dc adjust for time spent in timedated even without dbus timestamp
it is trivial to fall back to our own timestamp

v2: use now()
v3: remove useless if ()
v4: add comment
2015-03-07 08:10:51 -05:00
Sylvain Plantefève 1eb37584a8 po: update French translation 2015-03-06 18:58:34 -05:00
Jan Engelhardt a52750d148 vconsole: match on vtcon events, not fbcon ones
I observe that upon loading of framebuffer drivers, I do not get the
desired system font, but the kernel-level defaults (usually
lib/fonts/font_8x16.c, but your mileage may vary depending on kernel
config and boot options).

The fbcon driver may be loaded at a time way before the first
framebuffer device is active, such that the vconsole setup helper
runs too early.

The existing rule is non-fitting. The going live of the fbcon kernel
component does not indicate the proper time at which to load the
visuals, which really ought to be done when a new vtcon object comes
into existence. (The font table is a per-vtcon property.)
2015-03-06 15:00:40 +01:00
David Herrmann 9d10cbee89 login: make hold-off timeout configurable
This introduces 'HoldoffTimeoutSec' to logind.conf to make
IGNORE_LID_SWITCH_{SUSPEND,STARTUP}_USEC configurable.

Background: If an external monitor is connected, or if the system is
docked, we want to ignore LID events. This is required to support setups
where a laptop is used with external peripherals while the LID is closed.
However, this requires us to probe all hot-plugged devices before reacting
to LID events. But with modern buses like USB, the standards do not impose
any timeout on the slots, so we have no chance to know whether a given
slot is used or not. Hence, after resume and startup, we have to wait a
fixed timeout to give the kernel a chance to probe devices. Our timeout
has always been generous enough to support even the slowest devices.
However, a lot of people didn't use these features and wanted to disable
the hold-off timer. Now we provide a knob to do that.
2015-03-06 14:37:09 +01:00
Peter Hutterer 9638ee9086 hwdb: add Lenovo W451 to TOUCHPAD_HAS_TRACKPOINT_BUTTONS list 2015-03-06 11:02:32 +10:00
Lennart Poettering e721d697db machinectl: minor --help text improvements 2015-03-05 16:52:25 +01:00
Martin Pitt 6487ada88d tmpfiles: Fix handling of duplicate lines
Commit 3f93da987 accidentally dropped the "return 0" after detection of a
duplicate line. Put it back, to get back the documented and intended "first
match wins" behaviour.

https://launchpad.net/bugs/1428540
2015-03-05 16:14:07 +01:00
Jonathon Gilbert 6437edbebe hwdb: add Logitech G5 Laser Mouse 2015-03-05 20:35:21 +10:00
Jay Faulkner 9a71b1122c nspawn: Map all seccomp filters to capabilities
This change makes it so all seccomp filters are mapped
to the appropriate capability and are only added if that
capability was not requested when running the container.

This unbreaks the remaining use cases broken by the
addition of seccomp filters without respecting requested
capabilities.

Co-Authored-By: Clif Houck <me@clifhouck.com>

[zj: - adapt to our coding style, make struct anonymous]
2015-03-04 23:18:09 -05:00