aboutsummaryrefslogtreecommitdiff
path: root/src/shared/misc.c
AgeCommit message (Collapse)Author
2023-10-19openrc: rework pathing functionsAnna (navi) Figueiredo Gomes
this simplifies the allocation of path string. also fixes some memory leaks from the ealier commit also changes the log path for users to XDG_CACHE_HOME, default ~/.cache/openrc Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
2023-10-19openrc-pam: introduction of a PAM module for --userAnna (navi) Figueiredo Gomes
the module gets the pam user and executes a new login shell, in order to load the user's environment. this requires that the user's login shell supports `-c` as an option to run a command. all shells that i know of do. Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
2023-10-19openrc: Add support for user services.Anna (navi) Figueiredo Gomes
Modifies many functions where filesystem paths were hardcoded. In non-user-services mode, they still are. In user-services mode, they are allocated, since XDG_ dirs are to be set via environment variables. Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
2023-09-12misc: add syscall fallback for close_range for musl libcNatanael Copa
Add fallback for the close_range syscall wrapper. This is needed for musl libc, which currently does not have a close_range wrapper. Also set errno on errors.
2023-09-12misc: add cloexec_fds_from() helper functionNatanael Copa
Move logic to set file descriptors to a cloexec_fds_from() function in misc.c so it can be shared by both supervisor-daemon and start-stop-daemon, and hide the details behind.
2023-04-24openrc-run: silence lock failures with --no-depsDominique Martinet
work around scary warnings described in previous commit
2023-01-29shared: missing includes from IWYUSam James
2022-05-08shared/misc.c: free env_allow if returning early from env_filterSam James
Signed-off-by: Sam James <sam@gentoo.org>
2022-04-06migrate fully to meson build systemWilliam Hubbs
- drop old build system - move shared include and source files to common directory - drop "rc-" prefix from shared include and source files - move executable-specific code to individual directories under src - adjust top-level .gitignore file for new build system This closes #489.