Skip to contentSkip to conversation

I am more worried about open then read and write, SELinux needs open access checks.

DISCUSSION Steve G 4 participants 4 messages Jan 24, 2008 SELinux security module

lore
Share & tools
lore

Steve G

author
#0 lore raw
Quoted 2 lines

I would like to propose that we add one or more avc's to deal with opening a file. open or open_read open_write.

There are situations where apps should only do an open_append to make sure they don't erase anything. syslog, auditd, apache are a few apps that come to mind.

-Steve

      ____________________________________________________________________________________

Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

--
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.

#1 lore raw
Quoted 8 lines · Steve G
Quoted 2 lines

I would like to propose that we add one or more avc's to deal with opening a file. open or open_read open_write.

There are situations where apps should only do an open_append to make sure they don't erase anything. syslog, auditd, apache are a few apps that come to mind.

-Steve

As far as I'm aware, SELinux, and this requested addition, doesn't govern _how_ you write, just whether you _can_ write.

_______________________________
Brett Lentz | CarDomain Network
System Administrator

[email protected] | tel 206.926.2109 | cell 206.851.6669
http://www.cardomain.com/id/wakko666

"A University without students is like an ointment without a fly."
-- Ed Nather, professor of astronomy at UT Austin

--
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.

#2 lore raw
In reply to Steve G
Quoted 5 lines · Steve G
Quoted 2 lines

I would like to propose that we add one or more avc's to deal with opening a file. open or open_read open_write.

There are situations where apps should only do an open_append to make sure they don't erase anything. syslog, auditd, apache are a few apps that come to mind.

Just to clarify:
- SELinux already distinguishes append vs. write (checks append permission if opened with O_APPEND and checks write if you later try to clear via fcntl).
- I only expect us to add a single "open" permission to control whether a process can directly open a given file at all, not distinct "open_read", "open_write", "open_append" permissions. The usual read/write/append permissions will still get checked, both at open time and upon inheritance/transfer (and rechecked on read/write if the process or file label has changed or the policy has changed), but those are separate checks. The purpose of the new "open" check being proposed is to allow the policy writer to distinguish direct open of a file from inheriting it from another process.

Signature · 8 lines
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 [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#3 lore raw

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

Quoted 6 lines · Stephen Smalley
Quoted 4 lines · Steve G
Quoted 2 lines

I would like to propose that we add one or more avc's to deal with opening a file. open or open_read open_write.

There are situations where apps should only do an open_append to make sure they don't erase anything. syslog, auditd, apache are a few apps that come to mind.

Quoted 14 lines

Just to clarify:
- SELinux already distinguishes append vs. write (checks append permission if opened with O_APPEND and checks write if you later try to clear via fcntl).
- I only expect us to add a single "open" permission to control whether a process can directly open a given file at all, not distinct "open_read", "open_write", "open_append" permissions. The usual read/write/append permissions will still get checked, both at open time and upon inheritance/transfer (and rechecked on read/write if the process or file label has changed or the policy has changed), but those are separate checks. The purpose of the new "open" check being proposed is to allow the policy writer to distinguish direct open of a file from inheriting it from another process.

Correct, that is what I want.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkeY/2QACgkQrlYvE4MpobMjwACaAv192sC311cBCcjBb/GJtzXz AK8AoKmX4LLWBlhz15N7FwCWdBn/4+7w
=jts1
-----END PGP SIGNATURE-----

--
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.