Research Menu

.
Skip Search Box

SELinux Mailing List

Re: variables for file context files

From: Stephen Smalley <sds_at_tycho.nsa.gov>
Date: Thu, 20 Sep 2007 17:06:52 -0400


On Thu, 2007-09-20 at 10:03 -0700, Clarkson, Mike R (US SSA) wrote:
> Is there a way to set variables in a file context file?
>
> For instance, I'd like to be able to do something like this in my .fc
> files
>
> ORACLE_HOME = '/opt/nl/oracle/ora10gR2/app/oracle/product/10.2.0/db_1'
> $ORACLE_HOME/lib/lib.+\.a -- gen_context(system_u:object_r:lib_t,s0)
> $ORACLE_HOME/lib32/lib.+\.a -- gen_context(system_u:object_r:lib_t,s0)
> ...
>
> That way if my ORACLE_HOME changes, I only have to change a single line

The source .fc files are run through the m4 preprocessor like everything else (that is how gen_context gets expanded). So you can define a m4 macro and use it in the source .fc file. But the .fc file that gets packaged into a .pp file has already been preprocessed.

-- 
Stephen Smalley
National Security Agency


--
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.
Received on Thu 20 Sep 2007 - 17:13:39 EDT
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service