summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Removed -Werror=format=2 warningsnfs-utils-2-3-2-rc1Steve Dickson2018-03-101-4/+7
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed -Werror=format-truncation and format warningsSteve Dickson2018-03-104-17/+13
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Test if extra compiler warnings are availableJustin Mitchell2018-03-101-5/+18
| | | | | | | | Some of the latest compiler warnings flags are not available on older compilers so this adds macros to test they are supported Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Fix variable shadowing issue caused by ABI cleanupJustin Mitchell2018-03-107-76/+111
| | | | | | | | | | A mistake when cleaning up the ABI caused certain values to not be available to libnfsidmap plugins, requiring code reorganisation to not expose further unneccesary symbols. Adds one symbol reporting the configuration file path used. Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed -Werror=unused-result warnings.Steve Dickson2018-03-075-9/+21
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: minorversion setting is being ignored with the -t flagSteve Dickson2018-03-012-5/+25
| | | | | | | | | | | | mount -t nfs or mount -t nfs4 and setting minorversion should set the v4 minor version. This patch adds a few checks to make sure the minor version is set. The patch also translate the minorversion= option to vers=4.x in the arguments passed to the kernel when the kernel is later then v3.4. Signed-off-by: Steve Dickson <steved@redhat.com>
* Added more -Werror= warning flagsSteve Dickson2018-02-231-0/+13
| | | | | | | | Add some more -Werror warning flags that didn't cause warnings but could catch some in the future. Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed missing-include-dirs warningsSteve Dickson2018-02-235-1/+14
| | | | | | | Added the -Werror=missing-include-dirs warning flag then moved some include directories around. Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed undef warningsSteve Dickson2018-02-232-3/+4
| | | | | | | Added the -Werror=undef warning flag and then fixed a few #ifdefs Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed format=2 warningsSteve Dickson2018-02-233-0/+5
| | | | | | | | Added the -Werror=format=2 warning flag and added couple pragma statments to ignore the warning where it could not be avoided. Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed format-overflow=2 warningsSteve Dickson2018-02-233-2/+3
| | | | | | | Added the -Werror=format-overflow=2 warning flag and then cleaned up the mess Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed missing-prototypes warnings.Steve Dickson2018-02-2327-16/+46
| | | | | | | Added the -Werror=missing-prototypes warning flag then cleaned up the mess. Signed-off-by: Steve Dickson <steved@redhat.com>
* configure.ac: clean upSteve Dickson2018-02-231-14/+6
| | | | | | Remove ARCHFLAGS since it has not been needed for years. Signed-off-by: Steve Dickson <steved@redhat.com>
* git should ignore the generated nfsref executableChuck Lever2018-02-121-0/+1
| | | | | | | Clean up. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove fedfs_admin.hChuck Lever2018-02-126-345/+48
| | | | | | | | | | | | | | nfs-utils is not going to provide an implementation of the FedFS ADMIN protocol, so there's no need to include the entire .x file for that protocol. The only piece needed (for the moment) is the enum that defines the FEDFS_ERR codes, which are used by the internal and external libjunction APIs. Suggested-by: Neil Brown <neilb@suse.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove nsdb_display_fedfsconnectionsec()Chuck Lever2018-02-122-21/+0
| | | | | | | | | | This is a display helper function that is not needed in nfs-utils because nfs-utils does not implement the FedFS ADMIN protocol (and therefore does not need to display ADMIN protocol-related security settings). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove warnings from rpcgen generated filesSteve Dickson2018-02-122-2/+3
| | | | | | | | | | | | | | | | | | | The xdr c-files, generated from .x by rpcgen, in both libnsm.a and libexport.a libraries cause the following warnings: mount_xdr.c:43:20: warning: unused variable 'buf' [-Wunused-variable] sm_inter_xdr.c:37:20: warning: unused variable 'buf' [-Wunused-variable] sm_inter_xdr.c:51:6: warning: unused variable 'i' [-Wunused-variable] These warnings are caused by rpcgen trying in inline the xdr routines. It turns out no inlining was happening, except for one routine. So turning off inlining eliminated these warnings. This patch also eliminates a Werror missing-prototypes in sm_inter.h Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove unneeded reference to nfsidmap_internal.hChuck Lever2018-02-071-1/+1
| | | | | | | | This file is not part of "git clone" and is not #included from any C file. Reviewed-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com Signed-off-by: Steve Dickson <steved@redhat.com>
* Add LDAP-free 'nfsref' commandChuck Lever2018-02-079-0/+1086
| | | | | | | | | | The 'nfsref' command administers junctions. On an NFS server, it can create new junctions, remove existing junctions, or display the contents of junctions. A man page with more details is included. Signed-off-by: Steve Dickson <steved@redhat.com>
* mountd: Solder in support for NFS basic junctionsChuck Lever2018-02-073-104/+98
| | | | | | | | | | | | | | | | | | | | This patch does two things: 1. Reverts ab74900ff59e ("mountd: Support junction management plug-ins") 2. Re-implements support for NFS basic junctions directly in mountd So no more support for FedFS junctions, and no more need to have a dynamically load component installed from another package. The downside is that mountd has to be linked with libxml2 to get this support. Thus to make the use of libxml2 optional, built-in support for junctions is enabled only when --enable-junction is specified on the command line. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add LDAP-free version of libjunction to nfs-utilsChuck Lever2018-02-078-0/+3216
| | | | | | | | | | | | | | | | | | A "junction" is a physical filesystem object that contains an NFS referral. On Linux, a junction is a directory with special mode bits that has an extended attribute containing referral location information, represented as XML. A junction can contain either a list of target locations, or it can contain the location of an LDAP directory entry where the actual referral information is maintained. The former is called an "NFS basic junction", the latter is a "FedFS junction". libjunction contains support for reading or updating a junction that resides on an NFS server. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add infrastructure for libjunctionChuck Lever2018-02-075-0/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | The source code for libjunction used to be maintained in fedfs-utils, but fedfs-utils is being retired. Although interest in FedFS junctions has waned, NFS basic junctions are still appealing enough that we've decided we want to continue supporting them. Therefore this patch moves the non-LDAP parts of libjunction into nfs-utils, to enable nfs-utils to also support the user-visible pieces of NFS basic junctions. I've added yet another configure command line option to control whether libjunction is built. It defaults to "disabled" for the moment. Reasons you might want to leave it disabled: - Your distribution still provides fedfs-utils, which already has a working libjunction which is installed separately - Your distribution does not provide libxml2, which is required to support libjunction When it's disabled, nfs-utils builds just like it did before this patch, and there's no new dependency on libxml2. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add headers to support libjunctionChuck Lever2018-02-073-0/+469
| | | | | | | | | | | | | | | | | | libjunction contains support for reading or updating a junction that resides on an NFS server. It is used by mountd to read junction information from an exported filesystem, and by the nfsref command line tool. These will be introduced in subsequent patches. The source code for libjunction used to be maintained in fedfs-utils, but fedfs-utils is being retired. Although interest in FedFS junctions has waned, NFS basic junctions are still appealing enough that we've decided we want to continue supporting them. Therefore this patch moves the non-LDAP parts of libjunction into nfs-utils, to enable nfs-utils to also support the user-visible pieces of NFS basic junctions. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* exportfs: move ro/rw option back to secinfo_flag_displaymap tableJianhong Yin2018-01-172-4/+1
| | | | | | | | | | | | | | | | | | according https://bugzilla.redhat.com/show_bug.cgi?id=1532688#c3 ro/rw options should be in secinfo_flag_displaymap[] test pass: ''' [yjh@test ~]$ cat /etc/exports /export_test 127.0.0.1(rw,wdelay,no_root_squash,no_subtree_check,sec=sys,root_squash,all_squash,sec=krb5,ro,root_squash,no_all_squash,sec=krb5i,rw,root_squash,no_all_squash,sec=krb5p,no_root_squash,no_all_squash) [yjh@test ~]$ sudo service nfs restart Redirecting to /bin/systemctl restart nfs.service [yjh@test ~]$ sudo exportfs -v /export_test 127.0.0.1(sync,wdelay,hide,no_subtree_check,sec=sys,rw,secure,root_squash,all_squash,sec=krb5,ro,secure,root_squash,no_all_squash,sec=krb5i,rw,secure,root_squash,no_all_squash,sec=krb5p,rw,secure,no_root_squash,no_all_squash) ''' Signed-off-by: Jianhong Yin <yin-jianhong@163.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* libio.h: Has been deprecatedSteve Dickson2018-01-172-4/+2
| | | | | | | | | | In the latest glib-headers libio.h has been deprecated This patch removes this warning: /usr/include/libio.h:21:2: warning: #warning "<libio.h> is deprecated; use <stdio.h> instead." [-Wcpp] #warning "<libio.h> is deprecated; use <stdio.h> instead." Signed-off-by: Steve Dickson <steved@redhat.com>
* svcgssd: Update svcgssd so that it buildsJustin Mitchell2018-01-081-1/+3
| | | | | | | | | Since a15bd948 the --enable-svcgss option no longer builds as svcgssd references functions which were changed at that time. Fix those, and other function changes since then. Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Release: 3.1.1nfs-utils-2-3-1Steve Dickson2017-12-201-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Tidy up libnfsidmap exported symbols list and APIJustin Mitchell2017-12-2012-87/+158
| | | | | | | | | | | | | | | Prior to its merger with nfs-utils the libnfsidmap library leaked a lot of internal functions and variables that were not defined in its API, some of which were used by its various plugins. This created an accidentally large ABI which restricts attempts to clean up the code base. These patches aim to trim the ABI down, whilst adding to the API only the minimal required to still support both bundled and 3rd party plugins. Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountstats: Use correct RDMA terminologyChuck Lever2017-12-201-6/+6
| | | | | | | | | | The kernel is counting RDMA segments, not chunks. Correct the units labels displayed by "mountstats -x", and fix up the internal names of the counters. Fixes: 6742ba53ae79 ("mountstats: Add option to pretty-print ...") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountstats: Add option to pretty-print xprt statisticsnfs-utils-2-2-2-rc2Chuck Lever2017-12-072-13/+117
| | | | | | | | | Add "-x" option to display the statistics reported on the "xprt:" line in mountstats. This is not terribly interesting for UDP and TCP, but it can be for RDMA transports. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: don't parse "device" name for -o remountNeilBrown2017-12-071-1/+3
| | | | | | | | | | | | | | | | When "-o remount" is used, the device/special name is ignored. So don't parse it and risk generating a useless error. This is particularly important when nfs-root is used as the "device name" is listed as "/dev/nfs". Because mount.nfs doesn't think that is valid, mount -o remount,rw / will fail. Link: https://github.com/systemd/systemd/issues/3590 Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Restore ABI compat with pre-merge libnfsidmapJustin Mitchell2017-11-0715-36/+55
| | | | | | | | | Prior to merge libnfsidmap leaked many private symbols that were not defined in its API, creating an accidental ABI. This patch renames and unhides symbols in order to match that ABI until a cleaned up API can be established and released. Signed-off-by: Steve Dickson <steved@redhat.com>
* gitignore: ignore files generated by libnfsidmap compilationnfs-utils-2-2-2-rc1Steve Dickson2017-11-022-11/+1
| | | | | | | libnfsidmap.pc is generated during the compiling of libnfsidmap which needed to be ignored. Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Remove dependency on libnfsidmap-devel packageJustin Mitchell2017-11-021-0/+2
| | | | | | | | | With commit a867b45 (Release: 2.2.1) the libnfsidmap-devel package is now build from with the nfs-utils source tree. So the programs dependent on libnfsidmap-devel need to look inward verses outward for the nfsidmap.h header file. Signed-off-by: Steve Dickson <steved@redhat.com>
* Release: 2.2.1nfs-utils-2-2-1Steve Dickson2017-10-301-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsiostat: display NFS RPC queue time for mountstats and nfs-iostatnfs-utils-2-1-2-rc7Ryan Doyle2017-10-303-5/+22
| | | | | | | | | Display the NFS queue statistics for mountstats and nfsiostat exported in /proc/self/mountstats. The RTT and total execution time is currently displayed but it's also useful displaying how long the task was queued for too Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: cleanup warnings from merged libnfsidmap codeJustin Mitchell2017-10-265-21/+33
| | | | | | | | | Clean up a bunch of warnings about unused parameters, signedness differences, etc that we inherited from the merged libnfsidmap code. Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: integrate libnfsidmap code with rest of nfs-utilsJustin Mitchell2017-10-2612-24/+80
| | | | | | | | | | Modify libnfsidmap to use the now shared conffile code, adjust the build structure to generate everything correctly, and modify the other utils to use the merged version of libnfsidmap instead of testing for an external dependancy. Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Import libnfsidmap codebaseJustin Mitchell2017-10-2616-0/+4827
| | | | | | | | | | Merge the libnfsidmap code tree into nfs-utils. These are the original unmodified files, cherry picked only the necessary files that dont duplicate code, so will not build correctly at this stage. Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: split conffile to a separate convenience libJustin Mitchell2017-10-2616-20/+29
| | | | | | | | | To allow better reuse of the code we split conffile and xlog into their own separate convenience library, then merge it back so as to not create extra dependancies for everything Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* conffile: Add get_str with default valueJustin Mitchell2017-10-262-0/+13
| | | | | | | | | The similar config code in libnfsidmap had one additional feature of a get_str function with a default value option, include an equivalent function here to maintain compatibility. Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* conffile: Merge conf_get_str and conf_get_sectionJustin Mitchell2017-10-261-22/+14
| | | | | | | | | | conf_get_section() started as conf_get_str() with one extra search parameter, subsequent patches have not maintained feature parity, combine the code to make a single more generic function and just call that differently where required. Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* conffile: const-ify the config handling functionsJustin Mitchell2017-10-262-30/+30
| | | | | | | | Tighten up the conffile interface by switching to const arguments where appropriate. Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* sm-notify needs to call res_init() before each tryOrion Poplawski2017-10-251-0/+4
| | | | | | Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=625531 Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsdcltrack: return an non-zero value for invalid optionsSteve Dickson2017-10-121-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* exports(5): minor exports man page typoJ. Bruce Fields2017-10-121-1/+1
| | | | | | From: "J. Bruce Fields" <bfields@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs(5): update some version informationJ. Bruce Fields2017-10-121-15/+20
| | | | | | | | | | | | | | | | | | | | From: "J. Bruce Fields" <bfields@redhat.com> We've seen some confusion from people not understanding why newer clients may not support NFSv2. It might help a little to note in the man page that version support depends on how the kernel was built. While we're there: - update some references to NFS protocol versions. - update 4.0 RFC, and add references to 4.1 and 4.2 RFCs. - rename "BUGS" to "NOTES"; the section mostly isn't about bugs. (Might be time to remove some of the linux-2.4 notes too.) - remove some outdated references to optional NFSv4+ features. (Or should we try to keep this information up to date?) Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* systemd: Add RemainAfterExit to two servicesNeilBrown2017-10-122-0/+2
| | | | | | | | | | | | | | | | Both auth-rpcgss-module and rpc-statd-notify only ever need to be run once - the effect they have is permanent. We can give this information to systemd by setting RemainAfterExit=yes This avoids the minor cost of running them a second time if something "Wants" either service after it was first run, (e.g. both client and server startup can Want these), and avoids systemd complaining that it restarts to fast if multiple Wants happen at nearly the same time. Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: merge in vers= and nfsvers= optionsnfs-utils-2-1-2-rc6Justin Mitchell2017-10-051-3/+5
| | | | | | | | | | When using mount.nfs if an nfsvers= option is set in a config file, and a vers= option is given on the commandline, then they are not always correctly combined and this can result in both being present in the resulting mount call. Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.nfsd: Do not fail when all address families are not support.Steve Dickson2017-10-051-2/+4
| | | | | | | | Commit 2f8a6020 introduce a regression causing rpc.nfsd to fail when IPv6 is not supported. rpc.nfsd should not fail when there is at least one bounded socket. Signed-off-by: Steve Dickson <steved@redhat.com>