mirror of
https://github.com/borgbackup/borg.git
synced 2026-06-11 01:41:57 -04:00
mount: warn about symlinks pointing outside of the mountpoint, see #9254
Some checks failed
Lint / lint (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / security (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
CI / asan_ubsan (push) Has been cancelled
CI / native_tests (push) Has been cancelled
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Has been cancelled
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Has been cancelled
CI / vm_tests (OpenBSD, false, openbsd, 7.7) (push) Has been cancelled
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Has been cancelled
CI / windows_tests (push) Has been cancelled
Some checks failed
Lint / lint (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / security (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
CI / asan_ubsan (push) Has been cancelled
CI / native_tests (push) Has been cancelled
CI / vm_tests (Haiku, false, haiku, r1beta5) (push) Has been cancelled
CI / vm_tests (NetBSD, false, netbsd, 10.1) (push) Has been cancelled
CI / vm_tests (OpenBSD, false, openbsd, 7.7) (push) Has been cancelled
CI / vm_tests (borg-freebsd-14-x86_64-gh, FreeBSD, true, freebsd, 14.3) (push) Has been cancelled
CI / windows_tests (push) Has been cancelled
This commit is contained in:
parent
5112caba32
commit
4827521f9c
2 changed files with 10 additions and 0 deletions
|
|
@ -79,6 +79,11 @@ class MountMixIn:
|
|||
archives and the directory structure below these will be loaded on-demand from
|
||||
the repository when entering these directories, so expect some delay.
|
||||
|
||||
Care should be taken, as Borg backs up symlinks as-is. When an archive
|
||||
or repository is mounted, it is possible to “jump” outside the mount point
|
||||
by following a symlink. If this happens, files or directories (or versions of them)
|
||||
that are not part of the archive or repository may appear to be within the mount point.
|
||||
|
||||
Unless the ``--foreground`` option is given, the command will run in the
|
||||
background until the filesystem is ``unmounted``.
|
||||
|
||||
|
|
|
|||
|
|
@ -565,6 +565,11 @@ class FuseOperations(llfuse.Operations, FuseBackend):
|
|||
)
|
||||
self._create_filesystem()
|
||||
llfuse.init(self, mountpoint, options)
|
||||
logger.warning(
|
||||
"Warning: The mounted archive is capable of containing symlinks that point outside the archive tree. "
|
||||
"When following such symlinks you may see files and directories within the mountpoint "
|
||||
"that do not reflect the archive content."
|
||||
)
|
||||
if not foreground:
|
||||
if isinstance(self.repository_uncached, RemoteRepository):
|
||||
daemonize()
|
||||
|
|
|
|||
Loading…
Reference in a new issue