All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH external/sepolicy] Add selinux network script to policy
@ 2012-06-20 15:58 jbrindle
  2012-06-20 15:58 ` [PATCH build] add selinux-network.sh to SELINUX_DEPENDS for SELinux network labeling jbrindle
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: jbrindle @ 2012-06-20 15:58 UTC (permalink / raw)
  To: selinux; +Cc: Joshua Brindle

From: Joshua Brindle <jbrindle@tresys.com>

Signed-off-by: Joshua Brindle <jbrindle@tresys.com>
---
 Android.mk         |   13 +++++++++++++
 selinux-network.sh |   18 ++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100755 selinux-network.sh

diff --git a/Android.mk b/Android.mk
index 68f4c69..002a656 100644
--- a/Android.mk
+++ b/Android.mk
@@ -85,4 +85,17 @@ $(property_contexts): $(LOCAL_PATH)/property_contexts $(LOCAL_POLICY_PC)
 property_contexts :=
 ##################################
 
+##################################
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := selinux-network.sh
+LOCAL_SRC_FILES := $(LOCAL_MODULE)
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)
+
+include $(BUILD_PREBUILT)
+
+##################################
+
 endif #ifeq ($(HAVE_SELINUX),true)
diff --git a/selinux-network.sh b/selinux-network.sh
new file mode 100755
index 0000000..7d38623
--- /dev/null
+++ b/selinux-network.sh
@@ -0,0 +1,18 @@
+#!/system/bin/sh
+
+IPTABLES="/system/bin/iptables"
+
+#$IPTABLES -t security -A INPUT -i wlan0 -j SECMARK --selctx u:object_r:packet:s0
+#$IPTABLES -t security -A INPUT -i lo -j SECMARK --selctx u:object_r:lo_packet:s0
+#$IPTABLES -t security -A INPUT -i ppp0 -j SECMARK --selctx u:object_r:ppp0_packet:s0
+#$IPTABLES -t security -A INPUT -i ppp1 -j SECMARK --selctx u:object_r:ppp1_packet:s0
+#$IPTABLES -t security -A INPUT -i ppp2 -j SECMARK --selctx u:object_r:ppp2_packet:s0
+#$IPTABLES -t security -A INPUT -i ppp3 -j SECMARK --selctx u:object_r:ppp3_packet:s0
+
+#$IPTABLES -t security -A OUTPUT -o wlan0 -j SECMARK --selctx u:object_r:packet:s0
+#$IPTABLES -t security -A OUTPUT -o lo -j SECMARK --selctx u:object_r:lo_packet:s0
+#$IPTABLES -t security -A OUTPUT -o ppp0 -j SECMARK --selctx u:object_r:ppp0_packet:s0
+#$IPTABLES -t security -A OUTPUT -o ppp1 -j SECMARK --selctx u:object_r:ppp1_packet:s0
+#$IPTABLES -t security -A OUTPUT -o ppp2 -j SECMARK --selctx u:object_r:ppp2_packet:s0
+#$IPTABLES -t security -A OUTPUT -o ppp3 -j SECMARK --selctx u:object_r:ppp3_packet:s0
+
-- 
1.7.9.5


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-06-21 14:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-20 15:58 [PATCH external/sepolicy] Add selinux network script to policy jbrindle
2012-06-20 15:58 ` [PATCH build] add selinux-network.sh to SELINUX_DEPENDS for SELinux network labeling jbrindle
2012-06-20 15:58 ` [PATCH system/core] add SELinux network labeling script to startup jbrindle
2012-06-20 15:58 ` [PATCH kernel/tegra] Add security table to netfilter config jbrindle
2012-06-20 15:58 ` [PATCH kernel/omap] " jbrindle
2012-06-20 15:58 ` [PATCH kernel/samsung] enable secmark labeling and netfilter security table for SE Android network access controls jbrindle
2012-06-20 15:58 ` [PATCH kernel/goldfish] enable netfilter, secmark, and security tables jbrindle
2012-06-21 14:43 ` [PATCH external/sepolicy] Add selinux network script to policy Stephen Smalley
2012-06-21 14:46   ` Joshua Brindle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.