aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/writable_dirs.py
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2023-03-05 14:33:14 +0100
committerEgor Tensin <Egor.Tensin@gmail.com>2023-03-05 14:33:14 +0100
commit8b4fad5636f5e434c3316c0015d286eef797d8e1 (patch)
tree36566d82e2924e00ac94279ea2b32011832f8194 /writable_dirs.py
parentwritable_dirs: use process names in the log (diff)
downloadaudit-scripts-8b4fad5636f5e434c3316c0015d286eef797d8e1.tar.gz
audit-scripts-8b4fad5636f5e434c3316c0015d286eef797d8e1.zip
writable_dirs: refactoring
Diffstat (limited to '')
-rwxr-xr-xwritable_dirs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/writable_dirs.py b/writable_dirs.py
index 8313707..ed3ab89 100755
--- a/writable_dirs.py
+++ b/writable_dirs.py
@@ -47,7 +47,7 @@ def launch_logging_thread(queue):
@contextlib.contextmanager
-def set_up_logging(queue):
+def setup_logging(queue):
config = {
'version': 1,
'handlers': {
@@ -230,7 +230,7 @@ def access_loop(access_queue, scandir_queue):
def access_main(args, log_queue, access_queue, scandir_queue):
- with close_queue(scandir_queue), set_up_logging(log_queue):
+ with close_queue(scandir_queue), setup_logging(log_queue):
drop_privileges(args.uid, args.gid)
dump_process_info()
access_loop(access_queue, scandir_queue)
@@ -256,7 +256,7 @@ def scandir_main(access_queue, scandir_queue):
def main(argv=None):
log_queue = mp.Queue()
- with launch_logging_thread(log_queue), set_up_logging(log_queue):
+ with launch_logging_thread(log_queue), setup_logging(log_queue):
prog_args = parse_args(argv)
access_queue = mp.SimpleQueue()
scandir_queue = mp.SimpleQueue()