aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-31define the pam directory at the top levelWilliam Hubbs
2021-12-31remove a tabWilliam Hubbs
2021-12-30fix libkvm dependency for *bsdWilliam Hubbs
2021-12-30fix filename in FreeBSD meson buildWilliam Hubbs
2021-12-30use meson in cirrus ciWilliam Hubbs
2021-12-30build: always add subdirsWilliam Hubbs
2021-12-29remove separate pam directoryWilliam Hubbs
2021-12-29build: rename sh_dir variable to rc_shdirWilliam Hubbs
2021-12-23capabilities: Add support for Linux capabilities(7)LinkTed
This adds capabilities for start-stop-daemon by adding --capabilities option. As a result, the user can specify the inheritable, ambient and bounding set by define capabilities in the service script. This fixes #314.
2021-12-22add option for OOM score adjustmentMatt Whitlock
This commit adds a new --oom-score-adj option to start-stop-daemon and supervise-daemon, as well as an equivalent SSD_OOM_SCORE_ADJ environment variable. If either of these are specified (with the command-line option taking precedence), then the specified adjustment value is written to /proc/self/oom_score_adj after forking but prior to exec'ing the daemon (at the time when nice and ionice are applied). Additionally, per a suggestion by Mike Frysinger, the suggested values for the SSD_NICELEVEL, SSD_IONICELEVEL, and SSD_OOM_SCORE_ADJ variables in the example config file are now given as zeros, which are the kernel's default values of these process knobs for the init process at boot. Note that uncommenting any of these zero-valued suggestions will cause SSD/SD to set the corresponding process knob affirmatively to zero, whereas leaving the variable unset (and the equivalent command- line option unspecified) means SSD/SD will not change the corresponding process knob from its inherited value. See: https://github.com/OpenRC/openrc/pull/435#discussion_r688310672 This fixes #435.
2021-12-21start-stop-daemon: fix typo in error messageMatt Whitlock
2021-12-21broadcast: fix compiler warningsMike Frysinger
Newer gcc reports: broadcast.c: In function 'broadcast': broadcast.c:132:15: warning: variable 'tp' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered] 132 | FILE *tp; Move the storage off the stack to avoid. This makes the function not safe for multithread use, but we don't do that anywhere, so who cares!
2021-12-21code style: remove space after unary "not" operatorMatt Whitlock
There are no semantic changes in this commit. Suggested-by: Mike Frysinger <vapier@gentoo.org> See: https://github.com/OpenRC/openrc/pull/435#pullrequestreview-727035394
2021-12-20 supervise runsvdir daemonAaditya Bagga
This fixes #254.
2021-12-20use HEAD in git URIs to point to the default branchMike Frysinger
This makes the URIs shorter and dynamic: whatever the default branch the repo uses will be used.
2021-12-20drop unused copyright variablesMike Frysinger
The existing copyright notices in the file headers cover these vars.
2021-12-20change getopt definition to elide pointer storageMike Frysinger
Make this a const pointer to the storage directly instead of a pointer variable that points to the storage. Makes the code slightly smaller.
2021-12-12remove extra fileWilliam Hubbs
2021-12-12net-online: add missing sleep 1 in ping loopiucoen
Currently the ping loop instantly times out because timeout is decremented by 1 without actually going to sleep. This fixes #480.
2021-12-12rc-status: fix uptime types and simplifyDoug Freed
This fixes #484. This fixes #483.
2021-12-07killprocs: add kill_delay settingWilliam Hubbs
This allows containers using OpenRC based services to be configured to allow open tcp connections to be closed before they are shut down. This fixes #476.
2021-11-28support/init.d.examples: Do not use @PKG_PREFIX@ in service examplesWilliam Hubbs
I can't think of a reason to do this since these scripts are just examples. This is for #474.
2021-11-28build: set rootprefix_default to /usr if on a /usr merged systemWilliam Hubbs
This requires at leaste meson 0.53.0 since it uses the fs module. This is for #474.
2021-11-27meson: fallback to libcrypt detection outside of pkg-configSam James
Much like PAM, not all implementations of libcrypt provide a pkg-config file, and hence we can't find it using the old logic. Let's fall back to the standard AC_SEARCH_LIBS-style check if the pkg-config-style detection fails. This fixes finding e.g. musl's libcrypt. X-Gentoo-Bug: 827074 X-Gentoo-Bug-URL: https://bugs.gentoo.org/827074
2021-11-27src/rc/rc-selinux.c: fix use of deprecated security_context_tSam James
It's only a char* and has been deprecated upstream [0]. [0] https://github.com/SELinuxProject/selinux/commit/7a124ca27581 Fixes: #478
2021-11-27meson: only find libcrypt if SELinux and no PAMSam James
We only need libcrypt if we're building _with_ SELinux and _without_ PAM. We don't use libcrypt for general SELinux with PAM. This is mostly a correctness change as libcrypt should generally be available (as opposed to the previous change which fixed some real-world cases). Fixes: f3f0fde861b438c80f99afdd49fe175e9d0a68ca Fixes: #478
2021-11-20meson: link against libcrypt for SELinux if no PAMSam James
We use libcrypt's crypt() if we're _not_ using PAM in the SELinux code (rc-selinux, specifically). X-Gentoo-Bug: 824954 X-Gentoo-Bug-URL: https://bugs.gentoo.org/824954 Fixes: https://github.com/openrc/openrc/pull/477
2021-11-20meson: fix pam_misc_dep definitionSam James
X-Gentoo-Bug: 824954 X-Gentoo-Bug-URL: https://bugs.gentoo.org/824954 Fixes: https://github.com/OpenRC/openrc/issues/470 Fixes: https://github.com/OpenRC/openrc/pull/477
2021-11-12src/librc/librc-daemon.c: add missing include for kill (fix uclibc)Sam James
Fixes: #471 Fixes: #473
2021-11-12src/librc/librc-misc.c: add missing include for fileno (fix uclibc)Sam James
Fixes: #471 Fixes: #473
2021-11-12Added missing comma in openrc/src/rcEric Turgeon
Clang was failing with: ``` /zroot/jenkins/workspace/update_ghsotbsd-13_poudriere_jail/sbin/openrc/../../contrib/openrc/src/rc/rc.c:70:2: error: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Werror,-Wstring-concatenation] "when leaving single user or boot runlevels", ^ /zroot/jenkins/workspace/update_ghsotbsd-13_poudriere_jail/sbin/openrc/../../contrib/openrc/src/rc/rc.c:69:2: note: place parentheses around the string literal to silence warning "override the next runlevel to change into\n" ^ ``` This fixes #469.
2021-11-12openrc-init: fix build for selinuxWilliam Hubbs
X-Gentoo-Bug: 821520 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=821520
2021-11-06build: pam fixWilliam Hubbs
Set the HAVE_PAM option if the dependency is found *and* pam is requested. X-Gentoo-Bug: 821211 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=821211
2021-10-15fix permission of installed version fileWilliam Hubbs
2021-10-15 Use cgroup.kill in cgroup_cleanup when possibleAidan Harris
The old code is moved to a cgroup_fallback_cleanup function and only called if cgroup2_kill fails. This fixes #454.
2021-10-14init.d/s6-svscan.in: make sure $command existsKerin Millar
While the s6-svscan runscript belongs to OpenRC, the user is required to install s6 before it can actually be used, potentially leading to confusion. Check for the existence of $command in start_pre and, if it does not exist, bail out with an error that makes this observation. X-Gentoo-Bug: 816978 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=816978
2021-10-09separate github actions based on OSWilliam Hubbs
This fixes #466.
2021-10-08add github action to build on several linux platformsSam James
This github action runs a build on each of the following platforms on a push or pull request. - Ubuntu LTS with gcc and glibc - Ubuntu LTS with clang and glibc - Alpine with gcc and musl This fixes #463.
2021-10-08selinux build fixWilliam Hubbs
2021-10-08fix bug in pam build testsWilliam Hubbs
2021-10-08.cirrus.yml: update FreeBSD imagesSam James
2021-10-08support older pam versionsWilliam Hubbs
Some distros are still using versions of pam which do not create *.pc files, so we need fallback logic for that situation.
2021-10-07checkpath: fix allocation size of path bufferSam James
strlen's return value isn't enough to be used directly for (x)malloc; it doesn't include the null byte at the end of the string. X-Gentoo-Bug: 816900 X-Gentoo-Bug-URL: https://bugs.gentoo.org/816900 Fixes: #459 Fixes: #462
2021-10-04fix build for selinuxWilliam Hubbs
2021-10-02build: fix pam and pam_misc dependenciesWilliam Hubbs
Pam generates pkgconfig files now, so meson can use them to find the pam dependencies.
2021-09-21move rc_bindir and rc_sbindir definitions to the top levelWilliam Hubbs
2021-09-21build: fix rootprefixWilliam Hubbs
This fixes #438.
2021-09-18link runscript with auditWilliam Hubbs
2021-09-18link openrc-run with audit and libpam_miscWilliam Hubbs
2021-09-15fix agetty can be start directlyhosxy
This fixes #320.