File CVE-2025-68146.patch of Package python-filelock.42119
Index: py-filelock-3.0.12/filelock.py
===================================================================
--- py-filelock-3.0.12.orig/filelock.py
+++ py-filelock-3.0.12/filelock.py
@@ -381,6 +381,9 @@ class UnixFileLock(BaseFileLock):
def _acquire(self):
open_mode = os.O_RDWR | os.O_CREAT | os.O_TRUNC
+ o_nofollow = getattr(os, "O_NOFOLLOW", None)
+ if o_nofollow is not None:
+ open_mode |= o_nofollow
fd = os.open(self._lock_file, open_mode)
try: