Skip to content

os_hardening v. 2.4.0 parameter type conflict when using $system_umask #326

@mtuve

Description

@mtuve

Describe the bug
Variabel definition of system_umask has different type in init.pp(string) and umask.pp(integer) .

init.pp : (line 220) Optional[String] $system_umask = undef,
umask.pp : (line 15) Optional[Integer] $system_umask = undef,

Expected behavior
$system_umask defined as string should be accepted as input to umask.pp when using os_hardening modul v. 2.4.0.

This setting should be accepted ( in .yaml file ): os_hardening::system_umask: '027' (but it's not accepted)

Actual behavior

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Os_hardening::Umask]: parameter system_umask expects a value of type Undef or Integer, got String 

 '

Example code

'When using this in common.yaml file : os_hardening::system_umask: '027'    

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Os_hardening::Umask]: parameter system_umask expects a value of type Undef or Integer, got String 

When using this in common.yaml file : os_hardening::system_umask: 027

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Os_hardening]: parameter system_umask expects a value of type Undef or String, got Integer 

 '

OS / Environment

'RedHat 7 and 8'

Puppet Version

PE 2021.7.9 and PE 2023.2.8

Additional context
As a workaround we did a convert from string to integer for $system_umask ( if necessary) in umask.pp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions