summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2013-03-06core: add missing comma for NonewPrivileges=Lennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=917404
2013-03-06bus: Escape environment-based D-Bus addresses properlySimon McVittie
If XDG_RUNTIME_DIR contains a character like ":" (for instance if it's formed from an X11 display name), then it isn't valid to substitute it into a D-Bus address without escaping. http://bugs.freedesktop.org/show_bug.cgi?id=60499
2013-03-06manager: remove timer fd explicitly from epollEnrico Scholz
Forked processes can keep the old fd alive triggering epoll over and over again else. https://bugs.freedesktop.org/show_bug.cgi?id=61697
2013-03-06main: ISOLATE rather than REPLACE default.targetTom Gundersen
This allows switch-root to work correctly if a unit is active both before and after the switch-root, but its dependencies change. Before the patch, any dependencies added to active units by switch-root will not be pulled, in particular filesystems configured in /etc/fstab would not be activated if local-fs.target was active in the initrd. It is not clear to me if there is a bug in the REPLACE handling, or if it is working as expected and that we really want to use ISOLATE instead as this patch does.
2013-03-06Revert "add initrd-fs.target and initrd-fs-pre.target"Harald Hoyer
This reverts commit 39b83cdab37623a546344622db9bbbc784c15df5.
2013-03-04add initrd-fs.target and initrd-fs-pre.targetHarald Hoyer
2013-03-04core/manager: fix conditions to start and stop watching running jobsMichal Schmidt
Harald encountered division by zero in manager_print_jobs_in_progress. Clearly we had the watch enabled when we shouldn't - there were no running jobs in m->jobs, only waiting ones. This is either a deadlock, or maybe some of them would be detected as runnable in the next dispatch of the run queue. In any case we mustn't crash. Fix it by starting and stopping the watch based on n_running_jobs instead of the number of all jobs.
2013-03-03core/path: install inotify watches top-down instead of bottom-upZbigniew Jędrzejewski-Szmek
When watches are installed from the bottom, it is always possible to race, and miss a file creation event. The race can be avoided if a watch is first established for a parent directory, and then for the file in the directory. If the file is created in the time between, the watch on the parent directory will fire. Some messages (mostly at debug level) are added to help diagnose pidfile issues. Should fix https://bugzilla.redhat.com/show_bug.cgi?id=917075.
2013-03-03core/service: use cleanup functions, wrap linesZbigniew Jędrzejewski-Szmek
2013-03-03core/path: catch errors when adding watchesZbigniew Jędrzejewski-Szmek
Errors because of oom conditions or descriptor exhaustion should not be ignored. We probably cannot recover from those conditions. Current behaviour wrt. insufficient permissions is described in the man page. It might make sense in case of user sessions, so I left it as is.
2013-03-03core/path: modernize styleZbigniew Jędrzejewski-Szmek
2013-03-03core/path: use automatic cleanupZbigniew Jędrzejewski-Szmek
... and fix bogus return code on malloc failure.
2013-03-03core/path: fix a leak in success pathZbigniew Jędrzejewski-Szmek
... and use automatic cleanup.
2013-03-02job: print the "OK" status messages in normal greenMichal Schmidt
The "OK" status messages should not draw attention to themselves. It's better if they're not printed in bright/bold. Leave that to errors and warnings. Use a plain inconspicuous enterprisey green.
2013-03-02manager: turn a superfluous check into assertMichal Schmidt
The crash that the check prevented has been fixed by commit 9e9e2b7.
2013-03-02unit: count deserialized job only after it's definitely installedMichal Schmidt
Installation of a deserialized job may fail (though purely in theory), so increase the running job counter only when succeeding.
2013-03-01manager: print p and then free itLukas Nykryn
2013-03-01core: fix running jobs counters after reload/reexecMichal Schmidt
All active units will call unit_notify() during coldplug, so we just make sure we're counting from zero again and get the correct result for n_on_console. For n_running_jobs we likewise reset it to zero and then count the running jobs as we encounter them in deserialization.
2013-03-01unit: fix the race in deserialization.Oleksii Shevchuk
unit_notify is fired in deserelization code (particulary in service_set_state). Units passed in random order, and there is possibility, that unit with StopWhenUnneeded=yes passed before it actual dependecies. In that case unit will be stopped as unneeded, because deps in UNIT_INACTIVE state yet. So, reuse similar logic (unit.c:1421) to avoid this race
2013-03-01manager: prevent segfault in manager_print_jobs_in_progress()Harald Hoyer
2013-03-01specifier: when resolving specifier strings when loading configuration, ↵Lennart Poettering
don't misunderstand parse failures as OOM http://lists.freedesktop.org/archives/systemd-devel/2013-February/009179.html
2013-03-01fstab,mount: detect rbind as bind mountFrederic Crozat
Correctly detect rbind mount option as bind mount. Fixes https://bugzilla.novell.com/show_bug.cgi?id=804575.
2013-02-28core/manager: print status messages about running jobsMichal Schmidt
Sometimes the boot gets stuck until a timeout hits. The usual timeouts are on the order of minutes, so users may lose patience. Print animated status messages telling the names of units with running jobs to make it easy to see what systemd is waiting for. The animation looks cooler with a shorter interval, but 1 s is OK and should not be too hard on slow serial console users.
2013-02-28core: count active units that may mind our printing to /dev/consoleMichal Schmidt
2013-02-28core/execute: determine if ExecContext may fiddle with /dev/consoleMichal Schmidt
There is some guesswork, but it should work satisfactorily for the purpose of knowing when to suppress printing of status messages.
2013-02-28core/execute: add internal is_terminal_output()Michal Schmidt
Similar to already existing is_terminal_input(). Note that the only current user (connect_logger_as) is never called for EXEC_OUTPUT_TTY, so it won't mind whether we accept it.
2013-02-28core/unit: use a temp variable for manager pointer in unit_notify()Michal Schmidt
2013-02-28util, core: add support for ephemeral status linesMichal Schmidt
Ephemeral status lines do not end with a newline and they expect to be overwritten by the next printed status line.
2013-02-28core/transaction: replace a bare status_printf()Michal Schmidt
Like other status messages, this one too should not be printed unconditionally, but it should take the manager state into account. unit_status_printf() does that.
2013-02-28core: redefine unit_status_printf()Michal Schmidt
Take advantage of the fact that almost all callers want to pass unit description as the last parameter. Those who don't can use the more flexible manager_status_printf().
2013-02-28core/manager: make a couple of functions staticMichal Schmidt
They're not used outside manager.c anymore.
2013-02-28core: add manager_status_printf()Michal Schmidt
unit_status_printf() checks the state of the manager, not of the unit as such. Move it to manager.c and rename it to manager_status_printf(). Temporarily keep unit_status_printf as a wrapper macro.
2013-02-27core: keep track of the number of JOB_RUNNING jobsMichal Schmidt
2013-02-27unit: rework resource management APILennart Poettering
This introduces a new static list of known attributes and their special semantics. This means that cgroup attribute values can now be automatically translated from user to kernel notation for command line set settings, too. This also adds proper support for multi-line attributes.
2013-02-27mount-setup: mount pstore filesystemKay Sievers
2013-02-22core, systemctl: add support for irreversible jobsMichal Schmidt
Add a new job mode: replace-irreversibly. Jobs enqueued using this mode cannot be implicitly canceled by later enqueued conflicting jobs. They can however still be canceled with an explicit "systemctl cancel" call.
2013-02-16unit: don't Require systemd-journald.socket from unitsMichal Schmidt
It is not really necessary to have a hard requirement dependency on systemd-journald.socket in almost every unit. The socket gets pulled into boot via at least two ways: sockets.target -> systemd-journald.socket sysinit.target -> systemd-journald.service -> systemd-journald.socket So just assume something pulled the socket in and drop the automatic requirement dependencies on it. "systemctl stop systemd-journald.socket" will now not take the whole system down with it.
2013-02-16execute: increase severity of journal connect failure messageMichal Schmidt
journald is supposed to work. Failure to connect to its socket implies losing messages. It should be a very unusual event. Log the failure with LOG_CRIT. Just because this unit's stdout/stderr failed to connect to the journal does not necessarily mean that we shouldn't try to log the failure using a structured entry, so let's use log_struct_unit.
2013-02-16execute: unify setup_{output,error}Michal Schmidt
The functions are quite similar. Unify them into one. The source gets shorter, the binary gets slightly smaller.
2013-02-16execute: robustness against journald failuresMichal Schmidt
Almost every unit logs to the journal. If journald gets a permanent failure, units would not be able to start (exit code 209/STDOUT). Add a fallback to /dev/null to avoid making the system entirely unusable in such a case.
2013-02-14core: do not overwrite existing units sourceUmut Tezduyar
Only set source for freshly created .mounts coming from mountinfo file.
2013-02-14honor SELinux labels, when creating and writing config filesHarald Hoyer
Also split out some fileio functions to fileio.c and provide a SELinux aware pendant in fileio-label.c see https://bugzilla.redhat.com/show_bug.cgi?id=881577
2013-02-13build-sys: make EFI support build-time optionalLennart Poettering
2013-02-13selinux: use a dynamically sized string when generating audit messagesLennart Poettering
https://bugzilla.redhat.com/show_bug.cgi?id=883043
2013-02-13man: rename systemd.conf to systemd-system.confZbigniew Jędrzejewski-Szmek
Alias as systemd-user.conf is also provided. This should help users running systemd in session mode. https://bugzilla.redhat.com/show_bug.cgi?id=690868
2013-02-13use strneq instead of strncmpThomas Hindoe Paaboel Andersen
2013-02-13manager: pass environment over daemon-reexecOleksii Shevchuk
Fixes this bug: alxchk > systemctl --user set-environment A=B alxchk > systemctl --user show-environment | grep ^A= A=B alxchk > systemctl --user daemon-reexec alxchk > systemctl --user show-environment | grep ^A= alxchk >
2013-02-13efi: various cleanupsLennart Poettering
2013-02-11manager: clean environment before passing it on to othersLennart Poettering
2013-02-11core: properly validate environment data from Environment= lines in unit filesLennart Poettering