summaryrefslogtreecommitdiff
path: root/support/export
diff options
context:
space:
mode:
authorNeilBrown <neil@brown.name>2021-03-15 09:54:02 -0400
committerSteve Dickson <steved@redhat.com>2021-03-15 10:37:52 -0400
commitcc15009355c8a7761266943569edc59e0efdc232 (patch)
treef49d733cbed32b3856a4fb408ca451dd192446b0 /support/export
parentc7a954ae5a548d8fabec079c8fb426cca0c6f830 (diff)
downloadnfs-utils-cc15009355c8a7761266943569edc59e0efdc232.tar.gz
mountd: add --cache-use-ipaddr option to force use_ipaddr
When logging authentication requests, it can be easier to read the logs if clients are always identified by IP address, not intermediate names like netgroups or subnets. To allow this, add --cache-use-ipaddr or -i which tell mountd to always enable use_ipaddr. Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/export')
-rw-r--r--support/export/auth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/support/export/auth.c b/support/export/auth.c
index 0bfa77d..cea3763 100644
--- a/support/export/auth.c
+++ b/support/export/auth.c
@@ -66,6 +66,10 @@ check_useipaddr(void)
int old_use_ipaddr = use_ipaddr;
unsigned int len = 0;
+ if (use_ipaddr > 1)
+ /* fixed - don't check */
+ return;
+
/* add length of m_hostname + 1 for the comma */
for (clp = clientlist[MCL_NETGROUP]; clp; clp = clp->m_next)
len += (strlen(clp->m_hostname) + 1);