aboutsummaryrefslogtreecommitdiff
path: root/src/rc/openrc-run.c
AgeCommit message (Collapse)Author
2018-12-27fix leading whitespacephilhofer
Clean up code indented with mixed tabs and spaces. No actual code changes. This fixes #280.
2018-12-27fix potential out-of-bounds readsphilhofer
readlink(3) does not nul-terminate the result it sticks into the supplied buffer. Consequently, the code rc = readlink(path, buf, sizeof(buf)); does not necessarily produce a C string. The code in rc_find_pid() produces some C strings this way and passes them to strlen() and strcmp(), which can lead to an out-of-bounds read. In this case, since the code already takes care to zero-initialize the buffers before passing them to readlink(3), only allow sizeof(buf)-1 bytes to be returned. (While fixing this issue, I fixed two other locations that used the same problematic pattern.) This fixes #270.
2018-12-23src/rc/openrc-run.c: remove duplicate statementphilhofer
The statement ll = strlen(applet); appears twice in the same block without any intervening assignment to the variables 'll' or 'applet' Remove the second (duplicate) statement.
2018-05-15openrc-run: respect the RC_NODEPS environment variableWilliam Hubbs
2018-05-14openrc-run: respect the IN_DRYRUN environment variableWilliam Hubbs
This allows rc-service to pass the tryrun option to openrc-run. This is for #225.
2018-03-01openrc-run: fix memory size (#213)Chris Cromer
Fixes #212
2018-02-21openrc-run: clean up a compiler warningWilliam Hubbs
2018-02-15openrc-run: clean up string handlingWilliam Hubbs
- remove references to PATH_MAX - use xasprintf to create strings
2016-09-30openrc-run: fix double freeDoug Freed
2016-08-25openrc-run: make runscript warning respect quiet optionWilliam Hubbs
X-Gentoo-Bug: 591414 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=591414
2016-07-14Remove the DEBUG_MEMORY macroWilliam Hubbs
This fixes #43.
2016-05-24Make deprecation warnings for rc and runscript more visibleWilliam Hubbs
These warnings were inserted in verbose only mode in OpenRC-0.13.A Now, we are making them more visible in preparation for removing these compatibility binaries in the future.
2016-05-04openrc-run: clean up runscript deprecation messageWilliam Hubbs
2016-01-22add back deprecation warnings lost during refactoringWilliam Hubbs
2016-01-20openrc-run: in verbose mode, log execution of the shell scriptWilliam Hubbs
This is to show when openrc-run runs the openrc-run.sh script; it is used for debugging.
2016-01-12Remove multicall binary structure from OpenRCWilliam Hubbs
This eliminates the need for the selinux-specific wrapper scrript we were installing in /lib*/rc/{bin,sbin}.
2015-12-21Convert OpenRC to a centralized copyright/license structureWilliam Hubbs
In the past, OpenRC was a hybrid of a centralized and file-scope license/copyright structure. I followed the instructions from the Software Freedom Law Center [1] to convert to a Centralized structure where possible, for easier future maintenance. [1] https://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html
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-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-04-27convert all references from runscript to openrc-runWilliam Hubbs