OPNsense - FreeBSD source
Find a file
Dan Mcgregor 7c5146da12 mountd: Add support for spaces in exported directories
The previous code would correctly parse strings including quotation
marks (") or backslash (/), but the tests when creating the export
includes them in the final string. This prevents exporting paths
with embedded spaces, for example "/exports/with space". Trying
results in log lines resembling:

mountd[1337]: bad exports list line '/exports/with\ space':
    /exports/with\ space: lstat() failed: No such file or directory.

Turns out that when creating its exports list, zfs escapes strings
in a format compatible with vis(3). Since I expect that zfs sharenfs
is the dominating use case for generating an exports list, use
strunvis(3) to parse the export path. The result is lines like the
following allowing spaces:

/exports/with\040space -network 192.168.0 -mask 255.255.255.0

A man page update will be done as a separate commit.

MFC after:	1 month
Reviewed by:	rmacklem
Differential Revision:	https://reviews.freebsd.org/D42432
2023-11-04 15:07:56 -07:00
.cirrus-ci Cirrus-CI: add some timing info on pkg install failure 2021-08-04 15:02:00 -04:00
.github MAINTAINERS: Add myself to stand 2023-05-07 22:30:10 -06:00
bin pkgbase: Move uuidgen to runtime package 2023-10-11 21:10:14 +02:00
cddl dirdeps: Update Makefile.depend* files with empty contents 2023-10-29 17:01:04 -04:00
contrib Track upstream project rename in contrib/blocklistd 2023-11-03 16:53:04 -04:00
crypto OpenSSL: update to 3.0.12 2023-10-24 14:55:56 -04:00
etc mtree: Fix entry 2023-10-09 12:56:19 +02:00
gnu Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
include OpenSSL: Vendor import of OpenSSL 3.0.12 2023-10-24 13:48:36 -04:00
kerberos5 Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
lib Track upstream project rename in contrib/blocklistd 2023-11-03 16:53:04 -04:00
libexec rtld/arm: fix initial-exec (IE) thread-local storage relocation 2023-11-03 22:43:40 +01:00
release releng-gce: Add missing _ 2023-10-19 15:46:59 -07:00
rescue zfs: merge openzfs/zfs@804414aad 2023-08-26 23:51:42 +02:00
sbin pf: support SCTP-specific timeouts 2023-10-31 16:03:22 +01:00
secure Track upstream project rename in contrib/blocklistd 2023-11-03 16:53:04 -04:00
share bsd.progs.mk must pass META_XTRAS to gendirdeps.mk 2023-11-04 10:17:40 -07:00
stand stand/zfs: Remove one more read-compatible feature 2023-11-04 13:07:31 -04:00
sys tty: set IUTF8 by default 2023-11-04 22:31:47 +02:00
targets loader: add target for dirdeps build 2023-11-02 19:35:08 -04:00
tests pf tests: ensure that we generate all permutations for SCTP multihome 2023-10-31 16:03:22 +01:00
tools ino64: Fix incremental builds 2023-11-02 12:07:59 -06:00
usr.bin Add IBM TS1170 density codes and specs. 2023-10-31 15:20:36 -04:00
usr.sbin mountd: Add support for spaces in exported directories 2023-11-04 15:07:56 -07:00
.arcconfig arcanist: use FreeBSD/git project repository instead of FreeBSD/svn 2022-08-23 14:16:41 +00:00
.arclint arc lint: ignore /tests/ in chmod 2017-12-19 03:38:06 +00:00
.cirrus.yml Cirrus CI: Trigger on pull requests or downstream repos 2023-10-09 15:13:21 -04:00
.clang-format Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
.git-blame-ignore-revs Add git-blame ignore file 2023-01-23 15:27:25 -05:00
.gitattributes Add a basic clang-format configuration file 2019-06-07 15:23:52 +00:00
.gitignore .gitignore: Ignore LSP generated .cache 2023-03-07 10:04:18 -05:00
.mailmap Fix Sumit's email address 2023-10-19 15:49:05 -06:00
CONTRIBUTING.md CONTRIBUTING.md: add author identity info 2023-09-20 19:28:28 -04:00
COPYRIGHT Happy New Year 2023! 2023-01-01 13:44:43 +08:00
LOCKS Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
MAINTAINERS Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
Makefile Makefile: Support universe-toolchain on non-FreeBSD 2023-08-23 18:00:16 +01:00
Makefile.inc1 pkgbase: force OSVERSION 2023-11-03 09:29:23 +01:00
Makefile.libcompat build{libcompat}: Pass UNIVERSE_TOOLCHAIN_PATH to the _lc_build-tools submake 2023-08-21 21:00:45 -07:00
Makefile.sys.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ObsoleteFiles.inc ObsoleteFiles.inc: Remove old mixer(8) tests 2023-10-20 11:36:04 -07:00
README.md README.md: link to the list of supported platforms 2022-11-01 12:20:55 -03:00
RELNOTES RELNOTES: fix typo 2023-10-10 13:59:32 +02:00
UPDATING ino64: Remove 'forward compat' code for this 2023-10-31 15:26:44 -06:00

FreeBSD Source:

This is the top level of the FreeBSD source directory.

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.

For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.

The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables.

For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page.

Source Roadmap:

Directory Description
bin System/user commands.
cddl Various commands and libraries under the Common Development and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING and gnu/COPYING.LIB for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources (see sys/README.md).
targets Support for experimental DIRDEPS_BUILD
tests Regression tests which can be run by Kyua. See tests/README for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.

For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.