summaryrefslogtreecommitdiffstats
path: root/utils/mountd
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2010-09-16 14:21:08 -0400
committerSteve Dickson <steved@redhat.com>2010-09-16 14:33:51 -0400
commit1ba28ec59f39de0bc4953b42556d847efbb508eb (patch)
treefc50952aed316cf8c1d265a396cb4383ad886e58 /utils/mountd
parentffe8c9a084fec4fdd3acfcf4b36fbe434d297b82 (diff)
downloadnfs-utils-1ba28ec59f39de0bc4953b42556d847efbb508eb.tar.gz
nfs-utils-1ba28ec59f39de0bc4953b42556d847efbb508eb.tar.xz
nfs-utils-1ba28ec59f39de0bc4953b42556d847efbb508eb.zip
mountd: Handle IPv6 addresses in kernel auth_unix_ip upcalls
Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/mountd')
-rw-r--r--utils/mountd/cache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c
index ab873d5..0e8a2f4 100644
--- a/utils/mountd/cache.c
+++ b/utils/mountd/cache.c
@@ -80,7 +80,7 @@ static void auth_unix_ip(FILE *f)
*/
char *cp;
char class[20];
- char ipaddr[20];
+ char ipaddr[INET6_ADDRSTRLEN];
char *client = NULL;
struct addrinfo *tmp = NULL;
struct addrinfo *ai = NULL;
@@ -95,7 +95,7 @@ static void auth_unix_ip(FILE *f)
strcmp(class, "nfsd") != 0)
return;
- if (qword_get(&cp, ipaddr, 20) <= 0)
+ if (qword_get(&cp, ipaddr, sizeof(ipaddr)) <= 0)
return;
tmp = host_pton(ipaddr);
@@ -953,7 +953,7 @@ int cache_export(nfs_export *exp, char *path)
qword_print(f, "nfsd");
- qword_print(f,
+ qword_print(f,
host_ntop(get_addrlist(exp->m_client, 0), buf, sizeof(buf)));
qword_printint(f, time(0)+30*60);
qword_print(f, exp->m_client->m_hostname);