summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* nfs-utils: configure.ac: Fix --with-rpcgen=internal nottaking effect.Yang Bo2018-11-291-0/+2
| | | | | Signed-off-by: Yang Bo <rslovers@yandex.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: improve error msg when mount fail wirh EBUSYJianhong Yin2018-11-291-1/+1
| | | | | | | | | 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 <yin-jianhong@163.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Allow setting of commented out values in nfs.confJustin Mitchell2018-11-291-0/+24
| | | | | | | | | 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 <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* systemd/rpc-statd.service - add IgnoreOnIsolate=yesNeilBrown2018-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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 <neilb@suse.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Finish port of junction support to nfs-utilsChuck Lever2018-11-293-12/+16
| | | | | | | | | | | | | | | 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 <yoyang@redhat.com> BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1543126 Fixes: 79978ed34973 ("mountd: Solder in support for NFS basic ... ") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Harden configure.ac checks for libxml2Chuck Lever2018-11-292-11/+11
| | | | | | | | | 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 <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fix quoting in configure.acChuck Lever2018-11-291-1/+1
| | | | | | | Replace an unmatched single quote to help syntax coloring editors. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs: Add braces around EBUSY codenfs-utils-2-3-4-rc1Steve Dickson2018-10-251-1/+2
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs.conf: uncomment section headingsSteve Dickson2018-10-231-10/+10
| | | | | | | | To make it easier to turn values on and off, start with the section headings not being commented out. Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: Introduce use-gss-proxy boolean to nfs.confSteve Dickson2018-10-223-0/+12
| | | | | | | 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 <steved@redhat.com>
* mount.nfs: Only ignore EBUSY when a filesystem is already mountSteve Dickson2018-10-222-6/+11
| | | | | | | | | | | 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 <yin-jianhong@163.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove osd_loginSteve Dickson2018-10-194-136/+0
| | | | | | | This ancient script has not been used in years, if used at all. Signed-off-by: Steve Dickson <steved@redhat.com>
* idmapd: Use inotify instead of dnotifyAlan Swanson2018-10-041-15/+17
| | | | | | | | | 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 <bfields@fieldses.org> Signed-off-by: Alan Swanson <reiver@improbability.net> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsconf: Add missing nfs.conf entries for various cmdline optionsJustin Mitchell2018-09-264-0/+16
| | | | | | | | | | 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 <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs.conf: fail to disable major NFS version 4 using "vers4=n" in /etc/nfs.confJustin Mitchell2018-09-261-3/+12
| | | | | | | | | | | | | 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 <steved@redhat.com>
* Release: 2.3.2nfs-utils-2-3-3Steve Dickson2018-09-061-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* tcp-wrappers.m4: Only look for TCP wrappers lib when requestednfs-utils-2-3-3-rc4Steve Dickson2018-09-061-1/+1
| | | | | | | | | TCP wrappers is a pretty old and obsolete technology. The support has be terminated in current distro release, so only require the library to exist when asked for via the --with-tcp-wrappers Signed-off-by: Steve Dickson <steved@redhat.com>
* statd: fix use-after-free in monitor list if insertion failsSteve Dickson2018-09-061-1/+1
| | | | | | | | | | If nsm_insert_monitored_host() fails while saving the record to stable storage, we can't just assume the entry was new. Existing records must be removed from the list before being freed. Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Frank Sorenson <sorenson@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsd: track when the user explicitly requested version 4.0Scott Mayhew2018-08-203-7/+21
| | | | | | | | | | | | Since both 'rpc.nfsd -V4' and 'rpc.nfsd -V4.0' alter bit 0 in 'minorversset' and 'minorvers', it's not possible to know whether the user explicitly requested version 4.0 or not. Add another variable 'force4dot0' to track when the user explicitly requested version 4.0 so that we can write '4.0' to /proc/fs/nfsd/versions on kernel versions 4.11 and higher. On earlier kernels, we'll still write '4' as in the past. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsd: allow verson 4.0 to be enabled/disabled via nfs.confScott Mayhew2018-08-201-5/+1
| | | | | | | | The nfs.conf file has a 'vers4.0' parameter, but nfsd doesn't currently check it. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.gssd: fix typo checking "__NR_setresuid32" instead of "__NR_setresgid32Yongcheng Yang2018-07-211-1/+1
| | | | | Signed-off-by: Yongcheng Yang <yoyang@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.gssd: truncates 32-bit UIDs/GIDs to 16 bits architectures.nfs-utils-2-3-3-rc3Steve Dickson2018-07-181-4/+14
| | | | | | | | | | | | | | utils/gssd_proc.c uses SYS_setresuid and SYS_setresgid in change_identity when it should use SYS_setresuid32 and SYS_setresgid32 instead. This causes it to truncate UIDs/GIDs > 65536. Fixes: https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1779962 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1595927 Tested-by: James Ettle <theholyettlz@googlemail.com> Tested-by: Sree <Sree@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fixed typo in nfsmount.confSteve Dickson2018-07-101-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Revert "gssd.c: Remomved a couple of warning errors"Steve Dickson2018-06-271-10/+10
| | | | | | | | This reverts commit 98118f5e382cdeb1acf25370768d5dfdc254ba5d. Added back the 'm' character which cause memory to be allocated for the string convertions. Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsstat: fix typo causing --mounts unrecognized optionnfs-utils-2-3-3-rc2Yongcheng Yang2018-06-251-1/+1
| | | | | | | This reverts commit acf95d32a44fd8357c24e8a04ec53fc6900bfc58 Signed-off-by: Yongcheng Yang <yongcheng.yang@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Fix minor memory leaks before return.Kenneth D'souza2018-06-252-2/+6
| | | | | | Signed-off-by: Kenneth D'souza <kdsouza@redhat.com> Signed-off-by: Frank Sorenson <sorenson@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Spelling fixesJustin Mitchell2018-06-253-6/+6
| | | | | | | Fix some typos in the nfs.conf related code Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Add config setting to nfsconf cli toolJustin Mitchell2018-06-252-11/+90
| | | | | | | | Use the new conf_write() function to add setting and unsetting of config file values to the cli tool Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Add config file writing functionJustin Mitchell2018-06-252-0/+622
| | | | | | | | Adds a function to nfsconf handling to write a single config entry, creating the file and section headers as required. Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: swap xlog_err for less fatal versionJustin Mitchell2018-06-251-1/+1
| | | | | | | | | Use of xlog_err is immediately fatal, switch to using xlog(L_ERROR, ...) instead so that the error handling and cleanup mechanisms can operate properly Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Fix comparison check for subsection headersJustin Mitchell2018-06-251-0/+2
| | | | | | | | | When comparing two config section headers it incorrectly handled matching section names where only one had a subsection value Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Ignore empty lines in configJustin Mitchell2018-06-251-4/+4
| | | | | | | The test for empty lines didn't ignore whitespace properly Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsdcltrack: getopt_long() fails on a non x86_64 archsSteve Dickson2018-06-251-1/+1
| | | | | | | | | | | getopt_long() returns an int, not char, which matters on non-x86_64 archs since a char is signed on x86_64 arch but unsigned on other archs. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1551903 Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Fix a minor memory leak in generate_mount_unit and generate_targetKenneth D'souza2018-06-191-0/+8
| | | | | | | Free allocated memory for path before return. Signed-off-by: Kenneth D'souza <kdsouza@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* exports: document change to "insecure" export optionJ. Bruce Fields2018-06-191-3/+5
| | | | | | | | | | | | We're changing the kernel to allow gss requests from high ports even when "secure" is set. If the change gets backported to distro kernels, the kernel version may be an imperfect predictor of the behavior, but I think it's the best we can do. Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs(5): update clientaddr value optionsOlga Kornievskaia2018-06-191-0/+3
| | | | | | | | Document the use of IPv4/IPv6_ANY address as values to the clientaddr as a way to tell the server that the client does not want delegations. Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add check of clientaddr argumentOlga Kornievskaia2018-06-193-2/+71
| | | | | | | | | | | If the NFS client administrator supplies the clientaddr mount option, it should be either a special value of either IPv4/IPv6 any address or one of the machine's network addresses. Otherwise, warn the administrator about the use of an arbitrary value for the clientaddr value. Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove a number of stringop-overflow warningsnfs-utils-2-3-3-rc1Steve Dickson2018-06-052-3/+3
| | | | | | | | | | | | | umich_ldap.c:1128:3: warning: ‘strncat’ specified bound 128 equals destination size [-Wstringop-overflow=] umich_ldap.c:1130:3: warning: ‘strncat’ specified bound 128 equals destination size [-Wstringop-overflow=] idmapd.c:313:2: warning: ‘strncat’ specified bound 4096 equals destination size [-Wstringop-overflow=] Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove a number of stringop-truncation warningsSteve Dickson2018-06-056-7/+8
| | | | | | | | | | | | | | | | | | | | | | client.c:486:3: warning: ‘strncpy’ destination unchanged after copying no bytes [-Wstringop-truncation] file.c:99:2: warning: ‘strncpy’ specified bound 4096 equals destination size [-Wstringop-truncation] v4root.c:95:2: warning: ‘strncpy’ specified bound 1025 equals destination size [-Wstringop-truncation] sm-notify.c:572:3: warning: ‘strncpy’ specified bound 1025 equals destination size [-Wstringop-truncation] nfs4mount.c:221:3: warning: ‘strncpy’ specified bound 1024 equals destination size [-Wstringop-truncation] nfsmount.c:831:2: warning: ‘strncpy’ specified bound 256 equals destination size [-Wstringop-truncation] Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd.c: Remomved a couple of warning errorsSteve Dickson2018-06-051-10/+10
| | | | | | | | | | gssd.c:291:7: error: ISO C does not support the 'm' scanf flag [-Werror=format=] gssd.c:291:7: error: format '%s' expects argument of type 'char *', but argument 4 has type 'char **' [-Werror=format=] Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed format expects argument of type errorsSteve Dickson2018-06-052-2/+3
| | | | | | | | | | | | | | idmapd.c: In function 'getfield': idmapd.c:936:4: error: format '%o' expects argument of type 'unsigned int *', but argument 3 has type 'int *' [-Werror=format=] if ((n = sscanf(bp, "\\%03o", &val)) != 1) nfsidmap.c: In function 'key_invalidate': nfsidmap.c:322:3: error: format '%x' expects argument of type 'unsigned int *', but argument 3 has type 'key_serial_t *' [-Werror=format=] sscanf(buf, "%x", &key); Signed-off-by: Steve Dickson <steved@redhat.com>
* Removed ISO C does not support the '%m' gnu_printf format errorsSteve Dickson2018-06-052-6/+7
| | | | | | | | | | | | | | | | | | | | | | | nfsstat.c: In function 'mounts': nfsstat.c:1016:3: error: ISO C does not support the '%m' gnu_printf format [-Werror=format=] fprintf(stderr, "Warning: %s: %m\n", name); ^ nfsstat.c: In function 'get_stats': nfsstat.c:1093:6: error: ISO C does not support the '%m' gnu_printf format [-Werror=format=] label, file); statd.c: In function 'set_nlm_port': statd.c:235:5: error: ISO C does not support the '%m' gnu_printf format [-Werror=format=] name_p, type); ^ statd.c:238:3: error: ISO C does not support the '%m' gnu_printf format [-Werror=format=] fprintf(stderr, "%s: failed to open %s: %m\n", name_p, pathbuf); Signed-off-by: Steve Dickson <steved@redhat.com>
* xtab.c: Removed overflow in implicit constant conversion errorsSteve Dickson2018-06-051-1/+1
| | | | | | | | | | | | | xtab.c: In function 'xtab_read': xtab.c:60:4: error: overflow in implicit constant conversion [-Werror=overflow] exp->m_xtabent = 1; ^ xtab.c:61:4: error: overflow in implicit constant conversion [-Werror=overflow] exp->m_mayexport = 1; Signed-off-by: Steve Dickson <steved@redhat.com>
* Fixed format overflow warnings in mountd and nfsdgabriele balducci2018-06-052-2/+2
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* rpcgen: Only compile the command when configured.Steve Dickson2018-06-051-1/+1
| | | | | | | | | | Only compile and use the internal rpcgen when required via the --with-rpcgen flag It is strongly suggested to use the rpcgen from the new created rpcsvc-proto package be used. Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd: Add "srchost=" upcall parameterChuck Lever2018-06-053-20/+32
| | | | | | | | | | | | | | | | | | | The callback client used by NFSv4.0 servers to send CB calls has to use a source principal that is the same as the target principal that the client used to establish the forward channel. In multi-homed server set-ups, the domain part of the principal's hostname may not be the same as server's DNS domain. So gssd can no longer assume that. The kernel can scrape that domain off the forward channel's principal and pass that up to gssd. This patch adds a new parameter, "srchost", to the kernel upcall. When the kernel presents this new parameter in an upcall, gssd will use it, along with the "service" parameter, to construct the service principal for the keytab lookup. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Release: 2.3.2nfs-utils-2-3-2Steve Dickson2018-05-221-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsconf: Add man page for nfsconf clinfs-utils-2-3-2-rc2Justin Mitchell2018-05-222-0/+84
| | | | | | | Provide a man page for nfsconf Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsconf: use nfsconf cli to test library functionJustin Mitchell2018-05-226-0/+130
| | | | | | | | Uses the nfsconftool cli to test that the configuration library functions are operating as expected Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Add nfsconf cliJustin Mitchell2018-05-226-1/+193
| | | | | | | | | This tool uses the conffile facilities to allow commandline querying of configuration settings and to dump the current config for diagnosis and testing Signed-off-by: Justin Mitchell <jumitche@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>