summary history branches tags files
commit:c393fb2cefc4f51c074f1232a003762d54558f3b
author:Trevor Bentley
committer:Trevor Bentley
date:Thu Dec 3 00:46:04 2020 +0100
parents:1565b2b6715cb4bad99fc9ba29ea6e802ee7422a
fix using snitch-process-policy for both process and network
diff --git a/snitch.el b/snitch.el
line changes: +5/-3
index dad3691..76414f2
--- a/snitch.el
+++ b/snitch.el
@@ -520,7 +520,9 @@ the globally configured log filters."
                                           'event
                                           event)
     (snitch--log 'all event)
-    (let* ((wl (symbol-value (intern-soft
+    (let* ((policy (symbol-value (intern-soft
+                                  (format "snitch-%s-policy" prefix))))
+           (wl (symbol-value (intern-soft
                               (format "snitch-%s-whitelist" prefix))))
            (bl (symbol-value (intern-soft
                               (format "snitch-%s-blacklist" prefix))))
@@ -528,7 +530,7 @@ the globally configured log filters."
            (bled (intern-soft (format "%s-blacklisted" prefix)))
            (alw (intern-soft (format "%s-allowed" prefix)))
            (blk (intern-soft (format "%s-blocked" prefix)))
-           (decision (cond ((eq snitch-process-policy 'deny)
+           (decision (cond ((eq policy 'deny)
                             (snitch--decide event
                                             wl
                                             'whitelist
@@ -542,7 +544,7 @@ the globally configured log filters."
                                             snitch-on-blacklist-functions
                                             'allow
                                             snitch-on-allow-functions)))))
-      (cond ((eq snitch-process-policy 'deny)
+      (cond ((eq policy 'deny)
              (progn
                (snitch--log (if decision wled blk) event)
                (when decision (apply orig-fun args))))