From 366d65f592dd48c8fe62b93c2ff985c05c83d901 Mon Sep 17 00:00:00 2001 From: Loren Schlomer Date: Wed, 25 Jan 2023 11:14:12 -0800 Subject: [PATCH] Fixes the ssh kitten kovidgoyal@5e645a7 fixes the password file creation, allowing it to be unlinked, but read_data_from_shared_memory/1 rejects the shared object if it is not read only, and will break the ssh kitten for all platforms. This change removes the read only check, relying only on the file ownership check. This fully fixes #5928 Signed-off-by: Loren Schlomer --- kittens/ssh/main.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/kittens/ssh/main.py b/kittens/ssh/main.py index 7140379b4..cacc60ff0 100644 --- a/kittens/ssh/main.py +++ b/kittens/ssh/main.py @@ -50,9 +50,6 @@ def read_data_from_shared_memory(shm_name: str) -> Any: shm.unlink() if shm.stats.st_uid != os.geteuid() or shm.stats.st_gid != os.getegid(): raise ValueError('Incorrect owner on pwfile') - mode = stat.S_IMODE(shm.stats.st_mode) - if mode != stat.S_IREAD: - raise ValueError('Incorrect permissions on pwfile') return json.loads(shm.read_data_with_size())