Commit graph

19586 commits

Author SHA1 Message Date
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
Zbigniew Jędrzejewski-Szmek 9e4ded3064 build-sys: generate CLEANFILES from EXTRA_DIST
Everything that is generated can be assumed to belong to CLEANFILES,
which means that the original file has to be in EXTRA_DIST. Simplify
the rules by generating as in $subject.

We have less lists to adjust manually, and 'make clean' actually
removes more stuff that before.
2015-03-04 22:47:19 -05:00
Hannes Reinecke cbecf9bf92 Allow up to 4096 simultaneous connections
On large system we hit the limit on 512 simultaneous dbus
connections, resulting in tons of annoying messages:

Too many concurrent connections, refusing

This patch raises the limit to 4096.
2015-03-04 21:43:34 -05:00
Hannes Reinecke 1c724e9e0e Remove the cap on epoll events
Currently the code will silently blank out events if there are more
then 512 epoll events, causing them never to be handled at all. This
patch removes the cap on the number of events for epoll_wait, thereby
avoiding this issue.
2015-03-04 21:43:17 -05:00
Zbigniew Jędrzejewski-Szmek 4f70555d76 hwdb: fix Dell XPS12 9Q33 key name
https://bugs.freedesktop.org/show_bug.cgi?id=84437
2015-03-04 20:33:41 -05:00
Mirco Tischler efbef0036d build-sys: fix check for efi-lds file
Using the DIR macro breaks caching and has no benefit as it only offers
performance improvements when AS_FOR is used with a single element list.
Also --with-lds-dir= was broken as we never set have_efi_lds in this case.
Fix this and check if PATH actually contains the efi-lds file.
2015-03-04 19:33:29 -05:00
John Paul Adrian Glaubitz 3a867c6a23 Use correct uname identifiers in arch_map for SuperH architecture
https://bugs.freedesktop.org/show_bug.cgi?id=89421
2015-03-04 19:32:11 -05:00
Zachary Cook b1c1a51944 man: replace obsolete wiki link with man page 2015-03-04 19:30:50 -05:00
Lennart Poettering b6e676ce41 importd: add new bus calls for importing local tar and raw images
This also adds "machinectl import-raw" and "machinectl import-tar" to
wrap these new bus calls.

THe commands basically do for local files that "machinectl pull-raw" and
friends do for remote files.
2015-03-05 00:59:38 +01:00
Lennart Poettering 776a972612 pull: improve --help text 2015-03-05 00:59:37 +01:00
Lennart Poettering 3e2cda698f import: split out compression logic, so that we can share it with between import and pull calls 2015-03-05 00:59:37 +01:00
Lennart Poettering dc2c282b6a import: rename download code from "import" to "pull"
That way we can call the code for local container/VM imports "import"
without confusion.
2015-03-05 00:59:37 +01:00
Thomas Haller cc22955cfe sd-dhcp6-client: delay setting the DUID and don't fail constructor
sd_dhcp6_client_new() tried to set the DUID based on the machine id.
If the host has no /etc/machine-id, the constructor would fail
making it impossible to create an sd_dhcp6_client instance.

Relax this and create a DUID only later as needed. This way a caller
caller can workaround a missing machine-id file and set a DUID of his
choosing via sd_dhcp6_client_set_duid().
2015-03-04 11:01:39 +01:00
Jan Janssen 3e43b2cd97 networkd: Make DHCP client ID creation configurable 2015-03-04 11:01:39 +01:00
Tom Gundersen ff88a301e9 networkd: netdev - inform when we take over an existing netdev
The crucial point here is that we will not change the settings of a netdev created by someone else
we simply use it as is and trust it was set up as intended.

This is confusing in the case of the pre-created netdev's (bond0 etc.), the solution should probably
be to simply make the kernel stop creating these devices as they are pretty useless.
2015-03-04 11:01:39 +01:00