char ipaddr[20];
char *client;
struct in_addr addr;
+ struct hostent *he;
if (readline(fileno(f), &lbuf, &lbuflen) != 1)
return;
auth_reload();
/* addr is a valid, interesting address, find the domain name... */
- client = client_compose(addr);
+ he = client_resolve(addr);
+ client = client_compose(he);
qword_print(f, "nfsd");
qword_eol(f);
if (client) free(client);
-
+ free(he);
}
void auth_unix_gid(FILE *f)
if (!found) {
found = &exp->m_export;
found_path = strdup(path);
+ if (found_path == NULL)
+ goto out;
} else if (strcmp(found->e_path, exp->m_export.e_path)!= 0)
{
xlog(L_WARNING, "%s and %s have same filehandle for %s, using first",
qword_print(f, found->e_path);
qword_eol(f);
out:
+ free(found_path);
free(dom);
return;
}
"Cannot export %s, possibly unsupported filesystem"
" or fsid= required", path);
dump_to_cache(f, dom, path, NULL);
- } else
- mountlist_add(dom, path);
+ }
} else {
dump_to_cache(f, dom, path, NULL);
}
"Cannot export %s, possibly unsupported filesystem or"
" fsid= required", exp->e_path);
}
- mountlist_add(domain, exp->e_path);
while (err == 0 && (exp->e_flags & NFSEXP_CROSSMOUNT) && path) {
/* really an 'if', but we can break out of