summaryrefslogtreecommitdiffstats
path: root/support/export/rmtab.c
Commit message (Collapse)AuthorAgeFilesLines
* libexport.a: rmtab.c no longer needs #include xmalloc.hChuck Lever2012-12-121-3/+3
| | | | | 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-8/+5
| | | | | | | | | | | | | | | | | | | 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>
* libexport.a: Refactor rmtab_read()Chuck Lever2010-05-241-23/+41
| | | | | | | | Clean up: Make it easier to add IPv6 support by refactoring part of rmtab_read() into a helper function. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Mountd should use separate lockfilesBen Myers2009-04-031-1/+1
| | | | | | | | | | | | | | | | Mountd keeps file descriptors used for locks separate from those used for io and seems to assume that the lock will only be released on close of the file descriptor that was used with fcntl. Actually the lock is released when any file descriptor for that file is closed. When setexportent() is called after xflock() he closes and reopens the io file descriptor and defeats the lock. This patch fixes that by using a separate file for locking, cleaning them up when finished. Signed-off-by: Ben Myers <bpm@sgi.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* When a FQDN exists in /var/lib/nfs/rmtab it causesSteve Dickson2008-06-251-2/+2
| | | | | | | | the exportfs command to seg fault due to the nfs_export pointer not being allocated. Reworking the parentheses in rmtab_read() so the htype variable is evaluated correctly fix the problem. Signed-off-by: Steve Dickson <steved@redhat.com>
* Cleaned up warnings in rmtab.c and xlog.cSteve Dickson2008-06-061-3/+3
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Stop the kernel export table from being flushedNeil Brown2008-03-041-1/+1
| | | | | | | on MIPS machines. Reported-by: Anirban Sinha <ASinha@zeugmasystems.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.mountd: make exportent->e_hostname a dynamically-allocated stringJeff Layton2007-09-281-3/+1
| | | | | | | | | | | | This makes the e_hostname field of the exportent into a pointer to a dynamically allocated string. This is necessary since this is field is often filled out from the m_hostname. This too adds a few micro-optimizations as we can avoid copying the string in some places and simply pass a pointer to the original string instead. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Signed-off-by: Neil Brown <neilb@suse.de>
* Autogen updateneilbrown2005-12-201-1/+3
|
* Fixes to make unexporting and exporting with wildcardsneilbrown2003-07-031-12/+12
| | | | work more sensibly.
* make "exportfs -au" do no DNS lookupneilbrown2001-09-201-2/+2
|
* 2000-05-31 H.J. Lu <hjl@lucon.org>hjl2000-06-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.in (VERSION): Set to "0.1.7.5". * configure: Regenerated. * nfs-utils.spec: Updated. * support/include/nfslib.h (exportent): Add a new field, r_count, to count the number of mounts from a client. (getrmtabent): Take a new argument for position in file. (putrmtabent): Likewise. (fgetrmtabent): Likewise. (fputrmtabent): Likewise. * support/nfs/rmtab.c (getrmtabent): Handle the new argument for position in file. (fgetrmtabent): Likewise. (putrmtabent): Likewise. (fputrmtabent): Likewise. * support/nfs/rmtab.c (fgetrmtabent): Get value for the new field, r_count. * support/export/rmtab.c (rmtab_read): Pass NULL as the new argument to getrmtabent (), fgetrmtabent (), putrmtabent () and fputrmtabent (). * utils/mountd/rmtab.c (mountlist_add): Likewise. (mountlist_del): Likewise. (mountlist_del_all): Likewise. (mountlist_list): Likewise. * utils/mountd/rmtab.c (mountlist_add): Increment "r_count" for the existing entry and initialize "r_count" to 1. (mountlist_del): Decrement "r_count".
* Thu Oct 28 11:27:51 EST 1999 Neil Brown <neilb@cse.unsw.edu.au>neilbrown1999-10-281-13/+17
| | | | | | | | | | * support/include/nfs/export.h addedd NFSEXP_NOSUBTREECHECK * support/nfs/exports.c: added {no_,}subtree_check and changed crossmnt to nohide * utils/exportfs/exports.man: added no_subtree_check and nohide and removed irrelevant stuff from unfsd. * support/export/rmtab.c: rmtab_read didn't quite do the right thing if a pathname from rmtab was a subdirectory of an export-point
* Initial revisionhjl1999-10-181-0/+79