Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-9330

Unable to enfource SELinux attributes for files in /dev/shm

    XMLWordPrintable

Details

    • Coremunity
    • Platform Core KANBAN
    • Needs Assessment
    • Enhancement
    • A file on `tmpfs` will now report that it does support SELinux labels.
    • Needs Assessment

    Description

      Hi!

       

      Currently on Puppet 5.5.1, I've created the following resource:

          file { '/dev/shm/ns-slapd-database-cache/':
            ensure => 'directory',
            owner  => 'dirsrv',
            group  => 'dirsrv',
            mode   => '0770',
            seltype => dirsrv_var_lib_t'
          }
      

      However, Puppet never configures the seltype for this directory, in the Puppet Agent debug logs we see:

      Debug: /Stage[main]/Pt_freeipa::Server::Config::Limits/File[/dev/shm/ns-slapd-database-cache/]/seltype: SELinux not available for this filesystem. Ignoring parameter.
      

      I've tracked this down to the following:

      I'm going to open a pull request to propose adding tmpfs to https://github.com/puppetlabs/puppet/blob/5.5.1/lib/puppet/util/selinux.rb#L193 and as per the contributor guidelines, also opening this issue to track this change as well.

      Attachments

        Activity

          People

            melissa Melissa Stone
            jaredledvina Jared Ledvina
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support