Projet

Général

Profil

Révision 0b7bcb5d

ID0b7bcb5de9fe26c617dda5ba3e1c8e9310296a24
Parent 0e7fe75e
Enfant 069c9fd2

Ajouté par mh il y a plus de 2 ans

Align filemode on RedHat to distro default

The RPM acutally ships the configuration and directory with
0600/0700 while this module sets the mode to 0640/0750.

However, this has the drawback that on new nftables RPM versions,
we are setting it back to the modules mode and triggering an nft
validate.

Voir les différences:

spec/classes/snat4_spec.rb
9 9
    context "on #{os}" do
10 10
      let(:facts) { os_facts }
11 11

  
12
      nft_mode = case os_facts[:os]['family']
13
                 when 'RedHat'
14
                   '0600'
15
                 else
16
                   '0640'
17
                 end
18

  
12 19
      context 'with snat4' do
13 20
        let(:pre_condition) do
14 21
          '
......
42 49
            path: '/etc/nftables/puppet-preflight/ip-nat-chain-POSTROUTING.nft',
43 50
            owner: 'root',
44 51
            group: 'root',
45
            mode: '0640',
52
            mode: nft_mode,
46 53
            ensure_newline: true
47 54
          )
48 55
        }

Formats disponibles : Unified diff