1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
Commit Graph

21769 Commits

Author SHA1 Message Date
Jan Pokorný
6b9af96321
core: s/reexection/reexecution/ typo fix
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2015-08-07 17:13:15 +02:00
Daniel Mack
28ba1d6723 Merge pull request #904 from keszybz/load-fragment-fix
Load fragment fix
2015-08-07 07:32:19 +02:00
Zbigniew Jędrzejewski-Szmek
388a91b064 man: clarify that unknown escapes must be escaped
https://bugzilla.redhat.com/show_bug.cgi?id=1251334
is about a unit file which has
Environment=TERM=linux PS1=system-upgrade:\w\$\x20
We used to allow that, but after recent tightening of parsing
rules, we barf. Make it clear that this is intentional.
2015-08-07 00:07:39 -04:00
Zbigniew Jędrzejewski-Szmek
67a3328fbd load-fragment: fix segv on parse error
https://bugzilla.redhat.com/show_bug.cgi?id=1251334
2015-08-07 00:07:39 -04:00
Zbigniew Jędrzejewski-Szmek
b32545ff19 build-sys: line-wrap message about google servers
This way it is more readable in a wall of configure output.
2015-08-06 21:43:22 -04:00
Daniel Mack
3996b5251d Merge pull request #898 from poettering/machined-fix-reload
Fix for #376, plus some other fixes
2015-08-06 16:13:22 +02:00
Lennart Poettering
49f3fffd94 machined: rework state tracking logic for machines
This splits up the stopping logic for machines into two steps: first on
machine_stop() we begin with the shutdown of a machine by queuing the
stop method call for it. Then, in machine_finalize() we actually remove
the rest of its runtime context. This mimics closely how sessions are
handled in logind.

This also reworks the GC logic to strictly check the current state of
the machine unit, rather than shortcutting a few cases, like for example
assuming that UnitRemoved really means a machine is gone (which it isn't
since Reloading might trigger it, see #376).

Fixes #376.
2015-08-06 16:54:00 +03:00
Lennart Poettering
e5a840c93a machine: drop state variable from Machine object
We never made use of it, let's get rid of it.
2015-08-06 16:54:00 +03:00
Lennart Poettering
491ac9f2c4 logind,machined: various smaller cleanups
Use mfree() where we can.

Drop unnecessary {}.

Drop unnecessary variable declarations.

Cast syscall invocations where explicitly don't care for the return
value to (void).

Reword a comment.
2015-08-06 16:54:00 +03:00
Lennart Poettering
65d73cf042 machined,logind: don't generate errors on signal match functions
If we get a weird signal, then we should log about it, but not return an
error, since sd-bus will not call us again then anymore, but for these
signals we match here we actually do want to be called on the next
invocation.
2015-08-06 16:54:00 +03:00
Tom Gundersen
cedafc8a72 Merge pull request #897 from poettering/sd-bus-ignore-bloom-filter
sd-bus: ignore BLOOM_FILTER kdbus items
2015-08-06 14:56:47 +02:00
Lennart Poettering
3f624df6cf sd-bus: ignore BLOOM_FILTER kdbus items
The kernel nowadays sends these along, and that's OK, hence don't even
debug log about it, but completely ignore it.
2015-08-06 15:48:33 +03:00
Tom Gundersen
089157763a Merge pull request #896 from poettering/runtimedir-exec
execute: don't fail if we create the runtime directory from two proce…
2015-08-06 14:34:12 +02:00
Karel Zak
a592ab6ae8 bootctl: fix path in log message 2015-08-06 13:59:38 +02:00
Lennart Poettering
6bfe5c28ca execute: don't fail if we create the runtime directory from two processes simultaneously
If a service has both ExecStart= and ExecStartPost= set with
Type=simple, then it might happen that we have two children create the
runtime directory of a service (as configured with RuntimeDirectory=) at
the same time. Previously we did this with mkdir_safe() which will
create the dir only if it is missing, but if it already exists will at
least verify the access mode and ownership to match the right values.
This is problematic in this case, since it creates and then adjusts the
settings, thus it might happen that one child creates the directory with
root owner, another one then verifies it, and only afterwards the
directory ownership is fixed by the original child, while the second
child already failed.

With this change we'll now always adjust the access mode, so that we
know that it is right. In the worst case this means we adjust the
mode/ownership even though its unnecessary, but this should have no
negative effect.

https://bugzilla.redhat.com/show_bug.cgi?id=1226509
2015-08-06 14:56:20 +03:00
Karel Zak
93b1da8525 udev: variable dereferenced before check 'cmsg' 2015-08-06 13:46:49 +02:00
Kay Sievers
855fc9744f bus-proxy: add comment to remove -EPERM check 2015-08-06 13:45:46 +02:00
Karel Zak
0610939d6b libsystemd: fix RTNL_CONTAINER_DEPTH assert
The m->n_containers is index and has to be smaller than the array
size.
2015-08-06 13:33:53 +02:00
Kay Sievers
f35e54d03a Merge pull request #895 from zonque/unit-fix
core: unit: remove bus slot after calling unit_done()
2015-08-06 13:01:13 +02:00
Daniel Mack
cf9fd50884 core: unit: remove bus slot after calling unit_done()
The ->done callback in the unit's vtable might call into
unit_unwatch_bus_name() and corrupt memory by that.

Move the call down, and clean up the bus slot in case it hasn't been done
yet.
2015-08-06 12:56:15 +02:00
Lennart Poettering
5df0997459 update TODO 2015-08-06 13:44:24 +03:00
David Herrmann
2c960818c8 bus-proxy: fix error code for invalid reply-slots
The kernel may return EBADSLT if a reply slot cannot be found. Make sure
to ignore it just like we ignore EPERM (the comment still applies).
2015-08-06 11:44:06 +02:00
Lennart Poettering
a6b0951868 Merge pull request #894 from zonque/name-owner-changed-v2
core: dbus: track bus names per unit (v2)
2015-08-06 11:25:31 +03:00
Daniel Mack
bbc2908635 core: dbus: track bus names per unit
Currently, PID1 installs an unfiltered NameOwnerChanged signal match, and
dispatches the signals itself. This does not scale, as right now, PID1
wakes up every time a bus client connects.

To fix this, install individual matches once they are requested by
unit_watch_bus_name(), and remove the watches again through their slot in
unit_unwatch_bus_name().

If the bus is not available during unit_watch_bus_name(), just store
name in the 'watch_bus' hashmap, and let bus_setup_api() do the installing
later.
2015-08-06 10:14:41 +02:00
Lennart Poettering
d5972272d2 Merge pull request #888 from keszybz/completions-optional
build-sys: allow skipping installation of completions
2015-08-06 10:18:57 +03:00
Lennart Poettering
8090763d76 Merge pull request #890 from fsateler/special-docs-v2
man: Clarify the difference between sysinit.target and basic.target
2015-08-06 10:08:40 +03:00
Lennart Poettering
f003a1fa80 Merge pull request #893 from zonque/networkd
libsystemd-network: plug memory leak
2015-08-06 10:06:15 +03:00
Daniel Mack
92d0218ed1 libsystemd-network: plug memory leak
Coverity #1315324
2015-08-06 08:54:29 +02:00
Zbigniew Jędrzejewski-Szmek
b747102da7 Merge pull request #889 from keszybz/man-systemctl-quiet
man: update description of --quiet
2015-08-05 21:15:17 -04:00
Zbigniew Jędrzejewski-Szmek
73974f6768 Merge branch 'hostnamectl-dot-v2'
Manual merge of https://github.com/systemd/systemd/pull/751.
2015-08-05 21:02:41 -04:00
Zbigniew Jędrzejewski-Szmek
90365b043a hostname-util: ignore case when checking if hostname is localhost 2015-08-05 20:49:21 -04:00
Zbigniew Jędrzejewski-Szmek
ae691c1d93 hostname-util: get rid of unused parameter of hostname_cleanup()
All users are now setting lowercase=false.
2015-08-05 20:49:21 -04:00
Zbigniew Jędrzejewski-Szmek
17eb9a9ddb hostnamectl: allow trailing dot on fqdn
When the user requests to set hostname, and we are setting both
pretty and static hostnames, and the name is a valid FQDN, we
use it as the static hostname, and unset the pretty hostname.
The change is that a FQDN with a trailing dot is accepted and ignored.

https://bugzilla.redhat.com/show_bug.cgi?id=1238246

Lowercasing of the static name is not done anymore.

$ hostnamectl set-hostname Foobar.
=> static is "Foobar", pretty is "Foobar."
$ hostnamectl set-hostname Foobar.org.
=> static is "Foobar.org", pretty is unset
$ hostnamectl set-hostname Foobar.org..
=> static is "Foobar.org", pretty is "Foobar.org.."
2015-08-05 20:49:21 -04:00
Zbigniew Jędrzejewski-Szmek
79f17ea6f8 networkd: allow trailing dot on fqdn in config file 2015-08-05 20:49:20 -04:00
Zbigniew Jędrzejewski-Szmek
34ad609010 firstboot: allow a trailing dot on fqdn 2015-08-05 20:49:20 -04:00
Zbigniew Jędrzejewski-Szmek
8fb4944358 hostname-util: add relax parameter to hostname_is_valid
Tests are modified to check behaviour with relax and without relax.
New tests are added for hostname_cleanup().
Tests are moved a new file (test-hostname-util) because there's
now a bunch of them.

New parameter is not used anywhere, except in tests, so there should
be no observable change.
2015-08-05 20:49:20 -04:00
Felipe Sateler
913a986914 man: Clarify difference between basic.target and sysinit.target 2015-08-05 21:26:11 -03:00
Felipe Sateler
1abc8ae604 man: Clarify that basic.target does not pull in remote filesystems
Also note /var, /tmp or /var/tmp as special cases, should either of
those be a remote filesystem.
2015-08-05 21:26:11 -03:00
Zbigniew Jędrzejewski-Szmek
bbd46aadf3 man: update description of --quiet
This description should provide the general rule, without
listing all the subcommands, which is bound to get out of date
too often.

https://github.com/systemd/systemd/issues/216
2015-08-05 20:21:19 -04:00
Zbigniew Jędrzejewski-Szmek
a5ba84b7f2 build-sys: allow skipping installation of completions
./configure --with-bashcompletiondir=no or --without-bashcompletiondir
now works as expected. Similarly for zsh.

https://github.com/systemd/systemd/issues/533
2015-08-05 20:16:34 -04:00
Daniel Mack
4306d66f59 Merge pull request #885 from keszybz/logitech-g500
hwdb: add Logitech G500 (another version)
2015-08-06 02:13:37 +02:00
Zbigniew Jędrzejewski-Szmek
3d5c0e15b0 hwdb: add Logitech G500 (another version)
https://github.com/systemd/systemd/issues/562
2015-08-05 19:15:05 -04:00
Daniel Mack
e6898d854d Merge pull request #881 from jrobeson/remove-fedup-todos
TODO: remove obsolete fedup related todos
2015-08-06 01:13:21 +02:00
Daniel Mack
7c43bfecfa Merge pull request #883 from phomes/bool_vs_error_codes
tree-wide: do not return error codes as bool
2015-08-06 01:12:45 +02:00
Daniel Mack
c2f147382d Merge pull request #882 from phomes/indentation
tree-wide: fix indentation
2015-08-06 01:12:05 +02:00
Thomas Hindoe Paaboel Andersen
756775814c tree-wide: do not return error codes as bool 2015-08-06 00:49:45 +02:00
Thomas Hindoe Paaboel Andersen
7d6884b65e tree-wide: fix indentation 2015-08-06 00:44:19 +02:00
Johnny Robeson
caaf2d1f19 TODO: remove obsolete fedup related todos
Fedup is being replaced by a dnf plugin that relies on systemd offline
updates as per
https://fedoraproject.org/wiki/Changes/DNF_System_Upgrades
2015-08-05 17:28:29 -04:00
Tom Gundersen
511d2ffc8c Merge pull request #878 from poettering/network-dhcp-array-fix
network: make enough space for string
2015-08-05 22:58:55 +02:00
Lennart Poettering
30afef872e network: make enough space for string
Follow-up for PR #877.
2015-08-05 22:25:14 +03:00