summaryrefslogtreecommitdiff
path: root/src/core
Commit message (Collapse)AuthorAge
* tree-wide: remove Emacs lines from all filesDaniel Mack2017-05-17
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* core: log about path_is_mount_point() errorsLennart Poettering2017-05-17
| | | | | | | We really shouldn't fail silently, but print a log message about these errors. Also make sure to attach error codes to all log messages where that makes sense. (While we are at it, add a couple of (void) casts to functions where we knowingly ignore return values.)
* mount-setup.c: fix handling of symlink Smack labelling in cgroup setupPatrick Ohly2017-05-17
| | | | | | | | | | | | | | | | The code introduced in f8c1a81c51 (= elogind 227) failed for me with: Failed to copy smack label from net_cls to /sys/fs/cgroup/net_cls: No such file or directory There is no need for a symlink in this case because source and target are identical. The symlink() call is allowed to fail when the target already exists. When that happens, copying the Smack label must be skipped. But the code also failed when there is a symlink, like "cpu -> cpu,cpuacct", because mac_smack_copy() got called with src="cpu,cpuacct" which fails to find the entry because the current directory is not inside /sys/fs/cgroup. The absolute path to the existing entry must be used instead.
* tree-wide: sort includes in *.hThomas Hindoe Paaboel Andersen2017-05-17
| | | | | This is a continuation of the previous include sort patch, which only sorted for .c files.
* Prep v228: Condense elogind source masks (5/5)Sven Eden2017-04-26
|
* Prep v228: Condense elogind source masks (4/5)Sven Eden2017-04-26
|
* Prep v228: Condense elogind source masks (3/5)Sven Eden2017-04-26
|
* Prep v228: Substitute declaration masks (3/4)Sven Eden2017-04-26
|
* Prep v228: Add remaining updates from upstream (3/3)Sven Eden2017-04-26
| | | | | Apply remaining fixes and the performed move of utility functions into their own foo-util.[hc] files on the rest of elogind.
* core: don't generate warnings when write access to the cgroup fs fails in ↵Lennart Poettering2017-04-26
| | | | | | --user due to EACCES After all, in the classic hierarchy that's pretty much the default case.
* [3/5] Apply missing fixes from upstreamSven Eden2017-03-29
|
* mount: propagate error codes correctlyDavid Herrmann2017-03-29
| | | | | | | | | | Make sure to propagate error codes from mount-loops correctly. Right now, we return the return-code of the first mount that did _something_. This is not what we want. Make sure we return an error if _any_ mount fails (and then make sure to return the first error to not hide proper errors due to consequential errors like -ENOTDIR). Reported by cee1 <fykcee1@gmail.com>.
* smack: bugfix the smack label of symlink when '--with-smack-run-label' is setSangjung Woo2017-03-29
| | | | | | | | | | | | | | | | | | | Even though elogind has its own smack label since '--with-smack-run-label' configuration is set, the smack label of each CGROUP root directory should have the star (i.e. *) label. This is mainly because current Linux Kernel set the label in this way. (Refer to smack_d_instantiate() in security/smack/smack_lsm.c) However, if elogind has its own smack label and arg_join_controllers is explicitly set or initialized by initialize_join_controllers() function, current elogind creates the symlink in CGROUP root directory with its own smack label as below. lrwxrwxrwx. 1 root root System 11 Dec 31 16:00 cpu -> cpu,cpuacct dr-xr-xr-x. 4 root root * 0 Dec 31 16:01 cpu,cpuacct lrwxrwxrwx. 1 root root System 11 Dec 31 16:00 cpuacct -> cpu,cpuacct This patch fixes that bug by copying the smack label from the origin.
* Rename ELOGIND_CGROUP_CONTROLLER back to SYSTEMD_CGROUP_CONTROLLERSven Eden2017-03-14
| | | | | Although it is nice to have it read ELOGIND instead of SYSTEMD, all diffs just show too many irrelevant (false) positives.
* Add mounting of a name=elogind cgroup if no init controller is found.Sven Eden2017-03-14
| | | | | This is done for systems, which init systems are no cgroup controllers. One example is runit on Void Linux.
* Fixed gawk script for git-tar target.Sven Eden2017-03-14
| | | | | | | | | | | | | | | | | | | | | | | The previous variant was nice and sleek. But unfortunately, there are constructs like: #if 0 (... old code ...) #else (... alternative code for elogind ...) #endif // 0 These fragments couldn't be handled by the old code, but can by the new one. To make this work, the precompiler macros must be set like shown above. Apart from that, all lines like: /// Any doxygen one-line-comments with elogind in it are removed are removed, too. Please note the three slashes. And finally, all commented out #include directives are removed as well.
* Cleaned up more unneeded types and functions.Sven Eden2017-03-14
| | | | | | | | | | | | | | - src/shared/install.h - removed - src/basic/unit-name.[hc] - cleaned - src/core/cgroup.[hc] - cleaned - src/libelogind/libelogind.sym - cleaned - src/libelogind/sd-daemon/sd-daemon.c - cleaned - src/shared/acl-util.[hc] - cleaned - src/shared/bus-util.[hc] - cleaned - src/shared/output-mode.h - cleaned - src/shared/path-lookup.h - cleaned - src/systemd/sd-daemon.h - cleaned
* Add --enable-debug=elogind configure option and fix cgroup pathSven Eden2017-03-14
| | | | | | | a) Add some debugging messages to track what's going on with eloginds cgroup handling. b) Do not create a cgroup path "/elogind" if our cgroup root is already "/elogind".
* Remove src/basic/special.h, as all defines in there are systemd-only.Sven Eden2017-03-14
|
* [Patch 2/3] Add cgroups initialization and handlingSven Eden2017-03-14
| | | | | Add a highly reduced src/core/cgroup.[hc] to enable elogind to setup cgroups for proper usage.
* Remove obsolete headers and the src/core directory.Sven Eden2017-03-14
|
* Prep v221: Some more cleanup and a few fixesSven Eden2017-03-14
| | | | | | | | | The files - src/core/org.freedesktop.systemd.policy.in.in and - src/core/systemd.pc.in have been deleted as they are not needed. The other changes are some minor fixes.
* Prep v221: Update and clean up build system to sync with upstreamSven Eden2017-03-14
| | | | | | | | | | | | | | This commit replays the moving around of source files that have been done between systemd-219 and systemd-221. Further the Makefile.am is synchronized with the upstream version and then "re-cleaned". A lot of functions, that are not used anywhere in elogind have been coated into #if 0/#endif directives to further shorten the list of dependencies. All unneeded files have been removed.
* Remove src/coreAndy Wingo2015-04-19
|
* Compiling.Andy Wingo2015-04-08
|
* Remove SysV compatAndy Wingo2015-04-08
|
* mount: fix up wording in the commentMichal Sekletar2015-04-01
|
* mount: don't run quotaon only for network filesystemsLukas Nykryn2015-04-01
| | | | | | If you have for example ext4 on iscsi devices it is possible to setup qoutas there. Unfortunately, because such fstab entry contains _netdev, systemd will not add dependency to quotaon.service.
* nspawn: change filesystem type from "bind" to NULL in mount() syscallsIago López Galeiras2015-03-31
| | | | Try to keep syscalls as minimal as possible.
* core: make SELinux enable/disable check symmetricZbigniew Jędrzejewski-Szmek2015-03-21
| | | | | | | | | | We'd use the generic check for disable, and a unit-file-specific one for enable. Use the more specific one both ways. systemd[1]: SELinux access check scon=system_u:system_r:systemd_timedated_t:s0 tcon=system_u:system_r:init_t:s0 tclass=system perm=disable path=(null) cmdline=/usr/lib/systemd/systemd-timedated: -13 systemd[1]: SELinux access check scon=system_u:system_r:systemd_timedated_t:s0 tcon=system_u:object_r:systemd_unit_file_t:s0 tclass=service perm=enable path=/usr/lib/systemd/system/systemd-timesyncd.service cmdline=/usr/lib/systemd/systemd-timedated: -13 https://bugzilla.redhat.com/show_bug.cgi?id=1014315
* core/namespace: fix path sortingMichal Schmidt2015-03-16
| | | | | | | | | | | | | | | | | | | The comparison function we use for qsorting paths is overly indifferent. Consider these 3 paths for sorting: /foo /bar /foo/foo qsort() may compare: "/foo" with "/bar" => 0, indifference "/bar" with "/foo/foo" => 0, indifference and assume transitively that "/foo" and "/foo/foo" are also indifferent. But this is wrong, we want "/foo" sorted before "/foo/foo". The comparison function must be transitive. Use path_compare(), which behaves properly. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1184016
* core: Remove explicit Plymouth integrationJasper St. Pierre2015-03-16
| | | | | | | | | | | | | | | | | | | | | Even if plymouth is running, it might have not displayed the splash yet, so we'll see a few lines on fbcon when we should have otherwise had nothing. Plymouth integration was added to systemd in commit 6faa11140bf776cdaeb8d22d01816e6e48296971. That same day, Plymouth got systemd integration [0]. As such, the Plymouth integration has always been obsolete, and was probably only for older Plymouth's. But I can't imagine anybody running a Plymouth from 2011 with a systemd from 2015. Remove the Plymouth/systemd integration, and let Plymouth's code tell systemd to print the details. [0] http://cgit.freedesktop.org/plymouth/commit/?id=537c16422cd49f1beeaab1ad39846a00018faec1 Signed-off-by: Jasper St. Pierre <jstpierre@mecheye.net> Cc: Daniel Drake <dsd@endlessm.com> Cc: Ray Strode <rstrode@redhat.com>
* core: don't change removed devices to state "tentative"Martin Pitt2015-03-16
| | | | | | | | | | | | Commit 628c89c introduced the "tentative" device state, which caused devices to go from "plugged" to "tentative" on a remove uevent. This breaks the cleanup of stale mounts (see commit 3b48ce4), as that only applies to "dead" devices. The "tentative" state only really makes sense on adding a device when we don't know where it was coming from (i. e. not from udev). But when we get a device removal from udev we definitively know that it's gone, so change the device state back to "dead" as before 628c89c.
* Add (void) where we don't care about return valueZbigniew Jędrzejewski-Szmek2015-03-15
|
* core: remove useless debug messageZbigniew Jędrzejewski-Szmek2015-03-15
| | | | | | | | | | Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null) Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null) Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null) Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null) Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null) Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null) Mar 13 19:48:28 adam.happyassassin.net systemd[1]: Collecting (null)
* core: do not use quotes around virt and archZbigniew Jędrzejewski-Szmek2015-03-14
| | | | | Quotes are useful when the string can contain spaces or be otherwise confusing. Not possible with those two.
* core: remove left-over debug messageZbigniew Jędrzejewski-Szmek2015-03-14
|
* service: don't add After= dependencies on .busname units if kdbus support is ↵Michael Biebl2015-03-14
| | | | disabled
* core: check asprintf return valueZbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #1261729.
* core: print warning on invalid swap pri= fieldZbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #1264371.
* core: one more (void)Zbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #996308.
* core: explicitly ignore failure during cleanupZbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #1237550.
* core: don't wait for reply if writing to pipe failsZbigniew Jędrzejewski-Szmek2015-03-13
| | | | | | | This shouldn't really happen, but it's seems cleaner to continue on error. CID #1237552.
* core: either ignore or handle mount failuresZbigniew Jędrzejewski-Szmek2015-03-13
| | | | | | | | /dev/pts/ptmx is as important as /dev/pts, so error out if that fails. Others seem less important, since the namespace is usable without them, so ignore failures. CID #123755, #123754.
* Use space after a silencing (void)Zbigniew Jędrzejewski-Szmek2015-03-13
| | | | | We were using a space more often than not, and this way is codified in CODING_STYLE.
* core: ignore any issues with setting time on jobs_in_progress_event_sourceZbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #1237559.
* core: issue error on oom we can do nothing aboutZbigniew Jędrzejewski-Szmek2015-03-13
| | | | CID #1287142.
* tree-wide: there is no ENOTSUP on linuxDavid Herrmann2015-03-13
| | | | Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
* core: add missing words to my fix of explanation of associativityTom Gundersen2015-03-12
|
* core: fix cgroups-agent match for kdbusDavid Herrmann2015-03-11
| | | | | | On kdbus, we get cgroups-agent messages via the system bus, not the private systemd socket. Therefore, we must install the match properly or we will never receive cgroup notifications.