On Friday, January 13, 2017 at 6:24:57 AM UTC-5, Thomas Müller wrote:
>
>
>
> 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
>
 
Thanks for your answer. The selinux module is actually from camptocamp. 
Mine is a fork, but you're right, I should test voxpopuli'.  At the time at 
which I needed an SELinux module, I needed SELinux ports support, which, I 
think, wasn't supported by voxpopul's (or its ancestor), so I chose 
camptocamp's. I realize that I "lost" many hours to improve camptocamp's 
module while a switch to voxpopuli was the right thing to do.  At least it 
gave me more experience with contributing to puppet modules.  camptocamp's 
module is simpler than voxpopuli, so it's more accessible to me.

Now I have some testing to do :).

Thanks!

-- 
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/981fcd68-02d2-46e4-9fa0-80ebc9dbf67a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to