summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 1.3.2Steve Dickson2015-01-301-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* configure.ac: rpc.gssd now need libeventSteve Dickson2015-01-301-0/+3
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* configure.ac: More clean upSteve Dickson2015-01-301-2/+3
| | | | | | Added a couple default values to the flag descriptions Signed-off-by: Steve Dickson <steved@redhat.com>
* configure.ac: clean upSteve Dickson2015-01-301-13/+13
| | | | | | | | Reworked the configuration flags. If the default is on the used --disable to turn off. If the default is off use --enable to turn on. Signed-off-by: Steve Dickson <steved@redhat.com>
* svcgssd: Disable support for the rpcsec_gss server by defaultSteve Dickson2015-01-301-2/+2
| | | | | | | | | At this point the gssproxy is better option than the svcgssd so the support is off by default. Use --enable-svcgss to re-enable the support Signed-off-by: Steve Dickson <steved@redhat.com>
* ipv6: Enable IPv6 support by default.Steve Dickson2015-01-301-3/+3
| | | | | | | Enable IPv6 support to be on by default. Use the --disable-ipv6 flag to disable the support Signed-off-by: Steve Dickson <steved@redhat.com>
* tests: fix typo and let make check work againEryu Guan2015-01-282-2/+2
| | | | | | | Comments in bash starts with '#' not '*' Signed-off-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Set enable_mountconfig during configuration.Steve Dickson2015-01-271-4/+4
| | | | | | | Commit ee80d0aa enabled the mount config file but did not set the enable_mountconfig variable. Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - simplify handle_gssd_upcallDavid Hardeman2015-01-231-68/+38
| | | | | | | | Stumbled across this function, just had to simplify it. No mallocs necessary, one quick loop to find the parameters. Much simpler. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - improve inotifyDavid Hardeman2015-01-232-52/+116
| | | | | | | | | | Make full use of inotify by not rescanning the whole tree on each change, instead keep track of the inotify events and make sure that the minimum work (scan/create/delete) clients is done in most cases. Still detect anomalies and perform a full rescan in those cases. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - further shorten some pathnamesDavid Hardeman2015-01-231-9/+7
| | | | | | | Save some more memory by using relative pathnames. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - change dnotify to inotifyDavid Hardeman2015-01-232-30/+73
| | | | | | | | | This is just the first step, replacing dnotify with an inotify implementation that is not much better (still does a complete rescan of the whole rpc_pipefs tree on each change). Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - cleanup read_service_infoDavid Hardeman2015-01-231-98/+110
| | | | | | | | | There's a lot of fixed buffers in use here. Clean up the code and add more documentation on the different formats that have been used by the kernel. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - simplify client scanningDavid Hardeman2015-01-231-91/+80
| | | | | | | | Simplify the code responsible for the client dir scanning. This is also in preparation for the inotify patches. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - simplify topdir scanningDavid Hardeman2015-01-232-92/+81
| | | | | | | | Simplify and refactor the code that does the topdir scanning, this is in preparation for the inotify patches. Signed-off-by: David H?rdeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - use more relative pathsDavid Hardeman2015-01-233-41/+40
| | | | | | | | Using more relative paths saves memory and lets us get rid of more PATH_MAX fixed arrays. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - keep the rpc_pipefs dir openDavid Hardeman2015-01-231-49/+37
| | | | | | | | Keep the rpc_pipefs dir open and just do a rewind/rescan when necessary. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - make the client lists per-topdirDavid Hardeman2015-01-232-73/+66
| | | | | | | | This makes it easier to keep track of which client belongs to which topdir. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - remove "close me" codeDavid Hardeman2015-01-232-20/+8
| | | | | | | | This code is mostly just confusing. Close the fds immediately instead of doing so later. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - use libeventDavid Hardeman2015-01-233-266/+138
| | | | | | | | Using libevent (which is already in use in idmap) saves about a hundred lines of hand-rolled event loop code. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - move over pipfs scanning codeDavid Hardeman2015-01-234-563/+566
| | | | | | | | Move all rpc_pipefs scanning code from gssd_proc.c to gssd.c in preparation for later patches. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - simplify topdirs pathDavid Hardeman2015-01-232-59/+40
| | | | | | | | | | By chdir():ing to the root of the rpc_pipefs dir and making paths relative from there (gssd already keeps a number of files open in rpc_pipefs so chdir doesn't suddenly make it impossible to umount rpc_pipefs because of this patch). Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - remove arbitrary GSSD_MAX_CCACHE_SEARCH limitationDavid Hardeman2015-01-232-13/+35
| | | | | | | Get rid of another arbitrary limitation and PATH_MAX array. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - simplify some option handlingDavid Hardeman2015-01-232-10/+6
| | | | | | | | Using PATH_MAX in modern code is almost always a bad idea. Simplify the code and remove that arbitrary limitation at the same time. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd - merge gssd_main_loop.c and gssd.cDavid Hardeman2015-01-234-271/+220
| | | | | | | | Having all the main loop code in one file is important in preparation for later patches which add inotify and libevent. Signed-off-by: David Hardeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* cleanup daemonization codeDavid Hardeman2015-01-238-118/+67
| | | | | | | | | | | | | | | The daemonization init/ready functions have parameters that are never used, require the caller to keep track of some pipefds that it has no interest in and which might not be used in some scenarios. Cleanup both functions a bit. The idea here is also that these two functions might be good points to insert more systemd init code later (sd_notify()). Also, statd had a private copy of the daemonization code for unknown reasons...so make it use the generic version instead. Signed-off-by: David H?rdeman <david@hardeman.nu> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: configurable minor version defaultsBenjamin Coddington2015-01-231-43/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update nfsmount.conf to allow minor version specification, and rearrange the autonegotiation logic to agreed upon best behavior. Depending upon the combination of values specified within nfsmount.conf and given to mount.nfs, the retry behavior of mount.nfs varies according to the general rule of defaulting to the most specific setting, with some exceptions. A general guide to the expected behavior follows: ------------------ | nfsmount.conf |----------------------------------- | Defaultvers= | arg option | attempts: | |---------------------------------------------------| | 4.2 | not set | v4.2 v4.1 v4.0 v3 | | 4.2 | v4 | v4.2 v4.1 v4.0 | | 4.1 | not set | v4.1 v4.0 v3 | | 4.1 | v4 | v4.1 v4.0 | | 4 | not set | v4.0 v3 | | 4 | v4 | v4.0 | | 3 | not set | v3 | | any set | v4.2 | v4.2 | | any set | v4.1 | v4.1 | | any set | v4 | v4.0 | | any set | v3 | v3 | | not set | not set | v4.2 v4.1 v4.0 v3 | ----------------------------------------------------- If built with --enable-mountconfig=no, then the behavior is the same as if nfsmount.conf did not set Defaultvers. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsmount.conf: Always parse versionsBenjamin Coddington2015-01-231-34/+0
| | | | | | | | | | | In order to make decisions about which default version to use when only the major version is specified, the nfsmount.conf Defaultvers options should always be parsed, even when a version has already been specified. Remove the check and bypass for parsing the Defaultvers options from nfsmount.conf. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Add struct nfs_version and generalize version parsingBenjamin Coddington2015-01-235-77/+88
| | | | | | | | | | | | | | | | | | The nfs_version needs to carry major, minor, and basic mode information to allow decisions to be made to override, discard, or negotiate various versions. Update nfs_nfs_version() to work against this struct and set the various modes. This change also makes nfs_nfs_version() parse properly for future version number additions. The general rules for version.v_mode are - not set V_DEFAULT - single digit => 4 V_GENERAL - single digit < 4 V_SPECIFIC - decimal included V_SPECIFIC - miss all others V_PARSE_ERR Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: parse options - add helper po_contains_prefixBenjamin Coddington2015-01-232-0/+26
| | | | | | | | | | The version options (v3,v4,v4.2) may increase in the future, but they have a predictable prefix. Add a parse option helper to locate and return these options by prefix so that a future increment of version does not require the addition of strings to a search table. Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: fix a comment typo in parse optionsBenjamin Coddington2015-01-231-1/+1
| | | | | Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: default enable mount config file (nfsmount.conf)Benjamin Coddington2015-01-231-5/+5
| | | | | Signed-off-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* systemd: Ensure RPC pipefs is mounted before rpc.idmapd startsChris Mayo2015-01-231-0/+2
| | | | | | | | | rpc.idmapd aborts on start-up if RPC pipefs is not present. Needed if GSS services are not used. Signed-off-by: Chris Mayo <aklhfex@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.idmapd: Add a reference to nfsidmap(8) on the man pageScott Mayhew2015-01-231-1/+12
| | | | | | | | Even though the 'new' idmapper used by the client has been around for several years, a lot of users seem to be unaware of its existence. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* configure: restore checking for authgss_free_private_data in libtirpcYann E. MORIN2015-01-231-0/+6
| | | | | | | | | | | | | Since commit 8534063 (configure: use pkg-config to find libtirpc), we are missing the check for authgss_free_private_data in libtirpc. Restore this check, and adapt so that it works in both the pkg-config case and in the "old code" case. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Chuck Lever <check.lever@oracle.com> Cc: Steve Dickson <SteveD@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* configure:restore the old way of checking for libtirpcYann E. MORIN2015-01-231-2/+34
| | | | | | | | | | | | | | | | | | | | | | Since 8534063 (configure: use pkg-config to find libtirpc), we use pkg-config to check for libtirpc (he!). As reported on the list, some user do not have the libtirpc registered with pkg-config (even though it has been since at least 0.1.8). So, partially restore the old checking code, as it was before 8534063, but adapted to work with the pkg-config check, and also adapted to only use proper macros (AS_IF) instead of shell constructs. Re-introduce that old code in a separate function, so it is easy to get rid of when we only want to support pkg-config in the future (i.e. when virtually all libtirpc versions in the wild have been properly installed). Reported-by: Chuck Lever <check.lever@oracle.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Steve Dickson <SteveD@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* configure: be more laxist on the required libtirpc versionYann E. MORIN2015-01-231-1/+1
| | | | | | | | | | | | | | | Currently, we check for libtirpc >= 0.2.4 with pkg-config, because that is the one version I had to test against. As reported on the list, however, older versions are also supported. Relax the check to not require a version at all, and accept any version of libtirpc. Reported-by: Chuck Lever <check.lever@oracle.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Steve Dickson <SteveD@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.idmap: Use event_initialized() to check if event is initializedSteve Dickson2015-01-231-1/+1
| | | | | | | | Using EVLIST_INIT directly is bound to break. This seems to be a leftover from legacy code. Reported-by: Holger Hoffstatte <holger.hoffstaette@googlemail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* sm-notify: Notify hosts in backgroundSteve Dickson2015-01-151-3/+2
| | | | | | | sm-notify needs to notify hosts in background so the boot will not hang when the notified hosts do not answer. Signed-off-by: Steve Dickson <steved@redhat.com>
* start-statd: Use the canonical to check if systemd is running.Steve Dickson2015-01-151-1/+1
| | | | | | | | | Use the approved way, define in http://www.freedesktop.org/software/systemd/man/sd_booted.html to check if systemd is installed and running Signed-off-by: Steve Dickson <steved@redhat.com>
* systemd: Bind the nfs-mountd service to the nfs-server serviceSteve Dickson2015-01-151-2/+1
| | | | | | | | | | | | | | | Use BindsTo, instead of PartOf, to bind the rpc-mountd service to the nfs-server service. Its a much tighter bind than PartOf. The Partof=nfs-utils.service was not needed. One side effect of this tighter bond is when rpc.mountd is stop, that will also bring the nfs server down as well, due to the Requires=nfs-mountd.service in the nfs-server service Signed-off-by: Steve Dickson <steved@redhat.com>
* systemd: Bind rpc.idmapd to the nfs-server serviceSteve Dickson2015-01-151-1/+1
| | | | | | | | | Since rpc.idmapd is only used by the nfs server, to do its id mapping, bind the rpc-idmapd service to the nfs-server service so rpc.idmapd will started and stopped with the server. Signed-off-by: Steve Dickson <steved@redhat.com>
* mountstats: Updated the mountstats(8) man page.Scott Mayhew2014-12-131-14/+128
| | | | | | | | Added documentation for the iostat and nfsstat sub-commands. Added documentation for all of the options that have recently been added. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountstats: Implement the nfsstat sub-commandScott Mayhew2014-12-131-3/+153
| | | | | | | Displays nfssstat-like statistics (client statistics only). Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountstats: Add support for -R/--raw to mountstats_commandScott Mayhew2014-12-131-4/+43
| | | | | | | | | This option displays the mountstats in raw format (i.e. in the same format as /proc/self/mountstats). It's intended to be used mainly with the -S/--since option. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountstats: Allow mountstats_command to take a variable number of mountpointsScott Mayhew2014-12-131-14/+34
| | | | | | | | | Allow the mountstats command to take a variable number of mountpoints (including none, in which case it will print stats for all NFS mountpoints it finds). Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountstats: Fix IndexError in __parse_nfs_lineScott Mayhew2014-12-131-2/+2
| | | | | | | | If __parse_nfs_line is is called on a line that has 'fstype nfsd', it'll raise an IndexError trying to parse a nonexistent statvers entry. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountstats: Add support for -S/--sinceScott Mayhew2014-12-131-13/+38
| | | | | | | | | | Add support for -S/--since to display the delta between a previous copy of /proc/self/mountstats and the current /proc/self/mountstats file. Can be combined with the -f option to show the statistics between two different points in time. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountstats: Add support for -f/--fileScott Mayhew2014-12-131-10/+21
| | | | | | | | Add support for the -f/--file option to allow parsing of data from an arbitrary file instead of /proc/self/mountstats. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountstats: Make print_iostat_summary handle newly appearing mountsScott Mayhew2014-12-131-1/+1
| | | | | Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>