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

21685 Commits

Author SHA1 Message Date
Markus Elfring
3e044c492e Bug #944: Deletion of unnecessary checks before a few calls of systemd functions
The following functions return immediately if a null pointer was passed.
* calendar_spec_free
* link_address_free
* manager_free
* sd_bus_unref
* sd_journal_close
* udev_monitor_unref
* udev_unref

It is therefore not needed that a function caller repeats a corresponding check.

This issue was fixed by using the software Coccinelle 1.0.1.
2015-08-17 10:45:30 +02:00
Markus Elfring
dc4ebc0787 Bug #944: Deletion of unnecessary checks before calls of the function "free"
The function "free" is documented in the way that no action shall occur for
a passed null pointer. It is therefore not needed that a function caller
repeats a corresponding check.
http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first

This issue was fixed by using the software Coccinelle 1.0.1.
2015-08-17 09:30:49 +02:00
Markus Elfring
f00ef7f5d4 Bug #944: Replacement of a free() call by mfree()
The function "mfree" should be called instead of "free" at a specific
source code place.
2015-08-17 09:10:56 +02:00
Lennart Poettering
0d4605ec3c update TODO 2015-08-16 21:59:58 +02:00
Lennart Poettering
0038aed166 Merge pull request #908 from richardmaw-codethink/nspawn-path-escapes-v3
Allow arbitrary file paths to be passed to nspawn (v3)
2015-08-16 21:32:03 +02:00
Lennart Poettering
d1584b9f5b README: drop reference to Endocode
Chris Kühl does not work at Endocode anymore, the contact data is no
longer valid.
2015-08-16 21:06:42 +02:00
Tom Gundersen
0125ed22e3 Merge pull request #955 from poettering/resolved-localhost-xyz
resolved: enable synthesizing of A, AAAA and PTR records for "localhost"
2015-08-16 20:46:11 +02:00
Tom Gundersen
3aeae87664 Merge pull request #954 from poettering/nss-myhostname-loopback
nss-myhostname: use LOOPBACK_IFINDEX instead of if_nametoindex("lo")
2015-08-16 20:38:32 +02:00
Tom Gundersen
53576a7010 Merge pull request #972 from poettering/resolve-host-auto-start
resolve-host: enable auto start of resolved
2015-08-16 20:37:52 +02:00
Lennart Poettering
50d25fb08b resolve-host: enable auto start of resolved
There's no reason to explicitly turn off bus activation for resolved
here. The reason this was done before was that the code was copied from
nss-resolve, which has a fallback to glibc's nss-dns if resolved is not
reachable. However, such a logic makes no sense for resolve-host since
such a fallback doesn't make sense here, which means we can actually
turn on activation. Let's do it hence.
2015-08-16 20:29:23 +02:00
Lennart Poettering
7d19344a99 Merge pull request #971 from evverx/news-fix
NEWS: fix the "indirect" state description
2015-08-16 20:24:25 +02:00
Evgeny Vereshchagin
c7683ffb53 NEWS: fix the "indirect" state description 2015-08-16 18:10:23 +00:00
Lennart Poettering
7b0991c617 Merge pull request #931 from spartacus06/update-completion-machinectl
Update shell completion for machinectl
2015-08-16 19:58:49 +02:00
Lennart Poettering
e6a26d8c97 update TODO 2015-08-16 18:25:34 +02:00
Seth Jennings
4f8f4c310c shell-completion: use list-images rather than list
"machinectl list" only lists running machines while many of the MACHINES
commands use names of images; both running and non-running.

List machines from both "list" and "list-images" and use sort -u to
avoid duplicates.
2015-08-16 11:20:21 -05:00
Seth Jennings
6eb8bec62d shell-completion: update machinectl bash completion
Many new subcommands have been added since the bash completion was last
updated.  Bring it up to speed.
2015-08-16 11:19:36 -05:00
Lennart Poettering
6416a35db1 Merge pull request #930 from richardmaw-codethink/man-when-exec-start-post
man: Describe when ExecStartFoo= commands are run in more detail
2015-08-16 18:11:18 +02:00
Lennart Poettering
81f5fc1c5c Merge pull request #918 from thomasmey/uml-fix
UML: Fix block device setup
2015-08-16 17:07:28 +02:00
Lennart Poettering
9c75b2538a Merge pull request #947 from evverx/bash-completion
Update bash-completion: generate all unit types
2015-08-16 17:04:57 +02:00
Evgeny Vereshchagin
adb0c25eb6 bash-completion: generate unit type list from systemctl -t help option 2015-08-16 14:53:21 +00:00
Lennart Poettering
e59679246e Merge pull request #932 from kaysievers/bus
sd-bus: do not connect to dbus-1 socket when kdbus is available
2015-08-16 14:34:36 +02:00
Ronny Chevalier
ab5838fce7 Merge pull request #968 from alkino/master
zsh completion: update busctl
2015-08-15 14:21:42 +02:00
Nicolas Cornu
cade10ccef zsh completion: update busctl 2015-08-15 13:58:05 +02:00
Daniel Mack
6c269e6402 Merge pull request #948 from phomes/master
logind: actually fail on OOM
2015-08-14 13:31:36 +02:00
Lennart Poettering
9b644bf921 resolved: never allow routing of "localhost" queries to DNS or LLMNR
We should never allow leaking of "localhost" queries onto the network,
even if there's an explicit domain rotue set for this.
2015-08-14 13:21:28 +02:00
Lennart Poettering
2a1037af15 resolved: locally synthesize replies for "localhost"
Let's make sure that clients querying resolved via the bus for A, AAAA
or PTR records for "localhost" get a synthesized, local reply, so that
we do not hit the network.

This makes part of nss-myhostname redundant, if used in conjunction.
However, given that nss-resolve shall be optional we need to keep this
code in both places for now.
2015-08-14 13:17:05 +02:00
Lennart Poettering
f43242886c nss-myhostname: use LOOPBACK_IFINDEX instead of if_nametoindex("lo")
Given that we already hardocde the loopback ifindex, following the
kernel's own logic, we can replace the invocation of
if_nametoindex("lo") with LOOPBACK_IFINDEX.
2015-08-14 13:11:04 +02:00
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