common/admin_socket: add config for admin socket permission bits#11684
Merged
liewegas merged 1 commit intoceph:masterfrom Apr 21, 2017
Merged
common/admin_socket: add config for admin socket permission bits#11684liewegas merged 1 commit intoceph:masterfrom
liewegas merged 1 commit intoceph:masterfrom
Conversation
Contributor
Author
|
hi @liewegas , can you review this for me ? |
bd52766 to
9ef8157
Compare
|
any update on this? |
tchaikov
reviewed
Feb 10, 2017
src/common/common_init.cc
Outdated
|
|
||
| ret = strict_strtol(conf->admin_socket_mode.c_str(), 8, &err); | ||
| if (err.empty()) { | ||
| if (!(ret & (~07777))) { |
Contributor
There was a problem hiding this comment.
could use ALLPERMS or better off using ACCESSPERMS. for example, what is the use case of applying setuid?
liewegas
reviewed
Feb 10, 2017
| void AdminSocket::chmod(mode_t mode) | ||
| { | ||
| if (m_sock_fd >= 0) { | ||
| int r = ::chmod(m_path.c_str(), mode); |
Member
There was a problem hiding this comment.
since we have the fd, then let's fchmod instead
Contributor
Author
There was a problem hiding this comment.
If fd refers to a socket, the behavior of fchmod() is unspecified[1].
9ef8157 to
3a4113e
Compare
Signed-off-by: runsisi <runsisi@zte.com.cn>
3a4113e to
d2259ba
Compare
Contributor
Author
tchaikov
approved these changes
Mar 20, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
this is to fix influxdata/telegraf#1657, so other tools, such as
telegraf, running as non-root user can gather info from the ceph daemons.Signed-off-by: runsisi runsisi@zte.com.cn