summaryrefslogtreecommitdiff
path: root/src/basic
Commit message (Collapse)AuthorAge
* Classify processes from sessions into cgroupsSven Eden2017-03-14
| | | | | | | Create a private cgroup tree associated with no controllers, and use it to map PIDs to sessions. Since we use our own path structure, remove internal cgroup-related helpers that interpret the cgroup path structure to pull out users, slices, and scopes.
* Remove src/basic/special.h, as all defines in there are systemd-only.Sven Eden2017-03-14
|
* Add poweroff, suspend etc. loginctl commandsSven Eden2017-03-14
| | | | | | | * src/login/loginctl.c: Add poweroff, reboot, suspend, hibernate, and hybrid-sleep commands. Normally these are handled by systemctl but since elogind is targeted at the no-systemd use case, we incorporate them here.
* Handle suspend, shutdown, reboot, etc within elogindSven Eden2017-03-14
| | | | | | | | | | | | | | | | | Since we are catching the keys, we might as well just do suspend/reboot/etc handling here. * configure.ac: Get paths of halt and reboot. * Makefile.am (systemsleepdir, systemshutdowndir): New variables. Look in them for hooks to run. * src/login/logind-action.c: Inline the salient bits from systemd's sleep/sleep.c here. * src/login/logind-dbus.c (execute_shutdown_or_sleep): Call our own shutdown_or_sleep helper instead of invoking a systemd method. * src/login/logind-action.h: Declare shutdown_or_sleep.
* [Patch 3/3] Add cgroups initialization and handlingSven Eden2017-03-14
| | | | | Let elogind setup cgroups support on its manager initialization and free the cgroups subsystem when the manager is destroyed.
* Remove obsolete headers and the src/core directory.Sven Eden2017-03-14
|
* Remove APPARMOR, BLKID and SECCOMP checks and feature.Sven Eden2017-03-14
| | | | | Remove logind check, it is always built as elogind anyway. Remove ENABLE_LOGIND conditional from man pages.
* Remove libidn featureSven Eden2017-03-14
|
* Remove ELFUTILS, GCRYPT, GNUTLS, IMA, LIBAUDIT, LIBCRYPTSETUP,Sven Eden2017-03-14
| | | | LZ4 and XZ features from build.h
* Fix lookup_errno by adding a gperf length parameter detection.Sven Eden2017-03-14
| | | | | | | | | build-sys: add check for gperf lookup function signature (#5055) gperf-3.1 generates lookup functions that take a size_t length parameter instead of unsigned int. Test for this at configure time. Fixes: https://github.com/systemd/systemd/issues/5039
* Remove kmodSven Eden2017-03-14
|
* Remove SysV compatSven Eden2017-03-14
|
* Remove utmp stuff that has found it's way back in.Sven Eden2017-03-14
|
* Prep v226: Mask all unneeded functionsSven Eden2017-03-14
|
* Prep v226: Add src/basic/copy.[hc] to libbasic, the function copy_bytes() is ↵Sven Eden2017-03-14
| | | | needed by pager.c
* Prep v220: Fix src/basic/time-util.h, unmask timezone_is_valid, mask ↵Sven Eden2017-03-14
| | | | unneeded functions.
* Prep v226: Apply missing fixes and changes to src/basicSven Eden2017-03-14
|
* cgroup: when comparing agent paths, use path_equal()Lennart Poettering2017-03-14
| | | | | After all a path is a path is a path and we should use path_equal() to comapre those.
* audit: audit calls should return ENODATA when process are not in an audit ↵Lennart Poettering2017-03-14
| | | | | | | session ENODATA is how we usually indicate such "missing info" cases, so we should do this here, too.
* util: add new uid_is_valid() callLennart Poettering2017-03-14
| | | | | | This simply factors out the uid validation checks from parse_uid() and uses them everywhere. This simply verifies that the passed UID is neither 64bit -1 nor 32bit -1.
* cgroup: don't allow hidden cgroupsLennart Poettering2017-03-14
| | | | We really should care for all cgroups, and not allow hidden ones.
* cgroup: never migrate kernel threads out of the root cgroupLennart Poettering2017-03-14
| | | | It won't work anyway.
* set: return NULL on destructorsLennart Poettering2017-03-14
| | | | Like we do it pretty much everywhere else.
* extract_first_word: Refactor EXTRACT_DONT_COALESCE_SEPARATORS handlingFilipe Brandenburger2017-03-14
| | | | | | | | | | | | | | Refactor allocation of the result string to the top, since it is currently done in both branches of the condition. Remove unreachable code checking for EXTRACT_DONT_COALESCE_SEPARATORS when state == SEPARATOR (the only place where SEPARATOR is assigned to state follows a check for EXTRACT_DONT_COALESCE_SEPARATORS that jumps to the end of the function.) Tested by running test-util successfully. Follow up to: 206644aedeb8859801051ac170ec562c6a113a79
* extract_first_word: Refactor allocation in empty argument caseFilipe Brandenburger2017-03-14
| | | | | | | | | | | | This covers the case where an argument is an empty string, such as ''. Instead of allocating the empty string in the individual conditions when state == VALUE, just always allocate it at the end of state == START, at which point we know we will have an argument. Tested that test-util keeps passing after the refactor. Follow up to: 14e685c29d5b317b815e3e9f056648027852b07e
* util: make malloc0 ask calloc for one block of size nThomas Hindoe Paaboel Andersen2017-03-14
| | | | | | ... instead of an array of n individual bytes. Silences a lot of warnings in smatch.
* process-util: trivial optimizationLennart Poettering2017-03-14
|
* util: treat 'C' and 'POSIX' locale identicalLennart Poettering2017-03-14
|
* basic: document that people shouldn't use refcnt.h without reasonLennart Poettering2017-03-14
| | | | | | | refcnt.h only exists for cases where objects are simultaneously handled by different threads. Otherwise it should not be used. The only case where this applies is sd_bus, really, and pretty much none of our APIs, since we do not claim thread-safety for them.
* Prep v225: Added needed udev support and re-enabled some masked cgroup ↵Sven Eden2017-03-14
| | | | functions.
* Prep v225: Applying various fixes and changes to src/basic that got lost ↵Sven Eden2017-03-14
| | | | during git am transfer.
* Use getxpid syscall on alpha for raw_getpid()Matt Turner2017-03-14
| | | | | Alpha does not have a getpid syscall, but rather has getxpid to match OSF/1.
* basic: add LIST_INSERT_BEFOREAlex Crawford2017-03-14
| | | | | | Similar in function to LIST_INSERT_AFTER, this will insert a new element into the list before the specified position. If the specified position is NULL, the element is added as the tail of the list.
* terminal-util: no real reason to assert on O_CREATLennart Poettering2017-03-14
| | | | That's just handle this as a normal error.
* terminal-util: when resetting terminals, don't wait for carrierLennart Poettering2017-03-14
| | | | | | | | | | | | In case of non-CLOCAL lines (i.e. those with carrier detect configured) we shouldnt wait for a carrier if all we try to do is reset the TTY. Hence, whenever we open such a TTY pass O_NONBLOCK. Note that we continue to open ttys we intend to write to without O_ONBLOCK, we only add it in cases we invoke ioctl()s or other terminal operations without reading or writing to the device. Fixes #835.
* smack-util: revise smack-util apis and add read smack attr apisWaLyong Cho2017-03-14
| | | | | | | | - Add smack xattr lookup table - Unify all of mac_smack_apply_xxx{_fd}() to mac_smack_apply() and mac_smack_apply_fd(). - Add smack xattr read apis similar with apply apis as mac_smack_read{_fd}().
* Prep v224: Major cleanup of unneeded functions and some source files.Sven Eden2017-03-14
|
* Prep v224: Cleaned up src/basic/util.[ch]Sven Eden2017-03-14
| | | | | | | This lead to the deletion of src/basic/device-nodes.h and src/basic/env-util.h. Both are not needed by elogind. Further removed the superfluous src/boot/efi/disk.[ch]
* Prep v220: Updated src/basic/missing.h to upstream version.Sven Eden2017-03-14
|
* Prep v222: Update build system:Sven Eden2017-03-14
| | | | | | | | - The content of the man pages directory has been overhauled - Makefile-man.am was regenerated - Makefile.am and configure.ac needed a few addtitions and fixes - Some masked functions had to be unmasked - Now superfluous files have been removed
* 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.