1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-14 15:21:37 +03:00
Commit Graph

21010 Commits

Author SHA1 Message Date
David Herrmann
0b2ec8a3bf sysv-generator: fix coding-style
Fix weird coding-style:
 - proper white-space
 - no if (func() >= 0) bail-outs
 - fix braces
 - avoid 'r' for anything but errno
 - init _cleanup_ variables unconditionally, even if not needed
2015-07-01 13:02:58 +02:00
David Herrmann
e04658277d Revert "kmod-setup: don't print warning on -ENOSYS"
This partially reverts commit 78d298bbc5.
The changed coding-style is kept, but the ENOENT->ENOSYS conversion is
reverted.

kmod was fixed upstream to no longer return ENOSYS. Also see:
    https://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/?id=114ec87c85c35a2bd3682f9f891e494127be6fb5

The kmod fix is marked for backport, so no reason to bump the kmod
version we depend on.
2015-07-01 12:58:03 +02:00
Martin Pitt
52a321d839 sysv-generator test: Fix random ordering failure
test_simple_escaped() sometimes fails with

AssertionError: Lists differ: ['foo\\x2b.service', 'foo-admin.service'] != ['foo-admin.service', 'foo\\x2b.service']

We don't need to assume any order here, so compare them as a set, not a list.
2015-07-01 07:34:23 +02:00
Kay Sievers
64ea3f926d Merge pull request #411 from teg/udev-simplify-exec-envp
udev: event - simplify udev_event_spawn() logic
2015-06-30 22:32:45 +02:00
David Herrmann
dfab39b017 Merge pull request #398 from teg/netlink-container-rework
netlink container rework

Allocate containers as separate structs instead of individual arrays for each member field.
2015-06-30 22:15:55 +02:00
Martin Pitt
a7e950bdd9 Merge pull request #434 from kaysievers/wip
udev: remove WAIT_FOR key
2015-06-30 20:33:15 +02:00
Kay Sievers
f2b8052fb6 udev: remove WAIT_FOR key
This facility was never a proper solution, but only papered over
real bugs in the kernel. There are no known sysfs "timing bugs"
since a long time.
2015-06-30 19:57:40 +02:00
Tom Gundersen
94f5683160 Merge pull request #430 from gmacario/fix-issue404-v2
bootchart: Ensure that /proc/schedstat is read entirely (v2)
2015-06-30 18:39:39 +02:00
Tom Gundersen
b7a049dba5 Merge pull request #429 from richardmaw-codethink/nspawn-userns-uid-shift-autodetection-fix
nspawn: determine_uid_shift before forking
2015-06-30 18:24:14 +02:00
Tom Gundersen
2f280f17d9 Merge pull request #428 from richardmaw-codethink/nspawn-userns-remount-fail
nspawn: Don't remount with fewer options
2015-06-30 18:16:02 +02:00
Gianpaolo Macario
c91d0fd2f4 bootchart: Ensure that /proc/schedstat is read entirely
On multi-core systems file /proc/schedstat may be
larger than 4096 bytes and pread() will only read part of it.

Fix issue https://github.com/systemd/systemd/issues/404
2015-06-30 15:09:02 +00:00
Lennart Poettering
96f9102ce0 Merge pull request #424 from endocode/iaguis/shutdown-log-null
core: handle --log-target=null when calling systemd-shutdown
2015-06-30 10:58:35 -04:00
Richard Maw
7fe2bb84c4 nspawn: determine_uid_shift before forking
It is needed in one branch of the fork, but calculated in another
branch.

Failing to do this means using --private-users without specifying a uid
shift always fails because it tries to shift the uid to UID_INVALID.
2015-06-30 14:05:58 +00:00
Richard Maw
3c59d4f21f nspawn: Don't remount with fewer options
When we do a MS_BIND mount, it inherits the flags of its parent mount.
When we do a remount, it sets the flags to exactly what is specified.
If we are in a user namespace then these mount points have their flags
locked, so you can't reduce the protection.

As a consequence, the default setup of mount_all doesn't work with user
namespaces. However if we ensure we add the mount flags of the parent
mount when remounting, then we aren't removing mount options, so we
aren't trying to unlock an option that we aren't allowed to.
2015-06-30 14:05:03 +00:00
Iago López Galeiras
10f00ff17b core: handle --log-target=null when calling systemd-shutdown
When shutting down, if systemd was started with --log-target=null,
systemd-shutdown was being called with --log-target=console.
2015-06-30 15:13:57 +02:00
Tom Gundersen
8914ea0e90 Merge pull request #412 from fsateler/sysv-invalid-names-v2
sysv-generator: detect invalid names and escape them V2
2015-06-29 23:30:14 +02:00
Daniel Mack
745b8fcca9 Merge pull request #413 from jaystrictor/manpages
man: remove repeated word "the" and polish
2015-06-29 22:23:25 +02:00
Jay Strict
1d3eaa9361 man: remove repeated word "the" and polish 2015-06-29 21:20:02 +02:00
Felipe Sateler
264581a2f1 sysv-generator: escape names when translating from sysv name
While the LSB suggests only [A-Za-z0-9], that doesn't prevent admins
from doing the wrong thing. Lets not generate invalid names in
that case.
2015-06-29 16:07:49 -03:00
Felipe Sateler
2c09a745eb sysv-generator: detect invalid provided unit names
Do not assume that a non-service unit type is a target.
2015-06-29 16:07:49 -03:00
Daniel Mack
2ab4c7c9f3 Merge pull request #410 from teg/docs-gitignore
docs: remove stale .gitignore
2015-06-29 20:02:14 +02:00
Tom Gundersen
bbf3520673 udev: event - simplify udev_event_spawn() logic
Push the extraction of the envp + argv as close as possible to their use, to avoid code
duplication. As a sideeffect fix logging when delaing execution.
2015-06-29 19:51:04 +02:00
Tom Gundersen
72590bcb4e docs: remove stale .gitignore
This is no longer useful as the udev docs are gone.
2015-06-29 19:45:29 +02:00
Daniel Mack
1cf34d7118 Merge pull request #408 from ColdPie1/fix_resp
man: Remove instances of pseudo-English "resp."
2015-06-29 18:58:19 +02:00
Andrew Eikum
853382da70 man: Remove instances of pseudo-English "resp."
Me again :) Just noticed one of these in a manpage and did another pass
to clean them up.  See 16dad32e43 for
explanation, though the link needs updating:
<http://transblawg.eu/2004/02/26/resp-and-other-non-existent-english-wordsnicht-existente-englische-worter/>
2015-06-29 10:33:31 -05:00
Tom Gundersen
ab49ae5ba6 Merge pull request #387 from kaysievers/wip
udev: Remove accelerometer helper
2015-06-29 16:02:33 +02:00
Kay Sievers
0bf134a734 Merge pull request #403 from cedricde/patch-1
Process persistent storage rules for cciss devices
2015-06-29 10:59:35 +02:00
Cédric Delmas
ba27fb2111 Process cciss devices
Do not skip the persistent storage rules for cciss devices
2015-06-29 09:54:58 +02:00
Daniel Mack
a611cd7406 Merge pull request #402 from systemd-mailing-devs/1435512180-3659-1-git-send-email-ebiggers3@gmail.com
util: fix incorrect escape sequence in string_is_safe()
2015-06-29 05:43:26 +02:00
Daniel Mack
eeec69e0e0 Merge pull request #399 from gmacario/fix-issue341-v2
bootchart: reset list_sample_data head before generating SVG
2015-06-29 05:03:38 +02:00
Tom Gundersen
e88113bd44 Merge pull request #388 from fsateler/doc-pidfile-removal
systemd.service.xml: document that systemd removes the PIDFile
2015-06-28 23:10:46 +02:00
Eric Biggers
843f6bf4ef util: fix incorrect escape sequence in string_is_safe() 2015-06-28 20:02:44 +02:00
Gianpaolo Macario
ae87a4a929 bootchart: reset list_sample_data head before generating SVG
Until commit 1f2ecb0 ("bootchart: kill a bunch of global variables")
variable "head" was declared global and this action was performed by svg_header.
Now that "head" is local and passed to each function called by svg_do(...)
move the code at the beginning of svg_do(...) to restore the correct behaviour.
2015-06-28 17:30:47 +00:00
Tom Gundersen
8c2a0730f4 sd-netlink: message - remove unused next_rta_offset field
This was a left-over from before we supported containers.
2015-06-28 19:16:04 +02:00
Tom Gundersen
f663aeb80b netlink: rework containers
Instead of representing containers as several arrays, make a new
netlink_container struct and keep one array of these structs. We
also introduce netlink_attribute structs that in the future will
hold meta-information about each atribute.
2015-06-28 19:16:04 +02:00
Tom Gundersen
4203fc8b81 sd-netlink: make a couple of helper functions static
Also rename from rtnl_* to netlink_*.
2015-06-28 19:10:51 +02:00
Tom Gundersen
da041d69d1 sd-netlink: mark union containers as nested
This was an oversight, they are no different from regular containers in this respect.
2015-06-28 19:10:51 +02:00
Felipe Sateler
341db20b7e systemd.service.xml: document that systemd removes the PIDFile 2015-06-27 17:25:06 -03:00
Bastien Nocera
0051ebf7e5 udev: Remove accelerometer helper
It's moved to the iio-sensor-proxy D-Bus service.
2015-06-27 21:48:52 +02:00
Tom Gundersen
281d4a7710 Merge pull request #377 from zonque/logind
logind: fix delayed execution regression
2015-06-26 21:41:44 +02:00
Greg Kroah-Hartman
57a2bf2329 Merge pull request #353 from kaysievers/hid
rules: remove all power management from udev
2015-06-26 09:51:11 -07:00
Kay Sievers
13b7079289 Merge pull request #379 from whot/hwdb-updates
Revert "hwdb: add a touchpad hwdb"
2015-06-26 11:33:04 +02:00
Peter Hutterer
0530459245 Revert "hwdb: add a touchpad hwdb"
The main purpose of this hwdb was to tag touchpads that have the physical
trackstick buttons wired to the touchpad (Lenovo Carbon X1 3rd, Lenovo *50
series).  This hwdb is not required on kernels 4.0 and above, the kernel now
re-routes button presses through the trackstick's device node. Userspace does
not need to do anything.

See kernel commit cdd9dc195916ef5644cfac079094c3c1d1616e4c.

This reverts commit 001a247324.
2015-06-26 16:09:48 +10:00
Daniel Mack
418b22b88f logind: fix delayed execution regression
Commit c0f32805 ("logind: use sd_event timer source for inhibitor
logic") reworked the main loop logic of logind so that it uses a
real timeout callback handler to execute delayed functions.

What the old code did, however, was to call those functions on
every iteration in the main loop, not only when the timeout
expired.

Restore that behavior by bringing back manager_dispatch_delayed(),
and call it from manager_run(). The internal event source callback
manager_inhibit_timeout_handler() was turned into a wrapper of
manager_dispatch_delayed() now.
2015-06-25 17:18:41 +02:00
Daniel Mack
906fa49076 Merge pull request #367 from msekletar/install-unit-file-list-assert
install: explicitly return 0 on success
2015-06-25 16:38:41 +02:00
Daniel Mack
9674f042b2 Merge pull request #366 from gmacario/fix-issue139-v5
bootchart: Account CPU time spent in non-main threads of processes (v5)
2015-06-25 16:37:06 +02:00
Michal Sekletar
77cd2c87a4 install: explicitly return 0 on success
Maybe there is some left-over value stored in r from previous function
call. Let's make sure we always return consistent error code when we reach end of
the function body.

Fixes following crash of test-install,

Assertion 'r == 0' failed at src/test/test-install.c:52, function main(). Aborting.
[1]    11703 abort (core dumped)  ./test-install
2015-06-25 16:15:36 +02:00
Gianpaolo Macario
caa4339784 bootchart: Account CPU time spent in non-main threads of processes (v5)
Fix for issue https://github.com/systemd/systemd/issues/139

- Implement fixes suggested by @teg to -v2
- Implement fixes suggested by @zonque to -v3 and -v4
2015-06-25 13:39:41 +00:00
Kay Sievers
9ebdb1e057 Merge pull request #363 from zonque/proxy
bus-proxy: ignore 'log' attributes in XML policy
2015-06-25 14:36:59 +02:00
Daniel Mack
b9191d7a52 bus-proxy: ignore 'log' attributes in XML policy
'log' is unsupported but nothing to warn about. Ignore it just like we
ignore 'eavesdrop'.
2015-06-25 13:13:17 +02:00