1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 09:56:51 +03:00
Commit Graph

18761 Commits

Author SHA1 Message Date
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
Zbigniew Jędrzejewski-Szmek
553d2243e2 tree-wide: remove unnecessary LOG_PRI
LOG_DEBUG is already a log level, there is no need to use LOG_PRI which
is for filtering out the facility.
2015-01-06 00:29:40 -05:00
Zbigniew Jędrzejewski-Szmek
5dabb1e04e journal-upload: enable curl debug output conditionally
https://bugs.freedesktop.org/show_bug.cgi?id=86464
2015-01-06 00:26:26 -05:00
Gabor Kelemen
358e019c6e po: Initial Hungarian translation
https://bugs.freedesktop.org/show_bug.cgi?id=87982
2015-01-05 23:08:19 -05:00
Chris Atkinson
995084c7b4 man: clarify path escaping and reference systemd-escape
This patch adds more detail to the description of how path escaping
operates and provides a pointer to the systemd-escape program. Either
would serve to answer the question raised in the bug report, so
hopefully this will allow it to be closed.

https://bugs.freedesktop.org/show_bug.cgi?id=87688
2015-01-05 22:49:56 -05:00
Lennart Poettering
15f7a395c8 build-sys: add two more missing makefile links 2015-01-06 03:16:39 +01:00
Lennart Poettering
17a20d6491 machined: simplification 2015-01-06 03:16:39 +01:00
Lennart Poettering
13790add4b journald: allow restarting journald without losing stream connections
Making use of the fd storage capability of the previous commit, allow
restarting journald by serilizing stream state to /run, and pushing open
fds to PID 1.
2015-01-06 03:16:39 +01:00
Lennart Poettering
a354329f72 core: add new logic for services to store file descriptors in PID 1
With this change it is possible to send file descriptors to PID 1, via
sd_pid_notify_with_fds() which PID 1 will store individually for each
service, and pass via the usual fd passing logic on next invocation.
This is useful for enable daemon reload schemes where daemons serialize
their state to /run, push their fds into PID 1 and terminate, restoring
their state on next start from the data in /run and passed in from PID
1.

The fds are kept by PID 1 as long as no POLLHUP or POLLERR is seen on
them, and the service they belong to are either not dead or failed, or
have a job queued.
2015-01-06 03:16:39 +01:00
Zbigniew Jędrzejewski-Szmek
7539904965 cgroup: memory limits on / are not supported 2015-01-05 19:04:10 -05:00
Zbigniew Jędrzejewski-Szmek
6da139137e cgroup: fix error message
systemd[1]: Failed to set memory.limit_in_bytes on : Invalid argument
2015-01-05 19:04:10 -05:00
Zbigniew Jędrzejewski-Szmek
524daa8c3e journal: call connect() with dropped privileges
When systemd starts a service, it first opened /run/systemd/journal/stdout
socket, and only later switched to the right user.group (if they are
specified). Later on, journald looked at the credentials, and saw
root.root, because credentials are stored at the time the socket is
opened. As a result, all messages passed over _TRANSPORT=stdout were
logged with _UID=0, _GID=0.

Drop real uid and gid temporarily to fix the issue.
2015-01-05 14:12:58 -05:00
Lennart Poettering
9c3349e23b core: rework counting of running jobs
Let's unify the code that counts the running jobs a bit, in order to
make sure we are less likely to miss one.

This is related to this bug:

https://bugs.freedesktop.org/show_bug.cgi?id=87349

However, it probably won't fix it fully, and I cannot reproduce the issue.

The change also adds an explicit assert change when the counter is off.
2015-01-05 17:54:59 +01:00
Josef Andersson
bbe05969ec po: add Swedish translation
https://bugs.freedesktop.org/show_bug.cgi?id=88052
2015-01-05 11:39:31 -05:00
Ivan Shapovalov
60d27f1916 path-lookup, systemctl: export lookup_paths_init_from_scope() from shared/install.c and use it 2015-01-05 11:13:30 -05:00
Filipe Brandenburger
69c4e2771e machine: add reference to machine-dbus.h to Makefile.am
Commit 003dffde2c ("machined: Move image discovery logic into src/shared,
so that we can make use of it from nspawn") moved some definitions from
machine.h to a new machine-dbus.h, but did not include it in Makefile.am

Tested that `make distcheck` works after this fix.
2015-01-05 11:13:30 -05:00
Lennart Poettering
65d6d8e32b tmpfiles: fix 'D' lines
https://bugs.freedesktop.org/show_bug.cgi?id=87953
2015-01-05 16:32:59 +01:00
Lennart Poettering
3fdcecc87e nss-myhostname: always will in canonical hostname field when resolving addresses to hostnames
https://bugs.freedesktop.org/show_bug.cgi?id=87634
2015-01-05 16:24:41 +01:00
Lukasz Skalski
30897dd72b bus-proxyd: don't allow to acquire org.freedesktop.DBus name 2015-01-05 16:02:59 +01:00
Michael Biebl
8b173b5e8c core: fix typo in log message 2015-01-05 14:13:45 +01:00
Lennart Poettering
8246dff1f8 machinectl: remove spurious newline 2015-01-05 13:47:03 +01:00
Daniele Medri
08060f8c88 po: update Italian translation 2015-01-05 13:47:03 +01:00
Daniel Mack
d7d052b23f sd-bus: sync kdbus.h
Catch up with latest changes in kdbus.ko:

 * Signals can be sent as unicast now, hence they need to be marked as
   such with the KDBUS_MSG_SIGNAL in the message flags.

 * Follow ioctl number change for KDBUS_CMD_FREE
2015-01-05 13:44:40 +01:00
Topi Miettinen
abe4aa144b util: Do not clear parent mount flags when setting up namespaces
When setting up a namespace, mount flags like noexec, nosuid and
nodev are cleared, so the mounts always have exec, suid and dev
flags enabled.

Copy source directory mount flags to target mount when remounting
the bind mounts.
2015-01-05 13:24:57 +01:00
Lennart Poettering
5ac0162c3a udevadm,..: make --help output of udev tools more like the output of the various other tools 2015-01-05 13:19:55 +01:00
Lennart Poettering
00b4ffdecb fstab-generator: use more appropriate checks for swap and device availability
We always should use the same checks when deciding whether swap support
and mounting of devices is supported. Hence, let's make
fstab-generator's logic more similar to the usual logic we follow:

a) Look for /proc/swaps and no container support before activating
swaps.

b) Look for /sys being writable befire supporting device mounts.
2015-01-05 12:35:08 +01:00
Torstein Husebø
6b3fd9a14d libsystemd-network: fix typo in lldp 2015-01-05 12:34:11 +01:00
Colin Walters
9bc5cd6d74 util: Fix signedness error in lines(), match implementations
Regression introduced by ed757c0cb0

Mirror the implementation of columns(), since the fd_columns()
functions returns a negative integer for errors.

Also fix columns() to return the unsigned variable instead of the
signed intermediary (they're the same, but better to be explicit).
2015-01-05 03:05:15 +01:00
Lennart Poettering
6fc25464bf update TODO 2015-01-05 02:58:04 +01:00
Lennart Poettering
8266e1c04d journald: reuse IOVEC_TOTAL_SIZE() macros where possible 2015-01-05 02:57:36 +01:00
Lennart Poettering
2678031a17 journald: when we detect the journal file we are about to write to has been deleted, rotate
https://bugzilla.redhat.com/show_bug.cgi?id=1171719
2015-01-05 02:57:36 +01:00
Lennart Poettering
aba843317d systemctl: properly iterate through service array when dispatching to sysv
https://bugzilla.redhat.com/show_bug.cgi?id=1175734
2015-01-05 01:56:47 +01:00
Lennart Poettering
805d14864f journald: add some additional checks before we divide by values read from journal file headers
Since the file headers might be replaced by zeroed pages now due to
sigbus we should make sure we don't end up dividing by zero because we
don't check values read from journal file headers for changes.
2015-01-05 01:40:51 +01:00
Lennart Poettering
3774cf5708 journalctl: static variables immediately configured via command line arguments should be prefixed with "arg_" 2015-01-05 01:40:51 +01:00
Lennart Poettering
2cf4172a71 journal: install sigbus handler for journal tools too
This makes them robust regarding truncation. Ideally, we'd export this
as an API, but given how messy SIGBUS handling is, and the uncertain
ownership logic of signal handlers we should not do this (unless libc
one day invents a scheme how to sanely install SIGBUS handlers for
specific memory areas only). However, for now we can still make all our
own tools robust.

Note that external tools will only have read-access to the journal
anyway, where SIGBUS is much more unlikely, given that only writes are
subject to disk full problems.
2015-01-05 01:40:51 +01:00
Lennart Poettering
b798e7baa5 systemctl: fix waiting for jobs when using direct connections to PID 1 for dbus 2015-01-05 01:40:51 +01:00
Lennart Poettering
ea69bd41c5 journald: constify all things 2015-01-05 01:40:51 +01:00
Lennart Poettering
146d477367 machined,bus-proxy: fix connecting to containers 2015-01-05 01:40:51 +01:00
Lennart Poettering
8531ae707d journald: prefix exported calls with "server_", unexport unnecessary calls 2015-01-05 01:40:51 +01:00