Skip to content
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

common/admin_socket: add config for admin socket permission bits #11684

Merged
merged 1 commit into from Apr 21, 2017

Conversation

@runsisi
Copy link
Collaborator

@runsisi runsisi commented Oct 29, 2016

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

@runsisi
Copy link
Collaborator Author

@runsisi runsisi commented Nov 5, 2016

hi @liewegas , can you review this for me ?
thank you :)

@runsisi runsisi force-pushed the runsisi:wip-fix-asok-mode branch from bd52766 to 9ef8157 Nov 7, 2016
@overskylab
Copy link

@overskylab overskylab commented Feb 10, 2017

any update on this?


ret = strict_strtol(conf->admin_socket_mode.c_str(), 8, &err);
if (err.empty()) {
if (!(ret & (~07777))) {

This comment has been minimized.

@tchaikov

tchaikov Feb 10, 2017
Contributor

could use ALLPERMS or better off using ACCESSPERMS. for example, what is the use case of applying setuid?

void AdminSocket::chmod(mode_t mode)
{
if (m_sock_fd >= 0) {
int r = ::chmod(m_path.c_str(), mode);

This comment has been minimized.

@liewegas

liewegas Feb 10, 2017
Member

since we have the fd, then let's fchmod instead

This comment has been minimized.

@runsisi

runsisi Feb 13, 2017
Author Collaborator

If fd refers to a socket, the behavior of fchmod() is unspecified[1].

[1] https://linux.die.net/man/3/fchmod

@liewegas liewegas changed the title admin-socket: add config for admin socket permission bits common/admin-socket: add config for admin socket permission bits Feb 10, 2017
@liewegas liewegas changed the title common/admin-socket: add config for admin socket permission bits common/admin_socket: add config for admin socket permission bits Feb 10, 2017
@runsisi runsisi force-pushed the runsisi:wip-fix-asok-mode branch from 9ef8157 to 3a4113e Feb 13, 2017
Signed-off-by: runsisi <runsisi@zte.com.cn>
@runsisi runsisi force-pushed the runsisi:wip-fix-asok-mode branch from 3a4113e to d2259ba Feb 13, 2017
@runsisi
Copy link
Collaborator Author

@runsisi runsisi commented Feb 13, 2017

@tchaikov @liewegas updated, thanks!

@liewegas liewegas merged commit cf5152f into ceph:master Apr 21, 2017
3 checks passed
3 checks passed
@ceph-jenkins
Signed-off-by all commits in this PR are signed
Details
@ceph-jenkins
Unmodifed Submodules submodules for project are unmodified
Details
@ceph-jenkins
default Build finished.
Details
@runsisi runsisi deleted the runsisi:wip-fix-asok-mode branch Apr 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants