aboutsummaryrefslogtreecommitdiff
path: root/src/rc
AgeCommit message (Collapse)Author
2015-12-02Use systype variable for rc_sys callWilliam Hubbs
2015-11-12Implement "want" dependencyIan Stakenvicius
The want dependency is similar to the use dependency. If a service script, for example called service1, adds "want service2" to its depend function, OpenRC will attempt to start service2, if it exists on the system, when service1 is started. However, service1 will start regardless of the status of service2. X-Gentoo-Bug: 406021 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=406021
2015-11-11Standardize macro tests for gnu hurdBenda Xu
This also fixes breakage of GNU/hurd builds introduced by commit 3f82edbeb92.
2015-10-13mountinfo: make sure the netdev variable is initialized on LinuxWilliam Hubbs
This fixes the following regression: X-Gentoo-Bug: 562668 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562668
2015-10-05mountinfo: fix --netdev and --nonetdev on LinuxWilliam Hubbs
On Linux, the --netdev and --nonetdev switches were not working. They were both returning false. After this change, they operate based on the presence or abscence of the _netdev option in mount options.
2015-10-04mountinfo: read /proc/self/mounts instead of /proc/mounts on LinuxWilliam Hubbs
2015-09-17openrc-run: rename some dependency variables and a function for clarityWilliam Hubbs
All of the dependency type lists had the types_ prefix in their names; this has been changed to deptypes_ to make them more self documenting. Along the same lines, the setup_types function was renamed setup_deptypes.
2015-08-02mountinfo: fix -e and -E optionsWilliam Hubbs
Add the -e and -E options to getoptstring so they are recognized.
2015-07-23Add EERROR_QUIET and EINFO_QUIET to environment whitelistWilliam Hubbs
2015-04-27convert all references from runscript to openrc-runWilliam Hubbs
2015-04-24start-stop-daemon: redirect stdin if --background option is usedWilliam Hubbs
X-Gentoo-Bug: 498684 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=498684
2015-03-25checkpath: Remove the last HAVE_SELINUX testWilliam Hubbs
2015-03-25selinux: unconditionally include the header and provide stub methodsWilliam Hubbs
If selinux is disabled, then stub methods will be provided instead of calling the real methods. This removes some warnings about unused parameters which used to be covered up with #ifdef HAVE_SELINUX. Signed-off-by: Jason Zaman <jason@perfinion.com>
2015-03-24checkpath: fix warning about selinux_on being unusedWilliam Hubbs
2015-03-24Fix some compiler warningsDoug Freed
librc: Fix C90 warning (mixed declaration and code) rc: Fix warning about discarding const qualifier Fixes #45.
2015-03-24start-stop-daemon: Fix regression for --testWill Miles
The previous fix to --test (PR #34) prevented reading one too many arguments when --exec -or --name was not specified, but created a regression where the last argument would not print if either of those arguments was specified. This corrects the issue. Fixes #41.
2015-02-19checkpath: do not chown or chmod symbolic linksWilliam Hubbs
This is another security fix. If you use chown() or chmod() on a symbolic link, it affects the referenced file, not the symbolic link itself. X-Gentoo-Bug: 540006 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=540006
2015-02-15typo fixWilliam Hubbs
2015-02-15checkpath: security fix for -m and -o optionsWilliam Hubbs
Do not change permissions on the target if it is a file and has multiple hard links. This is necessary because a hard link can be an attack vector to gain privilege escalation. X-Gentoo-Bug: 540006 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=540006
2015-01-24Prioritize local includes and librariesWill Miles
This fixes #35.
2015-01-22Fix off-by-one error in --test argument printout in start-stop-daemon.Will Miles
Fixes #34.
2014-12-05rename git.mk to gitver.mkWilliam Hubbs
This is a more descriptive name since this file only sets the gitver variable.
2014-11-03Integrate the functionality from runscript_selinux.soJason Zaman
runscript used to dlopen() runscript_selinux.so. This adds equivalent functionality directly in to runscript instead. It authenticates with either PAM or shadow and optionally has a dep on audit. X-Gentoo-Bug: 517450 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=517450
2014-10-23helpers.h, start-stop-daemon.c: remove uneeded macrosAnthony G. Basile
TAILQ_CONCAT, TAILQ_FOREACH_SAFE and LIST_FOREACH_SAFE are defined in our bundled queue.h and are no longer required.
2014-10-23Bundle <sys/queue.h> from NetBSDAnthony G. Basile
We are bundling this to allow building on musl-based systems since musl does not include <sys/queue.h>.
2014-10-23Fix all tests for GNU/kFreeBSDWilliam Hubbs
It is necessary to check for both the kernel and c library because __FreeBSD_kernel is also defined on native FreeBSD [1]. [1] http://sourceforge.net/p/predef/wiki/OperatingSystems/
2014-10-23fix defines for GNU/HurdSvante Signell
2014-10-22Fix GNU/kFreeBSD portSvante Signell
Check for __FreeBSD_kernel instead of __GLIBC__ in source files. note from William Hubbs: I was told this is a better check for GNU/kFreeBSD than checking the C library the source is being compiled against. GNU/kFreeBSD than checking which library we are using.
2014-09-20typo fixWilliam Hubbs
2014-08-11Show rc and runscript deprecation warnings in verbose modeWilliam Hubbs
These messages are being changed for this release to show in verbose mode because of the number of times they display.
2014-07-28checkpath: apply ownership to all paths given on command lineWilliam Hubbs
The stat structure was not being initialized correctly in do_check. This was causing the owner adjustment to be skipped if the first path had the correct owner. Also, the "correcting owner" message should always be printed when the owner is being changed. X-Gentoo-Bug: 518042 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=518042
2014-07-25checkpath: style fixWilliam Hubbs
2014-07-19src/rc/Makefile: typo fixWilliam Hubbs
2014-07-17rc-status: fix infinite loop when using stacked runlevelsWilliam Hubbs
Remove the recursive call in print_stacked_services which was causing an infinite loop when using stacked runlevels. I would like to thank Doug Freed and Jason Zaman for assisting with tracking this down. X-Gentoo-Bug: 514972 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=514972
2014-07-16move the selinux_setup function into rc-selinuxJason Zaman
X-Gentoo-Bug: 516956 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-16checkpath: style fixesWilliam Hubbs
2014-07-16style fixesWilliam Hubbs
2014-07-16Rename SELinux source filesWilliam Hubbs
The name rc-selinux-util.* is a bit long, so I renamed the source files to rc-selinux.* X-Gentoo-Bug: 516956 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-16checkpath: restore the SELinux contextJason Zaman
X-Gentoo-Bug: 516956 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-13checkpath: fix logic for the writable optionWilliam Hubbs
The -W option does not need an argument of its own; it can take the first path after all other options are processed on the command line. Also, move the processing for the -W option out of the switch so it will be in the same loop as the other processing.
2014-07-11checkpath: fix error message in previous commitWilliam Hubbs
2014-07-11checkpath: report an error if required options were not specifiedWilliam Hubbs
Before this commit, not specifying -d, -f, -p or -W in a checkpath command meant the command exited successfully but actually did nothing. This is an error condition, so report it as such.
2014-01-18fstabinfo: fix mount and remountWilliam Hubbs
The mount and remount options should always be processed. They were only being processed if -q was not on the command line. X-Gentoo-Bug: 498206 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=498206
2014-01-13rc-update: add option to remove a service from all runlevelsBenda Xu
The -a option,which only applies to the del command, is used to remove a service from all runlevels. X-Gentoo-Bug: 497740 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=497740
2013-12-29Rename runscript to openrc-runWilliam Hubbs
This was requested by Debian, because the minicom software, which is available on Debian and other distros, has a binary named runscript. We are keeping a backward compatibility symlink for now, but this allows Debian or any other distro to safely remove the symlink. X-Gentoo-Bug: 494220 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=494220
2013-12-13add openrc binary to ignore patternsWilliam Hubbs
2013-12-13runscript: clarify the message wrt schedulingWilliam Hubbs
The message about a service being scheduled to start was confusing to some of our users; I was told this wording is more clear. X-Gentoo-Bug: 493070 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=493070
2013-12-12Rename the rc binary to openrcWilliam Hubbs
Debian requested this rename due to the "rc" binary conflicting with the "rc" binary from the plan 9 shell. We also add a deprecation warning to the binary when it is run as rc to encourage users to switch to openrc instead. X-Gentoo-Bug: 493958 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=493958
2013-12-01rc-update: make "service already installed" message informationalWilliam Hubbs
This message was being sent to stderr, and it should be sent to stdout since it is informational. This change was requested by zero_chaos.
2013-10-30Begin port to GNU/kFreeBSDSteven Chamberlain
This is just a minimal port to get Debian up and running; the rest will be done later.