From da7c9b228aaf31f37684e106b75262055ca440de Mon Sep 17 00:00:00 2001 From: Mattias Nissler Date: Fri, 31 Aug 2018 09:44:04 +0200 Subject: Add unprivileged option in `mount.fuse3` The unprivileged option allows to run the FUSE file system process without privileges by dropping capabilities and preventing them from being re-acquired via setuid / fscaps etc. To accomplish this, mount.fuse sets up the `/dev/fuse` file descriptor and mount itself and passes the file descriptor via the `/dev/fd/%u` mountpoint syntax to the FUSE file system. --- test/util.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/util.py') diff --git a/test/util.py b/test/util.py index b9c1b0c..ba02b9f 100644 --- a/test/util.py +++ b/test/util.py @@ -7,6 +7,7 @@ import time from os.path import join as pjoin import sys import re +import itertools basename = pjoin(os.path.dirname(__file__), '..') @@ -138,6 +139,12 @@ def fuse_test_marker(): return pytest.mark.uses_fuse() +def powerset(iterable): + s = list(iterable) + return itertools.chain.from_iterable( + itertools.combinations(s, r) for r in range(len(s)+1)) + + # Use valgrind if requested if os.environ.get('TEST_WITH_VALGRIND', 'no').lower().strip() \ not in ('no', 'false', '0'): @@ -147,6 +154,8 @@ else: # Try to use local fusermount3 os.environ['PATH'] = '%s:%s' % (pjoin(basename, 'util'), os.environ['PATH']) +# Put example binaries on PATH +os.environ['PATH'] = '%s:%s' % (pjoin(basename, 'example'), os.environ['PATH']) try: (fuse_proto, fuse_caps) = test_printcap() -- cgit v1.2.3