summaryrefslogtreecommitdiffstats
path: root/sbin/mountd
AgeCommit message (Collapse)AuthorFilesLines
2020-08-06Avoid reading one byte before the path buffer.naddy1-3/+3
This happens when there's only one component (e.g. "/foo"). This bug has been present since June 1990 when it was commited to mountd.c SCCS version 5.9. Note: the bug is on the second changed line, the first line is changed for visual consistency. From CheriBSD via FreeBSD ok millert@ deraadt@
2020-05-16list example files in FILES with a short description: generally, "Examplejmc1-4/+4
configuration file.", but occasionally something else fit better; at the same time, try to make the format for FILES more consistent; original diff from clematis
2020-02-10briefly mention /etc/examples/ in the FILES section of all theschwarze1-3/+5
manual pages that document the corresponding configuration files; OK jmc@, and general direction discussed with many
2020-01-24simplify, no need to make a copy of the filename, pointer is fineespie1-3/+6
okay millert@ schwarze@
2019-12-19Spell "mount point" as other man pages do, with a space.bentley1-4/+4
ok jmc@
2019-06-28When system calls indicate an error they return -1, not some arbitraryderaadt1-5/+5
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2018-04-28Ignore SIGPIPE in case a TCP client resets the connectguenther1-1/+2
ok otto@
2018-03-16improve markup quality in the cases found by the new "--" style messageschwarze1-3/+3
2016-01-08Zap extraneous SYNOPSIS sections.zhuk1-4/+2
The gettytab(5) and termcap(5) get FILES, others don't need anything. With input from & okay schwarze@
2015-12-23Remove unnecessary SIGSYS/ENOSYS handling for getfh(2).tim1-8/+1
Encouragement from deraadt@
2015-12-23Add privilege separation and pledge().tim2-69/+435
A privileged (that is, unpledged) child is forked that makes the "unpledgable" getfh(2) and mount(2) calls. It also takes care of writing /var/db/mountdtab so that the parent does not have to pledge "cpath wpath". This, then, allows the parent to pledge "stdio rpath inet dns". Suggestions and OK deraadt@
2015-12-15Include RFC number in reference. While here, improve formatting of anothertim1-5/+6
reference.
2015-12-15Document /var/db/mountdtabtim1-2/+4
2015-12-15When (re)reading /etc/exports, handle the case where the mount point of antim1-2/+4
export is not also the mount point of a local filesystem. In this case, the local filesystem would not be removed from the "unexport list", causing the export to be "unexported" again. This fix then also allows us to actually delete an export that has been removed from /etc/exports, by passing the MNT_DELEXPORT export flag to mount(2). Makes sense to millert@.
2015-12-10Remove NULL-checks before free(). ok tb@mmcc1-5/+3
2015-11-29Include RFC number in referencetim1-3/+3
2015-08-20Two reallocarray() conversions that were missed earlier.millert1-2/+2
OK deraadt@
2015-08-20<stdlib.h> is included, so do not need to cast result fromderaadt1-15/+12
malloc, calloc, realloc* ok krw millert
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt1-8/+9
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-11-20remove sys/file.h includes in favor of fcntl.h where needed.tedu1-2/+1
ok deraadt guenther
2014-10-22Use svc_getreq_poll() instead of svc_getreqset2() for mountd'smillert1-23/+20
custom svc_run loop. From Dimitris Papastamos. OK schwarze@
2014-08-24Remove imaginary non-reserved port support from mountd.doug2-20/+17
This bug was reported by Julian Hsiao. ok concept deraadt@, miod@ mountd.8 diff is from jmc@. ok doug@ mountd.c diff is from me. ok miod@
2014-05-16Zero out grp before re-using it (new ones are already cleared bymillert1-1/+3
calloc). We only reuse grp when there is an unresolvable host. Fixes a bug where if a host in a netgroup is unresolvable then entire netgroup is ignore. OK krw@
2014-05-09my previous attempt to fix the renaming of the inet(3) pages was wrong;jmc1-3/+3
this fixes those by referencing the correct page, and cleans up the netintro/ inet entries; all this on the advice (and ok) of guenther!
2014-05-08inet(3) -> inet_net(3);jmc1-3/+3
2014-04-22malloc/memset -> calloc. from peter malonetedu1-5/+3
2014-03-24Split the API: struct ucred remains the kernel internal structure whileguenther1-19/+15
struct xucred becomes the structure for syscalls (mount(2) and nfssvc(2)). ok deraadt@ beck@
2014-02-13mark up argument placeholders with .Ar; from Jan Stary <hans at stare dot cz>schwarze1-9/+11
2014-01-21obvious .Pa fixes; found with mandocdb(8)schwarze1-11/+11
2014-01-19Usually, you don't want macros in the .Nd line, so remove instances of .Tnschwarze2-20/+10
marking up words that are not trademarks (ASCII, I/O, NFS, TCP, TELNET). While here, remove .Tn markup from the same words in the body of these pages, too.
2013-11-22Whole bunch of (unsigned char) casts carefully added for ctype calls.deraadt1-5/+5
Careful second audit by millert
2010-03-26dispense with some wacky escape sequences;jmc1-3/+3
2010-03-22report why getgrouplist() failed and for which user, helps with debugging;otto1-2/+2
ok deraadt@
2009-10-27rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt1-15/+1
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2007-12-30use the same argument name in synopsis and usage; lowercase "usage:"sobrado1-2/+2
ok jmc@
2007-06-01remove crufty adosfs. everytime we try to change a vfs layer interface,deraadt1-4/+1
adosfs has the issue and in an entirely different way. noone uses this code so this is hte best way to handle the problem diff from pedro who went to sleep but we need to move ahead; ok thib
2007-05-31convert to new .Dd format;jmc2-4/+4
2006-05-29revert vfs.nfs.privport sysctl, broke a few architecturesavsm1-40/+2
requested by deraadt@
2006-05-28Add support for NFS mounts to be from non-reserved ports:avsm1-2/+40
- new sysctl vfs.nfs.privport to require NFS mount requests to be on reserved ports when set to 1 (the default). - mountd now automatically sets the sysctl depending on the -n flag. - add mountd_flags to rc.conf to enable the -n flag at boot. deraadt@ ok
2005-09-20if we must un-export, only un-export when we do the first call forderaadt1-1/+2
each filesystem; ok drahn, specific issue found by otto
2005-09-13Only DELEXPORT filesystems which are not exported. Removes NFS race whendrahn1-17/+60
mounting filesystems on nfs servers. Improvements and ok otto@
2005-04-08Sync with recent realpath(3) changes: on failure, don't use the secondjaredy1-4/+8
argument "resolved", since it is undefined. ok and help millert, otto
2004-09-15make examples match format specified in man page;jmc1-3/+3
from arto selonen (netbsd pr #26891);
2003-10-16Check for signals in local svc_run before doing anything else. Fixesmillert1-11/+11
the bug where signals would not be handled until the next mount request.
2003-10-09Remove errant semicolon introduced in rev 1.60; joshua steinmillert1-2/+2
2003-09-26check strdup failure; ok anil millertderaadt1-1/+3
2003-08-08refer to RFCs consistently (RFC XXXX);jmc1-2/+2
2003-06-11ansificationderaadt1-3/+3
2003-06-02Remove the advertising clause in the UCB license which Berkeleymillert4-24/+8
rescinded 22 July 1999. Proofed by myself and Theo.
2003-03-16Use len+1 as the size parameter to strlcpy() since len does not includemillert1-2/+2
the trailing NUL. From krw@; deraadt@ OK