Commit Graph

190 Commits

Author SHA1 Message Date
hannken 0af7903fb3 Fix typo, its the element not the array ... 2021-06-05 08:26:34 +00:00
hannken 66f6f55589 Change get_exportlist() to collect all exports and emit all
exports for a single mount in one call to nfssvc(2).

Should finally fix PR kern/5844 (NFS server sends "permission denied"
while mound re-read exports).
2021-06-04 10:46:57 +00:00
hannken 1015c2123b Restructure do_nfssvc() and simplify the left cases GT_HOST and GT_NET.
Add a helper add_export_arg() that emits a single export_args item and
does the IPv6 check.
Always use the path of the mount point for the export.
2021-06-04 10:46:01 +00:00
wiz 0b10797fb6 Reword slightly. 2021-02-16 10:01:55 +00:00
hannken b1564e28a9 Add support for multiple exports files. This will be useful for example for
ZFS, where we have an automatically generated /etc/zfs/exports file, which
should not be edited directly.
2021-02-16 10:00:27 +00:00
hannken 3067a266c7 Split get_exportlist() into get_exportlist() and get_exportlist_one()
in preparation to support multiple input files.

No functional change intended.
2021-02-16 09:58:35 +00:00
kamil aa97815be0 Include explicitly <rump/rump_syscallshotgun.h> for previous indirect users
via <rump/rump.h>.
2020-06-17 00:16:21 +00:00
joerg 1ae5c388e8 Rename debug to mountd_debug to avoid overlap in rump tests 2020-04-23 00:22:01 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
christos b985414b8f Merge autofs support from: Tomohiro Kusumi
XXX: Does not work yet
2018-01-09 03:31:12 +00:00
abhinav 93422f00ef Remove xref to signal(7).
As noted by wiz, it is probably not a good idea to mention signal(7) in SEE ALSO
every time a signal name is used in a man page.
2016-12-24 08:26:57 +00:00
abhinav c8a3a46962 Add xrefs to ipsec_set_policy(3) and signal(7) 2016-12-22 09:44:56 +00:00
pgoyette f6b47a4477 Add missing $NetBSD$ tag, and copy License/Copyright from mountd.c
OK christos@
2015-12-29 04:30:43 +00:00
christos 11804462b9 fix whitespace 2015-12-24 01:41:27 +00:00
christos e9e496746f fix comment, from kre 2015-12-24 01:41:19 +00:00
christos ce8e119589 Split out get_net function so that it is easily testable. Restore
functionality where 1.2.3/24 -> 1.2.3.0/24 not 1.2.0.3/24 now that
getaddrinfo(3) parses old-style incomplete dotted quads as old
style addresses.
2015-12-23 16:19:49 +00:00
christos 2761cda93e Again copying code is bad; the second copy of mountd was completely stale. 2015-11-08 21:03:16 +00:00
jnemeth 494e3bc90d PR/50125 - Jarle Greipsland -- Incorrect PID in /var/run/mountd.pid
Move call to pidfile() after daemon() so that correct (child) pid is
written to pidfile.
2015-08-05 23:23:47 +00:00
gson 815d09e5bc When daemonizing, delay the parent exit until the daemon is ready to
provide service.  Fixes a race that is a third possible cause of
PR misc/48282, in addition to the ones in rpc.rquotad and nfsd that
were fixed earlier.
2014-04-04 12:45:59 +00:00
christos 0a77b69ab6 fix unused variable warnings. 2013-10-19 17:16:37 +00:00
njoly d1f2d0ccef Remove unknown \*(tN and \*(sP macros.
ok wiz.
2013-03-28 22:54:25 +00:00
wiz e700cc04ea Dots as macro arguments need quoting.
Bug reported by Paul Goyette.
2012-08-26 14:50:45 +00:00
drochner 8fd6dadaf8 include <netipsec/ipsec.h> rather than <netinet6/ipsec.h> from userland
where possible, for consistency and compatibility to FreeBSD
(exception: KAME specific statistics gathering in netstat(1) and systat(1))
2012-01-04 16:09:40 +00:00
wiz 31ed07fa18 Spelling. 2011-11-02 20:27:33 +00:00
wiz 3e94948cb5 New sentence, new line. 2011-11-02 20:26:56 +00:00
christos fb62226b8d mention macos/x needing -N 2011-11-02 18:12:54 +00:00
christos 5b280d5010 Don't document long defunct flags 2011-11-02 18:09:43 +00:00
joerg 428b619bde ANSIfy. Use __dead. 2011-08-30 20:00:58 +00:00
plunky 87d4f6076b Apply casts to cases where xdrproc_t is expected but is not
strictly passed, for example because the second argument is
a different kind of pointer.
2011-08-30 17:06:20 +00:00
pooka a5cf1bb4b7 make this compatible with bool.h. no functional change intended. 2009-10-11 16:30:19 +00:00
lukem 0076abc054 Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare) 2009-04-17 13:56:33 +00:00
gmcgarry f9d5e5970d No empty structure initialisation. 2008-08-29 00:50:45 +00:00
lukem 9c1945664c Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 13:36:57 +00:00
ad 60df1d7038 The ISO stuff has never worked, remove it. 2008-02-27 16:39:17 +00:00
dholland d7c7049a10 Fix typo in error message 2008-02-09 19:15:59 +00:00
dholland bf86e75394 Improve an error message. Was buried in PR 6594 from Greg A. Woods. 2008-01-19 23:01:35 +00:00
dholland c6fda077dc Bail out cleanly if kernel nfs server support is missing, instead of
dumping core.
2008-01-13 16:39:07 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
hubertf 889da1779b * Don't include headers twice
* Remove a few trailing whitespaces
 * Rearrange and join to one #if for some headers

Patch contributed by Slava Semushin <slava.semushin@gmail.com>
in private mail.
2007-01-16 17:32:04 +00:00
wiz 7927d9d5f0 Fix a typo. 2006-10-09 21:36:18 +00:00
apb 4db4ce3a05 Document the -network=netname/prefixlength syntax. Requested in
PR 26891 by Arto Selonen.

Also some mdoc improvements.
2006-10-08 16:35:19 +00:00
wiz 31eaae697a Improve CAVEATS section. Based on mail by yamt@. Bump date. 2006-09-18 16:03:36 +00:00
wiz 6d434b9d71 Drop trailing space. 2006-09-10 22:21:58 +00:00
yamt ac9e01c324 - discourage nfs re-exporting.
- bump date.
2006-09-08 21:32:05 +00:00
yamt 932de434ea deal with variable-sized filehandles. 2006-09-02 11:10:24 +00:00
christos 1b75c508c8 Programs that had their own efuns, use libutil's now. 2006-08-26 18:15:37 +00:00
martin b4cb63a646 Make filehandles opaque to userland 2006-07-31 16:34:42 +00:00
yamt 6ea460924a mntsrv: wrap a long line. 2006-07-13 23:18:59 +00:00
martin a3b5baed42 Fix alignement problems for fhandle_t, exposed by gcc4.1.
While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.

Discussed on tech-kern, with lots of help from yamt (thanks!).
2006-07-13 12:00:24 +00:00
christos 2046b10b5b Coverity CID 601: Remove unused code. 2006-05-25 00:37:03 +00:00