aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/mountd
Commit message (Collapse)AuthorAgeFilesLines
* s/rpc.mountd/mountd/Philippe Charnier2002-10-161-5/+6
| | | | | | | | Add FBSDID Reorder #if/#endif around sccsid to conform style(9) Notes: svn path=/head/; revision=105267
* Use the standardized CHAR_BIT constant instead of NBBY in userland.Mike Barcroft2002-09-251-2/+3
| | | | Notes: svn path=/head/; revision=103949
* Kerberised NFS has never (as far as I can tell) worked outsideMark Murray2002-09-201-12/+2
| | | | | | | | | BSD 4.4. Nuke mention of Kerberos from the documentation here. MFC after: 1 week Notes: svn path=/head/; revision=103716
* Update manpage to match the code, vfsload() isn't usedMaxime Henrion2002-08-111-4/+2
| | | | | | | here since some time, kldload() is used instead. Notes: svn path=/head/; revision=101686
* use IPV6_V6ONLY instead of non standard IPV6_BINDV6ONLY.Hajimu UMEMOTO2002-07-221-2/+2
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=100505
* Try to give a more descriptive error message for the pilot error ofJoerg Wunsch2002-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 Notes: svn path=/head/; revision=100336
* If an RPC fails, try a shorter reply in case the fault lies with theAlfred Perlstein2002-07-151-10/+39
| | | | | | | | | | size of the response. PR: misc/26320 MFC After: 2 weeks Notes: svn path=/head/; revision=100117
* The .Nm utilityPhilippe Charnier2002-07-061-2/+3
| | | | Notes: svn path=/head/; revision=99501
* Remove old pre-TIRPC code for getting transport handles. The code thatAlfred Perlstein2002-06-251-5/+0
| | | | | | | follows spams over the contents of them making the removed code useless. Notes: svn path=/head/; revision=98826
* more file system > filesystemTom Rhodes2002-05-162-4/+4
| | | | Notes: svn path=/head/; revision=96707
* Use fgetln to remove the static limit on the length of lines inIan Dowse2002-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. Notes: svn path=/head/; revision=96622
* o __P removedWarner Losh2002-03-211-41/+41
| | | | | | | o main prototype removed Notes: svn path=/head/; revision=92882
* Remove 'register' keyword.David E. O'Brien2002-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?) Notes: svn path=/head/; revision=92806
* Chase sysctl name.Dima Dorfman2002-03-111-1/+1
| | | | | | | Submitted by: Christopher Sharp <christopher_sharp@web.de> Notes: svn path=/head/; revision=92035
* Introduce a version field to `struct xucred' in place of one of theDima Dorfman2002-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 Notes: svn path=/head/; revision=91354
* Default to WARNS=2.David E. O'Brien2001-12-041-0/+1
| | | | | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike Notes: svn path=/head/; revision=87325
* Deal with module name changes and autoloading.Peter Wemm2001-09-201-15/+8
| | | | Notes: svn path=/head/; revision=83687
* Userland part of nfs client/server split and cleanup.Peter Wemm2001-09-181-22/+5
| | | | Notes: svn path=/head/; revision=83653
* Silence non-constant format string warnings by marking functionsKris Kennaway2001-08-191-1/+1
| | | | | | | | | | as __printflike()/__printf0like(), adding const, or adding missing "%s" format strings, as appropriate. MFC after: 2 weeks Notes: svn path=/head/; revision=81911
* mdoc(7) police: join split punctuation to macro calls.Ruslan Ermilov2001-08-101-2/+2
| | | | Notes: svn path=/head/; revision=81462
* Remove whitespace at EOL.Dima Dorfman2001-07-151-2/+2
| | | | Notes: svn path=/head/; revision=79754
* mdoc(7) police: cosmetics.Ruslan Ermilov2001-07-041-1/+2
| | | | Notes: svn path=/head/; revision=79213
* Document continuation line support.Dima Dorfman2001-07-021-0/+2
| | | | | | | | PR: 8479 Submitted by: Adrian Filipi-Martin <adrian@ubergeeks.com> Notes: svn path=/head/; revision=79118
* Correct handling of continuation lines. Instead of treating theDima Dorfman2001-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> Notes: svn path=/head/; revision=79117
* Correct cross-reference:Maxim Sobolev2001-06-071-1/+1
| | | | | | | | | portmap.8 --> rpcbind.8 Submitted by: .Xr testing script Notes: svn path=/head/; revision=77878
* - VFS_SET(msdos) -> VFS_SET(msdosfs)Ruslan Ermilov2001-06-011-1/+1
| | | | | | | | | - msdos.ko -> msdosfs.ko - mount_msdos(8) -> mount_msdosfs(8) - "msdos" -> "msdosfs" compatibility glue in mount(8) Notes: svn path=/head/; revision=77577
* Remove vestiges of MFS.Ruslan Ermilov2001-06-011-1/+0
| | | | Notes: svn path=/head/; revision=77575
* Remove MFSPoul-Henning Kamp2001-05-291-4/+1
| | | | Notes: svn path=/head/; revision=77435
* Since the netexport struct was centralised to 'struct mount',Ian Dowse2001-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 Notes: svn path=/head/; revision=77405
* - sys/n[tw]fs moved to sys/fs/n[tw]fsRuslan Ermilov2001-05-261-1/+1
| | | | | | | - /usr/include/n[tw]fs moved to /usr/include/fs/n[tw]fs Notes: svn path=/head/; revision=77223
* - sys/msdosfs moved to sys/fs/msdosfsRuslan Ermilov2001-05-251-1/+1
| | | | | | | | - msdos.ko renamed to msdosfs.ko - /usr/include/msdosfs moved to /usr/include/fs/msdosfs Notes: svn path=/head/; revision=77162
* Reinstate one more old bugfix that got lost in the tirpc commit:Ian Dowse2001-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. Notes: svn path=/head/; revision=75861
* When exporting a directory that is not a mountpoint, mountd repeatedlyIan Dowse2001-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 Notes: svn path=/head/; revision=75841
* The introduction of IPv6 support from NetBSD's mountd invalidatedIan Dowse2001-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. Notes: svn path=/head/; revision=75801
* Fix a long-standing bug relating to the handling of SIGHUP: mountdIan Dowse2001-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. Notes: svn path=/head/; revision=75754
* A few more mountd cleanups:Ian Dowse2001-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. Notes: svn path=/head/; revision=75641
* Various bugfixes and cleanups, mainly from Martin Blapp:Ian Dowse2001-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 Notes: svn path=/head/; revision=75635
* give the "netgrent" functions a home in netdb.hAlfred Perlstein2001-03-271-5/+0
| | | | Notes: svn path=/head/; revision=74844
* - Backout botched attempt to introduce MANSECT feature.Ruslan Ermilov2001-03-261-2/+1
| | | | | | | - MAN[1-9] -> MAN. Notes: svn path=/head/; revision=74815
* Replace pmap_unset() with rpcb_unset() which fixes the unregistering.Alfred Perlstein2001-03-251-2/+2
| | | | | | | Submitted by: Martin Blapp <mb@imp.ch> Notes: svn path=/head/; revision=74792
* Deal with lack of IPv6 support gracefully.Alfred Perlstein2001-03-251-4/+8
| | | | | | | Submitted by: Martin Blapp <mb@imp.ch> Notes: svn path=/head/; revision=74791
* Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) andAlfred Perlstein2001-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 Notes: svn path=/head/; revision=74462
* Switch to using a struct xucred instead of a struct xucred when notBrian Feldman2001-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 Notes: svn path=/head/; revision=72650
* mdoc(7) police: split punctuation characters + misc fixes.Ruslan Ermilov2001-02-011-1/+1
| | | | Notes: svn path=/head/; revision=71895
* Prepare for mdoc(7)NG.Ruslan Ermilov2001-01-161-3/+3
| | | | Notes: svn path=/head/; revision=71099
* Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-181-3/+4
| | | | Notes: svn path=/head/; revision=70152
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-203-4/+4
| | | | Notes: svn path=/head/; revision=68960
* Explain why adding ``options NFSKERB'' breaks the kernel build.Sheldon Hearn2000-08-111-0/+3
| | | | | | | | | PR: 10642 Reported by: Stefan Eggers <seggers@semyam.dinoco.de> Submitted by: johan Notes: svn path=/head/; revision=64542
* Explicitly state that mountd can be made to re-read the exports file,Sheldon Hearn2000-07-031-0/+19
| | | | | | | | | even though this may seem obvious to some folks. Requested by: obrien Notes: svn path=/head/; revision=62459
* Correct an xref.Mike Pritchard2000-05-051-1/+3
| | | | | | | | PR: doc/13218 Submitted by: phantom Notes: svn path=/head/; revision=60016