1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-28 20:25:25 +03:00
Commit Graph

21708 Commits

Author SHA1 Message Date
Lennart Poettering
c5974b33e7 update TODO 2015-08-14 12:47:57 +02:00
Thomas Hindoe Paaboel Andersen
88231eb62c logind: actually fail on OOM
Since dacd6cee76 the two OOM's are
ignored as the value of r will be overwritten and we only log in
the fail section anyway.

This patch jumps to fail on OOM.

Note that this is different behavior compared to both the current
code and previous to dacd6cee76. Before
that commit we would log that saving the inhibit data failed, but
still write the file, though without the WHO/WHY section.

CID# 1313545
2015-08-13 23:53:49 +02:00
Lennart Poettering
3326332eb9 Merge pull request #907 from keszybz/sd-daemon-badf
sd-daemon: return EBADF for invalid fd numbers
2015-08-13 21:54:56 +03:00
Daniel Mack
b69c7e104b Merge pull request #941 from phomes/master
hwdb: add DPI for a few more mice
2015-08-13 17:57:09 +02:00
Thomas Hindoe Paaboel Andersen
6b829dddc6 hwdb: add DPI for a few more mice 2015-08-12 22:29:28 +02:00
Kay Sievers
bae0c4aa19 Merge pull request #938 from tblume/fix-kexec-force-reboot
support reboot -f for kexec kernel
2015-08-12 16:08:18 +02:00
Tom Gundersen
02d0f8a8a5 Merge pull request #939 from karelzak/smatch
treewide: trivial issues detected by smatch
2015-08-12 15:19:23 +02:00
Kay Sievers
f19121bbae Merge pull request #935 from teg/gpt-fixes
gpt-auto-generator: minor fixes
2015-08-12 14:37:42 +02:00
Thomas Blume
98d52feb96 support reboot -f for kexec kernel
Fix error message:

-->--
Code should not be reached 'Unknown action.' at
src/systemctl/systemctl.c:6382, function halt_now(). Aborting.
Aborted
--<--

when executing 'reboot -f' from a system running a kexec kernel.
2015-08-12 08:11:15 +02:00
Tom Gundersen
458a2f85e8 gpt-auto-generator: warn on ambiguous blkid probe 2015-08-11 23:38:19 +02:00
Tom Gundersen
7a1494aa4e gpt-auto-generator: don't warn on !ENABLE_EFI
add_automount() was only used on EFI systems, compile it conditionally
to avoid the warning.
2015-08-11 23:38:19 +02:00
Kay Sievers
d4d00020d6 sd-bus: do not connect to dbus-1 socket when kdbus is available
We should not fall back to dbus-1 and connect to the proxy when kdbus
returns an error that indicates that kdbus is running but just does not
accept new connections because of quota limits or something similar.

Using is_kdbus_available() in libsystemd/ requires it to move from
shared/ to libsystemd/.

Based on a patch from David Herrmann:
  https://github.com/systemd/systemd/pull/886
2015-08-11 20:49:36 +02:00
Richard Maw
12e2683d48 man: Describe when ExecStartFoo= commands are run in more detail
Previously it was just descibed that ExecStartPost= commands were
started "after" the ExecStart= command(s).
This hasn't specified after which event, which varies from after it has
been started, after it has exited, after it has sent READY=1 or after it
has taken the bus name, depending on Type=.

This now describes that it happens after the *service* has "started",
as defined by the Type=, and provides some clarification about precisely
when this is.

This may be unnecessary duplication, but it removes the ambiguity as to
whether RemainAfterExit=no means that ExecStartPost= shouldn't be
started because it means the service has stopped when the ExecStart=
command terminates, not "started".
2015-08-11 13:01:53 +00:00
Daniel Mack
3f1818cf70 Merge pull request #929 from kaysievers/gpt
gpt-auto-generator: apply partition-type flags only to specific parti…
2015-08-11 13:39:27 +02:00
Kay Sievers
0238d4c660 gpt-auto-generator: apply partition-type flags only to specific partition-types
The partition-type flags are defined independently for every partition-type. Apply
them only to the types where they are defined, and not to the ESP, which does not
appear to share the same set of flags.

  https://github.com/systemd/systemd/issues/920
2015-08-11 13:07:25 +02:00
Thomas Meyer
7519d221e0 UML: Fix block device setup
User mode linux block devices start with ubd, e.g. ubda, ubdb, etc..
2015-08-09 18:07:55 +02:00
Daniel Mack
aae68db9b4 Merge pull request #916 from reverendhomer/patch-3
libsystemd-network: fix memory leak
2015-08-08 13:34:32 +02:00
reverendhomer
626be147a6 libsystemd-network: fix memory leak 2015-08-08 14:24:11 +03:00
Daniel Mack
b28098571b Merge pull request #914 from reverendhomer/patch-2
Coverity #1299013
2015-08-08 11:07:05 +02:00
Daniel Mack
0578ded957 Merge pull request #913 from reverendhomer/patch-1
Coverity #1299015
2015-08-08 11:05:20 +02:00
reverendhomer
60e641a285 Coverity #1299013
event cannot be NULL due to assert
2015-08-08 09:54:10 +03:00
reverendhomer
37286ade90 Coverity #1299015
bus can never be NULL due to assert
2015-08-08 09:49:39 +03:00
Richard Maw
2eadf91ca1 man: Document \: escapes in nspawn's --overlay option 2015-08-07 15:50:43 +00:00
Richard Maw
62f9f39a45 nspawn: Allow : characters in overlay paths
: characters can be entered with the \: escape sequence.
2015-08-07 15:50:43 +00:00
Richard Maw
872d0dbdc3 nspawn: escape paths in overlay mount options
Overlayfs uses , as an option separator and : as a list separator. These
characters are both valid in file paths, so overlayfs allows file paths
which contain these characters to backslash escape these values.
2015-08-07 15:50:43 +00:00
Richard Maw
04c14b2541 strv: Add strv_shell_escape
This modifies the strv in-place, replacing strings with their escaped
version. It's mostly just a convenience function for when you need to
join a strv together because it's passed as a string to something, and
the separator needs escaping.
2015-08-07 15:50:43 +00:00
Richard Maw
61ee693981 util: Add shell_escape
This is for shell-style \ escaping rather than quoting, which while it
has the same effect in produced shell commands, is not exclusively
useful for shell commands.

shell_escape would be useful for producing sed commands, as you would be
able to \ escape the normal special characters, plus whichever argument
separator was chosen; or it could be used to escape arguments passed to
the overlayfs mount command.
2015-08-07 15:50:43 +00:00
Richard Maw
8ef24e7a4f man: Document \: escapes in nspawn's --bind option 2015-08-07 15:50:43 +00:00
Richard Maw
e4a5d9edee nspawn: Allow : characters in nspawn --bind paths
: characters in bind paths can be entered as the \: escape sequence.
2015-08-07 15:50:43 +00:00
Richard Maw
8adaf7bd23 strv: convert strv_split_quotes into a generic strv_split_extract
strv_split_extract is to strv_split_quotes as extract_first_word was to
unquote_first_word.

Now there's extract_first_word for extracting a single argument,
extract_many_words for extracting a bounded number of arguments,
and strv_split_extract for extracting an arbitrary number of arguments.
2015-08-07 15:50:43 +00:00
Richard Maw
ffcd3e89d5 man: Document \: escapes in nspawn's --tmpfs option 2015-08-07 15:50:42 +00:00
Richard Maw
6330ee1083 nspawn: Allow : characters in --tmpfs path
This now accepts : characters with the \: escape sequence.

Other escape sequences are also interpreted, but having a \ in your file
path is less likely than :, so this shouldn't break anyone's existing
tools.
2015-08-07 15:50:42 +00:00
Richard Maw
206644aede util: Allow non-separator coalescing parsing in extract_first_word
If EXTRACT_DONT_COALESCE_SEPARATORS is passed, then leading separators,
trailing separators and spans of multiple separators aren't skipped, and
empty arguments from before, after or between separators may be extracted.
2015-08-07 15:50:42 +00:00
Richard Maw
12ba2c44dd util: Don't interpret quotes by default in extract_first_word
This adds an EXTRACT_QUOTES option to allow the previous behaviour, of
not interpreting any character inside ' or " quotes as separators.
2015-08-07 15:50:42 +00:00
Richard Maw
6868560773 util: change unquote_*_word to extract_*_word
It now takes a separators argument, which defaults to WHITESPACE if NULL
is passed.
2015-08-07 15:50:42 +00:00
Richard Maw
53f0db7177 unquote_first_word: set *p=NULL on termination
To add a flag to allow an empty string to be parsed as an argument, we
need to be able to distinguish between the end of the string, and after
the end of the string, so when we *do* reach the end, let's set *p to
this state.
2015-08-07 15:50:42 +00:00
Richard Maw
4b1c175351 Convert unquote_*_word users to expect isempty(p) after the last entry
This is so that, when called in a loop, unquote_first_word can
distinguish between reaching the end of a string because it has consumed
all the input before the end, and consuming all the input.

This is important because we later add a flag that allows

    char *in = "";
    char *out;
    unquote_first_word(&in, &out, flags);

To put "" in out, and set in = NULL, so the trailing empty string of the
input can be consumed, and mark that the input has been consumed.
2015-08-07 15:50:42 +00:00
Zbigniew Jędrzejewski-Szmek
e680380168 sd-daemon: return EBADF for invalid fd numbers
This matches what open(2) and other system functions do.
2015-08-07 11:30:18 -04:00
Zbigniew Jędrzejewski-Szmek
9db81db06b Merge pull request #906 from jnpkrn/core-typo-fix
core: s/reexection/reexecution/ typo fix
2015-08-07 11:20:18 -04:00
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