summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
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
2013-02-11manager: validate environment parameters for SetEnvironment(), ↵Lennart Poettering
UnsetEnvironment() bus calls
2013-02-11core: don't accept invalid environment assignments from the kernel cmdlineLennart Poettering
2013-02-11env: considerably beef up environment cleaning logicLennart Poettering
Now, actually check if the environment variable names and values used are valid, before accepting them. With this in place are at some places more rigid than POSIX, and less rigid at others. For example, this code allows lower-case environment variables (which POSIX suggests not to use), but it will not allow non-UTF8 variable values. All in all this should be a good middle ground of what to allow and what not to allow as environment variables. (This also splits out all environment related calls into env-util.[ch])
2013-02-09shutdown: issue a sync() as soon as shutdown.target is queuedLennart Poettering
2013-02-08shared: conf-files - add root parameterKay Sievers
2013-02-07systemd: fix uninitialized memory access in selinuxZbigniew Jędrzejewski-Szmek
==6129== Syscall param socketcall.getsockopt(optlen) points to uninitialised byte(s) ==6129== at 0x312D0F325A: getsockopt (syscall-template.S:81) ==6129== by 0x4615E6: get_audit_data (selinux-access.c:268) ==6129== by 0x461A81: selinux_access_check (selinux-access.c:394) ==6129== by 0x453B23: bus_manager_message_handler (dbus-manager.c:1395) ==6129== by 0x313581D9C4: _dbus_object_tree_dispatch_and_unlock (dbus-object-tree.c:862) ==6129== by 0x313580FC1F: dbus_connection_dispatch (dbus-connection.c:4672) ==6129== by 0x44CD4C: bus_dispatch (dbus.c:528) ==6129== by 0x41292F: manager_loop (manager.c:1573) ==6129== by 0x40CD8E: main (main.c:1735) ==6129== Address 0x7fefff2c0 is on thread 1's stack
2013-02-06systemd: raise level of message about lookup pathsZbigniew Jędrzejewski-Szmek
This can be pretty important for the user, and is not trivial to figure out in all cases. Also show failing path in error messages.
2013-02-06systemd: do not remove empty paths from unit lookup pathZbigniew Jędrzejewski-Szmek
The ability to start a new unit with 'systemctl start ...' should not depend on whether there are other units in the directory. Previously, an additional 'systemctl daemon-reload' would be necessary to tell systemd to update the list of unit lookup paths.
2013-01-29install: allow specifiers in WantedBy/RequiredBy/AliasZbigniew Jędrzejewski-Szmek
This allows one templated unit to refer to another templated unit at installation time. Examples: > grep WantedBy ~/.config/systemd/user/mpop@.timer WantedBy=services@%i.target > srv disable mpop@iit.timer rm '/home/alxchk/.config/systemd/user/services@iit.target.wants/mpop@iit.timer' > srv enable mpop@iit.timer ln -s '/home/alxchk/.config/systemd/user/mpop@.timer' '/home/alxchk/.config/systemd/user/services@iit.target.wants/mpop@iit.timer' Based-on-patch-by: Oleksii Shevchuk <alxchk@gmail.com>
2013-01-29core: fix %U when no User= usedZbigniew Jędrzejewski-Szmek
When the username was not explicitly specified, both %U and %u would print the username. Make %U always print UID.
2013-01-29Move generic specifier functions to sharedZbigniew Jędrzejewski-Szmek
No functional change. This makes it possible to use them in install.c.
2013-01-26core: unify kill code of mount, service, socket, swap unitsLennart Poettering
2013-01-25job: fix merging with --ignore-dependenciesMichal Schmidt
This fixes a bug where a job with --ignore-dependencies would wait for other jobs because it merged into a previously queued job.
2013-01-25selinux: we don't need that many debug messages by defaultLennart Poettering
2013-01-25selinux-access: Delete debugging message logged as an errorColin Walters
I don't see why this should be logged at all, so let's delete it.
2013-01-24core: Set source for mountinfo .mount unitsUmut Tezduyar
2013-01-24service: make sure the watchdog timer is not restarted while stoppingMichael Olbrich
A watchdog notification may be handled after the watchdog timer was stopped while stopping the service. As a result the timer is restarted and the service may be restarted as well. The watchdog timestamp is initially set during startup in service_enter_start_post() and cleared when the timer is stopped. Therefore it can be used as an indication if the timer should be reset.
2013-01-24service: really stop watchdog timer when stoppingMichael Olbrich
For services without ExecStop= the state SERVICE_STOP is never entered. as a result the watchdog timer is not stopped and the service is restarted (if it is configuered to restart). Stopping the watchdog timer for SERVICE_STOP_SIGTERM as well fixes this.
2013-01-22Replace autoconf int max test with simple defineZbigniew Jędrzejewski-Szmek
2013-01-22Fix some typosEelco Dolstra
2013-01-21util: move is_efiboot() to efivars.cLennart Poettering
2013-01-20shutdown: loop - convert to enumerate matchKay Sievers
2013-01-19execute: Fix seccomp support on x32Jonathan Callen
In the x32 ABI, syscall numbers start at 0x40000000. Mask that bit on x32 for lookups in the syscall_names array and syscall_filter and ensure that syscall.h is parsed correctly. [zj: added SYSCALL_TO_INDEX, INDEX_TO_SYSCALL macros.]
2013-01-19core: if the bootloader supports it, determine firmware and boot loader delayLennart Poettering
This allows us to print simple performance data of all parts of the boot now: - firmware - boot loader - kernel - initrd - userspace This only works for bootloaders which support passing TSC data via EFI variables. As of now that's only gummiboot.
2013-01-19unit: fix typoLennart Poettering
2013-01-19unit: optionally allow making cgroup attribute changes persistentLennart Poettering
2013-01-19cgroup: additional validity checks for cgroup attribute namesLennart Poettering
2013-01-18build-sys: add autoconf macro to pick macro for x32 compatibilityZbigniew Jędrzejewski-Szmek
2013-01-18core: log USER_UNIT instead of UNIT if in user sessionMirco Tischler
2013-01-18systemctl: add new "get-cgroup-attr" to query current cgroup attribute valueLennart Poettering
Also adds a pair of bus calls for this to the daemon.
2013-01-17core: corrects check of strduped controller stringNestor Ovroy
In commit 246aa6d (core: add bus API and systemctl commands for altering cgroup parameters during runtime), when rewriting unit_add_one_default_cgroup to prefered style, the check of strduped b->controller was incorrectly changed to check the containing structure. Correct it.
2013-01-17service: properly signal permanent failure of a service to its socketLennart Poettering
This makes sure that a service is not indefinitely restarted in a tight loop if it fails before it is able to process its socket. This corrects the breakage introduced with 8d1b002a2e389e79a2414491523de549783abf73. Shame on me.
2013-01-17units: for all unit settings that take lists, allow the empty string for ↵Lennart Poettering
resetting the lists https://bugzilla.redhat.com/show_bug.cgi?id=756787
2013-01-17dbus: add Unit's PartOf and ConsistsOf deps to introspection XMLLennart Poettering
2013-01-16service: ignore dependencies on $syslog and $local_fs in LSB scriptsLennart Poettering
We no longer allow early-boot init scripts, however in late boot the syslog socket and local mounts are established anyway, so let's simplify our dep graph a bit. If $syslog doesn't resolve to syslog.target anymore there's no reason to keep syslog.target around anymore. Let's remove it. Note that many 3rd party service unit files order themselves after syslog.target. These will be dangling dependencies now, which should be unproblematic, however.