mirror of
https://github.com/libfuse/libfuse.git
synced 2026-07-07 14:47:41 +08:00
5d8b9a39a1
Create a mount helper program that can start a fuse server that runs as a socket-based systemd service, and a new libfuse module to wrap all the details of communicating between the mount helper and the containerized fuse server. This enables untrusted ext4 mounts via systemd service containers, which avoids the problem of malicious filesystems compromising the integrity of the running kernel through memory corruption. In theory this could also be supported via inetd and clones, though the author hasn't found one that supports AF_UNIX sockets. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
44 lines
1.6 KiB
Meson
44 lines
1.6 KiB
Meson
fuseconf_path = join_paths(get_option('prefix'), get_option('sysconfdir'), 'fuse.conf')
|
|
|
|
executable('fusermount3', ['fusermount.c', '../lib/mount_util.c', '../lib/mount_fsmount.c', '../lib/util.c'],
|
|
include_directories: include_dirs,
|
|
install: true,
|
|
install_dir: get_option('bindir'),
|
|
c_args: '-DFUSE_CONF="@0@"'.format(fuseconf_path))
|
|
|
|
if private_cfg.get('HAVE_SERVICEMOUNT', false)
|
|
executable('fuservicemount3', ['mount_service.c', 'fuservicemount.c', '../lib/mount_util.c'],
|
|
include_directories: include_dirs,
|
|
link_with: [ libfuse ],
|
|
install: true,
|
|
install_dir: get_option('sbindir'),
|
|
c_args: '-DFUSE_USE_VERSION=319')
|
|
endif
|
|
|
|
executable('mount.fuse3', ['mount.fuse.c'],
|
|
include_directories: include_dirs,
|
|
link_with: [ libfuse ],
|
|
install: true,
|
|
install_dir: get_option('sbindir'),
|
|
c_args: '-DFUSE_USE_VERSION=317')
|
|
|
|
|
|
udevrulesdir = get_option('udevrulesdir')
|
|
if udevrulesdir == ''
|
|
udev = dependency('udev', required: false)
|
|
if udev.found()
|
|
udevrulesdir = join_paths(udev.get_variable(pkgconfig: 'udevdir'), 'rules.d')
|
|
endif
|
|
endif
|
|
|
|
if udevrulesdir == ''
|
|
warning('could not determine udevdir, udev.rules will not be installed')
|
|
endif
|
|
|
|
meson.add_install_script('install_helper.sh',
|
|
join_paths(get_option('prefix'), get_option('sysconfdir')),
|
|
join_paths(get_option('prefix'), get_option('bindir')),
|
|
udevrulesdir,
|
|
'@0@'.format(get_option('useroot')),
|
|
get_option('initscriptdir'))
|