Re: keywords in .fc files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/11/2015 5:57 AM, Colin Powers wrote:
> Hi all,
> 
> We are trying in a .fc file to assign a label to a directory path containing the word 'include', e.g.
> 
> /opt/mydir/include(/.*)?		-d	gen_context(system_u:object_r:my_context_t,s0)
> 
> However it seems 'include(...)' is interpreted as a keyword/macro which causes a compilation error:
> `/.*': No such file or directory
> 
> Is there a way around this, other than by doing something funny with the regex, like wildcarding one of the letters?

You can do a "stupid m4 trick", by adding in an empty string
(backtick-apostraphe) before the open parenthesis:

/opt/mydir/include`'(/.*)?


For example:

$ cat test
/opt/mydir/include`'(/.*)?

$ m4 test
/opt/mydir/include(/.*)?


Note: Reference Policy questions should be asked on the refpolicy list
(http://oss.tresys.com/mailman/listinfo/refpolicy)

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
_______________________________________________
Selinux mailing list
Selinux@xxxxxxxxxxxxx
To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx.
To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux