-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
conmon: chmod std files pipes #112
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
src/conmon.c
Outdated
|
||
if (slavefd_stderr < 0) | ||
slavefd_stderr = slavefd_stdout; | ||
if (dup2(slavefd_stderr, STDERR_FILENO) < 0) | ||
pexit("Failed to dup over stderr"); | ||
if (fchmod(STDERR_FILENO, 0777) < 0) | ||
nwarn("Failed to chown stdout"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likely copy-paste error, shouldn't the error message read "Failed to chown stderr"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for noticing it! Yeah it was a copy-paste error
make sure every user inside of the container can use the standard files. Without the chmod, only root in the container would be able to print to stdout. It went unnoticed with runc, as runc itself corrects these permissions but it should not be the OCI runtime responsibility since conmon is creating these files. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1786449 Signed-off-by: Giuseppe Scrivano <[email protected]>
LGTM |
1 similar comment
LGTM |
Can we get a new conmon release? |
Since containers#112 the anonymous pipes are supposed to be more permissive. Restroing the permissive state. Close containers#429
Since containers#112 the anonymous pipes are supposed to be more permissive. Restoring the permissive state. Close containers#429
Since containers#112 the anonymous pipes are supposed to be more permissive. Restoring the permissive state. Close containers#429 Signed-off-by: Attila Fazekas <[email protected]>
Since containers#112 the anonymous pipes are supposed to be more permissive. Restoring the permissive state. Close containers#429 Signed-off-by: Attila Fazekas <[email protected]>
Since containers#112 the anonymous pipes are supposed to be more permissive. Restoring the permissive state. Close containers#429 Signed-off-by: afazekas <[email protected]>
Since containers#112 the anonymous pipes are supposed to be more permissive. Restoring the permissive state by default. 32816bd introduced the tty check for FreeBSD, assuming it is needed there. Close containers#429 Signed-off-by: afazekas <[email protected]>
Since containers#112 the anonymous pipes are supposed to be more permissive. Restoring the permissive state by default. 32816bd introduced the tty check for FreeBSD, assuming it is needed there. Close containers#429 Signed-off-by: afazekas <[email protected]>
Since containers#112 the anonymous pipes are supposed to be more permissive. Restoring the permissive state by default. 32816bd introduced a tty check assuming it was introduced to avoid too many warning logs on platfroms where several types are not supported. Instead of tty check using EINVAL check per the review comment. Close containers#429 Signed-off-by: afazekas <[email protected]>
Since containers#112 the anonymous pipes are supposed to be more permissive. Restoring the permissive state by default. 32816bd introduced a tty check assuming it was introduced to avoid too many warning logs on platfroms where several types are not supported. Instead of tty check using EINVAL check per the review comment. Close containers#429 Signed-off-by: afazekas <[email protected]>
Since containers#112 the anonymous pipes are supposed to be more permissive. Restoring the permissive state by default. Platforms which has a documented EINVAL usage for fchmod(2) indicates the fd in context is not supporting fchmod(2). In order to not have annoying logs in those cases the warning is omitted. Close containers#429 Signed-off-by: afazekas <[email protected]>
Since containers#112 the anonymous pipes are supposed to be more permissive. Restoring the permissive state by default. 32816bd introduced a tty check assming it was introduced to avoid too many warning logs on platfroms where several types are not supported. Instead of tty check using error code check per review. Close containers#429 Signed-off-by: afazekas <[email protected]>
Since #112 the anonymous pipes are supposed to be more permissive. Restoring the permissive state by default. Platforms which has a documented EINVAL usage for fchmod(2) indicates the fd in context is not supporting fchmod(2). In order to not have annoying logs in those cases the warning is omitted. Close #429 Signed-off-by: afazekas <[email protected]>
make sure every user inside of the container can use the standard
files. Without the chmod, only root in the container would be able to
print to stdout.
It went unnoticed with runc, as runc itself corrects these permissions
but it should not be the OCI runtime responsibility since conmon is
creating these files.
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1786449
Signed-off-by: Giuseppe Scrivano [email protected]