Skip to contentSkip to conversation

Configuration issues on a new installation

DISCUSSION Brad Chapman 8 participants 33 messages Jun 26, 2002 – Jun 28, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

Everyone,

I have just started using SELinux on my 2.4.18 system. I found an enormous
number of avc: denied messages in my dmesg and attempted to remove them. So far I have tweaked the devfs_contexts and the policy.conf files (using scripts/newrules.pl for policy.conf) since most of the errors were related to device files and system call commands. I have also installed the SELinux devfsd extension and added the config entries to my devfsd.conf, to no apparent avail.

What is the fastest way to eliminate most (if not preferably all) of these
messages and put me closer to activating enforcing mode?

Thanks,

Brad Chapman

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw

Good-day,
I have found that i found the same avc denied messages on my 2.4.18 SElinux kernel. I manually edited the specific te files, just by looking at the messages from dmesg. i eliminated all but two. They are realted to the kernel_t domain and have to do with write permissions mainly.

Quoted 36 lines · --- Brad Chapman

Everyone,

I have just started using SELinux on my 2.4.18
system. I found an enormous
number of avc: denied messages in my dmesg and attempted to remove them. So far
I have tweaked the devfs_contexts and the policy.conf files (using scripts/newrules.pl for policy.conf) since most of the errors were related to
device files and system call commands. I have also installed the SELinux devfsd
extension and added the config entries to my devfsd.conf, to no apparent avail.

What is the fastest way to eliminate most (if
not preferably all) of these
messages and put me closer to activating enforcing mode?

Thanks,

Brad Chapman

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

Quoted 7 lines

--
You have received this message because you are
subscribed to the selinux list.
If you no longer wish to subscribe, send mail to
[email protected] with
the words "unsubscribe selinux" without quotes as
the message.

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#2 lore raw

Mr. Nyika,

Quoted 7 lines · --- Michael Nyika

Good-day,
I have found that i found the same avc denied messages on my 2.4.18 SElinux kernel. I manually edited the specific te files, just by looking at the messages from dmesg. i eliminated all but two. They are realted to the kernel_t domain and have to do with write permissions mainly.

Could you elaborate on the exact files you edited and how you changed
them, please?

Quoted 43 lines
Quoted 32 lines · --- Brad Chapman

Everyone,

I have just started using SELinux on my 2.4.18
system. I found an enormous
number of avc: denied messages in my dmesg and attempted to remove them. So far
I have tweaked the devfs_contexts and the policy.conf files (using scripts/newrules.pl for policy.conf) since most of the errors were related to
device files and system call commands. I have also installed the SELinux devfsd
extension and added the config entries to my devfsd.conf, to no apparent avail.

What is the fastest way to eliminate most (if
not preferably all) of these
messages and put me closer to activating enforcing mode?

Thanks,

Brad Chapman

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

Quoted 7 lines

--
You have received this message because you are
subscribed to the selinux list.
If you no longer wish to subscribe, send mail to
[email protected] with
the words "unsubscribe selinux" without quotes as
the message.

Quoted 5 lines

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

Brad

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#3 lore raw

Certainly sir:
(Pardon me for not giving you a real concrete example message).

If your avc message contains, eg: avc denied { write } path=(something)........scontext=system_u:system_r:kernel_t tcontext= (something):(something):file_t tclass=file

then: look for a file called kernel.te in
/policy/domains/programs/

why there? because it is the kernel_t domain being denied "write" permission on a "file" of type "file_t".
If you look at the path statement (still in the avc denied statement), i believe you'll see the probable file that should have that type.

Now: look for a line in the kernel.te file that goes something like this:

allow kernel_t file_t:file { some_entry_here };

If this line exists, then add "write" between the {}. If you cant see it, then create the entry.

next, make sure you run "make load" from the /policy directory. You should see the message displayed SUCCESS if you successfully updated the policy configuration.

** This is just so you can see that avc will NOT deny the permission. It doesnt mean that you should (as Mr Smalley says, add permissions blindly. It really depends on what you want as an administrator).

If you reboot and then run "dmesg | less" and scroll down, you shouldnt see the SAME avc message again.

Quoted 81 lines · --- Brad Chapman

Mr. Nyika,

Quoted 2 lines · --- Michael Nyika

Good-day,
I have found that i found the same avc denied

messages

Quoted 3 lines

on my 2.4.18 SElinux kernel. I manually edited the specific te files, just by looking at the messages from dmesg. i eliminated all but two. They are

realted

Quoted 2 lines

to the kernel_t domain and have to do with write
permissions mainly.

Could you elaborate on the exact files you
edited and how you changed
them, please?

Quoted 6 lines
Quoted 3 lines · --- Brad Chapman

Everyone,

I have just started using SELinux on my

2.4.18

Quoted 6 lines
Quoted 6 lines

system. I found an enormous
number of avc: denied messages in my dmesg and
attempted to remove them. So far
I have tweaked the devfs_contexts and the
policy.conf files (using
scripts/newrules.pl for policy.conf) since most

of

Quoted 2 lines
Quoted 2 lines

the errors were related to
device files and system call commands. I have

also

Quoted 5 lines
Quoted 5 lines

installed the SELinux devfsd
extension and added the config entries to my
devfsd.conf, to no apparent avail.

What is the fastest way to eliminate most

(if

Quoted 2 lines
Quoted 2 lines

not preferably all) of these
messages and put me closer to activating

enforcing

Quoted 14 lines
Quoted 14 lines

mode?

Thanks,

Brad Chapman

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

Quoted 6 lines
Quoted 6 lines

--
You have received this message because you are
subscribed to the selinux list.
If you no longer wish to subscribe, send mail to
[email protected] with
the words "unsubscribe selinux" without quotes

as

Quoted 4 lines
Quoted 1 line

the message.

--
You have received this message because you are

subscribed to the selinux

Quoted 2 lines

list.
If you no longer wish to subscribe, send mail to

[email protected] with

Quoted 1 line

the words "unsubscribe selinux" without quotes as

the message.

Brad

=====
Brad Chapman

Quoted 8 lines

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#4 lore raw

Mr. Nyika,

Quoted 23 lines · --- Michael Nyika

Certainly sir:
(Pardon me for not giving you a real concrete example message).

If your avc message contains, eg: avc denied { write } path=(something)........scontext=system_u:system_r:kernel_t tcontext= (something):(something):file_t tclass=file

then: look for a file called kernel.te in /policy/domains/programs/

why there? because it is the kernel_t domain being denied "write" permission on a "file" of type "file_t".
If you look at the path statement (still in the avc denied statement), i believe you'll see the probable file that should have that type.

Now: look for a line in the kernel.te file that goes something like this:

allow kernel_t file_t:file { some_entry_here };

Quoted 7 lines

If this line exists, then add "write" between the {}. If you cant see it, then create the entry.

next, make sure you run "make load" from the /policy directory. You should see the message displayed SUCCESS if you successfully updated the policy configuration.

ACK. And the same should be done for all programs that generate avc:
denied messages in the dmesg? (i.e. edit files in policy/domain/program/*.te for make them)?

Quoted 5 lines

** This is just so you can see that avc will NOT deny the permission. It doesnt mean that you should (as Mr Smalley says, add permissions blindly. It really depends on what you want as an administrator).

ACK. I examined them and found them to be OK (so far), so I added them.

Quoted 3 lines

If you reboot and then run "dmesg | less" and scroll down, you shouldnt see the SAME avc message again.

        OK.

Brad

Quoted 93 lines
Quoted 81 lines · --- Brad Chapman

Mr. Nyika,

Quoted 2 lines · --- Michael Nyika

Good-day,
I have found that i found the same avc denied

messages

Quoted 3 lines

on my 2.4.18 SElinux kernel. I manually edited the specific te files, just by looking at the messages from dmesg. i eliminated all but two. They are

realted

Quoted 2 lines

to the kernel_t domain and have to do with write
permissions mainly.

Could you elaborate on the exact files you
edited and how you changed
them, please?

Quoted 6 lines
Quoted 3 lines · --- Brad Chapman

Everyone,

I have just started using SELinux on my

2.4.18

Quoted 6 lines
Quoted 6 lines

system. I found an enormous
number of avc: denied messages in my dmesg and
attempted to remove them. So far
I have tweaked the devfs_contexts and the
policy.conf files (using
scripts/newrules.pl for policy.conf) since most

of

Quoted 2 lines
Quoted 2 lines

the errors were related to
device files and system call commands. I have

also

Quoted 5 lines
Quoted 5 lines

installed the SELinux devfsd
extension and added the config entries to my
devfsd.conf, to no apparent avail.

What is the fastest way to eliminate most

(if

Quoted 2 lines
Quoted 2 lines

not preferably all) of these
messages and put me closer to activating

enforcing

Quoted 14 lines
Quoted 14 lines

mode?

Thanks,

Brad Chapman

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

Quoted 6 lines
Quoted 6 lines

--
You have received this message because you are
subscribed to the selinux list.
If you no longer wish to subscribe, send mail to
[email protected] with
the words "unsubscribe selinux" without quotes

as

Quoted 4 lines
Quoted 1 line

the message.

--
You have received this message because you are

subscribed to the selinux

Quoted 2 lines

list.
If you no longer wish to subscribe, send mail to

[email protected] with

Quoted 1 line

the words "unsubscribe selinux" without quotes as

the message.

Brad

=====
Brad Chapman

Quoted 8 lines

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

Quoted 4 lines

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#5 lore raw

Mr Chapman,
For the most part, YES, the files will be found in the

/policy/domains/programs directory, when system processes have permissions problems.
Some of my dmesg avc-denied-messages contained lines with "sysadm_t",
and the file in this case to edit was in /policy/domains. It was a file called admin.te For normal users, look in the same directory for user.te

Quoted 12 lines · --- Brad Chapman

Mr. Nyika,

Quoted 2 lines · --- Michael Nyika

Certainly sir:
(Pardon me for not giving you a real concrete

example

Quoted 3 lines

message).

If your avc message contains, eg: avc denied {

write }

Quoted 1 line

path=(something)........scontext=system_u:system_r:kernel_t

Quoted 174 lines
Quoted 1 line

tcontext= (something):(something):file_t

tclass=file

Quoted 8 lines

then: look for a file called kernel.te in /policy/domains/programs/

why there? because it is the kernel_t domain being denied "write" permission on a "file" of type "file_t".
If you look at the path statement (still in the

avc

Quoted 1 line

denied statement), i believe you'll see the

probable

Quoted 3 lines

file that should have that type.

Now: look for a line in the kernel.te file that

goes

Quoted 5 lines

something like this:

allow kernel_t file_t:file { some_entry_here };

If this line exists, then add "write" between the

{}.

Quoted 3 lines

If you cant see it, then create the entry.

next, make sure you run "make load" from the

/policy

Quoted 3 lines

directory. You should see the message displayed SUCCESS if you successfully updated the policy configuration.

ACK. And the same should be done for all
programs that generate avc:
denied messages in the dmesg? (i.e. edit files in
policy/domain/program/*.te
for make them)?

Quoted 2 lines

** This is just so you can see that avc will NOT

deny

Quoted 1 line

the permission. It doesnt mean that you should (as

Mr

Quoted 2 lines

Smalley says, add permissions blindly. It really depends on what you want as an administrator).

ACK. I examined them and found them to be OK
(so far), so I added them.

Quoted 2 lines

If you reboot and then run "dmesg | less" and

scroll

Quoted 1 line

down, you shouldnt see the SAME avc message again.

        OK.

Brad

Quoted 9 lines
Quoted 7 lines · --- Brad Chapman

Mr. Nyika,

Quoted 2 lines · --- Michael Nyika

Good-day,
I have found that i found the same avc denied

messages

Quoted 1 line

on my 2.4.18 SElinux kernel. I manually edited

the

Quoted 1 line
Quoted 1 line
Quoted 1 line

specific te files, just by looking at the

messages

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

from dmesg. i eliminated all but two. They are

realted

Quoted 1 line

to the kernel_t domain and have to do with

write

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

permissions mainly.

Could you elaborate on the exact files

you

Quoted 6 lines
Quoted 6 lines

edited and how you changed
them, please?

Quoted 3 lines

--- Brad Chapman <[email protected]>

Quoted 6 lines · wrote:
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines

Everyone,

I have just started using SELinux on my

2.4.18

Quoted 2 lines
Quoted 2 lines

system. I found an enormous
number of avc: denied messages in my dmesg

and

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

attempted to remove them. So far
I have tweaked the devfs_contexts and the
policy.conf files (using
scripts/newrules.pl for policy.conf) since

most

Quoted 3 lines
Quoted 3 lines

of

Quoted 2 lines
Quoted 2 lines

the errors were related to
device files and system call commands. I

have

Quoted 6 lines
Quoted 6 lines

also

Quoted 5 lines
Quoted 5 lines

installed the SELinux devfsd
extension and added the config entries to my
devfsd.conf, to no apparent avail.

What is the fastest way to eliminate

most

Quoted 13 lines
Quoted 13 lines

(if

Quoted 2 lines
Quoted 2 lines

not preferably all) of these
messages and put me closer to activating

enforcing

Quoted 9 lines
Quoted 9 lines

mode?

Thanks,

Brad Chapman

=====
Brad Chapman

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

Permanent e-mails: [email protected]
[email protected]
[email protected]

--
You have received this message because you

are

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

subscribed to the selinux list.
If you no longer wish to subscribe, send

mail to

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

[email protected] with
the words "unsubscribe selinux" without

quotes

Quoted 8 lines
Quoted 8 lines

as

Quoted 4 lines
Quoted 1 line

the message.

--
You have received this message because you are

subscribed to the selinux

Quoted 2 lines

list.
If you no longer wish to subscribe, send mail

to

Quoted 2 lines
Quoted 2 lines

[email protected] with

Quoted 1 line

the words "unsubscribe selinux" without quotes

as

Quoted 5 lines
Quoted 5 lines

the message.

Brad

Quoted 8 lines
Quoted 8 lines

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________

Quoted 9 lines
Quoted 3 lines

Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

=====
Brad Chapman

Quoted 8 lines

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#6 lore raw
In reply to Michael Nyika

Granted messages are only generated if you have specified auditallow rules
in the configuration. Denied messages are always generated unless you specify auditdeny rules in the configuration. A recently posted patch (also committed to the sourceforge CVS tree) changes the 'auditdeny' rules' to 'dontaudit' rules and provides more intuitive semantics. See the "Configuring the SELinux Policy" report for the precise syntax, or look at examples in the example policy configuration.

On Wed, 2002-06-26 at 08:24, Michael Nyika wrote:

Good-day,
I have found that i found the same avc denied messages on my 2.4.18 SElinux kernel. I manually edited the specific te files, just by looking at the messages from dmesg. i eliminated all but two. They are realted to the kernel_t domain and have to do with write permissions mainly.

--- Brad Chapman <[email protected]> wrote:
> Everyone,
>
> I have just started using SELinux on my 2.4.18
> system. I found an enormous
> number of avc: denied messages in my dmesg and > attempted to remove them. So far
> I have tweaked the devfs_contexts and the > policy.conf files (using
> scripts/newrules.pl for policy.conf) since most of > the errors were related to
> device files and system call commands. I have also > installed the SELinux devfsd
> extension and added the config entries to my > devfsd.conf, to no apparent avail.
>
> What is the fastest way to eliminate most (if
> not preferably all) of these
> messages and put me closer to activating enforcing > mode?
>
> Thanks,
>
> Brad Chapman
>
> =====
> Brad Chapman
>
> Permanent e-mails: [email protected]
> [email protected]
> [email protected]
>
> __________________________________________________ > Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
>
> --
> You have received this message because you are > subscribed to the selinux list.
> If you no longer wish to subscribe, send mail to > [email protected] with
> the words "unsubscribe selinux" without quotes as > the message.

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#7 lore raw
In reply to Brad Chapman
Quoted 9 lines · Brad Chapman

I have just started using SELinux on my 2.4.18 system. I found an enormous
number of avc: denied messages in my dmesg and attempted to remove them. So far I have tweaked the devfs_contexts and the policy.conf files (using scripts/newrules.pl for policy.conf) since most of the errors were related to device files and system call commands. I have also installed the SELinux devfsd extension and added the config entries to my devfsd.conf, to no apparent avail.

What is the fastest way to eliminate most (if not preferably all) of these
messages and put me closer to activating enforcing mode?

The Configuring the SELinux Policy report discusses how to customize your policy, although this is certainly not a fast process. The report is included in the distribution and is also available from the NSA SELinux web site.

It sounds like you are using Russell Coker's Debian selinux package rather than the upstream distribution. Is that correct? Russell's package includes a more complete example policy configuration.

You should be cautious about simply adding rules generated by newrules.pl. It can be a helpful tool if used properly, but you should not blindly add the rules it generates to your policy configuration. In many cases, you will want to define new domains and/or types rather than granting permissions to the existing ones in order to preserve your security goals.

The SELinux devfsd support has known problems with preserving security contexts on devfs entries. Fully supporting the SELinux devfsd will require modifications to the kernel devfs code. I'd suggest using devfs_contexts instead.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#8 lore raw

Mr. Smalley,

Quoted 15 lines · --- Stephen Smalley
Quoted 1 line · Brad Chapman

I have just started using SELinux on my 2.4.18 system. I found an

enormous

Quoted 1 line

number of avc: denied messages in my dmesg and attempted to remove them. So

far

Quoted 2 lines

I have tweaked the devfs_contexts and the policy.conf files (using scripts/newrules.pl for policy.conf) since most of the errors were related

to

Quoted 1 line

device files and system call commands. I have also installed the SELinux

devfsd

Quoted 1 line

extension and added the config entries to my devfsd.conf, to no apparent

avail.

Quoted 1 line
Quoted 8 lines
Quoted 1 line

What is the fastest way to eliminate most (if not preferably all) of

these

Quoted 1 line

messages and put me closer to activating enforcing mode?

The Configuring the SELinux Policy report discusses how to customize your policy, although this is certainly not a fast process. The report is included in the distribution and is also available from the NSA SELinux web site.

I saw it there, but it is not an easy-to-read document and would take
some time to parse correctly.

Quoted 4 lines

It sounds like you are using Russell Coker's Debian selinux package rather than the upstream distribution. Is that correct? Russell's package includes a more complete example policy configuration.

No. My base platform is RedHat 6.2 (heavily modified) with the 2.4.18
kernel (as mentioned previously) and the SELinux utils package dated 1000hrs May 31, 2002.

Quoted 6 lines

You should be cautious about simply adding rules generated by newrules.pl. It can be a helpful tool if used properly, but you should not blindly add the rules it generates to your policy configuration. In many cases, you will want to define new domains and/or types rather than granting permissions to the existing ones in order to preserve your security goals.

I am aware of that. I have read through parts of the policy.conf file
and was about to start working on that before messing with the *.te files in policy/.

Quoted 5 lines

The SELinux devfsd support has known problems with preserving security contexts on devfs entries. Fully supporting the SELinux devfsd will require modifications to the kernel devfs code. I'd suggest using devfs_contexts instead.

I edited that too.

Quoted 5 lines

--
Stephen D. Smalley, NAI Labs
[email protected]

Thanks for the help,

Brad

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#9 lore raw
Quoted 3 lines · Brad Chapman

No. My base platform is RedHat 6.2 (heavily modified) with the 2.4.18
kernel (as mentioned previously) and the SELinux utils package dated 1000hrs May 31, 2002.

Ok. The example policy configuration was originally developed based on RH6.1 and 6.2, and has been subsequently updated for RH7.1 and 7.2. But if your platform is heavily modified, it isn't surprising that you are encountering plenty of audit messages.

Have you verified that all of your system daemons are being placed into their own domains, as discussed in the README? If not, then that is a natural first step.

You can certainly post excerpts from your /var/log/messages or dmesg output and we can try to help you in updating your policy. Try to avoid including lots of redundant audit messages or trivial audit messages that you already know how to fix.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#10 lore raw
In reply to Brad Chapman
Quoted 10 lines · Brad Chapman

I have just started using SELinux on my 2.4.18 system. I found an
enormous number of avc: denied messages in my dmesg and attempted to remove them. So far I have tweaked the devfs_contexts and the policy.conf files (using scripts/newrules.pl for policy.conf) since most of the errors were related to device files and system call commands. I have also installed the SELinux devfsd extension and added the config entries to my devfsd.conf, to no apparent avail.

What is the fastest way to eliminate most (if not preferably all) of
these messages and put me closer to activating enforcing mode?

It is impossible to answer your question as asked.

I suggest that you should start by sending email to this list with examples of the operations that are being denied along with the new rules that you plan to resolve the issue. Then Steve and I can advise you on whether you are on the correct path towards good SE policy.

Also once you have become skilled at policy creation you should send to the list any improvements that you devise for the default sample policy. Steve is very good about incorporating improvements into the NSA releases.

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#11 lore raw

Mr. Coker,

Quoted 9 lines · --- Russell Coker
Quoted 8 lines · Brad Chapman

I have just started using SELinux on my 2.4.18 system. I found an
enormous number of avc: denied messages in my dmesg and attempted to remove them. So far I have tweaked the devfs_contexts and the policy.conf files (using scripts/newrules.pl for policy.conf) since most of the errors were related to device files and system call commands. I have also installed the SELinux devfsd extension and added the config entries to my devfsd.conf, to no apparent avail.

Quoted 4 lines
Quoted 2 lines

What is the fastest way to eliminate most (if not preferably all) of
these messages and put me closer to activating enforcing mode?

It is impossible to answer your question as asked.

I apologize for my ambiguity. I assumed that people who had previously
installed SELInux on this list had experienced the same difficulties setting up a good policy, and that they would have some good "generic" guidelines for me to follow.

Quoted 5 lines

I suggest that you should start by sending email to this list with examples of the operations that are being denied along with the new rules that you plan to resolve the issue. Then Steve and I can advise you on whether you are on the correct path towards good SE policy.

Attached (MIME) is the output of dmesg with kernel messages edited out.
I have used the newrules.pl utility, manually edited some of the files under policy/domains/program and policy/file_contexts, and followed some of the instructions given my others on this list. So far, I have had no luck: the same messages at the same time for the same reasons.

Thank God for CONFIG_SECURITY_SELINUX_DEVELOP......

Quoted 5 lines

Also once you have become skilled at policy creation you should send to the list any improvements that you devise for the default sample policy. Steve is very good about incorporating improvements into the NSA releases.

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

#12 lore raw
Quoted 6 lines · Brad Chapman
Quoted 1 line

It is impossible to answer your question as asked.

I apologize for my ambiguity. I assumed that people who had
previously installed SELInux on this list had experienced the same difficulties setting up a good policy, and that they would have some good "generic" guidelines for me to follow.

Yes, they probably have. But most of them seem to have suffered in silence. It seems that I'm the only SE Linux user who is spending any time writing policy files and then publishing them.

Quoted 10 lines
Quoted 4 lines

I suggest that you should start by sending email to this list with examples of the operations that are being denied along with the new rules that you plan to resolve the issue. Then Steve and I can advise you on whether you are on the correct path towards good SE policy.

Attached (MIME) is the output of dmesg with kernel messages edited
out. I have used the newrules.pl utility, manually edited some of the files under policy/domains/program and policy/file_contexts, and followed some of the instructions given my others on this list. So far, I have had no luck:
the same messages at the same time for the same reasons.

OK. At a quick glance these appear to be issues I've already solved in my tree. In a few hours I'll update my web site
http://www.coker.com.au/selinux/ with my latest policy (although the version that's currently there should solve the vast majority of it).

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#13 lore raw
Quoted 3 lines

Yes, they probably have. But most of them seem to have suffered in silence. It seems that I'm the only SE Linux user who is spending any time writing policy files and then publishing them.

Hah, tonight I've actually been working on policy files for Samba. This is my first time dabbling with domains - could any of you who are much more versed with SELinux take a quick look and tell me if everything seems in order?

I haven't had anything denied recently, but that's when Samba's being used for my purposes. Your mileage may vary. The above files also required a small change to the dhcpc domain, adding:

allow dhcpc_t nmbd_t:packet_socket recvfrom; allow dhcpc_t smbd_t:packet_socket recvfrom; allow dhcpc_t tcp_socket_t:packet_socket recvfrom;

Feeback is highly appreciated. No better way to get used to SELinux than jumping in head-first...

-Ryan

#14 lore raw
Quoted 9 lines · Ryan Bergauer

Hah, tonight I've actually been working on policy files for Samba. This is my first time dabbling with domains - could any of you who are much more versed with SELinux take a quick look and tell me if everything seems in order?

I haven't had anything denied recently, but that's when Samba's being used for my purposes. Your mileage may vary. The above files also required a small change to the dhcpc domain, adding:

Quoted 6 lines

allow dhcpc_t nmbd_t:packet_socket recvfrom; allow dhcpc_t smbd_t:packet_socket recvfrom; allow dhcpc_t tcp_socket_t:packet_socket recvfrom;

Feeback is highly appreciated. No better way to get used to SELinux than jumping in head-first...

Thanks for contributing. A few questions/suggestions:
1) You may want to be more restrictive in granting read access to smbd/nmbd than what is currently permitted under every_domain() and by your allow rules to home_type. Ideally, we'd like to see all of the domains reworked to move away from using every_domain in order to provide true least privilege. Notice that every_domain is already partitioned into some smaller macros that you can use and that you could easily define even finer-grained subset macros.
2) You can pick up some common declarations and rules for daemons from the daemon_domain macro in global_macros.te, contributed by Russell.
3) It would be a good idea to define a separate type for /var/cache/samba and only grant smbd/nmbd access to it rather than the generic var_t type.
4) Why does nmbd_t need recvfrom permission to initrc_t? Are any of your system processes being left in initrc_t due to a lack of a domain? Check your ps -e --context output.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#15 lore raw
Quoted 10 lines · Stephen Smalley

Thanks for contributing. A few questions/suggestions:
1) You may want to be more restrictive in granting read access to smbd/nmbd than what is currently permitted under every_domain() and by your allow rules to home_type. Ideally, we'd like to see all of the domains reworked to move away from using every_domain in order to provide true least privilege. Notice that every_domain is already partitioned into some smaller macros that you can use and that you could easily define even finer-grained subset macros.
2) You can pick up some common declarations and rules for daemons from the daemon_domain macro in global_macros.te, contributed by Russell.

Done. It still gets quite a few permissions, but it's better than using every_domain(). I also changed it to work with user_home_t in place of home_type.

Quoted 1 line

3) It would be a good idea to define a separate type for

/var/cache/samba

Quoted 1 line

and only grant smbd/nmbd access to it rather than the generic var_t

type.

I actually did that last night after I submitted. I also created a samba_share_t to allow Samba to share only those files that I intend it to (outside of the user homes).

Quoted 1 line

4) Why does nmbd_t need recvfrom permission to initrc_t? Are any of

your

Quoted 1 line

system processes being left in initrc_t due to a lack of a domain?

Check

Quoted 1 line

your ps -e --context output.

Very good question. That confused me last night but I included it anyway. I've since switched to a single samba.te file (per Russell's suggestion), left out the initrc_t recvfrom permission, and haven't had it pop up again. Strange.

I've attached samba.te and samba.fc with all of the changes. Nothing is labeled with samba_share_t by default.

-Ryan

#16 lore raw
Quoted 4 lines · Ryan Bergauer

Very good question. That confused me last night but I included it anyway. I've since switched to a single samba.te file (per Russell's suggestion), left out the initrc_t recvfrom permission, and haven't had it pop up again. Strange.

Using a single file does not require using a single domain. You can have separate domains for nmbd and smbd in the same file.

Also better allow it to create it's log files...

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#17 lore raw
Quoted 1 line · Russell Coker

Using a single file does not require using a single domain. You can

have

Quoted 1 line

separate domains for nmbd and smbd in the same file.

Good point. Although they require very close to the same privileges, so I don't believe it matters too much in this case.

Quoted 1 line

Also better allow it to create it's log files...

Whoops. Yes, good point.

Ok, updated samba.te is attached.

-Ryan

#18 lore raw
Quoted 9 lines · Ryan Bergauer
Quoted 1 line · Russell Coker

Using a single file does not require using a single domain. You can

have

Quoted 1 line

separate domains for nmbd and smbd in the same file.

Good point. Although they require very close to the same privileges, so I don't believe it matters too much in this case.

nmbd needs UDP, smbd needs TCP. smbd needs read/write access to all user files, nmbd doesn't.

If nmbd has a bug (it's had one before) then you're better off with different domains.

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#19 lore raw
Quoted 1 line · Russell Coker

nmbd needs UDP, smbd needs TCP. smbd needs read/write access to all

user

Quoted 4 lines

files, nmbd doesn't.

If nmbd has a bug (it's had one before) then you're better off with different domains.

Done. The updated files are attached.

-Ryan

#20 lore raw
Quoted 11 lines · Ryan Bergauer
Quoted 1 line · Russell Coker

nmbd needs UDP, smbd needs TCP. smbd needs read/write access to all

user

Quoted 4 lines

files, nmbd doesn't.

If nmbd has a bug (it's had one before) then you're better off with different domains.

Done. The updated files are attached.

These three are covered by daemon_domain() in my latest global_macros.te file, Steve, are you putting them in your tree?
allow smbd_t console_device_t:chr_file { read write };
allow smbd_t null_device_t:chr_file { read write ioctl }; allow smbd_t init_t:fd { use };

As a general rule we don't want to allow daemons to over-write their own config. The problem is that if one smbd instance can be compromised then the config file can be changed to do nasty things (such as authenticate users from a different server).
# Permissions for Samba files in /etc/samba
allow smbd_t samba_etc_t:file { write setattr getattr read lock }; allow smbd_t samba_etc_t:dir { search getattr };

I suggest having a separate type for the file(s) that smbd really needs to write (may need a file_type_auto_trans rile).

Also you appear to be lacking port definitions. You want to define port types for ports 137..139 and allow only Samba to connect to them. Check out some of the daemons I've written policy for (slapd or dictd) to see an example of how to do it.

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#21 lore raw
Quoted 5 lines · Russell Coker

These three are covered by daemon_domain() in my latest global_macros.te file, Steve, are you putting them in your tree?
allow smbd_t console_device_t:chr_file { read write };
allow smbd_t null_device_t:chr_file { read write ioctl }; allow smbd_t init_t:fd { use };

Yes, these rules are included in daemon_domain in our internal CVS tree, but I don't think that they were in the last public release.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#22 lore raw
In reply to Ryan Bergauer
Quoted 8 lines · Ryan Bergauer
Quoted 3 lines

Yes, they probably have. But most of them seem to have suffered in silence. It seems that I'm the only SE Linux user who is spending any time writing policy files and then publishing them.

Hah, tonight I've actually been working on policy files for Samba. This is my first time dabbling with domains - could any of you who are much more versed with SELinux take a quick look and tell me if everything seems in order?

Firstly, only have one .te file for an application. smbd and nmbd can not be used independantly, so there's no benefit in separate policy files.

Next, look at the daemon_domain() macro, and consider not using the every_domain() macro (maybe you can give it more restrictive permissions.

Quoted 2 lines

Feeback is highly appreciated. No better way to get used to SELinux than jumping in head-first...

Yes.

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#23 lore raw
In reply to Russell Coker
Quoted 3 lines · Russell Coker

Yes, they probably have. But most of them seem to have suffered in silence. It seems that I'm the only SE Linux user who is spending any time writing policy files and then publishing them.

almost. :)

we had a short flurry of "hey, everyone post their greatest policy files" on the list some time back, but not much came of it if I remember.

Selinux is a tough topic, and hard to understand. plus the sheer volume of options is deafening. getting the system too boot in enforcing mode is a challenge.

I guess the worst problem is that it takes so much time to dive into selinux. most of us interested in it professionally (i.e. with the necessary drive to go through it no matter the hassle) are probably swamped with other projects and lack the time required.

Signature · 9 lines
New GPG Key issued (old key expired):
http://web.lemuria.org/pubkey.html
pub  1024D/2D7A04F5 2002-05-16 Tom Vogt <[email protected]>
     Key fingerprint = C731 64D1 4BCF 4C20 48A4  29B2 BF01 9FA1 2D7A 04F5

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#24 lore raw
Quoted 4 lines · Tom

I guess the worst problem is that it takes so much time to dive into selinux. most of us interested in it professionally (i.e. with the necessary drive to go through it no matter the hassle) are probably swamped with other projects and lack the time required.

This is precisely my problem: finding enough time in one block to do some serious work on it rather than the few days here and there I've been able to spare over the last year or so. Life as a consultant for hire puts your priorities in a certain order :-)

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#25 lore raw
In reply to Russell Coker

Mr. Coker,

Quoted 24 lines · --- Russell Coker
Quoted 6 lines · Brad Chapman
Quoted 1 line

It is impossible to answer your question as asked.

I apologize for my ambiguity. I assumed that people who had
previously installed SELInux on this list had experienced the same difficulties setting up a good policy, and that they would have some good "generic" guidelines for me to follow.

Yes, they probably have. But most of them seem to have suffered in silence.

It seems that I'm the only SE Linux user who is spending any time writing policy files and then publishing them.

Quoted 10 lines
Quoted 4 lines

I suggest that you should start by sending email to this list with examples of the operations that are being denied along with the new rules that you plan to resolve the issue. Then Steve and I can advise you on whether you are on the correct path towards good SE policy.

Attached (MIME) is the output of dmesg with kernel messages edited
out. I have used the newrules.pl utility, manually edited some of the files under policy/domains/program and policy/file_contexts, and followed some of the instructions given my others on this list. So far, I have had no luck:
the same messages at the same time for the same reasons.

Quoted 4 lines

OK. At a quick glance these appear to be issues I've already solved in my tree. In a few hours I'll update my web site
http://www.coker.com.au/selinux/ with my latest policy (although the version that's currently there should solve the vast majority of it).

Could you please help me fix your Makefile for my system? I can't seem
to make it compile the policy; it keeps failing with this error:

( cd macros/program/ ; for n in *.te ; do echo "define(\`$n')"; done ) > tmp/macro_used_flags.te
/bin/sh: tmp/macro_used_flags.te: No such file or directory
make: *** [tmp/macro_used_flags.te] Error 1

I'm running RedHat 6.2 with SELinux installed in /usr/local/selinux.

Thanks,

Brad

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#26 lore raw
Quoted 9 lines · Brad Chapman

Could you please help me fix your Makefile for my system? I can't
seem to make it compile the policy; it keeps failing with this error:

( cd macros/program/ ; for n in *.te ; do echo "define(\`$n')"; done ) > tmp/macro_used_flags.te
/bin/sh: tmp/macro_used_flags.te: No such file or directory
make: *** [tmp/macro_used_flags.te] Error 1

I'm running RedHat 6.2 with SELinux installed in /usr/local/selinux.

mkdir /usr/local/selinux/tmp

I think that Steve fixed this when merging my code into his tree. I'll merge his fix when I get the next NSA release.

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#27 lore raw

Mr. Coker,

Quoted 9 lines · --- Russell Coker
Quoted 8 lines · Brad Chapman

Could you please help me fix your Makefile for my system? I can't
seem to make it compile the policy; it keeps failing with this error:

( cd macros/program/ ; for n in *.te ; do echo "define(\`$n')"; done ) > tmp/macro_used_flags.te
/bin/sh: tmp/macro_used_flags.te: No such file or directory
make: *** [tmp/macro_used_flags.te] Error 1

Quoted 7 lines
Quoted 1 line

I'm running RedHat 6.2 with SELinux installed in /usr/local/selinux.

mkdir /usr/local/selinux/tmp

I think that Steve fixed this when merging my code into his tree. I'll merge

his fix when I get the next NSA release.

Sorry, it doesn't work. I get the exact same error. I also tried mkdir
/usr/local/selinux/flask/tmp since I had to modify the Makefile to look in that dir for some of the context files it needed, but I still didn't have any luck.

Brad

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#28 lore raw
Quoted 13 lines · Brad Chapman
Quoted 13 lines
Quoted 7 lines

( cd macros/program/ ; for n in *.te ; do echo "define(\`$n')"; done )

Quoted 1 line

tmp/macro_used_flags.te

/bin/sh: tmp/macro_used_flags.te: No such file or directory
make: *** [tmp/macro_used_flags.te] Error 1

I'm running RedHat 6.2 with SELinux installed in
/usr/local/selinux.

mkdir /usr/local/selinux/tmp

I think that Steve fixed this when merging my code into his tree. I'll merge

Quoted 6 lines
Quoted 1 line

his fix when I get the next NSA release.

Sorry, it doesn't work. I get the exact same error. I also tried
mkdir /usr/local/selinux/flask/tmp since I had to modify the Makefile to look in that dir for some of the context files it needed, but I still didn't have any luck.

I think that the issue here is that you modified things to not be in the same layout that I designed but without correctly modifying the Makefile to match.

Try getting it going with the same layout I use and then changing it gradually into the setup you prefer.

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#29 lore raw
In reply to Brad Chapman

Mr. Coker,

Quoted 41 lines · --- Brad Chapman

Mr. Coker,

Quoted 3 lines · --- Russell Coker
Quoted 2 lines · Brad Chapman

I have just started using SELinux on my 2.4.18 system. I found an
enormous number of avc: denied messages in my dmesg and attempted to

remove

Quoted 3 lines
Quoted 3 lines

them. So far I have tweaked the devfs_contexts and the policy.conf files (using scripts/newrules.pl for policy.conf) since most of the errors were related to device files and system call commands. I have also installed

the

Quoted 1 line
Quoted 1 line

SELinux devfsd extension and added the config entries to my devfsd.conf,

to

Quoted 6 lines
Quoted 4 lines

no apparent avail.

What is the fastest way to eliminate most (if not preferably all) of
these messages and put me closer to activating enforcing mode?

It is impossible to answer your question as asked.

I apologize for my ambiguity. I assumed that people who had previously
installed SELInux on this list had experienced the same difficulties setting up
a good policy, and that they would have some good "generic" guidelines for me to follow.

Quoted 6 lines

I suggest that you should start by sending email to this list with examples

of the operations that are being denied along with the new rules that you plan to resolve the issue. Then Steve and I can advise you on whether you are on the correct path towards good SE policy.

Attached (MIME) is the output of dmesg with kernel messages edited
out.
I have used the newrules.pl utility, manually edited some of the files under policy/domains/program and policy/file_contexts, and followed some of the instructions given my others on this list. So far, I have had no luck: the same
messages at the same time for the same reasons.

Quoted 1 line

Thank God for CONFIG_SECURITY_SELINUX_DEVELOP......

If you are interested, here is another dmesg output after some system
use.

Brad

Quoted 17 lines
Quoted 8 lines

Also once you have become skilled at policy creation you should send to the

list any improvements that you devise for the default sample policy. Steve

is very good about incorporating improvements into the NSA releases.

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

Quoted 6 lines

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

ATTACHMENT part 2 application/octet-stream name=selinux-dmesg-output

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

#30 lore raw
Quoted 2 lines · Brad Chapman

If you are interested, here is another dmesg output after some
system use.

You need the following in gpm.te (it'll be in my new tree):
ifdef(devfsd.te', file_type_auto_trans(gpm_t, device_t, gpmctl_t)')

For alsa, is /dev/snd really the right thing to do? Probably best to have a script do this whcih is labelled such that a transition from initrc_t will take place.

For the syslogd/klogs errors, change the syslogd.te and klogd.te you need to change the domain_auto_trans() rules to take a transition from init_t instead of initrc_t because you are not running those daemons in the normal fashion.

Maybe you should have /usr/X11R6/bin/XFree86 labelled as system_u:object_r:xserver_exec_t...

/dev/nvidiactl needs an appropriate type.

There's still a heap of issues that my latest devfsd.te will solve. See
http://www.coker.com.au/selinux/selinux-small/ ...

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#31 lore raw

Mr. Coker,

Quoted 6 lines · --- Russell Coker
Quoted 2 lines · Brad Chapman

If you are interested, here is another dmesg output after some
system use.

You need the following in gpm.te (it'll be in my new tree):
ifdef(devfsd.te', file_type_auto_trans(gpm_t, device_t, gpmctl_t)')

Done

Quoted 4 lines

For alsa, is /dev/snd really the right thing to do? Probably best to have a script do this whcih is labelled such that a transition from initrc_t will take place.

I prefer to use /dev/snd because it's cleaner and follows the devfs
tradition; I keep a bunch of symlinks laying around in /dev just to keep certain programs happy.

Quoted 5 lines

For the syslogd/klogs errors, change the syslogd.te and klogd.te you need to change the domain_auto_trans() rules to take a transition from init_t instead

of initrc_t because you are not running those daemons in the normal fashion.

"Normal fashion?" Do other distros start syslogd and klogd straight from
/etc/inittab? Done

Quoted 3 lines

Maybe you should have /usr/X11R6/bin/XFree86 labelled as system_u:object_r:xserver_exec_t...

How do I do that?

Quoted 2 lines

/dev/nvidiactl needs an appropriate type.

How do I do this too? Should I mess with devfs_contexts or devfsd.conf?

Quoted 4 lines

There's still a heap of issues that my latest devfsd.te will solve. See
http://www.coker.com.au/selinux/selinux-small/ ...

Brad

=====
Brad Chapman

Permanent e-mails: [email protected]
[email protected]
[email protected]

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#32 lore raw
Quoted 9 lines · Brad Chapman
Quoted 6 lines

For the syslogd/klogs errors, change the syslogd.te and klogd.te you need to change the domain_auto_trans() rules to take a transition from init_t instead

of initrc_t because you are not running those daemons in the normal fashion.

"Normal fashion?" Do other distros start syslogd and klogd straight
from /etc/inittab? Done

No, most distributions start them from /etc/init.d scrips. I guessed that you started them from inittab because they were running as init_t instead of initrc_t.

What you want to do is have the script that calls all the startup scripts labelled as initrc_exec_t, usually one of the following catches it:

/etc/rc.d/rc                    system_u:object_r:initrc_exec_t
/etc/rc.d/rc.sysinit            system_u:object_r:initrc_exec_t
/etc/rc.d/rc.local              system_u:object_r:initrc_exec_t
/etc/init.d/rc.*                system_u:object_r:initrc_exec_t
Quoted 4 lines
Quoted 2 lines

Maybe you should have /usr/X11R6/bin/XFree86 labelled as system_u:object_r:xserver_exec_t...

How do I do that?

Put the appropriate entry in file_contexts/programs/whatever and relabel the file system.

Quoted 4 lines
Quoted 1 line

/dev/nvidiactl needs an appropriate type.

How do I do this too? Should I mess with devfs_contexts or
devfsd.conf?

Either can work, although due to a devfs related bug devfs_contexts is a better option at the moment.

Signature · 3 lines
I do not get viruses because I do not use MS software.
If you use Outlook then please do not put my email address in your
address-book so that WHEN you get a virus it won't use my address in the
Quoted 1 line

From field.

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.