Skip to content

Commit f2b6934

Browse files
KiaroSamaclaude
andcommitted
chore: drop what the icacls removal left behind
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 1ed547d commit f2b6934

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

telegram_mcp/aliases.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import logging
2222
import os
2323
import re
24-
import subprocess
2524
import tempfile
2625
import time
2726
import unicodedata
@@ -32,7 +31,7 @@
3231

3332
import telethon
3433

35-
from telegram_mcp.safe_log import log_event, logger
34+
from telegram_mcp.safe_log import log_event
3635
from telegram_mcp.owner_only import restrict_to_owner_strict, verify_owner_only
3736
from telegram_mcp.settings import _parse_bool_env, state_dir
3837
from sanitize import sanitize_name
@@ -57,11 +56,6 @@
5756
_SELF_REFS = {"me", "self"}
5857

5958

60-
# icacls is a subprocess; it needs a ceiling like any other. Ten seconds is
61-
# generous for a local file and short enough that a wedged one is not a hang.
62-
_ACL_TIMEOUT_SECONDS = 10.0
63-
64-
6559
def restrict_to_owner(path: Union[str, Path]) -> bool:
6660
"""Make a file or directory reachable by its owner alone, and prove it.
6761

tests/test_session_hardening.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def test_a_real_session_database_ends_up_mode_600(tmp_path, monkeypatch):
239239
assert stat.S_IMODE(directory.stat().st_mode) == 0o700
240240

241241

242-
@pytest.mark.skipif(os.name != "nt", reason="the Windows owner-only mechanism is icacls")
242+
@pytest.mark.skipif(os.name != "nt", reason="POSIX has no DACL to leave a foreign entry on")
243243
def test_session_hardening_leaves_no_foreign_entry_on_the_object(tmp_path, monkeypatch):
244244
"""Seeds an explicit `Everyone` entry first, because that is the case the
245245
previous implementation silently failed: it dropped INHERITED entries and

0 commit comments

Comments
 (0)