Package: backintime-qt
Version: 1.2.1-2
Followup-For: Bug #946349

Control: tag -1 +patch

Dear Maintainer,

the included patch solves the issue for me. Nonetheless I consider it more or
less as a workaround. Depending on upstream's concepts a different approach may
be more sensible.

Please review and check whether you want to integrate this patch into
backintime.

Regards,
Sven



-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.3.0-2-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages backintime-qt depends on:
ii  backintime-common            1.2.1-2
ii  libnotify-bin                0.7.8-1
ii  policykit-1                  0.105-26
ii  python3                      3.7.5-1
ii  python3-dbus.mainloop.pyqt5  5.12.3+dfsg-3+b1
ii  python3-pyqt5                5.12.3+dfsg-3+b1
ii  x11-utils                    7.7+4

Versions of packages backintime-qt recommends:
ii  python3-secretstorage  2.3.1-2

Versions of packages backintime-qt suggests:
pn  meld | kompare  <none>

-- no debconf information
Description: Keep permissions of an existing mountpoint from being overridden
 This measure especially protects the root of a already mounted file system
 (ssh or encfs) from getting its access permissions altered.
Author: Sven Geuer <debma...@g-e-u-e-r.de>
Bug-Debian: https://bugs.debian.org/946349
Last-Update: 2019-12-17
--- a/common/mount.py
+++ b/common/mount.py
@@ -648,7 +648,7 @@
         """
         tools.mkdir(self.mount_root, 0o700)
         tools.mkdir(self.hash_id_path, 0o700)
-        tools.mkdir(self.currentMountpoint, 0o700)
+        tools.mkdir(self.currentMountpoint, 0o700, False)
         tools.mkdir(self.lock_path, 0o700)
 
     def mountProcessLockAcquire(self, timeout = 60):
--- a/common/tools.py
+++ b/common/tools.py
@@ -287,7 +287,7 @@
                          %(path, str(e)), traceDepth = 1)
     return os.path.isdir(path)
 
-def mkdir(path, mode = 0o755):
+def mkdir(path, mode = 0o755, enforce_permissions = True):
     """
     Create directory ``path``.
 
@@ -300,7 +300,8 @@
     """
     if os.path.isdir(path):
         try:
-            os.chmod(path, mode)
+            if enforce_permissions:
+                os.chmod(path, mode)
         except:
             return False
         return True

Reply via email to