X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fexport%2Frmtab.c;h=d16b3b33b692dd421814590c2dcaddeeab0dd957;hp=0ec495c43c80e972d5cededb4946ab74c1718889;hb=a36bdceb99f6f08c6a0659d2cb38a7bbd4871220;hpb=9e398e49be79af62fca8efb21849d8a2714dc92a diff --git a/support/export/rmtab.c b/support/export/rmtab.c index 0ec495c..d16b3b3 100644 --- a/support/export/rmtab.c +++ b/support/export/rmtab.c @@ -1,7 +1,7 @@ /* - * support/export/rmntab.c + * support/export/rmtab.c * - * Interface to the rmnt file. + * Interface to the rmtab file. * */ @@ -12,7 +12,7 @@ #include #include #include -#include "xmalloc.h" + #include "misc.h" #include "nfslib.h" #include "exportfs.h" @@ -28,17 +28,14 @@ static void rmtab_read_wildcard(struct rmtabent *rep) { nfs_export *exp, *exp2; - struct hostent *hp; + struct addrinfo *ai; - hp = gethostbyname(rep->r_client); - if (hp == NULL) - return; - hp = hostent_dup(hp); - if (hp == NULL) + ai = host_addrinfo(rep->r_client); + if (ai == NULL) return; - exp = export_allowed(hp, rep->r_path); - free(hp); + exp = export_allowed(ai, rep->r_path); + freeaddrinfo(ai); if (exp == NULL) return;