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

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