commit 05333a19f1ba7512f0eadbd67b1a59d24c20802e Author: Steve Dickson Date: Fri May 10 15:08:25 2019 -0400 make_timestamp: removed a -Werror=unused-result error conffile.c:1440:3: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Werror=unused-result] asprintf(&tmpstr, "%s on %s", modified_by, datestr); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Steve Dickson commit c941a7c08407fb2b74682945f5fbbd94cb140905 Author: Steve Dickson Date: Fri May 10 14:45:57 2019 -0400 nfs-utils: nfsidmap fail to build if no --with-pluginpath specified The var "pkgplugindir" will be empty if no pluginpath provided. Makefile "-rpath $(pkgplugindir)" will then get failed. Signed-off-by: Yongcheng Yang Signed-off-by: Steve Dickson commit 66a2a3fac6d3d4123328a93e3227f191335371e5 Author: Orion Poplawski Date: Fri May 10 11:02:10 2019 -0400 systemd: Change /var/run -> /run in systemd service files This fixes: /usr/lib/systemd/system/nfs-blkmap.service:10: PIDFile= references path below legacy directory /var/run/, updating /var/run/blkmapd.pid -> /run/blkmapd.pid; please update the unit file accordingly. Signed-off-by: Orion Poplawski Signed-off-by: Steve Dickson commit 72d0048e6f08d9090a5af5f54113e69624bd2e4f Author: Steve Dickson Date: Tue Apr 30 09:25:49 2019 -0400 configure.ac: Turn off cast-function warnings The rpcgen generated code from .x files creates a cast-function-type warning. Due to the age and stability of the code turning off the warning makes more sense than re-writing the .x files. Signed-off-by: Steve Dickson commit 4f4352b290503fe0ae947b4363c5368b9f0ae9b8 Author: Steve Dickson Date: Fri Apr 26 13:48:11 2019 -0400 Removed a resource leak from nfsdcltrack/sqlite.c nfsdcltrack/sqlite.c:218: leaked_storage: Variable "err" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson commit 26b84f73adc2ff9011bea307c47a4c0cdf4a3031 Author: Steve Dickson Date: Fri Apr 26 13:40:54 2019 -0400 Removed a resource leak from mountd/fsloc.c mountd/fsloc.c:97: overwrite_var: Overwriting "mp" in "mp = calloc(1UL, 16UL)" leaks the storage that "mp" points to. Signed-off-by: Steve Dickson commit 39a1379520aa55589a09d27b0746d8b1354f6945 Author: Steve Dickson Date: Fri Apr 26 11:05:30 2019 -0400 Removed resource leaks from mountd/cache.c mountd/cache.c:1244:3: warning: statement will never be executed [-Wswitch-unreachable] mountd/cache.c:1260: leaked_storage: Variable "locations" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson commit 6c1bc0079c2a71481312130be0f258d6c39193f5 Author: Steve Dickson Date: Fri Apr 26 10:56:39 2019 -0400 Removed a resource leak from mount/stropts.c mount/stropts.c:986: leaked_storage: Variable "address" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson commit 7060b3fb5f2d935d372536d30c14454b10d4d10f Author: Steve Dickson Date: Fri Apr 26 10:47:17 2019 -0400 Removed a resource leak from mount/nfsmount.c mount/nfsmount.c:455: leaked_storage: Variable "mounthost" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson commit f5d903f907a4d250387a366bab029c79425c0113 Author: Steve Dickson Date: Fri Apr 26 10:43:19 2019 -0400 Removed a resource leak from mount/configfile.c mount/configfile.c:410: leaked_storage: Variable "config_opts" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson commit ae9e9760cb971e6470834e26afed9919d28175ea Author: Steve Dickson Date: Sun Apr 28 14:28:15 2019 -0400 Removed resource leaks from gssd/krb5_util.c gssd/krb5_util.c:696: overwrite_var: Overwriting "k5err" in "k5err = gssd_k5_err_msg(context, code)" leaks the storage that "k5err" points to. gssd/krb5_util.c:737: overwrite_var: Overwriting "k5err" in "k5err = gssd_k5_err_msg(context, code)" leaks the storage that "k5err" points to. gssd/krb5_util.c:899: overwrite_var: Overwriting "k5err" in "k5err = gssd_k5_err_msg(context, code)" leaks the storage that "k5err" points to. krb5_util.c:1173: leaked_storage: Variable "l" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson commit c4a1c3600f2a1240890517626731aaf6ef39fab6 Author: Steve Dickson Date: Sun Apr 28 14:12:22 2019 -0400 Removed resource leaks from blkmapd/device-discovery.c blkmapd/device-discovery.c:190: leaked_storage: Variable "serial" going out of scope leaks the storage it points to. blkmapd/device-discovery.c:378: overwrite_var: Overwriting handle "bl_pipe_fd" in "bl_pipe_fd = open(bl_pipe_file, 2)" leaks the handle. Signed-off-by: Steve Dickson commit adf749f1fc0a8ad9450459b391a615bf776e0ada Author: Steve Dickson Date: Thu Apr 25 15:58:39 2019 -0400 Removed resource leaks from systemd/rpc-pipefs-generator.c systemd/rpc-pipefs-generator.c:73: leaked_storage: Variable "pipefs_unit" going out of scope leaks the storage it points to systemd/rpc-pipefs-generator.c:77: leaked_storage: Variable "pipefs_unit" going out of scope leaks the storage it points to. systemd/rpc-pipefs-generator.c:85: leaked_storage: Variable "pipefs_unit" going out of scope leaks the storage it points to. systemd/rpc-pipefs-generator.c:94: leaked_storage: Variable "pipefs_unit" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson commit 606f49439c47923e9ae8a4a923b57f9b7d4a98d4 Author: Steve Dickson Date: Thu Apr 25 15:21:15 2019 -0400 Removed a resource leak from nsm/file.c nsm/file.c:536: leaked_handle: Handle variable "fd" going out of scope leaks the handle Signed-off-by: Steve Dickson commit 151352bd59365c4d07b9bc7413a0bfd2a3bdfb91 Author: Steve Dickson Date: Sun Apr 28 14:01:38 2019 -0400 Removed resource leaks from nfsidmap/static.c nfsidmap/static.c:350: leaked_storage: Variable "princ_list" going out of scope leaks the storage it points to. nfsidmap/static.c:358: leaked_storage: Variable "princ_list" going out of scope leaks the storage it points to. nfsidmap/static.c:360: leaked_storage: Variable "unode" going out of scope leaks the storage it points to. nfsidmap/static.c:382: leaked_storage: Variable "princ_list" going out of scope leaks the storage it points to. nfsidmap/static.c:390: leaked_storage: Variable "gnode" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson commit 53f6d22014c0928bf3fcfba4ae5078ca9188f116 Author: Steve Dickson Date: Sun Apr 28 13:56:52 2019 -0400 Removed resource leaks from nfsidmap/libnfsidmap.c nfsidmap/libnfsidmap.c:410: leaked_storage: Variable "nfs4_methods" going out of scope leaks the storage it points to. ibnfsidmap.c:483: leaked_storage: Variable "gss_methods" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson commit 624c112123baceff10c6bed368055c4a261b814d Author: Steve Dickson Date: Thu Apr 25 13:19:25 2019 -0400 Removed resource leaks from nfs/xlog.c nfs/xlog.c:139: leaked_storage: Variable "kinds" going out of scope leaks the storage it points to. nfs/xlog.c:142: leaked_storage: Variable "kinds" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson commit 9ce597048cab13eac5e8525e9e6728a3a099db12 Author: Steve Dickson Date: Sun Apr 28 13:39:26 2019 -0400 Removed bad frees from nfs/xcommon.c nfs/xcommon.c:63: incorrect_free: "free" frees incorrect pointer "(void *)s". nfs/xcommon.c:81: incorrect_free: "free" frees incorrect pointer "(void *)s". Signed-off-by: Steve Dickson commit 8c30ca6aba24a8d177e6a4696c3368bccfa7ca5b Author: Steve Dickson Date: Thu Apr 25 12:43:22 2019 -0400 Removed a resource leak from nfs/svc_socket.c nfs/svc_socket.c:137: leaked_handle: Handle variable "sock" going out of scope leaks the handle. Signed-off-by: Steve Dickson commit c1af7c6087001dd9a5367a29e9c27b1f95b21ed9 Author: Steve Dickson Date: Thu Apr 25 12:37:51 2019 -0400 Removed a resource leak from nfs/rpcmisc.c nfs/rpcmisc.c:105: leaked_handle: Handle variable "sock" going out of scope leaks the handle. Signed-off-by: Steve Dickson commit 2c7901c06d7aca2151deb7bb88cfa7065a10769e Author: Steve Dickson Date: Thu Apr 25 12:27:32 2019 -0400 Removed a resource leak from nfs/mydaemon.c nfs/mydaemon.c:130: leaked_handle: Handle variable "tempfd" going out of scope leaks the handle. Signed-off-by: Steve Dickson commit d906d5f325b02e99ee88076b50775f1cb94e48f6 Author: Steve Dickson Date: Thu Apr 25 10:53:39 2019 -0400 Removed resource leaks from nfs/exports.c nfs/exports.c:717: leaked_storage: Variable "id" going out of scope leaks the storage it points to. nfs/exports.c:727: leaked_storage: Variable "id" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson commit 2f98b4cf110933082be5795cd796d644df6803dc Author: Steve Dickson Date: Sun Apr 28 13:24:24 2019 -0400 Removed resource leaks from junction/path.c junction/path.c:167: leaked_storage: Variable "start" going out of scope leaks the storage it points to. junction/path.c:331: leaked_storage: Variable "normalized" going out of scope leaks the storage it points to. junction/path.c:340: leaked_storage: Variable "normalized" going out of scope leaks the storage it points to. Signed-off-by: Steve Dickson commit 823514d1d717a8988448cd6c60d7494f7cc1bc23 Author: Steve Dickson Date: Wed May 8 08:33:22 2019 -0400 nfs-utils: Enable adding of comments and date modified to nfs.conf files Extend the nfs.conf editing code to support the inserting of comment lines, as well as file modified information so that automated setting adjustments and imports can be appropriately flagged. Signed-off-by: Alice J Mitchell Signed-off-by: Steve Dickson commit 353eff80e8f9321a18131db0b703abe6fff41387 Author: Rosen Penev Date: Tue Apr 16 14:26:53 2019 -0400 idmapd: Add missing libgen header Otherwise compilation can fail with an implicit declaration of basename. Signed-off-by: Rosen Penev Signed-off-by: Steve Dickson commit a8b990304fd9b74eece0fca881273cbbaa6f849a Author: Rosen Penev Date: Tue Apr 16 14:25:29 2019 -0400 mount: Add missing cast to getsockname Otherwise compilation can fail with incompatible pointer type. Signed-off-by: Rosen Penev Signed-off-by: Steve Dickson commit c0cdf776491204fecd31a6fff72203dc70b918a2 Author: Scott Mayhew Date: Tue Apr 16 12:18:50 2019 -0400 nfsdcld: add a facility for migrating from older client tracking methods This patch adds a one-time "upgrade" when using nfsdcld for the first time. During initialization of the database, we try to copy records from the old nfdscltrack database and from the legacy v4recovery directory (although we don't expect to find records in both places). nfsdcltrack stores the client name string so the handling of those records is straightforward. Legacy records are md5 hashes of the client name string, so we prefix them with "hash:" as way to let knfsd know that this is a legacy record. knfsd will need a fallback check in the event that it cannot find a reclaim record using the client name string. Upon receipt of the first "GraceDone" upcall we clean out any records from the old nfsdcltrack database and delete any subdirectories under the v4recovery directory. Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 9e4bfb65ce2e3a8261d695328a7371f6563306c8 Author: Scott Mayhew Date: Tue Apr 16 11:54:27 2019 -0400 systemd: add a unit file for nfsdcld Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 86df1f069fd35a86730eb65f1cda0d854ac9981b Author: Scott Mayhew Date: Tue Apr 16 11:49:59 2019 -0400 nfsdcld: add /etc/nfs.conf support Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit a8ce6c346193f2c89012da7bea34d7b59b38c035 Author: Scott Mayhew Date: Tue Apr 16 11:48:01 2019 -0400 nfsdcld: the -p option should specify the rpc_pipefs mountpoint Change the -p option to specify the rpc_pipefs mountpoint rather than the full path to the cld pipe file. This is consistent with other daemons that use the rpc_pipefs filesystem. Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit c2b303c57350ac8d511ccc9d98ae484ac7d49af6 Author: Scott Mayhew Date: Tue Apr 16 11:32:14 2019 -0400 nfsdcld: remove some unused functions Get rid of sqlite_query_reclaiming() and sqlite_remove_unreclaimed(), which are not used. Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 4ccde2a29ec512b8ddcc98f7a03eb530a3679e26 Author: Scott Mayhew Date: Tue Apr 16 11:28:35 2019 -0400 nfsdcld: a few enhancements 1) Adopt the concept of "reboot epochs" (but not coordinated grace periods via the "need" and "enforcing" flags) from Jeff Layton's "Active/Active NFS Server Recovery" presentation from the Fall 2018 NFS Bakeathon. See http://nfsv4bat.org/Documents/BakeAThon/2018/Active_Active%20NFS%20Server%20Recovery.pdf - add a new table "grace" which contains two integer columns representing the "current" epoch (where new client records are stored) and the "recovery" epoch (which has the records for clients that are allowed to recover) - replace the "clients" table with table(s) named "rec-CCCCCCCCCCCCCCCC" (where C is the hex value of the epoch), containing a single column "id" which stores the client id string - when going from normal operation into grace, the current epoch becomes the recovery epoch, the current epoch is incremented, and a new table is created for the current epoch. Clients are allowed to reclaim if they have a record in the table corresponding to the recovery epoch and new records are added to the table corresponding to the current epoch. - when moving from grace back to normal operation, the table associated with the recovery epoch is deleted and the recovery epoch becomes zero. - if the server restarts before exiting the previous grace period, then the epochs are not changed, and all records in the table associated with the "current" epoch are cleared out. 2) Allow knfsd to "slurp" the client records during startup. During client tracking initialization, knfsd will do an upcall to get a list of clients from the database. nfsdcld will do one downcall with a status of -EINPROGRESS for each client record in the database, followed by a final downcall with a status of 0. This will allow 2 things - knfsd can check whether a client is allowed to reclaim without performing an upcall to nfsdcld - knfsd can decide to end the grace period early by tracking the number of RECLAIM_COMPLETE operations it receives from "known" clients, or it can skip the grace period altogether if no clients are allowed to reclaim. Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 3a61dd2ee0213741597f96500db146b9b987fc95 Author: Scott Mayhew Date: Tue Apr 16 11:25:10 2019 -0400 nfsdcld: move nfsdcld to its own directory The schema for the db used by nfsdcld is going to diverge quite a bit from that used by nfsdcltrack. It will be easier if the programs are kept in separate directories. Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 15301b34ab91b97b13a76a2fed0056d981a28a4d Author: Scott Mayhew Date: Tue Apr 16 11:19:02 2019 -0400 Revert "nfsdcltrack: remove the nfsdcld daemon" This reverts commit 2cf11ec6ed261ef56bbd0d73ff404fe69f1fefb0. nfsdcld was originally deprecated in favor of a usermodehelper, so as to not require another running daemon. But that turned out to make namespaced nfsd's too difficult, so this commit brings back nfsdcld. A few things have been changed since nfsdcld was removed in 2012: - libnfs.a is now libnfs.la - sqlite_insert_client and sqlite_check_client both take a bool has_session which is being hard-coded to false for now. - sqlite_insert_client also takes a bool zerotime which is being hard-coded to false. - an xlog() call whose arguments did not match the format string (and could crash nfsdcld) has been fixed - cld_pipe_open() now calls event_initialized() rather than checking for EVLIST_INIT directly (which does not compile with newer versions of libevent). Signed-off-by: Scott Mayhew Signed-off-by: Steve Dickson commit 4ef8cebb4959b3d03a01c32953d8f1eeb3127cf5 Author: Justin Mitchell Date: Tue Apr 16 10:23:06 2019 -0400 nfs-utils: Modify nfs.conf in-place instead of replacing the file When changes are written to nfs.conf the old method of building a new file and then switching them leaves less opportunities for race conditions against 3rd party tools but loses any existing permissions, ownerships, attributes, etc. This patch instead uses an advisory flock to guard the contents whilst it reads, modifies, and then rewrites the existing file. Signed-off-by: Justin Mitchell Signed-off-by: Steve Dickson commit c4c14011b70375050d7bba7c57e2eaf4c715dc7c Author: Matthew Ruffell Date: Thu Mar 28 15:43:21 2019 -0400 nfsiostat: replace 'list' reserved word list is a reserved word in python and should not be used as a variable name. Changing list to devicelist for list_nfs_mounts() Fixes: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1821261 Signed-off-by: Matthew Ruffell Signed-off-by: Steve Dickson commit 3dea72bed72bb6ac35f11de13c9154c2ecca8223 Author: Richard Sharpe Date: Thu Mar 21 11:57:42 2019 -0400 configure.ac: Check that an RPC compiler has been installed If we don't find rpcgen let the user know about it rather than getting an error later during make. Signed-off-by: Steve Dickson commit 64d83364b08ab32c6b8fee903529314349175772 Author: Pierguido Lambri Date: Mon Mar 11 13:50:57 2019 -0400 gssd: add verbosity options to the rpc.gssd man page It also adds the commented out entries in the nfs.conf default file. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1668026 Signed-off-by: Pierguido Lambri Signed-off-by: Steve Dickson commit e5c1eafe8ff74d389b54bbb0b034798f809f69af Author: Richard Sharpe Date: Mon Mar 11 13:58:17 2019 -0400 nfsindmap: Provide the offending UID/GID/name for which mapping fails This helps debug what is going on. Signed-off-by: Steve Dickson commit 5394f939b591e65fec37a6bee826c13620d3f39b Author: Justin Mitchell Date: Mon Mar 4 11:53:09 2019 -0500 Add nfs.conf equivalent for the statd --no-notify cmdline option Also cleaned up how nfs.conf is read. Signed-off-by: Justin Mitchell Signed-off-by: Steve Dickson commit 3762a464a8cd7afa42e616194cc7fcd1d200c1ad Author: Steve Dickson Date: Fri Mar 1 15:23:47 2019 -0500 sm-notify: Added -f flag to nfs.conf parsing Cleaned up the nfs.conf parsing and added the setting of the force to the nfs.conf parsing Signed-off-by: Steve Dickson commit edaadbe66456378547e2e95bd0e8bce4d2984ee0 Author: Patrick Steinhardt Date: Wed Feb 27 12:02:18 2019 -0500 svc_socket: fix use of undefined macro HAVE_GETRPCBYNUMBER_R The macro HAVE_GETRPCBYNUMBER_R is set based on whether the `getrpcbynumber_r` function was found by autoconf or not. While another location correctly checks whether it is set by using `#ifdef`, `getservport()` instead wrongly uses `#if HAVE_GETRPCBYNUMBER_R`. This may cause a compilation error with gcc with "-Werror=undef" if the macro has not been defined. Fix the error by using `#ifdef` instead. Signed-off-by: Patrick Steinhardt Signed-off-by: Steve Dickson commit dce8f980e25cf625d1bce2ef6f499b3a2664f2ce Author: Patrick Steinhardt Date: Wed Feb 27 12:00:16 2019 -0500 file: fix missing include for PATH_MAX constant While making use of the PATH_MAX constant, "file.c" does not include the "limits.h" header. While it is being transitively included via other headers on most platforms, it is not on e.g. musl-based systems. Add the include to fix compilation. Signed-off-by: Patrick Steinhardt Signed-off-by: Steve Dickson commit 4f91877bb313a35ade44d9dde1fd219035ba1fd9 Author: Patrick Steinhardt Date: Wed Feb 27 11:58:47 2019 -0500 configure.ac: more carefully detect availability of res_querydomain(3) Since glibc 2.2, the function res_querydomain(3) is implemented as a define to `__res_querydomain`. Due to this implementation detail, using `AC_CHECK_LIB` with a symbol name of "res_querydomain" will cause a linking failure and thus fail to detect its availability. This is why right now, we try to detect availability of `__res_querydomain` instead. Unfortunately, this may break on other platforms where there is no `__res_querydomain` but only the function without leading underscores. To fix this, we can perform another `AC_CHECK_LIB([resolv], [res_querydomain], ...)` call in case where the other one was not found and only raise an error if both symbols weren't found. Signed-off-by: Patrick Steinhardt Signed-off-by: Steve Dickson commit ed06fade6dc46df0a38caab2e465dfaabfc76f46 Author: Peter Wagner Date: Wed Feb 20 10:59:50 2019 -0500 nfs-utils: fix addrinfo usage with musl-1.1.21 Afer the update to musl 1.1.21 freeaddrinfo is broken in some places in the nfs-utils code because glibc seems to ignore when freeaddrinfo is called with a NULL pointer which seems to be not defined in the spec. See: https://www.openwall.com/lists/musl/2019/02/03/4 The free in support/export/hostname.c is removed too See: https://www.openwall.com/lists/musl/2019/02/17/2 Define and use wrapper function nfs_freeaddrinfo to handle freeaddrinfo versions that don't tolerate NULL pointers Reviewed-by: Chuck Lever Signed-off-by: Peter Wagner Signed-off-by: Steve Dickson commit 8f459a072f93458fc2198ce1962b279164aa9059 Author: Chuck Lever Date: Wed Feb 20 10:27:46 2019 -0500 Remove abuse of ai_canonname Peter Wagner reports a portability issue with freeing ai_canonname (and subsequently replacing that pointer via strdup(3)). The relevant standards text is: > If nodename is not null, and if requested by the AI_CANONNAME > flag, the ai_canonname field of the first returned addrinfo > structure shall point to a null-terminated string containing the > canonical name corresponding to the input nodename; if the > canonical name is not available, then ai_canonname shall refer to > the nodename argument or a string with the same contents. There is no indication that this string may be freed using free(3). Eg, the library could have allocated it as part of the addrinfo struct itself, or it could point to static memory. The Linux man page is equally silent on this issue. There is only one caller to host_reliable_addrinfo() that actually uses the string in ai->ai_canonname, and then only for debugging messages. Change those to display the IP address instead. Signed-off-by: Peter Wagner Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson commit 268e3c0cff6d6aee3b8f5458545f8dab76d7d444 Author: Steve Dickson Date: Mon Feb 4 15:17:42 2019 -0500 nfs.conf: Fixed manage-gids option typo Reported-by: Adam DiFrischia BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=333 Signed-off-by: Steve Dickson commit 94de9a2112cddfdacdb7d63b5c24be99e3db4124 Author: Steve Dickson Date: Tue Jan 29 15:31:06 2019 -0500 nfs-utils: Removed new error=format-overflow=2 errors With the latest C99-compliant gcc printf, sprintf, etc now only support up to 4k in buffer sizes. There were only a couple places that had to change to not violated this new restriction Signed-off-by: Steve Dickson commit a084d2fda8ead7fe756f726860c6665011768f5e Author: Mingli Yu Date: Tue Jan 29 15:40:15 2019 -0500 Makefile.am: update the path of libnfs.a The libnfs.a is under ../support/nfs/.libs/ now, update the reference path accordingly to fix below build error when run "make -C tests statdb_dump": | make: *** No rule to make target '../support/nfs/libnfs.a', needed by 'statdb_dump'. Stop. And below error when run "make -C tests/nsm_client nsm_client" | make: *** No rule to make target '../../support/nfs/libnfs.a', needed by 'nsm_client'. Stop. Signed-off-by: Mingli Yu Signed-off-by: Steve Dickson commit 47aa0c9683e048eb325dc9779a5aff41250c2c68 Author: Steve Dickson Date: Tue Dec 11 12:51:37 2018 -0500 nfsref: switch the way libraries are linked. Link the static libs before the dynamic libs allowing the routines in the static libs to be defined by the dynamic libs Signed-off-by: Steve Dickson commit 5e131279ba73fd9a58bfd35638f1136cf5a0cbfd Author: NeilBrown Date: Mon Dec 10 13:36:42 2018 -0500 nfsidmap: honour --with-pluginpath for instalation. The path set with --with-pluginpath is not currently used when installing plugins. It should be. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit bb5fd8f2d6c7e75f2bb23ff55daf43cf3089bb45 Author: NeilBrown Date: Wed Dec 5 13:52:37 2018 -0500 systemd: run statd-notify even when nfs-client isn't enabled When NFS filesytems are mounted, nfs-client.target really should be enabled. However it is possible to mount NFS filesystems without this (providing gss isn't used) and it mostly works. One aspect that doesn't work is that sm-notify isn't run, so the server isn't told to drop any locks from the previous client instance. This can result in confusing failures: if a client crashes while holding a lock, it won't be able to get the same lock after a reboot. While this isn't a complete solution (nfs-client really should be enabled), adding a dependency from rpc-statd to rpc-statd-notify is easy, has no down sides, and could help avoid confusion. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit 4090cc55b7ecc8ef1cfdc5b46f8151ad4a96166a Author: NeilBrown Date: Wed Dec 5 13:43:12 2018 -0500 Let systemd know when rpc.statd is needed A recent change to set IgnoreOnIsolate for rpc-statd isn't quite sufficient (though it doesn't hurt). While rpc-statd does remain when systemctl isolate multi-user is run, its dependencies don't remain, so rpcbind might get killed, which makes rpc.statd rather useless. The reason this is all an issue is that systemd doesn't know that rpc-statd is needed - mount.nfs explicitly starts it rather than having a dependency start it. This can be rectified by explicitly telling systemd about the dependency using "systemctl add-wants". This can be done in the start-statd script, at the same time that rpc-statd is started. As --runtime dependency is used so that it doesn't persist across reboots. A new dependency will be created on next boot if an NFSv3 filesystem is mounted. With this in place, both rpc.statd and rpcbind remain. Actually, rpcbind.service is stopped, but rpcbind.socket remains, and when anything tries to contact rpcbind, rpcbind.service is automatically started and it re-reads its saved state. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit b9fc99d5790283a02d27bebe911122698bee7f08 Author: NeilBrown Date: Wed Dec 5 13:37:38 2018 -0500 nfs.conf: allow empty assignments A recent commit caused an error message (but didn't actually trigger an error) for a config file line like: foo = There is no good reason to treat this as an error, and we (SUSE) have established practice of expecting these to be accepted. Specifically "/etc/nfs.conf" includes "/etc/sysconfig/nfs" which contains lots of empty definitions. So remove the error message. Fixes: 1c2c18806800 ("nfs.conf: Removed buffer overruns") Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit b360257e4924a558a9337d6bdfa9122ed2840017 Author: Yang Bo Date: Thu Nov 29 14:57:45 2018 -0500 configure.ac: Do not fatalize -Wstrict-prototypes with internal rpcgen. The internal rpcgen is not able to generate -Wstrict-prototypes free code, the problematic files are: ./tests/nsm_client/nlm_sm_inter_svc.c ./support/nsm/sm_inter_svc.c Signed-off-by: Yang Bo Signed-off-by: Steve Dickson commit ba13a7b456e5f06115bf6794e39670a66fdc8ddc Author: Yang Bo Date: Thu Nov 29 14:54:54 2018 -0500 nfs-utils: configure.ac: Fix --with-rpcgen=internal nottaking effect. Signed-off-by: Yang Bo Signed-off-by: Steve Dickson commit 047bd52d818b71f3715794cd19b6825d3e4f9ae1 Author: Jianhong Yin Date: Thu Nov 29 14:48:48 2018 -0500 mount: improve error msg when mount fail wirh EBUSY EBUSY can happen when mounting a filesystem that is already mounted or when the context= are different when using the -o sharecache Signed-off-by: Jianhong Yin Signed-off-by: Steve Dickson commit 86076327e91f28e0dad0af6d72178a23d3bb7191 Author: Justin Mitchell Date: Thu Nov 29 14:44:40 2018 -0500 Allow setting of commented out values in nfs.conf When using nfsconf tool to set values, allow it to uncomment a setting it finds in the relevant section if it would otherwise have had to create a new one. Signed-off-by: Justin Mitchell Signed-off-by: Steve Dickson commit da661064bcf86f530702695e2cc8b0641ebed473 Author: NeilBrown Date: Thu Nov 29 13:48:40 2018 -0500 systemd/rpc-statd.service - add IgnoreOnIsolate=yes If you run systemctl isolate multi-user.target then all services not needed by multi-user.target are stopped. This currently includes rpc-statd, which is a problem. Systemd doesn't know that rpc-statd.service is needed by multi-user.target, or more accurately nfs-client.target, because sometimes it isn't. It is started dynamically by mount.nfs when a v3 or v2 filesystem is mounted (not when v4 is mounted) - so systemd doesn't see the connection. mount units default to IgnoreOnIsolate=yes, as mounts are expected to be left mounted when you run "systemctl isolate ....". As rpc-statd.service is started by a mount, and needed for some mounts, it makes sense for it to declare IgnoreOnIsolate=yes too. With this declaration in place rpc.statd remains running when systemctl isolate multi-user.target is run. Signed-off-by: NeilBrown Signed-off-by: Steve Dickson commit 58833cf5caa299b0d0d39e3f2eecb226d828fb4d Author: Chuck Lever Date: Thu Nov 29 13:38:29 2018 -0500 Finish port of junction support to nfs-utils CONFIG_JUNCTION was defined for use in Makefiles, but that does not provide a -DCONFIG_JUNCTION on the compiler command line. Add logic to configure.ac to get the compiler flags right. Now that mountd junction support is getting built, a few last minute porting bugs popped out. Fix those up. Reported-by: Yongcheng Yang BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1543126 Fixes: 79978ed34973 ("mountd: Solder in support for NFS basic ... ") Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson commit 18911e0db8a2f9f73d4fa73dc31413b29bb528ea Author: Chuck Lever Date: Wed Nov 28 15:42:18 2018 -0500 Harden configure.ac checks for libxml2 Modernize the libxml2 script to use PKG_PROG_PKG_CONFIG instead of an ad hoc macro. This automates the population of AM_CPPFLAGS with "-I/usr/include/libxml2" when it is needed. Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson commit 28d08d249c5ef8e7bb9d03fe2dd116c84fb7ff91 Author: Chuck Lever Date: Wed Nov 28 15:11:00 2018 -0500 Fix quoting in configure.ac Replace an unmatched single quote to help syntax coloring editors. Signed-off-by: Chuck Lever Signed-off-by: Steve Dickson commit 2e5533976c76c1084baedadca7dc44c1113ae333 Author: Steve Dickson Date: Thu Oct 25 10:25:31 2018 -0400 mount.nfs: Add braces around EBUSY code Signed-off-by: Steve Dickson commit a49a690d477b01a4aeaafc85dc8c4e9447a08451 Author: Steve Dickson Date: Tue Oct 23 11:46:10 2018 -0400 nfs.conf: uncomment section headings To make it easier to turn values on and off, start with the section headings not being commented out. Signed-off-by: Steve Dickson commit 104f90f4ce964ddcfe50d4d24cc5e7ff96952299 Author: Steve Dickson Date: Sat Oct 20 12:01:37 2018 -0400 gssd: Introduce use-gss-proxy boolean to nfs.conf Allow the used of the gssprox-mech(8) through a the boolean variable in the [gssd] section of nfs.conf Signed-off-by: Steve Dickson commit afda50fc3691fc74ef3587009a70300ac174e0d6 Author: Steve Dickson Date: Sat Oct 20 10:46:45 2018 -0400 mount.nfs: Only ignore EBUSY when a filesystem is already mount EBUSY errors can be caused by using the -o sharecache flag and different context= values. So make sure the filesytem is mounted before ignoring the EBUSY error. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1629705 Found-by: Jianhong.Yin Signed-off-by: Steve Dickson commit 80b17639d78e152306d8d1753d719654ebb40e01 Author: Steve Dickson Date: Fri Oct 19 10:26:10 2018 -0400 Remove osd_login This ancient script has not been used in years, if used at all. Signed-off-by: Steve Dickson commit cec1278cdb385188cdf6b693fda1b00f9b93df55 Author: Alan Swanson Date: Thu Oct 4 13:45:50 2018 -0400 idmapd: Use inotify instead of dnotify Remove last use of dnotify in nfs-utils by bringing idmapd upto date with (required) inotify use by gssd and blkmapd. Acked-by: J. Bruce Fields Signed-off-by: Alan Swanson Signed-off-by: Steve Dickson commit f48d08f1148c9e0652f69f8274090970ca48a9fe Author: Justin Mitchell Date: Wed Sep 26 14:11:45 2018 -0400 nfsconf: Add missing nfs.conf entries for various cmdline options Add nfs.conf entries for various cmdline options These options did not have a corresponding nfs.conf entry which is currently forcing use of cmdline flags Signed-off-by: Justin Mitchell Signed-off-by: Steve Dickson commit d68be5d6ae5086d6b4ad84507d0d14011df40aa2 Author: Justin Mitchell Date: Wed Sep 26 10:37:17 2018 -0400 nfs.conf: fail to disable major NFS version 4 using "vers4=n" in /etc/nfs.conf Setting "vers4=n/off" (disabling the major NFS version 4) in nfs.conf doesn't work now. Refer to rpc.nfsd(8), "vers3/vers4" in the [nfsd] section of the /etc/nfs.conf file is to enable or disable a major NFS version 3 or 4 (which are normally enabled by default). Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1625032 Signed-off-by: Steve Dickson