1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00
Commit Graph

13665 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
aa9ed65389 build-sys: make test-dhcp-* statically linked
This makes them behave like everything else following
48d7417d3 'build-sys: link most internal libraries statically'.
2013-12-31 13:00:57 -05:00
Zbigniew Jędrzejewski-Szmek
dabeaa460d sleep-config: fix double free
Before 34a3baa4d 'sleep-config: Dereference pointer before check for NULL'
oom conditions would not be detected properly. After that commit, a double
free was performed.

Rework the whole function to be easier to understand, and also replace
strv_split_nulstr with strv_new, since we know the strings anyway.
2013-12-31 13:00:57 -05:00
Stefan Beller
b8265d4f8e boot-efi: Remove superfluous assignment
2 lines after the changed line we assign err to efi_get_variable(...)
unconditionally, so it makes no sense to initialize it to some value.
2013-12-31 17:53:30 +01:00
Stefan Beller
34a3baa4db sleep-config: Dereference pointer before check for NULL
This fixes a bug pointed out by http://css.csail.mit.edu/stack/
(Optimization-unstable code)
It is a similar fix as f146f5e159 (2013-12-30, core:
Forgot to dereference pointer when checking for NULL)

To explain this bug consider the following similar, but simpler code:
	if (!p)
		free(*p)

Assume the if condition evaluates to true, then we will access *p,
which means the compiler can assume p is a valid pointer, so it could
dereference p and use the value *p.
Assuming p as a valid pointer, !p will be false.
But initally we assumed the condition evaluates to true.

By this reasoning the optimizing compiler can deduce, we have dead code.
("The if will never be taken, as *p must be valid, because otherwise
accessing *p inside the if would segfault")

This led to an error message of the static code checker, so I checked the
code in question.

As we access *modes and *states before the check in the changed line of
this patch, I assume the line to be wrong and we actually wanted to check
for *modes and *states being both non null.
2013-12-30 19:10:22 +01:00
Stefan Beller
226b735a74 bootchart: Remove unneeded check for NULL
Directly before the changed line there is:

	while ((parent->next_ps && parent->pid != ps->ppid))
		parent = parent->next_ps;

which looks one element ahead of the list, hence we can rely on parent
being non null here.
If 'parent' were NULL at that while loop already, it would crash as we're
dereferencing 'parent' when checking for next_ps already.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
2013-12-30 19:10:22 +01:00
Zbigniew Jędrzejewski-Szmek
8181565124 tmpfiles: rename --unsafe to --boot
As suggested by Kay, it is better to describe what is done,
not what might happen.
2013-12-30 13:01:27 -05:00
Zbigniew Jędrzejewski-Szmek
8f8770706e build-sys: fix systemd-stdio-bridge link to work with split /usr
shumski> there seems to be slight error in systemd git master Makefile.am
2013-12-30 12:11:13 -05:00
Stefan Beller
f146f5e159 core: Forgot to dereference pointer when checking for NULL
Actually we already checked for !rt before, now we'd like to examine
the return value of the memory allocation.
2013-12-30 16:23:13 +01:00
Zbigniew Jędrzejewski-Szmek
3cf148f307 man: expand on some more subtle points in systemd.socket(5)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727708#1694
2013-12-30 00:17:16 -05:00
Zbigniew Jędrzejewski-Szmek
819c7e4fa4 systemd-python: fix listen_fds under Python 2 2013-12-30 00:17:16 -05:00
Zbigniew Jędrzejewski-Szmek
b560cc1c45 systemd-python: fix setting of exception codes
The return value of 0 would be treated as failure by mistake,
resulting in " SystemError: error return without exception set".
The way that set_error() is used is changed to be the same
everywhere.
2013-12-30 00:17:15 -05:00
Zbigniew Jędrzejewski-Szmek
892213bf1f acticate: rename --environment to --setenv
Nspawn has --setenv, and systemd itself accepts systemd.setenv.
It is nice to have the same parameter name everywhere.

Old name is accepted, but not advertised.
2013-12-30 00:17:15 -05:00
Kay Sievers
ed14edc04f udev: LOG_PRIORITY -> LOG_LEVEL 2013-12-29 18:05:25 +01:00
Thomas Hindoe Paaboel Andersen
a8c78decf0 autogen: add shortcut for running scan-build
scan-build is a static analyzer in llvm. As ususal static analyzers
tend to mostly find theoretical bugs in software that has been in
production for a while. For in-development code it can be useful to
check if new issues is added as there is a chance to spot real problems
before release. For systemd we are now down to 297 issues - the vast
majority are false positives because the tool does not understand the
cleanup attribute.

Running clang's static analyzer scan-build is a bit messy. You have to
run both configure and make "inside" the build-scan tool. To have an
easy shortcut from autogen.sh I thus call both directly from it. This
makes it different from the other options in autogen.sh. I chose 's'
for static analysis.

scan-build is in the package clang-analyzer on fedora.
2013-12-28 22:31:01 +01:00
Thomas Hindoe Paaboel Andersen
bd3539b222 autogen: add shortcut for building with clang
For a while I have been cleaning up warnings when building with clang.
There are currently only two sources of warnings left: Wcast-align and Wgnu.
I am not convinced that fixing up those up is feasible so I run with them
disabled to spot regressions. E.g. clang is a bit more strict wrt to unused
variables with the cleanup attribute and I have fixed a number of those since.

Like the other options in autogen.sh I have a shortcut for clang as well. I use
'l' for llvm.
2013-12-28 21:24:25 +01:00
Marc-Antoine Perennou
08c51903fb gitignore: add back user@.service 2013-12-28 15:19:25 +01:00
Lennart Poettering
d14ab08b29 bus: fix a couple of format string mistakes 2013-12-28 15:09:26 +01:00
Marc-Antoine Perennou
63b575175e bus: driverd; add missing format string parameter
This was causing a nasty coredump
2013-12-28 15:09:26 +01:00
Lennart Poettering
62ae757009 bus: correct a number of gcc format string attribute usages 2013-12-28 15:09:26 +01:00
Michał Górny
5486855f7d man: include autoconf snippet in daemon(7)
https://bugs.freedesktop.org/show_bug.cgi?id=40446
2013-12-27 23:45:24 -05:00
Lubomir Rintel
4f7385fa49 selinux: Check access vector for enable/disable perm for each unit file
SELinux check will be done using the context of the unit file as as a
target instead of the default init_t context, allowing selinux control
on the level of individual units.

https://bugzilla.redhat.com/show_bug.cgi?id=1022762
2013-12-27 22:40:43 -05:00
Lennart Poettering
08bcebf36e shared: add simplistic XML parser for usage in the D-Bus policy language compat parser 2013-12-28 03:04:29 +01:00
Zbigniew Jędrzejewski-Szmek
79ccff06c1 bus: fix running tests in parallel 2013-12-27 15:48:15 -05:00
Zbigniew Jędrzejewski-Szmek
a9a305332b man: add a note about propagating signals 2013-12-27 15:28:26 -05:00
Marcel Holtmann
c4a3a17ee9 hwdb: Update database of Bluetooth company identifiers 2013-12-27 09:35:20 -08:00
Zbigniew Jędrzejewski-Szmek
4acbce7979 build-sys: fix generation of user@.service 2013-12-27 12:12:41 -05:00
Mantas Mikulėnas
3dc9f55d6e units: user@.service: fix user bus path 2013-12-27 12:12:41 -05:00
Mantas Mikulėnas
e9b1d28de3 bus: PORTING-DBUS1: fix user bus path 2013-12-27 17:42:15 +01:00
Thomas Hindoe Paaboel Andersen
984af580b3 systemctl: remove unused variable 2013-12-27 12:04:00 +01:00
Thomas Hindoe Paaboel Andersen
f000939e3b bus: PORTING-DBUS1 typo fixes 2013-12-27 11:04:47 +01:00
Zbigniew Jędrzejewski-Szmek
12b25f3001 man: fix Type= reference v2
grawity:

  It looks like the old version _was_ correct – the default value will
  be "Type=dbus" if the service has a BusName set.

  Suggested change: "if neither Type= nor BusName= is specified"
2013-12-27 01:20:33 -05:00
Kay Sievers
0a6de11527 bus: PORTING-DBUS1 clarify pool size value 2013-12-27 04:08:53 +01:00
Kay Sievers
061eab675e bus: PORTING-DBUS1 update 2013-12-27 03:38:38 +01:00
Kay Sievers
6206f4b49d bus: update PORTING-DBUS1 2013-12-27 01:28:34 +01:00
Lennart Poettering
3e8ba0b815 bus: actually, the kernel does enforce validity of bus names... 2013-12-27 01:20:21 +01:00
Lennart Poettering
9129246ba5 bus: explain obsoletion of dbus1 .service files 2013-12-27 01:00:51 +01:00
Lennart Poettering
2e2ec0eaa6 bus: refuse invalid names from kbus meta data 2013-12-27 00:28:22 +01:00
Lennart Poettering
0058679911 bus: add some preliminary docs for porting existing dbus1 client libraries to kdbus 2013-12-27 00:28:22 +01:00
Kay Sievers
81efa1da64 bus: update kdbus.h 2013-12-26 22:06:14 +01:00
Marcos Felipe Rasia de Mello
3d2df82d61 man: fix Type= reference
Simple man page fix attached.

--
Marcos

From 268d10a2f8769fd1dcb9440670af15ac02c5df89 Mon Sep 17 00:00:00 2001
From: Marcos Mello <marcosfrm@gmail.com>
Date: Thu, 26 Dec 2013 17:19:04 -0200
Subject: [PATCH 1/1] man: fix Type= reference
2013-12-26 16:01:28 -05:00
Zbigniew Jędrzejewski-Szmek
f78e6385dc Use enums to make it obvious what boolean params mean
Suggested-by: Russ Allbery <rra@debian.org>
2013-12-26 15:49:54 -05:00
Zbigniew Jędrzejewski-Szmek
e3e0314b56 systemctl: allow globbing in commands which take multiple unit names 2013-12-26 13:24:36 -05:00
Zbigniew Jędrzejewski-Szmek
8d5ba5a946 systemctl: drop uninteresting units immediately
Also properly free memory if list-unit-files --root=... is used.
2013-12-26 11:24:42 -05:00
Zbigniew Jędrzejewski-Szmek
b652054662 systemctl: simplify start_unit 2013-12-26 11:24:42 -05:00
Zbigniew Jędrzejewski-Szmek
91f0ac7d40 man: fix description of is-enabled returned value 2013-12-26 11:24:42 -05:00
Lennart Poettering
c2595875c6 bus: add a temporary hard-coded policy to proxyd to make gdm work
gdm relies on the policy to deny its own requests to not deadlock. Given
that we currently do not enforce any policy in the dbus1 compat proxy
service this means that gdm will necessarily deadlock on our systems.

To work around this, enforce a fixed policy teomporarily, until we
interpret the legacy XML policy in full.

Booh, gdm, booh, for requring this and making me waste two days on
tracking this brokenness down.
2013-12-26 17:16:56 +01:00
Lennart Poettering
90911bb63e bus: always show messages we send 2013-12-26 17:16:56 +01:00
Zbigniew Jędrzejewski-Szmek
72ebbf3450 man: document fail/nofail, auto/noauto
Also s/filesystem/file system/ in a few places.
2013-12-25 23:22:05 -05:00
Zbigniew Jędrzejewski-Szmek
8b8f259170 Trim TODO 2013-12-25 22:53:46 -05:00
Jan Engelhardt
e0e009c067 man: grammar and wording improvements
This is a recurring submission and includes corrections to:
- missing words, preposition choice.
- change of /lib to /usr/lib, because that is what most distros are
  using as the system-wide location for systemd/udev files.
2013-12-25 22:53:46 -05:00