summaryrefslogtreecommitdiffstats
path: root/utils/exportfs
Commit message (Collapse)AuthorAgeFilesLines
* exportfs: Update exportfs flush option list in usage message.Namjae Jeon2012-07-051-9/+12
| | | | | | | Update exportfs flush option list in usage message. And sorted these cases in alphabetical order. Signed-off-by: Steve Dickson <steved@redhat.com>
* exportfs: Removed warnings about routines not being prototypedSteve Dickson2012-03-121-2/+4
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* exportfs: Stop racing exportfs on clustersSteve Dickson2012-03-121-0/+41
| | | | | | | | | | This problem can occur when multiple cluster services fail over at the same time, causing missing high-available exports. Having a lot of nfs-exports will trigger this issue easier. https://bugzilla.linux-nfs.org/show_bug.cgi?id=224 Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: exports man page: no_acl is not supportedHarshula Jayasuriya2012-02-291-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The inclusion of no_acl in the exports man page is confusing since it is not actually supported (v3.3-rc3): 1090 static struct flags { 1091 int flag; 1092 char *name[2]; 1093 } expflags[] = { 1094 { NFSEXP_READONLY, {"ro", "rw"}}, 1095 { NFSEXP_INSECURE_PORT, {"insecure", ""}}, 1096 { NFSEXP_ROOTSQUASH, {"root_squash", "no_root_squash"}}, 1097 { NFSEXP_ALLSQUASH, {"all_squash", ""}}, 1098 { NFSEXP_ASYNC, {"async", "sync"}}, 1099 { NFSEXP_GATHERED_WRITES, {"wdelay", "no_wdelay"}}, 1100 { NFSEXP_NOHIDE, {"nohide", ""}}, 1101 { NFSEXP_CROSSMOUNT, {"crossmnt", ""}}, 1102 { NFSEXP_NOSUBTREECHECK, {"no_subtree_check", ""}}, 1103 { NFSEXP_NOAUTHNLM, {"insecure_locks", ""}}, 1104 { NFSEXP_V4ROOT, {"v4root", ""}}, 1105 { 0, {"", ""}} 1106 }; Signed-off-by: Harshula Jayasuriya <harshula@redhat.com> Acked-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* man pages: fixed a few typos in a couple man pagesSteve Dickson2011-10-042-4/+4
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* exportfs: do not warn if /etc/exports.d/ does not existMike Frysinger2011-09-011-2/+5
| | | | | | | | | It isn't uncommon for /etc/exports.d/ to not exist, and imo, it's not that big of a deal as often times, a simple /etc/exports is sufficient. So silently skip the case where the dir is missing. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* exportfs: drop extra newline in xlogMike Frysinger2011-09-011-4/+4
| | | | | | | | Since xlog() itself appends a newline, we don't want to add our own otherwise we get extra in the output. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* exportfs: matchhostname() doesn't handle localhost properlyChuck Lever2011-08-291-2/+32
| | | | | | | | | | | | Same change as statd_matchhostname() is necessary for the logic in exportfs. Recall that these are "separate but nearly equal" because the exportfs version requires extra expensive string checking that would be onerous for statd. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* exports.man: Fix comment syntaxLuk Claes2011-08-291-76/+76
| | | | | | | | | | Using three single-quotes for a comment sort of works because it results in invoking a nonexistent macro, but it results in a huge number of warnings when trying to validate the man page. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* exports.man: "\* d lets man complainLuk Claes2011-08-291-1/+1
| | | | | | | | man complains with "macro `d' not defined", so remove these seemingly unneeded characters Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* manpage: add section on character class matches to exports(5)Jeff Layton2011-06-221-5/+8
| | | | | Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: remove possibly false statement from exports.manJames Pearson2011-06-221-1/+1
| | | | | | | | | A very minor change suggested by J. Bruce Fields <bfields@fieldses.org> to remove the statement that exporting to a single host or IP address is the "most common format" - as it probably isn't. Signed-off-by: James Pearson <james-p@moving-picture.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* manpage: add info about IPv6 configuration to exports(5)Jeff Layton2011-06-221-4/+7
| | | | | | | | | | The parts of the exports(5) manpage that discuss IP addressing neglect IPv6 configuration. Update to include info on how to export to IPv6 subnets and addresses, and add a line demonstrating that to the EXAMPLE section. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* exports: Clearly Defining Exports PrioritiesJames Pearson2011-06-071-13/+25
| | | | | | | | Added some verbiage to the exports(5) man page that clearly explains the precedence around how exports will work with regard to netgroups. Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed a warning from exportfs.cSteve Dickson2011-04-061-1/+1
| | | | | | exportfs.c:280:29: warning: 'exp' may be used uninitialized in this function Signed-off-by: Steve Dickson <steved@redhat.com>
* Update man pages for /etc/exports.dMasatake YAMATO2011-03-072-5/+50
| | | | | | | Man page updates for /etc/exports.d. Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Read /etc/exports.d/*.export as extra export filesMasatake YAMATO2011-03-071-1/+58
| | | | | | | | | | | | | | | | This patch adding a capability to read /etc/exports.d/*.exports as extra export files to exportfs. If one wants to add or remove an export entry in a script, currently one may have to use sed or something tool for adding or removing the line for the entry in /etc/exports file. With the patch, adding and removing an entry from a script is much easier. cat<<EOF... or mv can be used for adding. rm can be used for removing. Signed-off-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Cleared up the sync option in exportfs man pageSteve Dickson2010-10-201-1/+3
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed duplicate entries in export man pageSteve Dickson2010-10-151-14/+0
| | | | | | | The man page's paragraphs about "refer=" and "replicas=" each appear twice. Signed-off-by: Steve Dickson <steved@redhat.com>
* mountd: Update mountd/exportfs man pages to reflect IPv6 changesChuck Lever2010-09-272-175/+200
| | | | | | | | | | | | Document IPv6 support in rpc.mountd and exportfs, and clarify existing language in the man page. Clean up: Use bold consistently for program names, and italics consistently for file names. Use "rpc.mountd" consistently as the name of the mountd daemon. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* exportfs: Enable IPv6 support in matchhostname()Chuck Lever2010-09-161-21/+2
| | | | | | | | | | | | To gain IPv6 support in matchhostname(), simply replace the socket address comparison helpers with the generic versions that can handle IPv4 and IPv6. host_addrinfo() (called by matchhostname()) returns IPv6 addresses only if IPv6 support is enabled. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* exportfs: Use xlog() for error reportingChuck Lever2010-08-241-27/+29
| | | | | | | | | | | | | | exportfs already invokes xlog_open() because libexport.a uses xlog() exclusively for error reporting and debugging messages. If we can use xlog() throughout exportfs itself, that enables xlog debugging messages everywhere in the code path. In addition, use xlog() instead of fprintf(stderr) for reporting errors in exportfs.c, to be consistent with libexport.a and other components of nfs-utils. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* exportfs: exportfs.c no longer needs #include "xmalloc.h"Chuck Lever2010-08-241-2/+4
| | | | | | | | Clean up: No calls to xmalloc() or xstrdup() here. No need for the double #include of xmalloc.h. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Replace matchhostname()Chuck Lever2010-06-221-0/+78
| | | | | | | | | | | | | | | | | So that exportfs can eventually support IPv6 addresses, copy statd's getaddrinfo(3)-based matchhostname to exportfs, with adjustments for dealing with export wildcards and netgroups. Until exportfs has full IPv6 support, however, we want to ensure that IPv6 addresses continue to remain blocked in the address comparison code used by exportfs. At a later point we'll replace much of this with the generic functions in sockaddr.h. Since it contains special logic for handling wildcard and netgroups, this function is specialized for exportfs, and does not belong in one of the shared libraries. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountd: Replace "struct hostent" with "struct addrinfo"Chuck Lever2010-06-221-16/+9
| | | | | | | | | | | | | | | | | | | struct hostent can store either IPv4 or IPv6 addresses, but it can't store both address families concurrently for the same host. Neither can hostent deal with parts of socket addresses that are outside of the sin{,6}_addr field. Replace the use of "struct hostent" everywhere in libexport.a, mountd, and exportfs with "struct addrinfo". This is a large change, but there are so many strong dependencies on struct hostent that this can't easily be broken into smaller pieces. One benefit of this change is that hostent_dup() is no longer required, since the results of getaddrinfo(3) are already dynamically allocated. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* exportfs: Add a common exit label in exportfs()Chuck Lever2010-06-221-8/+6
| | | | | | | | | Clean up: Reduce code duplication by introducing a goto label for freeing hp and exiting. This will make replacing "struct hostent *" with "struct addrinfo *" more straightforward in this code. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libexport.a: Add helpers to manage DNS lookupsChuck Lever2010-06-221-6/+5
| | | | | | | | | | | | | | | Introduce DNS query helpers based on getaddrinfo(3) and getnameinfo(3). These will eventually replace the existing hostent-based functions in support/export/hostname.c. Put some of these new helpers to immediate use, where convenient. As they are part of libexport.a, I've added the forward declarations for these new functions in exportfs.h rather than misc.h, where the hostent-based forward declarations are currently. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Added the sys/stat.h header file to a number ofSteve Dickson2010-01-221-0/+1
| | | | | | files which ensure the S_ISDIR() macro is defined. Signed-off-by: Steve Dickson <steved@redhat.com>
* Update example in exports(5) man pageValerie Aurora Henson2009-03-041-1/+1
| | | | | Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Exportfs and rpc.mountd optimalizationTomas Richter2009-02-181-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | There were some problems with exportfs and rpc.mountd for long export lists - see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=76643 I do optimalization as my bachelors thesis (Facuulty of informatics, Masaryk's university Brno, Czech Republic), under lead of Yenya Kasprzak. Both exportfs and rpc.mount build linked list of exports (shared functions in export.c). Every time they are inserting new export into list, they search for same export in list. I replaced linked list by hash table and functions export_add and export_lookup by functions hash_export_add and hash_export_lookup (export.c). Because some other functions required exportlist as linked list, hash table has some implementation modification im comparison with ordinary hash table. It also keeps exports in linked list and has pointer to head of the list. So there's no need of implementation function <for_all_in_hash_table>. Signed-off-by: Tomas Richter <krik3t@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Cleared up a contradiction in the export(5) man pageSteve Dickson2008-10-011-1/+1
| | | | | | (BZ: https://bugzilla.linux-nfs.org/show_bug.cgi?id=161) Signed-off-by: Steve Dickson <steved@redhat.com>
* Stop exportfs warning about needing fsid, when we actually have oneDavid Woodhouse2008-08-281-1/+9
| | | | | Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fixed smail typo in exportfs man pageOren Held2008-05-081-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Updated exportfs man to talk about /var/lib/nfs/etabSteve Dickson2008-03-181-10/+10
| | | | | | instead of /var/lib/nfs/xtab Signed-off-by: Steve Dickson <steved@redhat.com>
* Fixed typo in nfsd man pageFilipus Klutiero2008-03-111-1/+1
| | | | | | bz: http://bugzilla.linux-nfs.org/show_bug.cgi?id=160 Signed-off-by: Filipus Klutiero <chealer@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Be explicit on how to update exports in the man page.Steve Dickson2008-03-101-0/+2
| | | | | Signed-off-by: Steinar H. Gunderson <sgunderson@bigfoot.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* The wording in the exportfs man page can be a bit confusing, implyingSteve Dickson2007-11-031-2/+19
| | | | | | | | | | that "exportfs -u :/foo" will unexport /foo from all hosts, which it won't. This patch cleans that wording up and adds a couple examples on how to unexport directories Signed-off-by: Steinar H. Gunderson <sesse@debian.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* document the sec= optionJ. Bruce Fields2007-07-101-3/+18
| | | | | | | | | | | Document the sec= option in the exports man page. Not done: it would be nice to have an example or two here (and not just in the final "EXAMPLE" section, though that would be nice too). I was just too lazy to figure out the formatting. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Support sec= option to specify export securityJ. Bruce Fields2007-07-101-0/+1
| | | | | | | | | | | This adds support for reading sec= option and sending security data through cache via "... secinfo n flavor1 flag1 ... flavorN flagN". If sec= is missing, no secinfo option will be passed down. Signed-off-by: Fred Isaman <iisaman@citi.umich.edu> Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* exportfs - test exportability of filesystems when exportfs is run.Neil Brown2007-04-021-1/+85
| | | | | | | | | When exporting a filesystem test to see if the kernel is likely to accept the export and print suitable warning message if not. Don't actually fail the 'exportfs' as by the time a MOUNT request arrives, the filesystem might be exportable. Signed-off-by: Neil Brown <neilb@suse.de>
* Make warning about host matching multiple exports more helpful.Neil Brown2007-03-191-0/+2
| | | | | 1/ only warn once per export, as it could get too noisy. 2/ make it a little clearer why this might be a problem.
* Remove uid-mapping text from exports.manNeil Brown2007-03-151-99/+0
| | | | | | It was already commented out, and it will never be wanted. Signed-off-by: Neil Brown <neilb@suse.de>
* Remove "maptype" supportJ. Bruce Fields2007-03-151-4/+0
| | | | | | | | It appears that this is used only by unfsd, and is obscure enough that we should be able to just rip it out with no special precautions. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Extend the exportfs/mountd interface to pass fslocations info into the kernelFred Isaman2007-02-272-0/+16
| | | | | | | | Fix up a few issues with the fsloc code. Signed-off-by: Fred Isaman <iisaman@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Extend the exportfs interface to pass fslocations info into the kernel.Fred Isaman2007-02-222-1/+27
| | | | | | | | | | Extend exportfs interface to pass fslocations info into the kernel, using syntax modelled after AIX. Adds "refer=" and "replicas=" options to /etc/exports to enable use of the kernel fslocation code. Signed-off-by: Fred Isaman <iisaman@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Use UUIDs to identify filesystems if kernel supports it.Neil Brown2007-02-122-17/+26
| | | | | | | | | | | This introduces a new dependancy on libblkid. If a filesystem being exported has a UUID that libblkid can extract, then that is passed to the kernel for use in identifying the filesystem in filehandles. This means that 'fsid=' is no longer needed to work around the problem of device numbers changing. fsid= is still needed for fielsystems that have no device, and can now be given 16byute uuid instead of just a 32bit one.
* Various minor manpage fixes.Steinar H. Gunderson2007-02-051-2/+2
| | | | | | | | | | This mostly takes care of the difference between - and \-; in man pages, the former is hyphen (which indicates, among others, that a line might be split at that point), while the latter is a dash. For options, the latter is correct. There's also one minor grammatical fix.
* Allow default options in /etc/exportsSteinar H. Gunderson2007-02-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | Implement default options in /etc/exports, to fix a long-standing wishlist bug in Debian. (The user claims the syntax matches that of OpenBSD.) This makes it possible to write "/srv/www -sync,no_subtree_check host1 host2 host3" instead of having to write (sync,no_subtree_check) over and over and over again, driving the administrator slowly mad. Such option lines can be placed anywhere on the line, and affects anything after them (I do not know if OpenBSD allows this). The patch is slightly convoluted in order to avoid triggering spurious warnings; for instance, we want "/srv/www -sync host1" to trigger a warning, but not "/srv/www -sync,no_subtree_check host1" or "/srv/www -sync host1(no_subtree_check)". There was also a suggestion for a truly global (ie. per-file) option list, but this seemed like the safest bet, given that it matches that of other implementations. Also, the man page is updated with information on the new possibilities, and an example. Signed-off-by: Steinar H. Gunderson <sesse@debian.org> Signed-off-by: Neil Brown <neilb@suse.de>
* Document sensitive gidsSteinar H. Gunderson2006-10-241-2/+5
| | | | | | | | The exports(8) man page already mentions that some non-root users, such as bin, might be just as sensitive as root, and that root_squash thus might not be as effective as one could hope for. Update the documentation to also mention that this could be the case for non-root groups, such as staff.
* Assorted man page fixesNeil Brown2006-10-242-8/+10
| | | | Mostly thanks to Sylvain Cherrier <sylvain.cherrier@free.fr>