[sysadmin-bin] Consider /var a trusted path as well



commit 175ad76866353385cf6aa919351159fa3aa8ac61
Author: Andrea Veri <averi redhat com>
Date:   Mon Sep 4 17:28:33 2017 +0200

    Consider /var a trusted path as well

 run-git-or-special-cmd |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/run-git-or-special-cmd b/run-git-or-special-cmd
index 4566fed..cdf5668 100755
--- a/run-git-or-special-cmd
+++ b/run-git-or-special-cmd
@@ -55,8 +55,8 @@ def validate_git_dir(path, readonly):
         print >>sys.stderr, "git repository does not exist."
         sys.exit(1)
 
-    if not path.startswith('/git/'):
-        print >>sys.stderr, "git repository is not in /git."
+    if not (path.startswith('/git/') or path.startswith('/var/')):
+        print >>sys.stderr, "git repository is not in /git or /var"
         sys.exit(1)
 
     if (not readonly and not is_sysadmin and


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]