aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-07start-stop-daemon: remove rc-prefix from file namesWilliam Hubbs
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.
2022-03-31init.d/seedrng.in: fix rc_yesno typoSam James
This fixes #512.
2022-03-31Add clangd support for developmentLinkTed
This fixes #502.
2022-03-30seedrng: remove environment variablesJason A. Donenfeld
Now that we have the command line arguments, there's no need for the environment variables. This fixes #511.
2022-03-30init.d/urandom.in: drop the use of the psz variableWilliam Hubbs
Since this service is now *bsd only, we don't need to worry about reading this value from /proc/sys.
2022-03-30add seedrng service for LinuxWilliam Hubbs
This moves urandom to *bsd only and adds seedrng as a separate service for Linux. This fixes #510
2022-03-30seedrng.c: multiple cleanupsWilliam Hubbs
This fixes #508.
2022-03-29seedrng: clean up fds and avoid -1 close on exit (#509)Jason A. Donenfeld
This cleans up the exit path a little bit. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-03-26Use seedrng for seeding the random number generatorJason A. Donenfeld
The RNG can't actually be seeded from a shell script, due to the reliance on ioctls. For this reason, the seedrng project provides a basic script meant to be copy and pasted into projects like OpenRC and tweaked as needed: https://git.zx2c4.com/seedrng/about/ This commit imports it into OpenRC and wires up /etc/init.d/urandom to call it. It shouldn't be called by other things on the system, so it lives in rc_sbindir. Closes #506. Closes #507. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-03-05Add Posix Scheduling Support to start-stop-daemon (#497)sad-goldfish
2022-03-05switch 0x100 constants to enumsMike Frysinger
This should make the code easier to maintain without having to remember what the exact 0x100 constant means.
2022-03-05switch 0x80 to 0x103 for long optionsMike Frysinger
We use 0x100+ to avoid collisions in the 8 bit getopt interface, so switch 0x80 to align with the other existing 0x100 options we have.
2022-03-05Use consistent args passing in start-stop-daemonLinkTed
2022-03-05Fix indentation in the meson.build fileLinkTed
2022-03-05Add newline for `want`Cat Lee Ball
The comment block for `want` seemed to be unintentionally part of the `use` block. Added a newline so `want` will have its own section.
2022-02-06add GH action to leverage coverity scanMike Frysinger
2022-02-06linux: Add support for No New Privs flagLinkTed
This add No New Privs flag for start-stop-daemon and supervise-daemon by adding --no-new-privs flag. As a result, the user set the No New Privs flag for the program should run with. see PR_SET_NO_NEW_PRIVS prctl(2)
2022-02-06capabilities: Add support for securebits flagsLinkTed
This adds securebits flags for start-stop-daemon and supervise-daemon by adding --secbits option. As a result, the user can specify securebits the program should run with. see capabilities(7)
2022-01-30init.d/devfs: default mount /dev noexecomnivagant
2022-01-30init.d/bootmisc.in: prevent error due to nonexistant fileDermot Bradley
During boot if the "previous_dmesg" setting is enabled in /etc/conf.d/bootmisc then during the 1st boot of a machine the bootmisc init.d script will attempt to move a nonexistant dmesg file, so generating an error on the console. Modify the script to only move an existing file.
2022-01-26rc-misc.c: Allocate memory for 'file'Matt Turner
This is a partial revert of commit 8e02406d ("rc-misc.c: remove references to PATH_MAX"), which changed 'file' to a null pointer with no associated storage. ../openrc-0.44.10/src/rc/rc-misc.c: In function ‘_rc_deptree_load’: ../openrc-0.44.10/src/rc/rc-misc.c:392:33: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 392 | eerror("Clock skew detected with `%s'", file); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 8e02406d ("rc-misc.c: remove references to PATH_MAX") Closes: #493
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