summaryrefslogtreecommitdiffstats
path: root/sbin/mountd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Avoid reading one byte before the path buffer.naddy2020-08-061-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@
* list example files in FILES with a short description: generally, "Examplejmc2020-05-161-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
* briefly mention /etc/examples/ in the FILES section of all theschwarze2020-02-101-3/+5
| | | | | manual pages that document the corresponding configuration files; OK jmc@, and general direction discussed with many
* simplify, no need to make a copy of the filename, pointer is fineespie2020-01-241-3/+6
| | | | okay millert@ schwarze@
* Spell "mount point" as other man pages do, with a space.bentley2019-12-191-4/+4
| | | | ok jmc@
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-281-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.
* Ignore SIGPIPE in case a TCP client resets the connectguenther2018-04-281-1/+2
| | | | ok otto@
* improve markup quality in the cases found by the new "--" style messageschwarze2018-03-161-3/+3
|
* Zap extraneous SYNOPSIS sections.zhuk2016-01-081-4/+2
| | | | | | The gettytab(5) and termcap(5) get FILES, others don't need anything. With input from & okay schwarze@
* Remove unnecessary SIGSYS/ENOSYS handling for getfh(2).tim2015-12-231-8/+1
| | | | Encouragement from deraadt@
* Add privilege separation and pledge().tim2015-12-232-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@
* Include RFC number in reference. While here, improve formatting of anothertim2015-12-151-5/+6
| | | | reference.
* Document /var/db/mountdtabtim2015-12-151-2/+4
|
* When (re)reading /etc/exports, handle the case where the mount point of antim2015-12-151-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@.
* Remove NULL-checks before free(). ok tb@mmcc2015-12-101-5/+3
|
* Include RFC number in referencetim2015-11-291-3/+3
|
* Two reallocarray() conversions that were missed earlier.millert2015-08-201-2/+2
| | | | OK deraadt@
* <stdlib.h> is included, so do not need to cast result fromderaadt2015-08-201-15/+12
| | | | | malloc, calloc, realloc* ok krw millert
* Replace <sys/param.h> with <limits.h> and other less dirty headers wherederaadt2015-01-161-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)
* remove sys/file.h includes in favor of fcntl.h where needed.tedu2014-11-201-2/+1
| | | | ok deraadt guenther
* Use svc_getreq_poll() instead of svc_getreqset2() for mountd'smillert2014-10-221-23/+20
| | | | custom svc_run loop. From Dimitris Papastamos. OK schwarze@
* Remove imaginary non-reserved port support from mountd.doug2014-08-242-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@
* Zero out grp before re-using it (new ones are already cleared bymillert2014-05-161-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@
* my previous attempt to fix the renaming of the inet(3) pages was wrong;jmc2014-05-091-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!
* inet(3) -> inet_net(3);jmc2014-05-081-3/+3
|
* malloc/memset -> calloc. from peter malonetedu2014-04-221-5/+3
|
* Split the API: struct ucred remains the kernel internal structure whileguenther2014-03-241-19/+15
| | | | | | struct xucred becomes the structure for syscalls (mount(2) and nfssvc(2)). ok deraadt@ beck@
* mark up argument placeholders with .Ar; from Jan Stary <hans at stare dot cz>schwarze2014-02-131-9/+11
|
* obvious .Pa fixes; found with mandocdb(8)schwarze2014-01-211-11/+11
|
* Usually, you don't want macros in the .Nd line, so remove instances of .Tnschwarze2014-01-192-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.
* Whole bunch of (unsigned char) casts carefully added for ctype calls.deraadt2013-11-221-5/+5
| | | | Careful second audit by millert
* dispense with some wacky escape sequences;jmc2010-03-261-3/+3
|
* report why getgrouplist() failed and for which user, helps with debugging;otto2010-03-221-2/+2
| | | | ok deraadt@
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-271-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
* use the same argument name in synopsis and usage; lowercase "usage:"sobrado2007-12-301-2/+2
| | | | ok jmc@
* remove crufty adosfs. everytime we try to change a vfs layer interface,deraadt2007-06-011-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
* convert to new .Dd format;jmc2007-05-312-4/+4
|
* revert vfs.nfs.privport sysctl, broke a few architecturesavsm2006-05-291-40/+2
| | | | requested by deraadt@
* Add support for NFS mounts to be from non-reserved ports:avsm2006-05-281-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
* if we must un-export, only un-export when we do the first call forderaadt2005-09-201-1/+2
| | | | each filesystem; ok drahn, specific issue found by otto
* Only DELEXPORT filesystems which are not exported. Removes NFS race whendrahn2005-09-131-17/+60
| | | | mounting filesystems on nfs servers. Improvements and ok otto@
* Sync with recent realpath(3) changes: on failure, don't use the secondjaredy2005-04-081-4/+8
| | | | | | argument "resolved", since it is undefined. ok and help millert, otto
* make examples match format specified in man page;jmc2004-09-151-3/+3
| | | | from arto selonen (netbsd pr #26891);
* Check for signals in local svc_run before doing anything else. Fixesmillert2003-10-161-11/+11
| | | | the bug where signals would not be handled until the next mount request.
* Remove errant semicolon introduced in rev 1.60; joshua steinmillert2003-10-091-2/+2
|
* check strdup failure; ok anil millertderaadt2003-09-261-1/+3
|
* refer to RFCs consistently (RFC XXXX);jmc2003-08-081-2/+2
|
* ansificationderaadt2003-06-111-3/+3
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-024-24/+8
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Use len+1 as the size parameter to strlcpy() since len does not includemillert2003-03-161-2/+2
| | | | the trailing NUL. From krw@; deraadt@ OK