Blame SOURCES/0015-Cgconfig-allow-fperm-dperm-in-admin-task.patch

84dac3
From de01f104d6ee4b11122aa4a108fc6082d3061886 Mon Sep 17 00:00:00 2001
84dac3
From: Pino Toscano <ptoscano@redhat.com>
84dac3
Date: Mon, 4 Sep 2017 18:45:05 +0200
84dac3
Subject: [PATCH] Cgconfig: allow fperm & dperm in admin & task
84dac3
84dac3
These keys are used to control the permissions for files and
84dac3
directories.
84dac3
---
84dac3
 lenses/cgconfig.aug            |  2 +-
84dac3
 lenses/tests/test_cgconfig.aug | 45 ++++++++++++++++++++++++++++++++++++++++++
84dac3
 2 files changed, 46 insertions(+), 1 deletion(-)
84dac3
84dac3
diff --git a/lenses/cgconfig.aug b/lenses/cgconfig.aug
84dac3
index 6a5b8603..e766343d 100644
84dac3
--- a/lenses/cgconfig.aug
84dac3
+++ b/lenses/cgconfig.aug
84dac3
@@ -30,7 +30,7 @@ module Cgconfig =
84dac3
    let name      = /[^#= \n\t{}\/]+/
84dac3
    let cont_name = /(cpuacct|cpu|devices|ns|cpuset|memory|freezer|net_cls|blkio|hugetlb|perf_event)/
84dac3
    let role_name = /(admin|task)/
84dac3
-   let id_name   = /(uid|gid)/
84dac3
+   let id_name   = /(uid|gid|fperm|dperm)/
84dac3
    let address   = /[^#; \n\t{}]+/
84dac3
    let qaddress  = address|/"[^#;"\n\t{}]+"/
84dac3
 
84dac3
diff --git a/lenses/tests/test_cgconfig.aug b/lenses/tests/test_cgconfig.aug
84dac3
index 6cd0856d..84fd2ded 100644
84dac3
--- a/lenses/tests/test_cgconfig.aug
84dac3
+++ b/lenses/tests/test_cgconfig.aug
84dac3
@@ -318,3 +318,48 @@ test Cgconfig.lns get group6 =
84dac3
     {  }
84dac3
   }
84dac3
 
84dac3
+let group7 ="
84dac3
+group daemons/www {
84dac3
+  perm {
84dac3
+    task {
84dac3
+      uid = root;
84dac3
+      gid = root;
84dac3
+      fperm = 770;
84dac3
+    }
84dac3
+    admin {
84dac3
+      uid = root;
84dac3
+      gid = root;
84dac3
+      dperm = 777;
84dac3
+    }
84dac3
+  }
84dac3
+}
84dac3
+"
84dac3
+
84dac3
+test Cgconfig.lns get group7 =
84dac3
+  {  }
84dac3
+  { "group" = "daemons/www"
84dac3
+    {  }
84dac3
+    { "perm"
84dac3
+      {  }
84dac3
+      { "task"
84dac3
+        {  }
84dac3
+        { "uid" = "root" }
84dac3
+        {  }
84dac3
+        { "gid" = "root" }
84dac3
+        {  }
84dac3
+        { "fperm" = "770" }
84dac3
+        {  } }
84dac3
+      {  }
84dac3
+      { "admin"
84dac3
+        {  }
84dac3
+        { "uid" = "root" }
84dac3
+        {  }
84dac3
+        { "gid" = "root" }
84dac3
+        {  }
84dac3
+        { "dperm" = "777" }
84dac3
+        {  } }
84dac3
+      {  } }
84dac3
+    {  }
84dac3
+  }
84dac3
+  {  }
84dac3
+
84dac3
-- 
7b8067
2.14.3
84dac3