Default to socket_device for anything under /dev/socket.
Otherwise sockets that have no specific entry match the /dev(/.*) entry
instead, leaving them in device type rather than socket_device type.
Every socket should get its own entry regardless, but this at least puts
it into a more specific type by default.
Change-Id: I97f7999af7f9f83484d3a51440dda791d3726f1a
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
diff --git a/file_contexts b/file_contexts
index 7579771..20b7915 100644
--- a/file_contexts
+++ b/file_contexts
@@ -75,7 +75,7 @@
/dev/rpmsg-omx[0-9] u:object_r:rpmsg_device:s0
/dev/rproc_user u:object_r:rpmsg_device:s0
/dev/snd(/.*)? u:object_r:audio_device:s0
-/dev/socket u:object_r:socket_device:s0
+/dev/socket(/.*)? u:object_r:socket_device:s0
/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