mount.nfs: submarvellous messages from mount.nfs
Subsystems (2)
PATCH 1/1 mount.nfs: submarvellous messages from mount.nfs
From: Max Matveev <[email protected]>
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
--- utils/mount/stropts.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
utils/mount/stropts.c +2 -0
@@ -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 ;
Signature · 1 line
1.7.6
Quoted 9 lines · Steve Dickson
From: Max Matveev <[email protected]>
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.
Quoted 6 lines
This patch changes that error message from:
mount.nfs: Argument list too long
to
mount.nfs: access denied by server while mounting server:/exportSigned-off-by Steve Dickson <[email protected]>
Committed...
steved.
Quoted 17 lines
--- utils/mount/stropts.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)utils/mount/stropts.c +2
-0@@ -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 ;