Skip to contentSkip to conversation

Allow release_app getattr of netlink_selinux sockets

PATCH In review Haiqing Jiang 2 participants 2 messages Jul 30, 2012 – Jul 31, 2012 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow release_app getattr of netlink_selinux sockets

---
 app.te |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
app.te +2 -0
index 139652f..4e002bf 100644
@@ -63,6 +63,8 @@ net_domain(release_app)
 bluetooth_domain(release_app)
 # Read logs.
 allow release_app log_device:chr_file read;
+# Use netlink_selinux socket
+allow release_app zygote:netlink_selinux_socket getattr;
 
 #
 # An example of a specific domain for a specific app
Signature · 7 lines
1.7.0.4


--
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 3 lines · Haiqing Jiang
---
 app.te |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

I think the right fix is to instead close the NETLINK_SELINUX socket in the child process. I've made this change to libselinux. Can you re-test with the new libselinux and see if the permission is still required by the test?

Quoted 14 lines
app.te +2 -0
index 139652f..4e002bf 100644
@@ -63,6 +63,8 @@ net_domain(release_app)
 bluetooth_domain(release_app)
 # Read logs.
 allow release_app log_device:chr_file read;
+# Use netlink_selinux socket
+allow release_app zygote:netlink_selinux_socket getattr;
 
 #
 # An example of a specific domain for a specific app
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.