Summary: | openrc doesn't check for stat return value and assume success | ||
---|---|---|---|
Product: | Gentoo Hosted Projects | Reporter: | nobody <noreply> |
Component: | OpenRC | Assignee: | OpenRC Team <openrc> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/OpenRC/openrc/blob/master/src/rc/rc-misc.c#L383 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
nobody
2018-01-02 10:25:06 UTC
There isn't enough information in this report for me to determine where the issue is. Which version of OpenRC are you using? Also, you mention line 384 without saying which file it is in. Is the issue still in the master branch at https://github.com/openrc/openrc? Thanks, William I gave the link in the url section of the bug section ;) here it is again: https://github.com/OpenRC/openrc/blob/master/src/rc/rc-misc.c#L383 You may also fix that https://github.com/OpenRC/openrc/commit/918d955fd2de1f594b83508f5ddd5271534e3591 The commit change use of chown to lchown, but forget to change chown to lchown in the error message So as tiny as it is, the error message should reflect it use lchown now and no more chown, because lchown will at least return an error lchown generate that chown doesn't : when the file is a symlink, and it will be clearer to see the error code is the one return from lchown instead of chown. < eerror("%s: chown: %s", applet, strerror(errno)); > eerror("%s: lchown: %s", applet, strerror(errno)); The below linked commits take care of these issues. https://github.com/openrc/openrc/commit/4af5a80b https://github.com/openrc/openrc/commit/87c98ebb In the future, please open separate bugs for un-related issues like this. Thanks much. William I have estimate the second fix was so tiny it wasn't worth another bug for that. I will do things properly. Thank you for your attention and the fixes Mr. Hubbs |