Skip to contentSkip to conversation

Create xattrfs attribute and use it instead of fs_t

RFC Superseded Laurent Bigoville 1 participant 2 messages Mar 5, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

RFC 1/1 Create xattrfs attribute and use it instead of fs_t

From: Laurent Bigonville <[email protected]>

Create xattrfs attribute and use it instead of fs_t for the file systems that support extended file attributes.

This patch add a new fs_xattr_type() interface.

---
 policy/modules/kernel/devices.te    |  4 +--
 policy/modules/kernel/filesystem.if | 55 ++++++++++++++++++++++++++-----------
 policy/modules/kernel/filesystem.te | 43 +++++++++++++++--------------
 policy/modules/kernel/kernel.te     |  6 ++--
 policy/modules/kernel/selinux.te    |  2 +-
 policy/modules/kernel/terminal.te   |  2 +-
 6 files changed, 68 insertions(+), 44 deletions(-)
policy/modules/kernel/devices.te +2 -2
index 8af85d3..9a18dda 100644
@@ -18,7 +18,7 @@ fs_associate_tmpfs(device_t)
 files_type(device_t)
 files_mountpoint(device_t)
 files_associate_tmp(device_t)
-fs_type(device_t)
+fs_xattr_type(device_t)
 fs_use_trans devtmpfs gen_context(system_u:object_r:device_t,s0);
 
 #
@@ -224,7 +224,7 @@ dev_node(sound_device_t)
 #
 type sysfs_t;
 files_mountpoint(sysfs_t)
-fs_type(sysfs_t)
+fs_xattr_type(sysfs_t)
 genfscon sysfs / gen_context(system_u:object_r:sysfs_t,s0)
 
 #
policy/modules/kernel/filesystem.if +39 -16

125 lines not on this page · raw message

policy/modules/kernel/filesystem.te +22 -21

140 lines not on this page · raw message

policy/modules/kernel/kernel.te +3 -3
index 7f7372f..633b63c 100644
@@ -57,7 +57,7 @@ sid kernel gen_context(system_u:system_r:kernel_t,mls_systemhigh)
 
 type debugfs_t;
 files_mountpoint(debugfs_t)
-fs_type(debugfs_t)
+fs_xattr_type(debugfs_t)
 allow debugfs_t self:filesystem associate;
 genfscon debugfs / gen_context(system_u:object_r:debugfs_t,s0)
 
@@ -66,7 +66,7 @@ genfscon debugfs / gen_context(system_u:object_r:debugfs_t,s0)
 #
 
 type kvmfs_t;
-fs_type(kvmfs_t)
+fs_xattr_type(kvmfs_t)
 genfscon kvmfs / gen_context(system_u:object_r:kvmfs_t,s0)
 
 #
@@ -75,7 +75,7 @@ genfscon kvmfs / gen_context(system_u:object_r:kvmfs_t,s0)
 
 type proc_t, proc_type;
 files_mountpoint(proc_t)
-fs_type(proc_t)
+fs_xattr_type(proc_t)
 genfscon proc / gen_context(system_u:object_r:proc_t,s0)
 genfscon proc /sysvipc gen_context(system_u:object_r:proc_t,s0)
 
policy/modules/kernel/selinux.te +1 -1
index e0a973b..5cf625d 100644
@@ -30,7 +30,7 @@ selinux_labeled_boolean(secure_mode_policyload_t, secure_mode_policyload)
 #
 type security_t, boolean_type;
 files_mountpoint(security_t)
-fs_type(security_t)
+fs_xattr_type(security_t)
 mls_trusted_object(security_t)
 sid security gen_context(system_u:object_r:security_t,mls_systemhigh)
 genfscon selinuxfs / gen_context(system_u:object_r:security_t,s0)
policy/modules/kernel/terminal.te +1 -1
index 66e116a..c59df22 100644
@@ -27,7 +27,7 @@ dev_node(console_device_t)
 type devpts_t;
 files_mountpoint(devpts_t)
 fs_associate_tmpfs(devpts_t)
-fs_type(devpts_t)
+fs_xattr_type(devpts_t)
 fs_use_trans devpts gen_context(system_u:object_r:devpts_t,s0);
 
 #
Signature · 1 line
1.9.0
#1 lore raw

Le Wed, 5 Mar 2014 21:12:06 +0100,
Laurent at oss1.tresys.com, "Bigoville <bigon"@debian.org a ?crit :

Quoted 6 lines

From: Laurent Bigonville <[email protected]>

Create xattrfs attribute and use it instead of fs_t for the file systems that support extended file attributes.

This patch add a new fs_xattr_type() interface.

Mhhh, nevermind, I didn't saw Christopher answer to my previous mail before sending this