Commit Graph

111 Commits

Author SHA1 Message Date
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
christos 75aa3e0d4e Coverity CID 3308: Free the head of the group list, not the tail. 2006-05-25 00:33:24 +00:00
christos ebebb0245d Another uninitialized var XXX: GCC 2006-05-14 01:26:34 +00:00
mrg 9ef684e646 pass an array of gid_t, not int, to getgrouplist(). 2006-05-11 07:11:08 +00:00
wiz 2950a17537 Remove last Kerberos 4 support in non-3RDPARTY code. 2006-03-23 23:51:25 +00:00
yamt 5997340664 do_nfssvc: remove code to go up the path, as it's nonsense and
sometimes even harmful.
2006-01-05 10:38:29 +00:00
christos 11f5327084 Don't log an error if a delete exports request is not supported. Also fix
the error message to print the reason delete exports failed.
2005-12-04 18:01:53 +00:00
yamt 6458fcab9f make -noresvmnt in DEFSET work. 2005-11-18 13:19:48 +00:00
jmmv 2a3e5eeb7c Apply the NFS exports list rototill patch:
- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
  function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
  file sys/nfs/nfs_export.c.  The former was becoming large and its code
  is always compiled, regardless of the build options.  Using the latter,
  the code is only compiled in when NFSSERVER is enabled.  While doing this,
  also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
  path and a set of export entries.  At the moment it can only clear the
  exports list or append entries, one by one, but it is done in a way that
  allows setting the whole set of entries atomically in the future (see the
  comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
  that it becomes file system agnostic.  In fact, all this whole thing was
  done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
  exports initialization; done internally by the kernel when initializing
  the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
  subsystems can run arbitrary code upon receipt of specific VFS events.
  At the moment, this only provides support for unmount and is used to
  destroy NFS exports lists from the file systems being unmounted, though it
  has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
2005-09-23 12:10:31 +00:00
wiz f38e8b27b1 Sync usage with man page. 2005-09-19 22:43:21 +00:00
christos 089e80014b Allow setting the reserved port we bind, witb -p. I've had this patch for
3 months stashed...
2005-09-19 00:59:56 +00:00
lukem c8e07a4ef7 appease gcc -Wuninitialized 2005-06-02 05:58:24 +00:00
perseant 127b043e58 Allow exports of LFS filesystems. 2005-04-27 20:32:41 +00:00
briggs 6089355b00 If -d (debug mode) is specified on the command line, include
LOG_PERROR in openlog() to send log output to stderr as well.
Suggested by Darrin Jewell.
2005-03-15 04:54:59 +00:00
wiz c10c98a855 Add -n and -N to usage. 2005-01-17 15:20:35 +00:00
thorpej f82a7cafe9 Don't exit if we can't read the exports file; we can still reload it
after a SIGHUP.
2005-01-14 16:16:28 +00:00
thorpej a25a23d58b Add a -N option that causes all exports to have "-noresvport -noresvmnt"
added to them.
2005-01-14 16:12:46 +00:00
itojun b95181fc9b NI_WITHSCOPEID was not picked up by IETF standardization process. 2004-11-16 05:59:32 +00:00
dsl f7571bacc2 Add (unsigned char) cast to ctype functions 2004-10-30 08:46:12 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
agc 326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
christos 03db714fce - zero out the sockaddr before passing it to the kernel.
- print the reason of the export failure.
2003-05-16 14:03:31 +00:00
lukem e7fa9814b3 clear errno before strtol() if we're going to test it for ERANGE afterwards 2003-04-17 02:41:21 +00:00
wiz 5a91827c81 through, not throught. 2003-01-06 12:29:48 +00:00
fvdl d4f83aa2bb Use a non-blocking SVC for TCP connections. 2002-11-08 00:14:50 +00:00
christos 221d636e59 PR/15692: Love: specify ipsec policy for mountd. 2002-09-21 20:35:00 +00:00
christos af0366bdde use struct uucred. 2001-11-29 21:23:38 +00:00
itojun c878544aa7 s/IPV6_BINDV6ONLY/IPV6_V6ONLY/ to follow changes made yesterday. 2001-10-16 01:51:26 +00:00
fvdl 17a51bfa67 Don't allow -mask for v6 addresses, otherwise there could be confusion
leading to incorrect masks being used. Problem pointed out by
Martin Blapp (mb@imp.ch) who ported the code to FreeBSD, fixed
differently for the time being.
2001-04-24 15:04:27 +00:00
enami e1d0d284cf Free the storage allocated by fparseln when skipping an empty line. 2000-07-19 08:41:13 +00:00
itojun b141a4af1e always check getnameinfo errors. pass NI_WITHSCOPEID to
getnameinfo if declared.
2000-07-16 14:07:39 +00:00
itojun 55108de1d4 remove debug printf(). 2000-07-16 08:13:34 +00:00
itojun aa16ae57f1 fatal typo: need listen(tcp6sock). 2000-07-16 08:11:34 +00:00
thorpej 3a1d089614 Add some extra instrumentation in the `debug' case. 2000-06-27 20:32:28 +00:00
enami bc066a6ce1 Avoid null pointer dereference; the `addrp' is NULL if a mount point
is default exported.
2000-06-21 02:48:31 +00:00
fvdl 95e20d99e4 Don't try to push v6 addresses into the kernel when they're not supported. 2000-06-19 23:44:16 +00:00
hannken a2c3edb415 Fix bad registration of mountd/tcp/v3 on port of mountd/udp/v3. 2000-06-16 11:34:55 +00:00
itojun 1a658c5964 avoid memory leak and duplicated free. 2000-06-13 01:08:43 +00:00
itojun 20b4e05ffe check scope id when we compare two AF_INET6 sockaddrs.
XXX still not sure if it is enough, so I do not remove warning from
documentation yet.
2000-06-10 08:01:07 +00:00
itojun 1ba6c2716a support IPv6 addresses start with hex digit or colon (like ::1).
in manpages, warn that scoped IPv6 addresses are not supported.
2000-06-10 07:04:13 +00:00
itojun 739ca10641 bark if too-big-masklen on "-network prefix/masklen". 2000-06-10 04:40:17 +00:00
fvdl 65c642a530 Make address handling in mountd more generic, to allow IPv6 mounting.
Add IPv6 example to exports manpage. Allow /prefix notation for
networks.
2000-06-09 00:03:31 +00:00
fvdl 548ea61860 Fix last arg to clnt_broadcast. 2000-06-03 14:20:49 +00:00
enami 700450f288 Backout revision 1.58-1.61; Since we currently only have a way to unexport
per mount point, the way ``try to export and unexport an unnecessary
mount point later'' may leave unwanted information in the kernel, and
doesn't work if a mount point is default exported or publically exported.

To fix the race condtion, we need another way.
2000-02-16 04:08:40 +00:00