All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christopher J. PeBenito" <cpebenito@tresys.com>
To: Colin Powers <Colin.Powers@nexor.com>,
	"SELinux@tycho.nsa.gov" <SELinux@tycho.nsa.gov>
Subject: Re: keywords in .fc files
Date: Wed, 11 Feb 2015 08:47:51 -0500	[thread overview]
Message-ID: <54DB5D87.20405@tresys.com> (raw)
In-Reply-To: <AMSPR03MB632C591E8AF6DBA1219361C9E250@AMSPR03MB632.eurprd03.prod.outlook.com>

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

      parent reply	other threads:[~2015-02-11 13:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11 10:57 keywords in .fc files Colin Powers
2015-02-11 13:44 ` Stephen Smalley
2015-02-11 13:47 ` Christopher J. PeBenito [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54DB5D87.20405@tresys.com \
    --to=cpebenito@tresys.com \
    --cc=Colin.Powers@nexor.com \
    --cc=SELinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.