summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mountd
Commit message (Collapse)AuthorAgeFilesLines
* s/rpc.mountd/mountd/charnier2002-10-161-5/+6
| | | | | Add FBSDID Reorder #if/#endif around sccsid to conform style(9)
* Use the standardized CHAR_BIT constant instead of NBBY in userland.mike2002-09-251-2/+3
|
* Kerberised NFS has never (as far as I can tell) worked outsidemarkm2002-09-201-12/+2
| | | | | | BSD 4.4. Nuke mention of Kerberos from the documentation here. MFC after: 1 week
* Update manpage to match the code, vfsload() isn't usedmux2002-08-111-4/+2
| | | | here since some time, kldload() is used instead.
* use IPV6_V6ONLY instead of non standard IPV6_BINDV6ONLY.ume2002-07-221-2/+2
| | | | MFC after: 1 week
* Try to give a more descriptive error message for the pilot error ofjoerg2002-07-182-25/+81
| | | | | | | | | | | | | | | | | | | | | | | | attempting to export the non-root of a filesystem with -alldirs. This pilot error seems to be very common, and the "could not remount" error message doesn't give much hints about the real reason. See the old PR below for an example. While i was at it, make it possible to entirely omit the often annoying error message in that case by specifying the "quiet" exports flag. This allows to specify something like /cdrom -alldirs,ro,quiet <where to export to> which will silently fail if nothing is mounted under /cdrom, but do the rigth thing as soon as you mount something. While doing this, i've put the embedded example in the exports(5) man page into a subsection of its own as it ought to be. Thanks for Paul Southworth for reminding me about this problem. PR: bin/4448 MFC after: 1 month
* If an RPC fails, try a shorter reply in case the fault lies with thealfred2002-07-151-10/+39
| | | | | | | size of the response. PR: misc/26320 MFC After: 2 weeks
* The .Nm utilitycharnier2002-07-061-2/+3
|
* Remove old pre-TIRPC code for getting transport handles. The code thatalfred2002-06-251-5/+0
| | | | follows spams over the contents of them making the removed code useless.
* more file system > filesystemtrhodes2002-05-162-4/+4
|
* Use fgetln to remove the static limit on the length of lines iniedowse2002-05-141-14/+15
| | | | | | /etc/exports. Oversized lines were unlikely due to the large 10k limit, but any found would cause mountd to exit with an error. Also fix one or two compiler warnings.
* o __P removedimp2002-03-211-41/+41
| | | | o main prototype removed
* Remove 'register' keyword.obrien2002-03-201-1/+1
| | | | | | It does not help modern compilers, and some may take some hit from it. (I also found several functions that listed *every* of its 10 local vars with "register" -- just how many free registers do people think machines have?)
* Chase sysctl name.dd2002-03-111-1/+1
| | | | Submitted by: Christopher Sharp <christopher_sharp@web.de>
* Introduce a version field to `struct xucred' in place of one of thedd2002-02-271-1/+2
| | | | | | | | | | | | spares (the size of the field was changed from u_short to u_int to reflect what it really ends up being). Accordingly, change users of xucred to set and check this field as appropriate. In the kernel, this is being done inside the new cru2x() routine which takes a `struct ucred' and fills out a `struct xucred' according to the former. This also has the pleasant sideaffect of removing some duplicate code. Reviewed by: rwatson
* Default to WARNS=2.obrien2001-12-041-0/+1
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* Deal with module name changes and autoloading.peter2001-09-201-15/+8
|
* Userland part of nfs client/server split and cleanup.peter2001-09-181-22/+5
|
* Silence non-constant format string warnings by marking functionskris2001-08-191-1/+1
| | | | | | | as __printflike()/__printf0like(), adding const, or adding missing "%s" format strings, as appropriate. MFC after: 2 weeks
* mdoc(7) police: join split punctuation to macro calls.ru2001-08-101-2/+2
|
* Remove whitespace at EOL.dd2001-07-151-2/+2
|
* mdoc(7) police: cosmetics.ru2001-07-041-1/+2
|
* Document continuation line support.dd2001-07-021-0/+2
| | | | | PR: 8479 Submitted by: Adrian Filipi-Martin <adrian@ubergeeks.com>
* Correct handling of continuation lines. Instead of treating thedd2001-07-021-0/+4
| | | | | | | | backslash as nothing, treat it like a space so that adjacent lines aren't glued together. PR: 8479 Submitted by: Adrian Filipi-Martin <adrian@ubergeeks.com>
* Correct cross-reference:sobomax2001-06-071-1/+1
| | | | | | portmap.8 --> rpcbind.8 Submitted by: .Xr testing script
* - VFS_SET(msdos) -> VFS_SET(msdosfs)ru2001-06-011-1/+1
| | | | | | - msdos.ko -> msdosfs.ko - mount_msdos(8) -> mount_msdosfs(8) - "msdos" -> "msdosfs" compatibility glue in mount(8)
* Remove vestiges of MFS.ru2001-06-011-1/+0
|
* Remove MFSphk2001-05-291-4/+1
|
* Since the netexport struct was centralised to 'struct mount',iedowse2001-05-291-3/+4
| | | | | | | | | | | | | attempting to remove nonexistant exports with MNT_DELEXPORT returns an error; before this change it always succeeded. This caused mountd(8) to log "can't delete exports for /whatever" warnings. Change the error code from EINVAL to a more specific ENOENT, and make mountd ignore this error when deleting the export list. I could have just restored the previous behaviour of returning success, but I think an error return is a useful diagnostic. Reviewed by: phk
* - sys/n[tw]fs moved to sys/fs/n[tw]fsru2001-05-261-1/+1
| | | | - /usr/include/n[tw]fs moved to /usr/include/fs/n[tw]fs
* - sys/msdosfs moved to sys/fs/msdosfsru2001-05-251-1/+1
| | | | | - msdos.ko renamed to msdosfs.ko - /usr/include/msdosfs moved to /usr/include/fs/msdosfs
* Reinstate one more old bugfix that got lost in the tirpc commit:iedowse2001-04-231-15/+20
| | | | | | | always look up -network and -mask addresses numerically before trying getnetbyname(). Without this, we may end up attempting DNS queries on silly names such as "127.0.0.0.my-domain.com". See the commit log from revisions 1.21 and 1.20 for further details.
* When exporting a directory that is not a mountpoint, mountd repeatedlyiedowse2001-04-221-0/+8
| | | | | | | | | | | | | removes the last path component until the mount() succeeds. However, the code never checks if it has passed the mountpoint, so in some cases where the mount() never succeeds, it can end up applying the flags from a mounted filesystem to the underlying one. Add a sanity check to the code which removes the last path component: test that the fsid associated with the new path is the same as that of the old one. PR: bin/7872
* The introduction of IPv6 support from NetBSD's mountd invalidatediedowse2001-04-211-243/+207
| | | | | | | | | | | | | | | | | | | | | | | | a number of assumptions related to the parsing of options in /etc/exports, and missed a few necessary new error checks. The main problems related to netmasks: an IPv6 network address missing a netmask would result in the filesystem being exported to the whole IPv6 world, non-continuous netmasks would be made continuous without any warnings, and nothing prevented you specifying an IPv4 mask with an IPv6 address. This change addresses these issues. As a side-effect we now store netmasks in sockaddr structs (this matches the kernel interface, and is closer to the way it used to be). Add a flag OP_HAVEMASK to keep track of whether or not we have successfully got a mask from any source. Replace some mask-related helper functions with versions that use the sockaddr-based masks. Also tidy up get_net() and fix the code that interprets IPv4 partial networks such as "127.1" as network rather than host addresses. Properly zero out some structures that were ending up partially containing junk from the stack, fix a few formatting issues, and add a comment noting some assumptions about export arguments.
* Fix a long-standing bug relating to the handling of SIGHUP: mountdiedowse2001-04-211-4/+30
| | | | | | | | | | would call malloc, stdio and other library functions from the signal handler which is not safe due to reentrancy problems. Instead, add a simple handler that just sets a flag, and call the more complex function from main() when necessary. Unfortunately to be able to check this flag, we must expand the svc_run() call, but the RPC library makes that relatively easy to do.
* A few more mountd cleanups:iedowse2001-04-181-37/+17
| | | | | | | | | | | | - Remove some horrible code that faked a "struct addrinfo" to be later passed to freeaddrinfo(). Instead, add a new group type "GT_DEFAULT" used to denote that the filesystem is exported to the world, and treat this case separately. - Don't clear the AI_CANONNAME flag in a struct addrinfo returned by getaddrinfo. There's still a bit more struct addrinfo abuse left in here. - Simplify do_mount() slightly by using an addrinfo pointer to keep track of the current address.
* Various bugfixes and cleanups, mainly from Martin Blapp:iedowse2001-04-171-68/+47
| | | | | | | | | | | | | | | | | - Revert del_mlist() to its pre-tirpc prototype. Unlike NetBSD's version, ours lets the caller generate any syslog() messages, so that it can include the service name in the message. - Initialise a few local variables to clarify the logic and avoid some compiler warnings. - Remove a few unused functions and local variables, and fix some whitespace issues. - Reinstate the logic for avoiding duplicate host entries that got removed accidentally in revision 1.41 (added in r1.5). This bit was submitted in a slightly different form by Thomas Quinot. Submitted by: Martin Blapp <mb@imp.ch>, Thomas Quinot <quinot@inf.enst.fr> PR: bin/26148
* give the "netgrent" functions a home in netdb.halfred2001-03-271-5/+0
|
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-2/+1
| | | | - MAN[1-9] -> MAN.
* Replace pmap_unset() with rpcb_unset() which fixes the unregistering.alfred2001-03-251-2/+2
| | | | Submitted by: Martin Blapp <mb@imp.ch>
* Deal with lack of IPv6 support gracefully.alfred2001-03-251-4/+8
| | | | Submitted by: Martin Blapp <mb@imp.ch>
* Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) andalfred2001-03-191-252/+624
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | associated changes that had to happen to make this possible as well as bugs fixed along the way. Bring in required TLI library routines to support this. Since we don't support TLI we've essentially copied what NetBSD has done, adding a thin layer to emulate direct the TLI calls into BSD socket calls. This is mostly from Sun's tirpc release that was made in 1994, however some fixes were backported from the 1999 release (supposedly only made available after this porting effort was underway). The submitter has agreed to continue on and bring us up to the 1999 release. Several key features are introduced with this update: Client calls are thread safe. (1999 code has server side thread safe) Updated, a more modern interface. Many userland updates were done to bring the code up to par with the recent RPC API. There is an update to the pthreads library, a function pthread_main_np() was added to emulate a function of Sun's threads library. While we're at it, bring in NetBSD's lockd, it's been far too long of a wait. New rpcbind(8) replaces portmap(8) (supporting communication over an authenticated Unix-domain socket, and by default only allowing set and unset requests over that channel). It's much more secure than the old portmapper. Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded to support TI-RPC and to support IPV6. Umount(8) is also fixed to unmount pathnames longer than 80 chars, which are currently truncated by the Kernel statfs structure. Submitted by: Martin Blapp <mb@imp.ch> Manpage review: ru Secure RPC implemented by: wpaul
* Switch to using a struct xucred instead of a struct xucred when notgreen2001-02-181-12/+12
| | | | | | | | | | | | | | | | | actually in the kernel. This structure is a different size than what is currently in -CURRENT, but should hopefully be the last time any application breakage is caused there. As soon as any major inconveniences are removed, the definition of the in-kernel struct ucred should be conditionalized upon defined(_KERNEL). This also changes struct export_args to remove dependency on the constantly-changing struct ucred, as well as limiting the bounds of the size fields to the correct size. This means: a) mountd and friends won't break all the time, b) mountd and friends won't crash the kernel all the time if they don't know what they're doing wrt actual struct export_args layout. Reviewed by: bde
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-011-1/+1
|
* Prepare for mdoc(7)NG.ru2001-01-161-3/+3
|
* Prepare for mdoc(7)NG.ru2000-12-181-3/+4
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-203-4/+4
|
* Explain why adding ``options NFSKERB'' breaks the kernel build.sheldonh2000-08-111-0/+3
| | | | | | PR: 10642 Reported by: Stefan Eggers <seggers@semyam.dinoco.de> Submitted by: johan
* Explicitly state that mountd can be made to re-read the exports file,sheldonh2000-07-031-0/+19
| | | | | | even though this may seem obvious to some folks. Requested by: obrien
* Correct an xref.mpp2000-05-051-1/+3
| | | | | PR: doc/13218 Submitted by: phantom
OpenPOWER on IntegriCloud