From: David Caplan <dac@tresys.com>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: ivg2@cornell.edu, selinux@tycho.nsa.gov,
selinuxdev <selinux-dev@tresys.com>
Subject: Re: Policy format: apostrophe in comments
Date: Tue, 01 Feb 2005 10:11:24 -0500 [thread overview]
Message-ID: <41FF9C1C.9050101@tresys.com> (raw)
In-Reply-To: <1107260084.26936.32.camel@moss-spartans.epoch.ncsc.mil>
Stephen Smalley wrote:
> On Mon, 2005-01-31 at 17:29, Ivan Gyurdiev wrote:
>
>>What about this bug? It complains about not being able to use
>>apostrophe in the policy config. Any chance this will be fixed,
>>or should I leave it alone? I ask because I was confused
>>what was wrong with my policy when adding apostr. comments.
>>
>>https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=146553
>
>
> Yes, that has bothered me as well; it is a curious property of m4 that
> it interprets quotes even within comments.
I thought this as well. I discovered, with some help from Gary Vaughan at
gnu.org, that what I thought was a comment was actually embedded in a
quoted string. For example:
define(`only_trans',`
#
# Allow the user's process to transition.
#
allow $1 $3:process transition;
')
The comment is actually _in_ the quoted string, so the apostrophe in the
comment matches the end delimeter of the string and problems occur. It
should really be written as:
define(`only_trans',
#
# Allow the user's process to transition.
#
`
allow $1 $3:process transition;
')
> An option would be to use
> the m4 changequote builtin to change the start-quote and end-quote
> delimiters, but that would require rewriting all actual uses of the
> existing quote characters in the existing policy to use the new
> delimiters.
Changing the quote delimeter was the suggestion I received from Gary, but
you are always going to end up vulnerable because of what someone puts into
what they believe is a comment line.
Obviously not my highest priority, but I'd be willing to
> consider patches that make such a change.
>
David
--
__________________________________
David Caplan 410 290 1411 x105
dac@tresys.com
Tresys Technology, LLC
8840 Stanford Blvd., Suite 2100
Columbia, MD 21045
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
prev parent reply other threads:[~2005-02-01 15:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-31 22:29 Policy format: apostrophe in comments Ivan Gyurdiev
2005-02-01 12:14 ` Stephen Smalley
2005-02-01 15:11 ` David Caplan [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=41FF9C1C.9050101@tresys.com \
--to=dac@tresys.com \
--cc=ivg2@cornell.edu \
--cc=sds@epoch.ncsc.mil \
--cc=selinux-dev@tresys.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.