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

18699 Commits

Author SHA1 Message Date
David Herrmann
b864535791 bus-proxyd: fix EPERM on replies
Imagine a kdbus peer sending a method-call without EXPECT_REPLY set
through the proxy to a dbus1 peer. The proxy turns the missing
EXPECT_REPLY flag into a dbus1 NO_REPLY_EXPECTED flag. However, if the
receipient ignores that flag (valid dbus1 behavior) and sends a reply, the
proxy will try to forward it to the original peer. This will fail with
EPERM as the kernel didn't track the reply.

We have two options now: Either we ignore EPERM for reply messages, or we
track reply-windows in the proxy so we can properly ignore replies if
EXPECT_REPLY wasn't set.

This commit chose the first option: ignore EPERM for replies. The only
down-side is that replies without matching method call will no longer be
forwarded by the proxy. This works on dbus1, though.
Nobody sane does this, so lets ignore it.
2015-01-08 21:06:14 +01:00
David Herrmann
426bb5ddb8 bus-proxyd: optimize replies if they're not requested
If a caller does not request a reply, dont send it. This skips message
creation and speeds up NO_REPLY_EXPECTED cases. Note that sd-bus still
handles this case internally, but if we handle it in bus-proxyd, we can
skip the whole message creation step.
2015-01-08 20:58:59 +01:00
David Herrmann
9dc41cc597 bus-proxy: augment credentials from /proc for cmdline update
dbus1 does not provide cmdline, so we have to augment our credentials from
/proc to beautify the bus-proxyd cmdline. We dont use this for anything
but beautification, so there shouldn't be any problems due to /proc
pid-recycling races.

This fixes bus-proxyd to no longer display 'xxxxxxxxxxxxxxxxxxxxxxxxxxx'
in its cmdline.
2015-01-08 17:46:42 +01:00
Tom Gundersen
080e78329a nspawn: fix error message when mknod fails 2015-01-08 17:09:45 +01:00
Tom Gundersen
a0539d7753 path-util: plug leak 2015-01-08 17:09:45 +01:00
David Herrmann
34a317e1cc dbus1-generator: fix array sentinal
Add a {} sentinal entry so the config-iterator can properly iterate all
array elements. Fixes a segfault in the dbus1-generator.
2015-01-08 16:13:39 +01:00
Umut Tezduyar Lindskog
3383f7e956 build: print conditions of ldconfig, hibernate configs 2015-01-08 14:08:04 +01:00
Lukasz Skalski
23539f6779 sd-bus: fix copy-paste error 2015-01-08 11:11:58 +01:00
Lennart Poettering
92ff080be1 update TODO 2015-01-08 03:21:13 +01:00
Lennart Poettering
de45d72603 journal: bump RLIMIT_NOFILE when journal files to 16K (if possible)
When there are a lot of split out journal files, we might run out of fds
quicker then we want. Hence: bump RLIMIT_NOFILE to 16K if possible.

Do these even for journalctl. On Fedora the soft RLIMIT_NOFILE is at 1K,
the hard at 4K by default for normal user processes, this code hence
bumps this up for users to 4K.

https://bugzilla.redhat.com/show_bug.cgi?id=1179980
2015-01-08 03:20:45 +01:00
Lennart Poettering
2ac23519d0 udevadm: don't hit an assert when obsolete parameters are passed
https://bugzilla.redhat.com/show_bug.cgi?id=1178051
2015-01-08 01:59:58 +01:00
Lennart Poettering
07289967bc update TODO 2015-01-08 01:28:15 +01:00
Lennart Poettering
d61b600dde util: make it easy to initialize the crtime from the current time in fd_setcrtime() 2015-01-08 01:27:13 +01:00
Lennart Poettering
dfd1520d3a import: also set NOCOW for gpt disk images
Given the write patterns on disk images, we better should turn COW off
for them. In particular as the file systems used inside the disk images
should do their own data integrity checks anyway and we don't need
multiple layers of it.
2015-01-08 01:25:40 +01:00
Lennart Poettering
11689d2a02 journald: turn off COW for journal files on btrfs
btrfs' COW logic results in heavily fragment journal files, which is
detrimental for perfomance. Hence, turn off COW for journal files as we
create them.

Turning off COW comes at the cost of data integrity guarantees, but this
should be acceptable, given that we do our own checksumming, and
generally have a pretty conservative write pattern.

Also see discussion on linux-btrfs:

http://www.spinics.net/lists/linux-btrfs/msg41001.html
2015-01-08 01:22:29 +01:00
Lennart Poettering
3c4230a5af util: upgrade default $TERM from vt102 to vt220 if we have no idea about the connected terminal
So far, if we had no knowledge about the correct $TERM we defaulted to
v102, as a safe, conservative choice. However, the terminfo data for
vt102 is not aware of pageup/pagedown, which makes "less" much harder
work with than necessary. Setting vt220 allows them to work correctly.

"vt220" should be a sufficiently safe choice too, given that xterm,
gnome-terminal and the linux console all strive to implement vt220 as
baseline, already to pass pageup/pagedown correctly to apps.

Effectively, with this change "journalctl -e" run inside a
"systemd-nspawn" terminal will now run a pager where pageup/pagedown
works, which is quite an improvement of usability for containers.
2015-01-07 23:44:08 +01:00
Lennart Poettering
2efe2438fd bus-util: fix error number output when waiting for job 2015-01-07 23:44:08 +01:00
Lennart Poettering
1a4873c499 update TODO 2015-01-07 23:44:08 +01:00
Lennart Poettering
78ad7cf1b9 units: make resolved pull in its own .busname unit, but only on kdbus systems
The daemon requires the busname unit to operate, since it contains the
policy that allows it to acquire its service name.
2015-01-07 23:44:08 +01:00
Lennart Poettering
8545f7ceaa service: automatically create After= dependency from services to their .busname units, if BusName= is set 2015-01-07 23:44:08 +01:00
Lennart Poettering
b02cb41c78 conf-parse: don't accept invalid bus names as BusName= arguments in service units 2015-01-07 23:44:08 +01:00
Lennart Poettering
978553ce5e conf-parse: make syntax logging functions behave more like other log functons
In particular, don't patch the error number to EINVAL if 0, and don't
negate it.

(Also, add do {} while (false) around multi-line macro)
2015-01-07 23:44:08 +01:00
Lennart Poettering
1535ef321f units: improve Description= for systemd's own busname unit 2015-01-07 23:44:08 +01:00
Jonas Ådahl
6366e34991 hwdb: mouse DPI data, Logitech Gaming Mouse G400 2015-01-07 21:45:45 +01:00
Lennart Poettering
92d6662579 busctl: exit cleanly when the bus connection is severed 2015-01-07 20:42:14 +01:00
Lennart Poettering
52cd587789 sd-bus: when we synthesize messages, initialize timestamps ourselves 2015-01-07 20:36:23 +01:00
Lennart Poettering
d29ae2914e sd-bus: unify how we set the sender of synthetic messages 2015-01-07 20:25:30 +01:00
Lennart Poettering
76877fb9cc sd-bus: make use of the newly added timestamps on kdbus kernel messages 2015-01-07 19:53:39 +01:00
Lennart Poettering
210a68826f sd-bus: always catch name requests for the special names "org.freedesktop.DBus" and "org.freedesktop.DBus.Local" and refuse them 2015-01-07 19:32:42 +01:00
Lennart Poettering
b80c66ba98 update TODO 2015-01-07 19:32:42 +01:00
Lennart Poettering
0b63e2789f machinectl: prettify "machinectl list" output 2015-01-07 19:32:42 +01:00
Michael Biebl
1ed0c19f81 sysv-generator: initialize units before use to ensure correct ordering
The original loop called fix_order() on each service immediately after
loading it, but fix_order() would reference other units which were not
loaded yet.
This resulted in bogus and unnecessary orderings based on the static
start priorities.

Therefore call load_sysv() for every init script when traversing them in
enumerate_sysv(). This ensures that all units are loaded when
fix_order() is called.

Bug-Debian: https://bugs.debian.org/771118
2015-01-07 19:08:58 +01:00
Lennart Poettering
6ce02c2a3a update TODO 2015-01-07 18:00:38 +01:00
Lennart Poettering
dbda6dce3d man: document nss-mymachines 2015-01-07 17:40:10 +01:00
Lennart Poettering
49aa61a550 man: add an alias to libnss_myhostname.so2 for nss-myhostname
The module appears under the name "libnss_myhostname.so.2" in the file
system, hence let's link it up under that name.
2015-01-07 17:19:46 +01:00
Lennart Poettering
b311d32ff4 man: rework nss-myhostname man page
Remove a number of incorrect links, and explain that "localhost" and
"gateway" are now resolved by it, too.
2015-01-07 17:14:04 +01:00
Lennart Poettering
5b728e6ba1 Update TODO 2015-01-07 14:49:27 +01:00
Lennart Poettering
da054c3782 ptyfwd: simplify how we handle vhangups a bit 2015-01-07 14:47:10 +01:00
Lennart Poettering
5743a5852d btrfs-util: rework how we iterate through the results of the TREE_SEARCH results
Let's introduce some syntactic sugar with iteration macros, and add
correct key increment calls.
2015-01-07 14:47:10 +01:00
Michael Biebl
b7e7184634 sysv-generator: handle Provides: for non-virtual facility names
The list of provided facility names as specified via Provides: in the
LSB header was originally implemented by adding those facilities to the
Names= property via unit_add_name().

In commit 95ed3294c6 the internal SysV
support was replaced by a generator and support for parsing the Names=
option had been removed from the unit file parsing in v186.
As a result, Provides: for non-virtual facility was dropped when
introducing the sysv-generator.

Since quite a few SysV init scripts still use that functionality (at
least in distros like Debian which have a large body of SysV init
scripts), add back support by making those facility names available via
symlinks to the unit filename to ensure correct orderings between
SysV init scripts which use those facility names.

Bug-Debian: https://bugs.debian.org/774335
2015-01-07 13:20:40 +01:00
Lennart Poettering
c006826886 update TODO 2015-01-07 03:08:29 +01:00
Lennart Poettering
0ec5543c4c machinectl: make sure that "machinectl login" exits immediately when the machine it is connected to dies 2015-01-07 03:08:00 +01:00
Lennart Poettering
f7ad54a301 util: make use of kcmp() to compare fds, if it is available 2015-01-07 02:14:14 +01:00
Lennart Poettering
a7e0720602 util: don't fail recursive bind mounting if we cannot read the mount flags from an obstructed mounted 2015-01-07 01:32:13 +01:00
Lennart Poettering
2339fc936a core: implement serialization/deserialization of fd store elements 2015-01-07 01:18:13 +01:00
Lennart Poettering
1e95893a89 tmpfiles: make gcc shut up 2015-01-06 20:33:46 +01:00
Lennart Poettering
b9a1617d75 journal: consider file deletion errors a reason for rotation 2015-01-06 20:31:40 +01:00
Lennart Poettering
f27a386430 journald: whenever we rotate a file, btrfs defrag it
Our write pattern is quite awful for CoW file systems (btrfs...), as we
keep updating file parts in the beginning of the file. This results in
fragmented journal files. Hence: when rotating files, defragment them,
since at that point we know that no further write accesses will be made.
2015-01-06 20:31:40 +01:00
Lennart Poettering
7c75c5ca68 Update TODO 2015-01-06 20:31:39 +01:00
Zbigniew Jędrzejewski-Szmek
1db50423ba tmpfiles: finish with EXIT_FAILURE if anything failed
Return value is successful only if everything succeeded.
2015-01-06 09:57:40 -05:00