Skip to contentSkip to conversation

user guide drafts: Maintaining SELinux Labels

DISCUSSION Clarkson, Mike R (US SSA) 1 participant 1 message Oct 8, 2008 SELinux security module

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]

On

Quoted 6 lines

Behalf Of Glenn Faden
Sent: Wednesday, October 08, 2008 8:46 AM
To: Daniel J Walsh
Cc: Murray McAllister; SE Linux
Subject: Re: user guide drafts: Maintaining SELinux Labels

Quoted 16 lines
Quoted 15 lines · Daniel J Walsh

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 10 lines · Murray McAllister

Hi,

The following are the first few drafts of the "Maintaining SELinux Labels" sections. Any comments and corrections are appreciated.

Cheers.

Copying Files and Directories

When files and directories are copied, they inherit the SELinux

context

Quoted 1 line
Quoted 1 line
Quoted 1 line

of the parent directory they are copied to. This helps ensure files

and

Quoted 1 line
Quoted 1 line
Quoted 1 line

directories are labeled with the correct SELinux context after

being

Quoted 1 line
Quoted 1 line
Quoted 1 line

moved. The following example demonstrates copying a file from a

user's

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

home directory to /var/www/html/, which is used by the Apache HTTP Server. Since the file is copied, it inherits the correct SELinux

context:

Quoted 1 line
Quoted 1 line

Is this true when using MLS policy? Assuming the policy allows a

subject

Quoted 4 lines

to create a file in a directory, shouldn't the newly created file's SELinux context have the same sensitivity as the subject who wrote it?

Or is the new file's type copied from the directory and the

sensitivity

Quoted 1 line

copied from the subject?

You are correct, the type is copied from the directory and the level is copied from the subject. It might also be worth mentioning that the type is copied from the directory as default behavior, which can be overridden with type_transition statements.

Quoted 5 lines

--Glenn

--
This message was distributed to subscribers of the selinux mailing

list.

Quoted 1 line

If you no longer wish to subscribe, send mail to

[email protected]

Quoted 2 lines

with
the words "unsubscribe selinux" without quotes as the message.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.