Skip to contentSkip to conversation

locales

PATCH Russell Coker 3 participants 4 messages Jul 15, 2002 SELinux security module

lore
Share & tools
lore
#0 lore raw

---------- Forwarded Message ----------

Subject: locales
Date: Mon, 15 Jul 2002 10:47:35 +1000
From: Brian May <[email protected]>
To: Russell Coker <[email protected]>

Russell,

I suggest making the following change seeing as so many programs require read access to the locale files:

(still to resolve: execute permission for /usr/lib/gconv/*.so)

domains/misc/locales.te new file +2 -0
diff -Nru a/domains/misc/locales.te b/domains/misc/locales.te
@@ -0,0 +1,2 @@
+allow domain writeable_t:dir r_dir_perms;
+allow domain writeable_t:notdevfile_class_set r_file_perms;
domains/program/amanda.te +0 -3
diff -Nru a/domains/program/amanda.te b/domains/program/amanda.te
@@ -310,9 +310,6 @@
 allow amanda_recover_t amanda_recover_dir_t:dir { add_name remove_name
 search write }; allow amanda_recover_t amanda_recover_dir_t:file { append
 create getattr setattr unlink };
 
-# access to locale at /usr/lib/locale/de_DE/LC_CTYPE
-allow amanda_recover_t writeable_t:file { getattr read };
-
 # access to var_t and var_run_t
 allow amanda_recover_t var_t:dir { search };

allow amanda_recover_t var_run_t:dir { search };

domains/program/ipsec.te +0 -3
diff -Nru a/domains/program/ipsec.te b/domains/program/ipsec.te
@@ -164,9 +164,6 @@
 uses_shlib(ipsec_mgmt_t)
 uses_shlib(ipsec_t)
 allow ipsec_mgmt_t lib_t:dir r_dir_perms;
-# access /usr/lib/locale information
-allow ipsec_mgmt_t writeable_t:dir r_dir_perms;
-allow ipsec_mgmt_t writeable_t:file r_file_perms;
 # access /usr/share/locale
 allow ipsec_mgmt_t usr_t:file r_file_perms;
 # Read and write /dev/tty

--
Brian May <[email protected]>

-------------------------------------------------------

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.

#1 lore raw
Quoted 4 lines · Russell Coker

I suggest making the following change seeing as so many programs require read access to the locale files:

(still to resolve: execute permission for /usr/lib/gconv/*.so)

Access to writeable_t is granted by the general_file_write_access() macro. 'allow domain' rules should be minimized or completely avoided, as they prevent people from writing domains that are truly limited to least privilege.

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

#2 lore raw
Quoted 6 lines · Stephen Smalley
Quoted 3 lines · Russell Coker

I suggest making the following change seeing as so many programs require read access to the locale files:

Quoted 7 lines
Quoted 1 line

(still to resolve: execute permission for /usr/lib/gconv/*.so)

Access to writeable_t is granted by the general_file_write_access() macro. 'allow domain' rules should be minimized or completely avoided, as they prevent people from writing domains that are truly limited to least privilege.

Just happen to check 'allow domain' rules. In 'global_macros.te' file, there is a 'general_file_read_access' macro, in which there is a line like this

base_file_read_access(domain)

This looks strange to me.
It seems that every te files that uses 'general_file_read_access' will call 'base_file_read_access(domain)'
and end up having lots identical rules in policy.conf.
I have tried the following

% grep "allow domain root_t:dir" policy.conf | wc -l

and gives me 96 instance.

Just wonder if 'base_file_read_access(domain)' is supposed to be

base_file_read_access($1)

Thanks for helping,
Simon

--
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
Quoted 3 lines · Simon Han

Just wonder if 'base_file_read_access(domain)' is supposed to be

base_file_read_access($1)

Yes. I posted a patch correcting this error earlier today.

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