summaryrefslogtreecommitdiff
path: root/src/core
AgeCommit message (Collapse)Author
2014-11-14mount-setup: remove mount_setup_late()Daniel Mack
Turns out we can just do kmod_setup() earlier, before we do mount_setup(), so there's no need for mount_setup_late() anymore. Instead, put kdbusfs in mount_table[].
2014-11-13sd-bus: sync with kdbus upstream (ABI break)Daniel Mack
kdbus has seen a larger update than expected lately, most notably with kdbusfs, a file system to expose the kdbus control files: * Each time a file system of this type is mounted, a new kdbus domain is created. * The layout inside each mount point is the same as before, except that domains are not hierarchically nested anymore. * Domains are therefore also unnamed now. * Unmounting a kdbusfs will automatically also detroy the associated domain. * Hence, the action of creating a kdbus domain is now as privileged as mounting a filesystem. * This way, we can get around creating dev nodes for everything, which is last but not least something that is not limited by 20-bit minor numbers. The kdbus specific bits in nspawn have all been dropped now, as nspawn can rely on the container OS to set up its own kdbus domain, simply by mounting a new instance. A new set of mounts has been added to mount things *after* the kernel modules have been loaded. For now, only kdbus is in this set, which is invoked with mount_setup_late().
2014-11-13manager: allow test run to catch SIGCHLD eventsRonny Chevalier
Otherwise we cannot know when a service exited
2014-11-08core: remove unused macro GC_QUEUE_USEC_MAXRonny Chevalier
It is unused since cf1265e188e876dda906dca0029248a06dc80c33
2014-11-07core: unify how we create the notify and private dbus socketLennart Poettering
Use the same robust logic of mkdir + unlink of any existing AF_UNIX socket, ignoring the return value, right before bind().
2014-11-07manager: cast mkdir() result to (void) to make sure coverity is quietLennart Poettering
Also simplify the code a bit by moving mkdir to the common path.
2014-11-07timer: reenable TIMER_ACTIVE timers when restartedMichael Chapman
A timer configured with OnActiveSec will start its associated unit again if the timer is stopped, then started. However, if the timer unit is restarted -- with "systemctl restart", say -- this does not occur. This commit ensures that TIMER_ACTIVE timers are re-enabled whenever the timer is started, even if that's within a restart job.
2014-11-07util: simplify proc_cmdline() to reuse get_process_cmdline()Lennart Poettering
Also, make all parsing of the kernel cmdline non-fatal.
2014-11-06shutdown: fix arguments to /run/initramfs/shutdownMichal Schmidt
Our initrd interface specifies that the verb is in argv[1]. This is where systemd passes it to systemd-shutdown, but getopt permutes argv[]. This confuses dracut's shutdown script: Shutdown called with argument '--log-level'. Rebooting! getopt can be convinced to not permute argv[] by having '-' as the first character of optstring. Let's use it. This requires changing the way non-option arguments (in our case, the verb) are processed. This fixes a bug where the system would reboot instead of powering off.
2014-11-06s/commandline/command line/gHarald Hoyer
2014-11-06shared: rename condition-util.[ch] to condition.[ch]Lennart Poettering
Now that we only have one file with condition implementations around, we can drop the -util suffix and simplify things a bit.
2014-11-06core: get rid of condition.c and move the remaining call into util.cLennart Poettering
That way only one file with condition code remaining, in src/shared/, rather than src/core/. Next step: dropping the "-util" suffix from condition-util.[ch].
2014-11-06core: introduce the concept of AssertXYZ= similar to ConditionXYZ=, but ↵Lennart Poettering
fatal for a start job if not met
2014-11-06condition: record test state internally and beef it up to be a full enumLennart Poettering
2014-11-06condition: unify condition logic in one fileLennart Poettering
2014-11-06condition: properly allow passing back errors from condition checksLennart Poettering
2014-11-05core: introduce new Delegate=yes/no property controlling creation of cgroup ↵Lennart Poettering
subhierarchies For priviliged units this resource control property ensures that the processes have all controllers systemd manages enabled. For unpriviliged services (those with User= set) this ensures that access rights to the service cgroup is granted to the user in question, to create further subgroups. Note that this only applies to the name=systemd hierarchy though, as access to other controllers is not safe for unpriviliged processes. Delegate=yes should be set for container scopes where a systemd instance inside the container shall manage the hierarchies below its own cgroup and have access to all controllers. Delegate=yes should also be set for user@.service, so that systemd --user can run, controlling its own cgroup tree. This commit changes machined, systemd-nspawn@.service and user@.service to set this boolean, in order to ensure that container management will just work, and the user systemd instance can run fine.
2014-11-05manager: Ensure user's systemd runtime directory exists.Colin Guthrie
This mirrors code in dbus.c when creating the private socket and avoids error messages like: systemd[1353]: bind(/run/user/603/systemd/notify) failed: No such file or directory systemd[1353]: Failed to fully start up daemon: No such file or directory
2014-11-04audit: improve the audit messages we generateLennart Poettering
always pass along comm, as documented by audit. Always set the correct comm value.
2014-11-03core: introduce ConditionSecurity=auditLennart Poettering
And conditionalize journald audit support with it
2014-11-02manager: do not print timing when running in test modeZbigniew Jędrzejewski-Szmek
2014-11-02Raise level of 'Found dependency...' linesZbigniew Jędrzejewski-Szmek
This way they always show up together with 'Found ordering cycle...'. Ordering cycles are a serious error and a major pain to debug. If quiet is enabled, only the first and the last line of output are shown: systemd[1]: Found ordering cycle on basic.target/start systemd[1]: Breaking ordering cycle by deleting job timers.target/start systemd[1]: Job timers.target/start deleted to break ordering cycle starting with basic.target/start which isn't particularly enlightening. So just show the whole message at the same level. https://bugzilla.redhat.com/show_bug.cgi?id=1158206
2014-11-01bus: use STR_IN_SETWaLyong Cho
2014-11-01core: improve error message when machine id is missingJan Synacek
2014-10-30snapshot: return error when snapshot existsZbigniew Jędrzejewski-Szmek
2014-10-30Convert the rest to sd_bus_errnomapZbigniew Jędrzejewski-Szmek
I tried to preserve most errno values, but in some cases they were inconsistent (different errno values for the same error name) or just mismatched.
2014-10-28service: add missing state table entryLennart Poettering
2014-10-28core: send sigabrt on watchdog timeout to get the stacktraceUmut Tezduyar Lindskog
if sigabrt doesn't do the job, follow regular shutdown routine, sigterm > sigkill.
2014-10-28swap: don't add too many deps for swap files form /proc/swapLennart Poettering
2014-10-28mac: add mac_ prefix to distinguish origin security apisWaLyong Cho
2014-10-28swap: drop noauto/nofail bools from Swap structureLennart Poettering
We nowadays always set them to "false" anyway, hence let's get rid of them entirely.
2014-10-28swap: replace Discard= setting by a more generic Options= settingLennart Poettering
For now, it's systemd itself that parses the options string, but as soon as util-linux' swapon can take the option string directly with -o we should pass it on unmodified.
2014-10-27manager: print warning on console before rebootZbigniew Jędrzejewski-Szmek
It will be printed even if a prompt is blocking other messages.
2014-10-27manager: convert ephemeral to enumZbigniew Jędrzejewski-Szmek
In preparation for subsequent changes.
2014-10-27rpm: add user macrosZbigniew Jędrzejewski-Szmek
2014-10-27manager: do not print anything while passwords are being queriedZbigniew Jędrzejewski-Szmek
https://bugs.freedesktop.org/show_bug.cgi?id=73942
2014-10-27selinux: make sure we do not try to print missing fieldsZbigniew Jędrzejewski-Szmek
UID or GID of 0 is valid, so we cannot use that to distinguish whether calls to sd_bus_creds_get_* succeeded, and the return value from the function is the only way to know about missing fields. Print "n/a" if the fields are missing. CID #1238779
2014-10-28job: optionally, when a job timeout is hit, also execute a failure actionLennart Poettering
2014-10-28core: remove system start timeout logic againLennart Poettering
The system start timeout as previously implemented would get confused by long-running services that are included in the initial system startup transaction for example by being cron-job-like long-running services triggered immediately at boot. Such long-running jobs would be subject to the default 15min timeout, esily triggering it. Hence, remove this again. In a subsequent commit, introduce per-target job timeouts instead, that allow us to control these timeouts more finegrained.
2014-10-27shutdown: do final unmounting only if not running inside the containerMichal Sekletar
If we run in the container then we run in a mount namespace. If namespace dies then kernel should do unmounting for us, hence we skip unmounting in containers. Also, it may be the case that we no longer have capability to do umount, because we are running in the unprivileged container. See: http://lists.freedesktop.org/archives/systemd-devel/2014-October/023536.html
2014-10-27util: introduce sethostname_idempotentMichal Sekletar
Function queries system hostname and applies changes only when necessary. Also, migrate all client of sethostname to sethostname_idempotent while at it.
2014-10-25Rearrange Unit to make pahole happyZbigniew Jędrzejewski-Szmek
After all we have lots of those.
2014-10-24calendar: make freeing a calendar spec object deal fine with NULLLennart Poettering
In order to make object destruction easier (in particular in combination with _cleanup_) we usually make destructors deal with NULL objects as NOPs. Change the calendar spec destructor to follow the same scheme.
2014-10-24manager: Linux on hppa has fewer rtsigs, hence avoid using the higher ones thereLennart Poettering
https://bugs.freedesktop.org/show_bug.cgi?id=84931
2014-10-24shutdown: pass own argv to /run/initramfs/shutdownMarius Tessmann
Since commit b1e90ec515408aec2702522f6f68c4920b56375b systemd passes its log settings to systemd-shutdown via command line parameters. However, systemd-shutdown doesn't pass these parameters to /run/initramfs/shutdown, causing it to fall back to the default log settings. This fixes the following bugs about the shutdown not being quiet despite "quiet" being in the kernel parameters: https://bugs.freedesktop.org/show_bug.cgi?id=79582 https://bugs.freedesktop.org/show_bug.cgi?id=57216
2014-10-23socket: properly label socket symlinksLennart Poettering
2014-10-23socket: fix error comparisonLennart Poettering
2014-10-23selinux: clean up selinux label function namingLennart Poettering
2014-10-23selinux: rework label query APIsLennart Poettering
APIs that query and return something cannot silently fail, they must either return something useful, or an error. Fix that. Also, properly rollback socket unit fd creation when something goes wrong with the security framework.
2014-10-23smack: rework smack APIs a bitLennart Poettering
a) always return negative errno error codes b) always become a noop if smack is off c) always take a NULL label as a request to remove it