Am Donnerstag, 12. Januar 2017 20:23:48 UTC+1 schrieb Ugo Bellavance:
>
> Hi,
>
> I've been working on a public module that manage text entries that have 
> SELinux contexts in them. I added basic support to some of the regex 
> special characters that may be used in SELinux contexts and here's the 
> result: 
> https://github.com/ubellavance/puppet-selinux/blob/deleteworks/manifests/fcontext.pp#L49-L50.
>  
>  After having done something that fits my need up to now, I knew that it 
> was probably not perfect so I looked at some lists of contexts and found 
> out that there are a lot more than just "(/.*)" entries but I think it 
> doesn't make sense to do a regsubst for every special character.  Is there 
> something that can be done directly in the module that would automatically 
> put a backspace before every regex special character?
>
>  
maybe the shellwords does it for you: 
http://ruby-doc.org/stdlib-2.0.0/libdoc/shellwords/rdoc/Shellwords.html

 
instead of working on your own selinux module I'd invite you to parcitipate 
on the voxpupuli/selinux module: https://github.com/voxpupuli/puppet-selinux

- Thomas

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/03155d97-3b6e-4ba4-9d3b-bd0fc7beaf18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to