Kay Sievers [Sat, 31 Dec 2011 05:02:42 +0000 (06:02 +0100)]
build-sys: restructure logind parts in Makefile.am and add --disable-logind
Kay Sievers [Sat, 31 Dec 2011 03:36:02 +0000 (04:36 +0100)]
logind: fix POTFILES location
Kay Sievers [Sat, 31 Dec 2011 03:20:25 +0000 (04:20 +0100)]
logind: add 'login' subdir to include dirs
When separate 'builddirs', like with 'distcheck', are used, the generated
sources, like the '.c' files from 'gperf', are placed in the 'builddir' and
can not find the include headers in 'srcdir'.
Kay Sievers [Sat, 31 Dec 2011 02:59:54 +0000 (03:59 +0100)]
Makefile.am: consistently use tabs
Kay Sievers [Sat, 31 Dec 2011 02:55:35 +0000 (03:55 +0100)]
journal: silence gcc warnings
Lennart Poettering [Sat, 31 Dec 2011 02:35:45 +0000 (03:35 +0100)]
util: fix warning
Lennart Poettering [Sat, 31 Dec 2011 02:35:38 +0000 (03:35 +0100)]
journal: move symver file into subdirectory
Lennart Poettering [Sat, 31 Dec 2011 02:24:31 +0000 (03:24 +0100)]
logind: move more files into subdirectory
Lennart Poettering [Sat, 31 Dec 2011 02:16:08 +0000 (03:16 +0100)]
logind: move logind into its own subdirectory
Lennart Poettering [Sat, 31 Dec 2011 02:02:57 +0000 (03:02 +0100)]
git: update gitignore
Lennart Poettering [Sat, 31 Dec 2011 01:31:54 +0000 (02:31 +0100)]
journal: automatically deduce journal metrics from file system sizes
Lennart Poettering [Sat, 31 Dec 2011 00:08:06 +0000 (01:08 +0100)]
kmsg: drop unused variable
Lennart Poettering [Sat, 31 Dec 2011 00:07:49 +0000 (01:07 +0100)]
socket: rename the PassCred= option to PassCredentials=, since we don't want to needlessly abbreviate options unless they are very well established
Lennart Poettering [Fri, 30 Dec 2011 23:59:37 +0000 (00:59 +0100)]
Merge branch 'journal'
Lennart Poettering [Fri, 30 Dec 2011 23:57:14 +0000 (00:57 +0100)]
journal: move max_use into metrics structure
Lennart Poettering [Fri, 30 Dec 2011 21:29:23 +0000 (22:29 +0100)]
journal: disable default debug logging
Lennart Poettering [Fri, 30 Dec 2011 21:15:58 +0000 (22:15 +0100)]
journal: fix a few bad memory accesses and leaks
Lennart Poettering [Fri, 30 Dec 2011 18:05:43 +0000 (19:05 +0100)]
journald: forward all syslog messages to syslogd
Lennart Poettering [Fri, 30 Dec 2011 16:50:37 +0000 (17:50 +0100)]
journal: add unit files and shared library glue
Lennart Poettering [Fri, 30 Dec 2011 15:01:33 +0000 (16:01 +0100)]
journald: add missing header
Lennart Poettering [Fri, 30 Dec 2011 14:34:21 +0000 (15:34 +0100)]
remount-api-vfs: handle another OOM condition
Lennart Poettering [Thu, 29 Dec 2011 14:25:42 +0000 (15:25 +0100)]
journald: don't recheck /var availability more often than 30s
Lennart Poettering [Thu, 29 Dec 2011 14:00:57 +0000 (15:00 +0100)]
journald: flush /run to /var as soon as it becomes available
Lennart Poettering [Thu, 29 Dec 2011 14:00:05 +0000 (15:00 +0100)]
journald: increase rate limit burst rate
Kay Sievers [Thu, 29 Dec 2011 13:09:04 +0000 (14:09 +0100)]
update TODO
Lennart Poettering [Wed, 28 Dec 2011 00:53:06 +0000 (01:53 +0100)]
journal: never mmap beyond file size
Lennart Poettering [Tue, 27 Dec 2011 22:18:09 +0000 (23:18 +0100)]
journald: when checking available disk space for rate limiting, cache the results temporarily
Lennart Poettering [Tue, 27 Dec 2011 21:58:20 +0000 (22:58 +0100)]
journal: fix hash table lookup logic
Lennart Poettering [Tue, 27 Dec 2011 21:52:22 +0000 (22:52 +0100)]
journal: fix typo
Lennart Poettering [Tue, 27 Dec 2011 21:52:15 +0000 (22:52 +0100)]
udev: exclude loopback device from udev rule based sysctl application, since we can just apply that directly at boot
Lennart Poettering [Tue, 27 Dec 2011 21:51:46 +0000 (22:51 +0100)]
journald: implement sophisticated rate limiting
Lennart Poettering [Fri, 23 Dec 2011 19:50:48 +0000 (20:50 +0100)]
journal: implement stdout transport
Lennart Poettering [Wed, 21 Dec 2011 23:35:04 +0000 (00:35 +0100)]
journald: enforce some syntax restrictions on field names sent from the client side
Lennart Poettering [Wed, 21 Dec 2011 21:32:52 +0000 (22:32 +0100)]
journal: properly handle first inline bisect array entry
Lennart Poettering [Wed, 21 Dec 2011 18:00:10 +0000 (19:00 +0100)]
journal: add missing compress.[ch]
Lennart Poettering [Wed, 21 Dec 2011 17:59:56 +0000 (18:59 +0100)]
journalctl: add command line parsing
Lennart Poettering [Wed, 21 Dec 2011 17:17:22 +0000 (18:17 +0100)]
journalctl: add json, export, short and verbose output modes
Lennart Poettering [Wed, 21 Dec 2011 01:40:59 +0000 (02:40 +0100)]
journal: add inline compression support with XZ
Lennart Poettering [Tue, 20 Dec 2011 01:38:36 +0000 (02:38 +0100)]
journal: fix space reservation limit enforcement
Lennart Poettering [Mon, 19 Dec 2011 23:38:14 +0000 (00:38 +0100)]
journal: fix matches
Michal Schmidt [Sun, 18 Dec 2011 13:57:54 +0000 (14:57 +0100)]
log: never block on syslog in PID 1
Use a non-blocking syslog socket if logging from PID 1.
If sendmsg fails with EAGAIN, fall back to kmsg or console only for the
current message. Next message will try syslog again.
Michal Schmidt [Mon, 19 Dec 2011 17:32:10 +0000 (18:32 +0100)]
dbus: no sync D-Bus connection flushing
Blocking on D-Bus in a system manager could lead to deadlock.
Michal Schmidt [Sun, 18 Dec 2011 13:58:10 +0000 (14:58 +0100)]
dbus: register to DBus asynchronously
Chen Jie observed and analyzed a deadlock. Assuming systemd-kmsg-syslogd
is already stopped, but rsyslogd is not started yet:
1. systemd makes a synchronous call to dbus-daemon.
2. dbus-daemon wants to write something to syslog.
3. syslog needs to be started by systemd.
... but cannot be, because systemd is waiting in 1.
Solve this by avoiding synchronous D-Bus calls. I had to write an async
bus registration call. Interestingly, D-Bus authors anticipated this, in
documentation to dbus_bus_set_unique_name():
> The only reason to use this function is to re-implement the equivalent
> of dbus_bus_register() yourself. One (probably unusual) reason to do
> that might be to do the bus registration call asynchronously instead
> of synchronously.
Lennart's comments from IRC:
> though I think this doesn't fix the problem in its entirety
> simply because dbus_connection_open_private() itself is still synchronous
> i.e. the connect() call behind it is not async
> I think I listed that issue actually on some D-Bus todo list
> i.e. to make dbus_connection_get() fully async
> but that's going to be hard
> so your patch looks good
So it may not be perfect, but it's clearly an improvement.
I did not manage to reproduce the original deadlock with the patch.
Dan Walsh [Mon, 19 Dec 2011 22:55:29 +0000 (23:55 +0100)]
label: fix labeling of symbolic links
Lennart Poettering [Mon, 19 Dec 2011 21:35:46 +0000 (22:35 +0100)]
journal: implement inotify-based live logging logic
Lennart Poettering [Mon, 19 Dec 2011 19:25:52 +0000 (20:25 +0100)]
man: switch to UTF-8 output, to work around charset issues
Lennart Poettering [Mon, 19 Dec 2011 18:55:54 +0000 (19:55 +0100)]
man: generate HTML instead of XHTML with XSL docbook to work around 'fsfunc' noise
Lennart Poettering [Mon, 19 Dec 2011 18:54:51 +0000 (19:54 +0100)]
hashmap: add hashmap_first_key()
Lennart Poettering [Mon, 19 Dec 2011 16:40:31 +0000 (17:40 +0100)]
man: extend sd-login(7) in regards to mixing D-Bus and synchronous library calls a bit
Lennart Poettering [Mon, 19 Dec 2011 13:42:59 +0000 (14:42 +0100)]
man: various updates
Lennart Poettering [Mon, 19 Dec 2011 12:57:07 +0000 (13:57 +0100)]
man: add sd-login(7) page
Lennart Poettering [Mon, 19 Dec 2011 12:25:00 +0000 (13:25 +0100)]
build-sys: add rules for man page aliases
Lennart Poettering [Mon, 19 Dec 2011 12:19:01 +0000 (13:19 +0100)]
man: sd_readahead is not actually available in libsystemd-daemon
Lennart Poettering [Mon, 19 Dec 2011 12:12:36 +0000 (13:12 +0100)]
man: build new man pages
Lennart Poettering [Mon, 19 Dec 2011 12:11:42 +0000 (13:11 +0100)]
sd-daemon: fix #include lines since we now ship a shared library
Lennart Poettering [Mon, 19 Dec 2011 02:02:17 +0000 (03:02 +0100)]
man: document the sd-login interfaces
Lennart Poettering [Sat, 17 Dec 2011 00:36:47 +0000 (01:36 +0100)]
journald: filter fields send from client starting with underscore
Michal Schmidt [Sat, 17 Dec 2011 00:33:40 +0000 (01:33 +0100)]
execute: fix losing of start timestamps
Start timestamps were always cleared before saving exit timestamps.
Fix it by removing a condition that makes no sense any way I look at it.
Lennart Poettering [Sat, 17 Dec 2011 00:32:49 +0000 (01:32 +0100)]
journal: introduce mandatory sd_journal_printf() priority parameter
Lennart Poettering [Sat, 17 Dec 2011 00:13:55 +0000 (01:13 +0100)]
journal: enforce limits on open journal files
Lennart Poettering [Fri, 16 Dec 2011 23:56:34 +0000 (00:56 +0100)]
journal: add native protocol to journald, and client side API to send journal messages
Michal Schmidt [Fri, 16 Dec 2011 23:39:19 +0000 (00:39 +0100)]
man: fix misplaced remark in description of Sockets=
Michal Schmidt [Fri, 16 Dec 2011 17:27:35 +0000 (18:27 +0100)]
tmpfiles: add 'z', like 'Z' but not recursive
Michal Schmidt [Fri, 16 Dec 2011 17:00:11 +0000 (18:00 +0100)]
tmpfiles: apply chown, chmod for 'Z' entries too
If changing ownership or permissions is not desired, they can be
configured to '-' or omitted entirely.
Michal Schmidt [Fri, 16 Dec 2011 16:38:01 +0000 (17:38 +0100)]
service: use 'syslog+console' for sysv_console
The default output to 'tty' for SysV service was making it hard to debug
problems because error messages were missing from syslog.
Michal Schmidt [Thu, 15 Dec 2011 23:38:22 +0000 (00:38 +0100)]
man: mention that 'Z' ignores uid/gid/mode
Michal Schmidt [Thu, 15 Dec 2011 22:04:37 +0000 (23:04 +0100)]
man: document 'Z' in tmpfiles
Michal Schmidt [Thu, 15 Dec 2011 22:11:07 +0000 (23:11 +0100)]
tmpfiles: add RECURSIVE_RELABEL_PATH ('Z')
Feature requested by Dan Walsh.
Michal Schmidt [Thu, 15 Dec 2011 22:45:26 +0000 (23:45 +0100)]
tmpfiles: separate a generic item glob processing function
Item glob processing will be useful for more than just removing.
Michal Schmidt [Thu, 15 Dec 2011 22:44:23 +0000 (23:44 +0100)]
tmpfiles: use a common function to set owner/group/mode/label
Michal Schmidt [Thu, 15 Dec 2011 20:32:50 +0000 (21:32 +0100)]
tmpfiles: rename a couple of functions
remove_item -> remove_item_instance
remove_item_glob -> remove_item
Michal Schmidt [Thu, 15 Dec 2011 20:31:14 +0000 (21:31 +0100)]
tmpfiles: use an enum instead of plain char for item type
For better safety. gcc can warn about missing values in switch statements.
Michal Schmidt [Wed, 14 Dec 2011 21:23:56 +0000 (22:23 +0100)]
systemctl: fix typo in 'is-enabled'
It prevented the action from working without dbus.
Gregs Gregs [Mon, 14 Nov 2011 17:58:03 +0000 (19:58 +0200)]
fsck: Fix typo in comment
Lennart Poettering [Wed, 14 Dec 2011 16:03:50 +0000 (17:03 +0100)]
update TODO
Michal Schmidt [Wed, 14 Dec 2011 00:25:47 +0000 (01:25 +0100)]
pam-module: add a couple of debugging prints
Michal Schmidt [Fri, 9 Dec 2011 14:25:29 +0000 (15:25 +0100)]
unit: check for unneeded dependencies even when unit stop was expected
systemd did not stop units marked as "StopWhenUnneeded=yes" when the requiring
unit was stopped on user's request.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=704197
Michal Schmidt [Fri, 9 Dec 2011 14:24:04 +0000 (15:24 +0100)]
unit: fix false positive in check for unneeded unit
A freshly started unit A was immediately considered unneeded just because
unit B, which Requires A, was starting later in the transaction.
Fix it by looking not only at the state of B, but also at its pending job.
Also fix a copied&pasted comment.
Michal Schmidt [Thu, 8 Dec 2011 11:09:10 +0000 (12:09 +0100)]
path: add missing pieces for PathModified
PATH_MODIFIED worked internally for PID files detection, but was unusable
in units.
Tim Waugh [Thu, 8 Dec 2011 16:32:09 +0000 (17:32 +0100)]
'@' is an 'ampersat' not an 'ampersand'; let's call it 'at symbol'
Michal Schmidt [Tue, 6 Dec 2011 00:14:36 +0000 (01:14 +0100)]
systemctl: print 'error' load state in red
Be consistent in coloring of load states in list-units and status.
Print only 'error' in red.
There are no 'banned' or 'failed' states. Do not color 'masked', it's
not an error.
Michal Schmidt [Mon, 5 Dec 2011 23:47:28 +0000 (00:47 +0100)]
unit: garbage collect units with load error
Units that failed to load were never cleaned up. It was possible to
reach the 128K limit of units by attempting to load a bunch of nonsense.
Bug observed by Reartes Guillermo in
https://bugzilla.redhat.com/show_bug.cgi?id=680122
Bill Nottingham [Tue, 22 Nov 2011 20:45:34 +0000 (15:45 -0500)]
Allow 'list-unit-files' to run with --root.
To do so, move the check for the bus to the bus-using portion of
list_unit_files(), and ensure that get_config_path doesn't abort when
checking the runtime path with --root.
Michal Schmidt [Sat, 3 Dec 2011 20:34:34 +0000 (21:34 +0100)]
service: stop the service if ExecStartPost ends with a failure
The handling of failures in ExecStartPost is inconsistent. If the
command times out, the service is stopped. But if the command exits
with a failure, the service keeps running.
It makes more sense to stop the service when ExecStartPost fails.
If this behaviour is not desired, the ExecStartPost command can be
prefixed with "-".
Michal Schmidt [Sat, 3 Dec 2011 01:13:30 +0000 (02:13 +0100)]
service: handle services with racy daemonization gracefully
There are a lot of forking daemons that do not exactly follow the
initialization steps as described in daemon(7). It is common that they
do not bother waiting in the parent process for the child to write the
PID file before exiting. The daemons' developers often do not perceive
this as a bug and they're unwilling to change.
Currently systemd warns about the missing PID file and falls back to
guessing the main PID. Being not quite deterministic, the guess can be
wrong with bad consequences. If the guessing is disabled, determinism is
achieved at the cost of losing the ability of noticing when the main
process of the service dies.
As long as it does not negatively affect properly written services,
systemd should strive for compatibility even with services with racy
daemonization. It is possible to provide determinism _and_ main process
supervision to them.
If the PID file is not there, rather than guessing and considering the
service running immediately after getting the SIGCHLD from the ExecStart
(or ExecStartPost) process, we can keep the service in the activating
state for a bit longer. We can use inotify to wait for the PID file to
appear. Only when it finally does appear and we read a valid PID from
it, we'll move the service to the running state. If the PID file never
appears, the usual timeout kicks in and the service fails.
Michal Schmidt [Sat, 3 Dec 2011 09:22:26 +0000 (10:22 +0100)]
path: add PathModified (= PathChanged + IN_MODIFY)
Michal Schmidt [Sat, 3 Dec 2011 00:38:30 +0000 (01:38 +0100)]
path: refactor PathSpec usage
path_*() functions operate on "Path *p" and they do not touch PathSpec
internals directly.
pathspec_*() functions operate on "PathSpec *s". The PathSpec class will
be useful outside of path.c.
Michal Schmidt [Sat, 3 Dec 2011 00:36:05 +0000 (01:36 +0100)]
path: use %m instead of strerror(errno)
and strerror(-errno) was just wrong.
Michal Schmidt [Fri, 2 Dec 2011 23:41:34 +0000 (00:41 +0100)]
util: fix error checking after fgets()
fgets() does not set errno on EOF.
Michal Schmidt [Fri, 2 Dec 2011 10:32:52 +0000 (11:32 +0100)]
rc-local: order after network.target
As suggested by Bill Nottingham: rc.local is often used for frobbing the
network.
https://bugzilla.redhat.com/show_bug.cgi?id=754789
Michal Schmidt [Fri, 2 Dec 2011 10:32:04 +0000 (11:32 +0100)]
rc-local: no need to check if the script is executable
rc-local.service is pulled in by a generator only if the script is
executable. No need to check again.
Michal Schmidt [Fri, 2 Dec 2011 09:18:46 +0000 (10:18 +0100)]
add a generator to pull rc-local.service in
rc-local.service acts as an ordering barrier even if its condition is
false, because conditions are evaluated when the service is about to be
started.
To avoid the ordering barrier in a legacy-free system, add a generator
to pull rc-local.service into the transaction only if the script is
executable.
If/when we rewrite SysV compatibility into a generator, this one can become
a part of it.
Michal Schmidt [Wed, 30 Nov 2011 10:06:35 +0000 (11:06 +0100)]
man: document the PassCred option
Michal Schmidt [Wed, 30 Nov 2011 08:37:13 +0000 (09:37 +0100)]
syslog: use PassCred=yes for the /dev/log socket
Both kmsg-syslogd and the real syslog service want to receive
SCM_CREDENTIALS. With socket activation it is too late to set
SO_PASSCRED in the services.
Michal Schmidt [Tue, 29 Nov 2011 22:14:36 +0000 (23:14 +0100)]
shutdownd: use PassCred=yes in the socket unit
Since Linux 3.2 in order to receive SCM_CREDENTIALS it is not sufficient
to set SO_PASSCRED just before recvmsg(). The option has to be already
set when the sender sends the message.
With socket activation it is too late to set the option in the service.
It must be set on the socket right from the start.
See the kernel commit:
16e57262 af_unix: dont send SCM_CREDENTIALS by default
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=757628
Michal Schmidt [Tue, 29 Nov 2011 21:15:41 +0000 (22:15 +0100)]
socket: add option for SO_PASSCRED
Add an option to enable SO_PASSCRED for unix sockets.
Michal Schmidt [Sat, 19 Nov 2011 01:47:09 +0000 (02:47 +0100)]
let mount and swap units log to the configured defaults
Related-to: https://bugzilla.redhat.com/show_bug.cgi?id=750032
Michal Schmidt [Sat, 19 Nov 2011 00:17:46 +0000 (01:17 +0100)]
pam-module: treat "cron" in PAM_TTY as empty tty
cron sets PAM_TTY to "cron" and it has been doing it for a long time.
It cannot be changed because user configurations may depend on it.
https://bugzilla.redhat.com/show_bug.cgi?id=727315
Michal Schmidt [Sat, 19 Nov 2011 00:14:11 +0000 (01:14 +0100)]
pam-module: use the correct session type "unspecified"
logind does not understand "other".
Michal Schmidt [Wed, 16 Nov 2011 23:21:16 +0000 (00:21 +0100)]
execute: log errors from "sd(EXEC)"
To give the administrator more hints about failures occuring in spawning
of commands than just the exit code, log the strerror.
All fds are closed, so reopen the log.
Related-to: https://bugzilla.redhat.com/show_bug.cgi?id=752901