All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH external/sepolicy] Add iptables script to policy
@ 2012-06-16 18:56 Joshua Brindle
  2012-06-16 18:56 ` [PATCH build] add iptables-selinux.sh to SELINUX_DEPENDS Joshua Brindle
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Joshua Brindle @ 2012-06-16 18:56 UTC (permalink / raw)
  To: selinux, method; +Cc: Joshua Brindle

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

diff --git a/Android.mk b/Android.mk
index 68f4c69..0b744b0 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 := iptables-selinux.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/iptables-selinux.sh b/iptables-selinux.sh
new file mode 100755
index 0000000..e9ac7d1
--- /dev/null
+++ b/iptables-selinux.sh
@@ -0,0 +1,18 @@
+#!/system/bin/sh
+
+IPTABLES="/system/bin/iptables"
+
+#$IPTABLES -t mangle -A INPUT -i wlan0 -j SECMARK --selctx u:object_r:packet:s0
+#$IPTABLES -t mangle -A INPUT -i lo -j SECMARK --selctx u:object_r:lo_packet:s0
+#$IPTABLES -t mangle -A INPUT -i ppp0 -j SECMARK --selctx u:object_r:ppp0_packet:s0
+#$IPTABLES -t mangle -A INPUT -i ppp1 -j SECMARK --selctx u:object_r:ppp1_packet:s0
+#$IPTABLES -t mangle -A INPUT -i ppp2 -j SECMARK --selctx u:object_r:ppp2_packet:s0
+#$IPTABLES -t mangle -A INPUT -i ppp3 -j SECMARK --selctx u:object_r:ppp3_packet:s0
+
+#$IPTABLES -t mangle -A OUTPUT -o wlan0 -j SECMARK --selctx u:object_r:packet:s0
+#$IPTABLES -t mangle -A OUTPUT -o lo -j SECMARK --selctx u:object_r:lo_packet:s0
+#$IPTABLES -t mangle -A OUTPUT -o ppp0 -j SECMARK --selctx u:object_r:ppp0_packet:s0
+#$IPTABLES -t mangle -A OUTPUT -o ppp1 -j SECMARK --selctx u:object_r:ppp1_packet:s0
+#$IPTABLES -t mangle -A OUTPUT -o ppp2 -j SECMARK --selctx u:object_r:ppp2_packet:s0
+#$IPTABLES -t mangle -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] 18+ messages in thread

end of thread, other threads:[~2012-06-19 19:38 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-16 18:56 [PATCH external/sepolicy] Add iptables script to policy Joshua Brindle
2012-06-16 18:56 ` [PATCH build] add iptables-selinux.sh to SELINUX_DEPENDS Joshua Brindle
2012-06-16 18:56 ` [PATCH system/core] add iptables secmark labeling script to startup Joshua Brindle
2012-06-18 15:18   ` Paul Moore
2012-06-18 15:23     ` Joshua Brindle
2012-06-19 12:24       ` Stephen Smalley
2012-06-19 12:29         ` Joshua Brindle
2012-06-16 18:56 ` [PATCH kernel/tegra] enable secmark labeling for SE Android network access controls Joshua Brindle
2012-06-19 13:26   ` Stephen Smalley
2012-06-19 14:11     ` Joshua Brindle
2012-06-19 14:25       ` Joshua Brindle
2012-06-16 18:56 ` [PATCH kernel/omap] " Joshua Brindle
2012-06-19 13:27   ` Stephen Smalley
2012-06-16 18:56 ` [PATCH kernel/goldfish] " Joshua Brindle
2012-06-19 12:01   ` Stephen Smalley
2012-06-19 19:38     ` Joshua Brindle
2012-06-18 15:25 ` [PATCH external/sepolicy] Add iptables script to policy Paul Moore
2012-06-19 12:22   ` Stephen Smalley

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.