]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
mount.nfs: submarvellous messages from mount.nfs
authorMax Matveev <makc@redhat.com>
Tue, 16 Aug 2011 11:57:43 +0000 (07:57 -0400)
committerSteve Dickson <steved@redhat.com>
Tue, 16 Aug 2011 16:46:07 +0000 (12:46 -0400)
Consider a setup where mountd on the server is controlled via
tcp_wrappers (usual RHEL setup) and will not process calls from a
particular client because of something in /etc/hosts.deny.

When such client attempts to do v3 mount, the error message printed
by mount.nfs is misleading.

This patch changes that error message from:
    mount.nfs: Argument list too long
to
    mount.nfs: access denied by server while mounting server:/export

Signed-off-by: Steve Dickson <steved@redhat.com>
utils/mount/stropts.c

index f1aa5030062e2cb7bee232d6f14ea880ace688b0..4d023d63408c9425445b00517d5dd3e12670c4d2 100644 (file)
@@ -538,6 +538,8 @@ nfs_rewrite_pmap_mount_options(struct mount_options *options)
                errno = ESPIPE;
                if (rpc_createerr.cf_stat == RPC_PROGNOTREGISTERED)
                        errno = EOPNOTSUPP;
+               else if (rpc_createerr.cf_stat == RPC_AUTHERROR)
+                       errno = EACCES;
                else if (rpc_createerr.cf_error.re_errno != 0)
                        errno = rpc_createerr.cf_error.re_errno;
                return 0;