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

collectd not able to mount cvmfs if selinux is in place #5

Open
traylenator opened this issue Jul 4, 2018 · 2 comments
Open

collectd not able to mount cvmfs if selinux is in place #5

traylenator opened this issue Jul 4, 2018 · 2 comments

Comments

@traylenator
Copy link
Member

  • Version python2-collectd_cvmfs-1.0.2-1.el7.1
  • CentOS 7
  • cvmfs-2.4.4-1.el7.centos

We will need some extra seliinux permissions to allow collectd service to access cvmfs.

# grep avc /var/log/audit/audit.log | audit2allow   -a
#============= collectd_t ==============
allow collectd_t fusefs_t:dir read;

and probably others once mounted.

@traylenator
Copy link
Member Author

module collectd_cvmfs 1.0;

require {
        type collectd_t;
        type fusefs_t;
        class dir read;
}

but not the whole story. I now see

[2018-07-04 14:37:28] cvmfs: failed to get MountTime for repo cms.cern.ch

but no avc records.,..

@luisfdez
Copy link
Contributor

policy_module(collectdcvmfs 1.2);

gen_require(`
    type collectd_t;
    type fusefs_t;
    class dir { read };
')

allow collectd_t fusefs_t:dir { read };

That works for me if all the config is set (including pointing to the typedb).

Enabling dontaudit rules I see as well:

type=AVC msg=audit(1531298857.953:511): avc:  denied  { read } for  pid=18741 comm="collectd" path="/var/db/nscd/hosts" dev="vda1" ino=25798084 scontext=system_u:system_r:collectd_t:s0 tcontext=system_u:object_r:nscd_var_run_t:s0 tclass=file

But I think that one is not connected to this use case.

luisfdez pushed a commit to luisfdez/python-collectd_cvmfs that referenced this issue Oct 3, 2018
luisfdez pushed a commit to luisfdez/python-collectd_cvmfs that referenced this issue Oct 3, 2018
luisfdez pushed a commit to luisfdez/python-collectd_cvmfs that referenced this issue Oct 3, 2018
luisfdez pushed a commit to luisfdez/python-collectd_cvmfs that referenced this issue Oct 3, 2018
luisfdez pushed a commit to luisfdez/python-collectd_cvmfs that referenced this issue Oct 3, 2018
luisfdez pushed a commit to luisfdez/python-collectd_cvmfs that referenced this issue Oct 3, 2018
luisfdez pushed a commit to luisfdez/python-collectd_cvmfs that referenced this issue Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants