From 567ee4116e0a7f842862bfc35d97f2fb9fe082a0 Mon Sep 17 00:00:00 2001
From: Stephen Smalley <sds@tycho.nsa.gov>
Date: Fri, 20 Sep 2013 12:32:45 -0400
Subject: [PATCH] Label /dev/socket/gps with its own type.

The type was already defined and used in type transitions for cases
where the gps socket is created at runtime by gpsd, but on some devices
it is created by init based on an init.<board>.rc socket entry and therefore
needs a file_contexts entry.

Before:
$ ls -Z /dev/socket/gps
srw-rw---- gps      system            u:object_r:device:s0 gps

After:
$ ls -Z /dev/socket/gps
srw-rw---- gps      system            u:object_r:gps_socket:s0 gps

Change-Id: I8eef08d80e965fc4f3e9dd09d4fa446aaed82624
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
---
 file_contexts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/file_contexts b/file_contexts
index e128420cb..0010a182b 100644
--- a/file_contexts
+++ b/file_contexts
@@ -83,6 +83,7 @@
 /dev/socket/adbd	u:object_r:adbd_socket:s0
 /dev/socket/bluetooth	u:object_r:bluetooth_socket:s0
 /dev/socket/dnsproxyd	u:object_r:dnsproxyd_socket:s0
+/dev/socket/gps		u:object_r:gps_socket:s0
 /dev/socket/installd	u:object_r:installd_socket:s0
 /dev/socket/keystore	u:object_r:keystore_socket:s0
 /dev/socket/mdns	u:object_r:mdns_socket:s0
-- 
GitLab