I have a file on the system with the following SELinux context
I also have a File["/etc/my-app/my-config.cfg"] resource defined in my manifests, which doesn't call out the seltype attribute, so according the documentation , it should get the type from matchpathcon, and set it to "my-app_config_t".
However, it's setting it to "my" instead.
I think I've tracked this down to the regex in parse_selinux_context() in utils/selinux.rb, where the 'type' section of the regexp stops accepting characters at the dash in the "my-app_config_t"
I think it would be better if the regexp were something more lenient , like