Linux NFS development
 help / color / mirror / Atom feed
* [PATCH] mount.nfs: submarvellous messages from mount.nfs
@ 2011-08-16 12:02 Steve Dickson
  2011-08-16 16:46 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Dickson @ 2011-08-16 12:02 UTC (permalink / raw)
  To: Linux NFS Mailing List

From: Max Matveev <makc@redhat.com>

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 |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c
index f1aa503..4d023d6 100644
--- a/utils/mount/stropts.c
+++ b/utils/mount/stropts.c
@@ -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;
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-16 18:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-16 12:02 [PATCH] mount.nfs: submarvellous messages from mount.nfs Steve Dickson
2011-08-16 16:46 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox