07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

# myapp executable will have:<br />

# label: system_u:object_r:myapp_exec_t<br />

# MLS sensitivity: s0<br />

# MCS categories: <br />

/usr/sbin/myapp -- gen_context(system_u:object_r:myapp_exec_t,s0)<br />

Example 14.2<br />

example.fc file<br />

14.4.4.2. Writing a .if File<br />

In the sample below, the first interface (“myapp_domtrans”) controls who can execute the<br />

application. The second one (“myapp_read_log”) grants read rights on the application's log<br />

files.<br />

Each interface must generate a valid set of rules which can be embedded in a .te file. You should<br />

thus declare all the types that you use (with the gen_require macro), and use standard directives<br />

to grant rights. Note, however, that you can use interfaces provided by other modules. The next<br />

section will give more explanations about how to express those rights.<br />

## Myapp example policy<br />

## <br />

## <br />

## More descriptive text about myapp. The <br />

## tag can also use , , and <br />

## html tags for formatting.<br />

## <br />

## <br />

## This policy supports the following myapp features:<br />

## <br />

## Feature A<br />

## Feature B<br />

## Feature C<br />

## <br />

## <br />

## <br />

#<br />

########################################<br />

## <br />

## Execute a domain transition to run myapp.<br />

## <br />

## <br />

Chapter 14 — Security<br />

395

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!