summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* security information number as, 1 1 0 0Kinglong Mee2015-05-062-1/+4
| | | | | | | | | | | It's caused by commit 4a1ad4aa30, "mountd: Enable all auth flavors on pseudofs exports" This patch removes duplicate secinfo and invalid secinfo (zero). Acked-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: Writes signal number to kernel as command lineKinglong Mee2015-05-061-2/+7
| | | | | | | | | | | | When mounting nfs with -overs=4,minorversion=2, want getting nfs mounts with vers=4.2, but got vers=4.0 as, It's caused by mount.nfs writing bad vers to kernel. This patch lets mount.nfs writing signal number to kernel as command line. Reviewed-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* When mounting nfs with -ov4, -overs=4 or -onfsvers=4, fail as,Kinglong Mee2015-05-061-9/+3
| | | | | | | | | | | mount -t nfs -ov4 192.168.31.12:/ /testidr/ mount.nfs: access denied by server while mounting 192.168.31.12:/ Fixes: f980298853 "mount.nfs: configurable minor version defaults" Reviewed-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* osd_login: add --disable-osdlogin for configure osd_loginKinglong Mee2015-05-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Configure using the following command ./configure --prefix=/home/username/installs/tmp --exec-prefix=/home/username/installs/tmp When running "make install" most of the packages are put under /home/username/installs/tmp, but for some reason the install script tries to put osd_login under /sbin, which results in an error: Making install in osd_login make[2]: Entering directory `/home/username/installs/nfs-utils-1.3.2/utils/osd_login' make[3]: Entering directory `/home/username/installs/nfs-utils-1.3.2/utils/osd_login' /usr/bin/mkdir -p '/sbin' /usr/bin/install -c osd_login '/sbin' /usr/bin/install: cannot remove ‘/sbin/osd_login’: Permission denied make[3]: *** [install-dist_sbinSCRIPTS] Error 1 Reported-by: Eino Juhani Oltedal <e.j.oltedal@fys.uio.no> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* configure.ac: fix configure fail with --disable-mountKinglong Mee2015-05-061-1/+3
| | | | | | | | | | | | Configure fail as, ./configure --disable-mount : checking for suitable libblkid version... yes checking for mnt_context_do_mount in -lmount... no configure: error: libmount needed Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* configure.ac: fix typo of enable_nfsdcltrackKinglong Mee2015-05-061-1/+1
| | | | | Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsidmap: make sure give arguments are validSteve Dickson2015-05-041-1/+4
| | | | | | | Detect when a given argument is invalid. Log the error and exit gracefully Signed-off-by: Steve Dickson <steved@redhat.com>
* exportfs: add missing comma for exports entKinglong Mee2015-04-061-1/+1
| | | | | | | | | | | | | When using pnfs with "fsid=0", exportfs prints error as, $ exportfs -a exportfs: /var/lib/nfs/etab:1: unknown keyword "no_pnfsfsid=0" Commit cdd16bef98 ("nfs-utils: add support for the "pnfs" export option") miss the comma after "pnfs"/"on_pnfs" operation. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: add support for the "pnfs" export optionChristoph Hellwig2015-04-024-0/+17
| | | | | | | | This goes along with the patch just sent to Bruce to make pnfs support conditional. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount.nfs.man, nfs.man: Update distinction between fstypesBen Hutchings2015-04-021-4/+8
| | | | | | | | | | From: Ben Hutchings <ben@decadent.org.uk> this is a resync of the man page updates in the Debian package with mainline nfs-utils. Acked-By: J. Bruce Fields <bfields@fieldses.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: cross-reference nfsd.7 from nfsd.8 and vice versaCyril Brulebois2015-04-022-0/+2
| | | | | | | | | | | From: Cyril Brulebois <kibi@debian.org> It'd be nice if one could notice nfsd(7) when reading nfsd(8) and the other way round, without having to have to resort to dpkg -L $pkg to figure out what documentation is available. Acked-By: J. Bruce Fields <bfields@fieldses.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountd: Enable all auth flavors on pseudofs exportsScott Mayhew2015-04-021-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the current mountd code it's possible to craft exports in such a manner that clients will be unable to mount exports that they *should* be able to mount. Consider the following example: /foo *(rw,insecure,no_root_squash,sec=krb5p) /bar client.example.com(rw,insecure,no_root_squash) Initially, client.example.com will be able to mount the /foo export using sec=krb5p, but attempts to mount /bar using sec=sys will return EPERM. Once the nfsd.export cache entry expires, client.example.com will then be able to mount /bar using sec=sys but attempts to mount /foo using sec=krb5p will return EPERM. The reason this happens is because the initial nfsd.export cache entry is actually pre-populated by nfsd_fh(), which is the handler for the nfsd.fh cache, while later cache requests (once the initial entry expires) are handled by nfsd_export(). These functions have slightly different logic in how they select a v4root export from the cache -- nfsd_fh() takes last matching v4root export it finds, while nfsd_export() (actually lookup_export()) takes the first. Either way it's wrong because the client should be able to mount both exports. Both rfc3503bis and rfc5661 say: A common and convenient practice, unless strong security requirements dictate otherwise, is to make the entire pseudo file system accessible by all of the valid security mechanisms. ...so lets do that. Acked-by: J. Bruce Fields <bfields@fieldses.org> Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mount: improve error message when statd cannot be started.NeilBrown2015-03-262-0/+4
| | | | | | | | | | | | | | | | | | | | | | If you try to mount and NFSv3 filesystem, and statd is not running and cannot be started (maybe rpcbind isn't running either), the error message is: mount.nfs: rpc.statd is not running but is required for remote locking. mount.nfs: Either use '-o nolock' to keep locks local, or start statd. mount.nfs: an incorrect mount option was specified That last line is incorrect and misleading: no incorret mount option was specified. This line comes from mount_error() in error.c. In this case that function doesn't really need to provide any more information. So introduce a concention that EALREADY means an error message has already been printed, and use it to suppress that message. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* blkmapd: Make sure device root contains valid device idKinglong Mee2015-03-261-3/+7
| | | | | | | | | When testing pnfs in virtual linux based on VirtualBox, blkmapd gets dev_root->len == 0, which causes it Segmentation fault. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-blkmap.service: add EnvironmentFile directiveSteve Dickson2015-03-191-0/+1
| | | | | | Fixes: https://bugzilla.linux-nfs.org/show_bug.cgi?id=281 Signed-off-by: Steve Dickson <steved@redhat.com>
* units: nuke nfs-blkmap.targetZbigniew Jędrzejewski-Szmek2015-03-195-15/+5
| | | | | | | | | | | | | | | | | It seems that the purpose of nfs-blkmap.target was to enable and disable nfs-blkmap.service. This can be done directly by adding an [Install] section in nfs-blkmap.service. The downside of the previous arrangement, apart from the unnecessary complexity, was a warning during boot: [ INFO ] PNFS blkmaping enablement. is not active. [DEPEND] Dependency failed for pNFS block layout mapping daemon. https://bugzilla.redhat.com/show_bug.cgi?id=1088665 Signed-off-by: Zbigniew J?drzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Steve Dickson <steved@redhat.com>
* systemd: Relax dependencies of servicesMartin Pitt2015-03-197-4/+13
| | | | | | | | | | Stop depending on basic.target in the daemons which still do; i. e. add DefaultDependencies=no. This makes it possible to run NFS during early boot, and helps if you e. g. have /var on NFS. We don't require much else than local-fs. Acked-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Steve Dickson <steved@redhat.com>
* systemd: Order NFS server before clientMartin Pitt2015-03-191-0/+3
| | | | | | | | | This makes mounting NFS shares from localhost work reliably, as you need to start the server before attempting (client) mounts, and conversely on shutdown need to unmount all shares before stopping the server to avoid hangs. Signed-off-by: Steve Dickson <steved@redhat.com>
* systemd: Have rpc-statd-notify.service Require network.targetSteve Dickson2015-03-191-1/+1
| | | | | | | | | | | | Its been reported that having the rpc-statd-notify service depend on network.target instead network-online.target decrease boot times as much as 10 seconds on some installs Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1183293 Signed-off-by: Steve Dickson <steved@redhat.com> Reported-by: Eric Work <work.eric@gmail.com>
* mountstats: Normalize the mountpoints passed on the command line.Scott Mayhew2015-03-041-3/+3
| | | | | | | | Normalize the mountpoints passed on the command line so that commands like 'mountstats /mnt/' succeed rather than fail. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountstats: Fix exit code handlingScott Mayhew2015-03-041-4/+7
| | | | | | | | | | | When I changed mountstats to use the argparse module, I neglected to make the subcommand functions return any values even though main() was looking for them. Also removed SystemExit from the except clause at the end of the program since it was causing the program to always exit with a status of 1. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* configure.ac: Fix systemd autotools activation optionAurélien Chabot2015-02-261-1/+0
| | | | | | | The option to activate the install of systemd service files was never taken into account. Signed-off-by: Steve Dickson <steved@redhat.com>
* mountd: Fix memory leak in getexportentScott Mayhew2015-02-261-1/+1
| | | | | | | | | | | Valgrind shows that the memory allocated for ee.e_hostname in getexportent() is being leaked. While there _is_ a call to xfree(), by the time it gets called the leak's already happened. Moving the xfree() call so that it occurs before the assignment that overwrites ee fixes this. Signed-off-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.statd: Avoid passing unregistered socket to svc_getreqsetCarlos O'Donell2015-02-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rpc.statd may crash if it receives both a notification reply and a client connection at the same time. It crashes because it adds sockfd to SVC_FDSET and that violates the API contract. The SVC_FDSET is to be considered read-only and must not be modified by user code. The daemon modifies it for expediency to avoid having to maintain two distinct fd lists and select on each one. It is a practical choice that makes sense. Thus, if a notification reply arrives by itself everything works, or if a client connection arrives by itself everything works. Both must arrive at the same time for sockfd to be set in SVC_FDSET and to be processed by svc_getreqset because more than one of readfds is ready. It is the processing by svc_getreqset that will crash when it finds an unregistered fd in the list that doesn't correlate to any of the internal book keeping done by the library. At present the glibc SunRPC library will crash, but TIRPC does not (it is robust against invalid API usage in this case). However, future RPC libraries may be implemented differently, and the questionable API usage should be fixed. The simplest fix is for process_reply to *clear* sockfd from the ready-to-read fds, since it was never registered with xprt_register. This works because the code always calls process_reply before handing the fd set to the RPC layer for processing. Compile-tested on x86_64 against master. Signed-off-by: Carlos O'Donell <carlos@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* exports.man: improve documentation of 'nohide' and 'crossmnt'NeilBrown2015-02-261-6/+36
| | | | | | | | | - note that 'nohide' is irrelevant for NFSv4 - note that children on a 'crossmnt' filesystem cannot be unexported - note that 'nocrossmnt' is a valid option, but probably not useful. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* mountd: fix next_mnt handling for "/"NeilBrown2015-02-261-1/+1
| | | | | | | | | | | | If the (exported) path passed to next_mnt() is simply "/", next_mnt() will not report any children, as none start with "/" followed by a '/'. So make a special case for strlen(p)==1. In that case, return all children. This gives correct handling if only "/" is exported. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fixed a few typos in the mountstats(8) manpageSteve Dickson2015-02-191-4/+4
| | | | | Acked-by: Scott Mayhew <smayhew@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc-statd-notify: Don't wait for the network to come upSteve Dickson2015-02-091-1/+1
| | | | | | | | | | | | | rpc-statd-notify only needs to wait for the network interface to be configured not to be connected since it forks into background and will wait 15mins for the network to come up. This decrease boot times when networks are not and will not be connected. Signed-off-by: Steve Dickson <steved@redhat.com> Reported-By: Eric Work <work.eric@gmail.com>
* statd: Fix test for foreground modeChris Mayo2015-02-011-1/+1
| | | | | | | | daemon_init parameter has the opposite sense to code removed in commit 7addf9d Signed-off-by: Chris Mayo <aklhfex@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* 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>