Skip to contentSkip to conversation

etc type naming

PATCH In review Chris PeBenito 3 participants 4 messages Dec 27, 2003 – Feb 26, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 etc type naming

Attached is a hefty patch to change almost all of the etc type names to be consistent with the rest of the policy naming. Namely, the daemon/program is prefixed.

ex: etc_cupsd_t -> cupsd_etc_t

I have successfully compiled the entire example policy after applying the patch, but it probably should be doublechecked. I left a few types as is, since they're generic:

etc_aliases_t
etc_mail_t
etc_runtime_t

Openca has a pair of weird types that should probably be changed, but I left them for now:

openca_etc_in_t
openca_etc_writeable_t

 domains/program/getty.te             |    4 ++--
 domains/program/unused/authbind.te   |    6 +++---
 domains/program/unused/bootloader.te |    6 +++---
 domains/program/unused/courier.te    |    8 ++++----
 domains/program/unused/cups.te       |   16 ++++++++--------
 domains/program/unused/ddt-client.te |    4 ++--
 domains/program/unused/devfsd.te     |    6 +++---
 domains/program/unused/dhcpc.te      |    6 +++---
 domains/program/unused/dhcpd.te      |    6 +++---
 domains/program/unused/dictd.te      |    4 ++--
 domains/program/unused/dpkg.te       |   20 ++++++++++----------
 domains/program/unused/fingerd.te    |    4 ++--
 domains/program/unused/ftpd.te       |    4 ++--
 domains/program/unused/gatekeeper.te |    4 ++--
 domains/program/unused/hotplug.te    |    8 ++++----
 domains/program/unused/ircd.te       |    4 ++--
 domains/program/unused/mrtg.te       |   10 +++++-----
 domains/program/unused/mysqld.te     |    6 +++---
 domains/program/unused/nessusd.te    |    4 ++--
 domains/program/unused/netsaint.te   |   12 ++++++------
 domains/program/unused/ntpd.te       |    6 +++---
 domains/program/unused/perdition.te  |    6 +++---
 domains/program/unused/postfix.te    |   10 +++++-----
 domains/program/unused/postgresql.te |    4 ++--
 domains/program/unused/pppd.te       |    4 ++--
 domains/program/unused/qmail.te      |   10 +++++-----
 domains/program/unused/radius.te     |    6 +++---
 domains/program/unused/radvd.te      |    4 ++--
 domains/program/unused/slapd.te      |    6 +++---
 domains/program/unused/snmpd.te      |    4 ++--
 domains/program/unused/usbmodules.te |    2 +-
 domains/program/unused/xdm.te        |    8 ++++----
 file_contexts/program/authbind.fc    |    2 +-
 file_contexts/program/bootloader.fc  |    2 +-
 file_contexts/program/courier.fc     |    4 ++--
 file_contexts/program/cups.fc        |   18 +++++++++---------
 file_contexts/program/ddt-client.fc  |    2 +-
 file_contexts/program/devfsd.fc      |    2 +-
 file_contexts/program/dhcpc.fc       |    6 +++---
 file_contexts/program/dhcpd.fc       |    4 ++--
 file_contexts/program/dictd.fc       |    2 +-
 file_contexts/program/dpkg.fc        |    6 +++---
 file_contexts/program/fingerd.fc     |    2 +-
 file_contexts/program/ftpd.fc        |    2 +-
 file_contexts/program/gatekeeper.fc  |    2 +-
 file_contexts/program/getty.fc       |    2 +-
 file_contexts/program/hotplug.fc     |    2 +-
 file_contexts/program/ircd.fc        |    2 +-
 file_contexts/program/mrtg.fc        |    2 +-
 file_contexts/program/mysqld.fc      |    4 ++--
 file_contexts/program/nessusd.fc     |    2 +-
 file_contexts/program/netsaint.fc    |    2 +-
 file_contexts/program/ntpd.fc        |    2 +-
 file_contexts/program/perdition.fc   |    2 +-
 file_contexts/program/postfix.fc     |    2 +-
 file_contexts/program/postgresql.fc  |    2 +-
 file_contexts/program/qmail.fc       |    4 ++--
 file_contexts/program/radius.fc      |    2 +-
 file_contexts/program/radvd.fc       |    2 +-
 file_contexts/program/slapd.fc       |    2 +-
 file_contexts/program/snmpd.fc       |    2 +-
 file_contexts/program/xdm.fc         |    2 +-
 macros/program/lpr_macros.te         |    2 +-
 macros/program/mta_macros.te         |    4 ++--
 macros/user_macros.te                |    2 +-
 65 files changed, 156 insertions(+), 156 deletions(-)

c5593874ff9319c4a626c792cd5a463d policy-1.4-etc_t_name_consistency.diff.gz

Signature · 8 lines
Chris PeBenito
<[email protected]>
Developer,
Hardened Gentoo Linux
Embedded Gentoo Linux
 
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243
Key fingerprint = B0E6 877A 883F A57A 8E6A  CB00 BC8E E42D E6AF 9243
#1 lore raw
Quoted 5 lines · Chris PeBenito

Attached is a hefty patch to change almost all of the etc type names to be consistent with the rest of the policy naming. Namely, the daemon/program is prefixed.

ex: etc_cupsd_t -> cupsd_etc_t

The kinder, gentler way of making this kind of change is to introduce type aliases with the old type name so that people can easily migrate to the new type names on running systems, e.g.

-type etc_getty_t, file_type, sysadmfile; -r_dir_file(getty_t, etc_getty_t)
+type getty_etc_t alias etc_getty_t, file_type, sysadmfile; +r_dir_file(getty_t, getty_etc_t)

The type alias lets someone load the patched policy without invalidating existing contexts with the old type name and making objects labeled with those contexts inaccessible.

Signature · 8 lines
Stephen Smalley <[email protected]>
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.
#2 lore raw
Quoted 10 lines · Stephen Smalley
Quoted 5 lines · Chris PeBenito

Attached is a hefty patch to change almost all of the etc type names to be consistent with the rest of the policy naming. Namely, the daemon/program is prefixed.

ex: etc_cupsd_t -> cupsd_etc_t

The kinder, gentler way of making this kind of change is to introduce type aliases with the old type name so that people can easily migrate to the new type names on running systems, e.g.

Ah, good point. I updated the patch to add in the type aliases.

Signature · 8 lines
Chris PeBenito
<[email protected]>
Developer,
Hardened Gentoo Linux
Embedded Gentoo Linux
 
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243
Key fingerprint = B0E6 877A 883F A57A 8E6A  CB00 BC8E E42D E6AF 9243
#3 lore raw
Quoted 6 lines · Chris PeBenito
Quoted 5 lines · Stephen Smalley
Quoted 4 lines · Chris PeBenito

Attached is a hefty patch to change almost all of the etc type names to be consistent with the rest of the policy naming. Namely, the daemon/program is prefixed.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

ex: etc_cupsd_t -> cupsd_etc_t

The kinder, gentler way of making this kind of change is to introduce type aliases with the old type name so that people can easily migrate to the new type names on running systems, e.g.

Ah, good point. I updated the patch to add in the type aliases.

I've included that into my tree. While I was at it I used the new typealias directive, and I added some global macros etc_domain() and etcdir_domain().

Signature · 10 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


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