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

19518 Commits

Author SHA1 Message Date
Martin Pitt
0c13be389f rules: simplify mmc RPMB handling
We don't actually want a by-path/ symlink for MMC RPMB devices, so just add
them to the blacklist. This will prevent creating wrong by-path links and
blkid'ing those.
2015-02-13 10:59:38 +01:00
Martin Pitt
b87b01cf83 rules: Fix by-path of mmc RPMB partitions and don't blkid them
Linux 3.10+ exposes RPMB (Replay Protected Memory Block) partitions of MMC
devices [1] ; trying to read them with blkid or other unspecific means will
cause kernel buffer I/O errors and timeouts. So don't run blkid on these.

Also ensure that /dev/disk/by-path creates proper symlinks and exposes the
-rpmb partition separately, instead of letting the "normal" partition symlink
point to the rpbm device (this is a race condition).

[1] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=090d25fe224c0

https://launchpad.net/bugs/1333140
2015-02-13 08:39:07 +01:00
Thomas Hindoe Paaboel Andersen
0a6f50c0af include <poll.h> instead of <sys/poll.h>
include-what-you-use automatically does this and it makes finding
unnecessary harder to spot. The only content of poll.h is a include
of sys/poll.h so should be harmless.
2015-02-12 20:47:38 +01:00
Thomas Hindoe Paaboel Andersen
c1ff5570f4 Add missing includes in header files
This fixes various issues found by globally reordering the include
sections of all .c files.
2015-02-12 20:44:32 +01:00
Thomas Hindoe Paaboel Andersen
76f282c636 test-util: remove superfluous const 2015-02-12 20:44:11 +01:00
Thomas Hindoe Paaboel Andersen
8744505aae remove unused variable 2015-02-12 20:44:06 +01:00
Lennart Poettering
cf1d0302ae exec: also evaluate working_directory_missing_ok when not applying chroots 2015-02-12 18:58:43 +01:00
Lennart Poettering
615aaf412c NEWS: begin collecting news items for 219 2015-02-12 18:44:55 +01:00
Tom Gundersen
5c3072eab6 networkd: explicitly enable/disable ipv6ll addresses
The kernel does not like getting an empty container, so just always pass the parameter, even if
it is the default.
2015-02-12 14:23:02 +01:00
Lennart Poettering
424d110ac0 hwdb: adjust --help text to be more like other --help texts
Fix capitalization, indentation, make sure we support --version, and
similar.
2015-02-12 13:17:08 +01:00
Lennart Poettering
c2cc6b9aef core: disarm shutdown watchdog if we fail to set timeout
Better safe than sorry, if drivers are stupid, and reset immediately on
device closing if the timeout could not be initialized.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777735
2015-02-12 12:28:48 +01:00
Lennart Poettering
4c08c8242a core: don't fail to run services in --user instances if $HOME is missing
Otherwise we cannot even invoke systemd-exit.service anymore, thus not
even exit.

https://bugs.freedesktop.org/show_bug.cgi?id=83100
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759320
2015-02-12 12:21:16 +01:00
Lennart Poettering
a38d99451f Revert "tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC"
This reverts commit d6d810fbf8.

It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw
sockets.
2015-02-12 11:45:39 +01:00
Marcel Holtmann
d01efa0744 missing: add __NR_getrandom for powerpc architecture 2015-02-11 22:16:07 +01:00
Lennart Poettering
d54ddab8cb core: don't watch for socket events when service is in SERVICE_STOP
If a service has an ExecStop= program that uses the socket the service was
activated by to tell it to terminate, then that should not be used as
trigger to start the service again.

http://lists.freedesktop.org/archives/systemd-devel/2015-February/028058.html
2015-02-11 21:25:30 +01:00
Michael Olbrich
c31c4324c5 systemctl: don't update the reboot parameter if none is given
Otherwise systemd-reboot.service will remove the parameter that was set
before. This was broken in commit "b986229efe2cc96157aa14c37bab7843311bbef1
systemctl: bugfix for systemctl reboot command with argument"
2015-02-11 20:37:16 +01:00
Lennart Poettering
418761f586 core: correct a log message
The log message talks specifically about services, though it actually
applies to any kind of unit.
2015-02-11 18:51:37 +01:00
Lennart Poettering
eef46c372f tree-wide: whenever we include libgen.h, immediately undefine basename()
Also, document in adjacent comments and in CODING_STYLE why we do that.
2015-02-11 18:50:38 +01:00
Cristian Rodríguez
e89fe484df core: remove unneeded <libgen.h> include
execute.c only uses basename (the GNU version in <string.h>)
2015-02-11 18:31:29 +01:00
Lennart Poettering
a24111cea6 Revert "units: add SecureBits"
This reverts commit 6a716208b3.

Apparently this doesn't work.

http://lists.freedesktop.org/archives/systemd-devel/2015-February/028212.html
2015-02-11 18:28:06 +01:00
Robert Milasan
e203dc1076 ata_id: remove unused header files
Signed-off-by: Robert Milasan <rmilasan@suse.com>
2015-02-11 18:02:04 +01:00
Topi Miettinen
6a716208b3 units: add SecureBits
No setuid programs are expected to be executed, so add
SecureBits=noroot noroot-locked
to unit files.
2015-02-11 17:33:36 +01:00
Torstein Husebø
c4c086a2e3 man: fix typo 2015-02-11 17:30:31 +01:00
Tom Gundersen
910889b617 network-internal: fix inverted matching
This fixes the test-suite again.
2015-02-11 13:13:50 +01:00
Tom Gundersen
a245ced0d7 networkd: fdb - fix const warning 2015-02-11 13:13:50 +01:00
Tom Gundersen
f806f64c74 networkd: don't do exit-on-idle if there is something wrong with the dbus connection
Just fall back to plain old event loop in this (highly unlikely) case.

In the glorious future when kdbus is upstream we can of course drop all this.
2015-02-11 13:13:49 +01:00
Martin Pitt
f4f01ec146 sysv-generator: Skip init scripts for existing native services
This avoids taking the SysV init script enablement state into account if we
have native units. Otherwise systemctl disable on native unit would not
be respected in the presence of an enabled SysV script.

Also, there's no need to do all the parsing and creation of service files if we
already have a native systemd unit for the processed SysV init script.
2015-02-11 13:02:01 +01:00
Lennart Poettering
f93b36affa Update TODO 2015-02-11 12:57:17 +01:00
Paul Martin
804319344b networkd DHCPv4 logging endian fix
On Tue, Feb 10, 2015 at 08:10:43PM +0100, Lennart Poettering wrote:

> Hmm, I think it would be nicer to use be32toh() here instead, since it
> ensures the macro is (to a limited degree) typesafe.
>
> Any chance you could rework that?

From: Paul Martin <paul.martin@codethink.co.uk>
Date: Wed, 11 Feb 2015 11:47:16 +0000
Subject: [PATCH] networkd dhcpv4 logging endian fix

On a big-endian host, systemd-networkd prints out IPv4 network
addresses byte reversed:

Feb 10 16:43:32 hostname systemd-networkd[151]: eth0 : DHCPv4 address 158.1.24.10/16 via 1.1.24.10

The address obtained is 10.24.1.158/16 and the route is

  10.24.0.0/16 dev eth0  src 10.24.1.187

The macro ADDRESS_FMT_VAL() unpacks a "struct in_addr" in a
little-endian specific manner.

This patch forces the passed address into host order, then unpacks it.

On an x86 later than i486, compiled with -O2, the only extra overhead
is a single bswap instruction.
2015-02-11 12:57:17 +01:00
Zbigniew Jędrzejewski-Szmek
b975b0d514 man: boilerplate unification 2015-02-10 23:24:27 -05:00
Zbigniew Jędrzejewski-Szmek
decde8cd96 man: fix reference to glob manpage 2015-02-10 23:24:27 -05:00
Zbigniew Jędrzejewski-Szmek
432d59656b man: add systemd.generator(7)
This is largely based on http://www.freedesktop.org/wiki/Software/systemd/Generators/,
and obsoletes that page. It seems that we do a much better
job of keeping man pages up-to-date compared to wiki pages.
Man pages are also easier to find for users.

https://bugs.freedesktop.org/show_bug.cgi?id=89048
2015-02-10 23:20:51 -05:00
Tom Gundersen
dafd811234 TODO 2015-02-10 22:30:50 +01:00
Tom Gundersen
5256e00e8b net: support globbing and disjunction in Match logic
Match{Name,OrginalName,Type,Driver,Path} can now take a space-separated glob of matches.
2015-02-10 22:30:35 +01:00
Tom Gundersen
ea6ec096db networkd: fdb - refactor a bit
Pass around Link objcets rather than FdbEntry objects. The link objects have an up-to-date
ifname we can use for logging. match_name sholud _never_ be used for anything except
matching. Firstly, it may be unset (usually is), and secondly it may not be up-to-date.
2015-02-10 22:30:35 +01:00
Tom Gundersen
9198e12ca3 networkd: bus - expose MatchMAC 2015-02-10 22:30:35 +01:00
Tom Gundersen
53d6837510 man: sd_bus_path_encode - fix order of arguments 2015-02-10 22:30:35 +01:00
Tom Gundersen
f6f8d466bd networkd: network-bus - use sd_bus_path_{en,de}code 2015-02-10 22:30:35 +01:00
Lennart Poettering
699eee62d1 CODING_STYLE: elaborate on O_CLOEXEC a bit 2015-02-10 21:25:38 +01:00
Cristian Rodríguez
d6d810fbf8 tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC 2015-02-10 21:20:16 +01:00
Lennart Poettering
332560792c test-lldp: fix minor OOM 2015-02-10 21:17:26 +01:00
Lennart Poettering
804138a08c test-lldp: initialize structs when we define them 2015-02-10 21:15:47 +01:00
Lennart Poettering
b762fbd128 test-lldp: use strndup() where possible 2015-02-10 21:15:21 +01:00
Philippe De Swert
2e1a569b77 libsystemd-network: Avoid potential NULL dereference in test-lldp
As a malloc0 could fail, doing a strncpy without checking could
cause issues. Adding an assert should be good enough and in line
with other similar routines in the code.

Found with Coverity Fixes: CID#1261402
2015-02-10 21:11:52 +01:00
Lennart Poettering
20760dcf5d update TODO 2015-02-10 20:46:19 +01:00
Lennart Poettering
df3efc3c90 bus-proxyd: initialize ioctl structure only once 2015-02-10 20:46:09 +01:00
Vincent Batts
a89a8031e0 .gitignore: add systemd-pull 2015-02-10 12:41:42 +01:00
Lennart Poettering
2a560338c4 journald: don't specify inline in local functions
Leave it to the compiler to figure out whether it shall inline stuff or
not.

Only place where using static inline is OK to use is in in header
files, really.
2015-02-10 12:34:11 +01:00
Lennart Poettering
5b99bc57f2 shared: untabify 2015-02-10 12:34:11 +01:00
Lennart Poettering
a9c67ea2a2 logind: tell Coverity that we knowingly ignore mkdir()'s return value 2015-02-10 12:34:11 +01:00