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

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