summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2025-08-22 22:50:51 -0400
committerJohn Turner <jturner.usa@gmail.com>2025-08-22 22:50:51 -0400
commitc785370dcf66d81a8e0432535d787aab7f7f18c0 (patch)
tree7244642a1164e5b09ebaa5482eaf4f3f008fad3f
parent1441a042b614197af04e6f9984056d9a8ecb859e (diff)
downloadselinux-policy-c785370dcf66d81a8e0432535d787aab7f7f18c0.tar.gz
create xdgfile module
-rw-r--r--src/file/homefile/userhomefile/meson.build2
-rw-r--r--src/file/homefile/userhomefile/xdgfile.cil56
2 files changed, 57 insertions, 1 deletions
diff --git a/src/file/homefile/userhomefile/meson.build b/src/file/homefile/userhomefile/meson.build
index f10be0b..e53e16f 100644
--- a/src/file/homefile/userhomefile/meson.build
+++ b/src/file/homefile/userhomefile/meson.build
@@ -1 +1 @@
-modules += files('shellrcfile.cil')
+modules += files('shellrcfile.cil', 'xdgfile.cil')
diff --git a/src/file/homefile/userhomefile/xdgfile.cil b/src/file/homefile/userhomefile/xdgfile.cil
new file mode 100644
index 0000000..b10dd2c
--- /dev/null
+++ b/src/file/homefile/userhomefile/xdgfile.cil
@@ -0,0 +1,56 @@
+;; Copyright (C) 2025 John Turner
+
+;; This program is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+(block xdg
+ (block config
+ (block user
+ (block home
+ (blockinherit .file.home.user.template)
+
+ (filecon "HOME_DIR/\.config" dir file_context)
+ (filecon "HOME_DIR/\.config/.*" any file_context))))
+
+ (block cache
+ (block user
+ (block home
+ (blockinherit .file.home.user.template)
+
+ (filecon "HOME_DIR/\.cache" dir file_context)
+ (filecon "HOME_DIR/\.cache/.*" any file_context))))
+
+ (block share
+ (block user
+ (block home
+ (blockinherit .file.home.user.template)
+
+ (filecon "HOME_DIR/\.local/share" dir file_context)
+ (filecon "HOME_DIR/\.local/share/.*" any file_context))))
+
+ (block state
+ (block user
+ (block home
+ (blockinherit .file.home.user.template)
+
+ (filecon "HOME_DIR/\.local/state" dir file_context)
+ (filecon "HOME_DIR/\.local/state/.*" any file_context))))
+
+ (block bin
+ (block user
+ (block home
+ (blockinherit .file.exec.template)
+
+ (filecon "HOME_DIR/\.local/bin" dir file_context)
+ (filecon "HOME_DIR/\.local/bin" any file_context)))))
+