33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
From 5adb1f336dc88c081eaed13fc454e9601b34bc1e Mon Sep 17 00:00:00 2001
|
|
From: Thore Sommer <mail@thson.de>
|
|
Date: Thu, 27 Jan 2022 18:43:33 +0100
|
|
Subject: [PATCH] revocation_notifier: fix socket path permission check
|
|
|
|
If the path was already there, we checked if the socket has the right
|
|
permissions not the directory. This fails because the file does not exists
|
|
at that point.
|
|
|
|
Signed-off-by: Thore Sommer <mail@thson.de>
|
|
---
|
|
keylime/revocation_notifier.py | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/keylime/revocation_notifier.py b/keylime/revocation_notifier.py
|
|
index e9e3b3f..1b74001 100644
|
|
--- a/keylime/revocation_notifier.py
|
|
+++ b/keylime/revocation_notifier.py
|
|
@@ -32,8 +32,8 @@ def start_broker():
|
|
if not os.path.exists(dir_name):
|
|
os.makedirs(dir_name, 0o700)
|
|
else:
|
|
- if os.stat(_SOCKET_PATH).st_mode & 0o777 != 0o700:
|
|
- msg = f"{_SOCKET_PATH} present with wrong permissions"
|
|
+ if os.stat(dir_name).st_mode & 0o777 != 0o700:
|
|
+ msg = f"{dir_name} present with wrong permissions"
|
|
logger.error(msg)
|
|
raise Exception(msg)
|
|
|
|
--
|
|
2.33.1
|
|
|