[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

glibc problem in nis/nss_nisplus/nisplus-ethers.c



[our firewall forbids the access to
http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl, so I sent you an
email]


Hi,

In glibc-2.1.3, I found an error in nis/nss_nisplus/nisplus-ethers.c,
line 234 : 

  _nss_nisplus_gethostton_r (const char *name, struct etherent *eth,
                             char *buffer, size_t buflen, int *errnop)
  { ...
    if (tablename_val == NULL)
      { ...
      }
    if (name != NULL)  <<--- the error is here
      {
        *errnop = EINVAL;
        return NSS_STATUS_UNAVAIL;
      }
   ...

There is "if (name != NULL)" instead of "if (name == NULL)"

--

Moreover, but I'am not sure, the function 
"_nss_nisplus_gethostton_r" has 5 parameters, but the function 
ether_hostton (inet/ether_hton.c, line 76) seems to call it
with only 4 parameters (as fct) :

  while (no_more == 0)
    {
      char buffer[1024];
      status = (*fct) (hostname, &etherent, buffer, sizeof buffer);
      no_more = __nss_next (&nip, "gethostton_r", (void **) &fct,
status, 0);
    }


Bye,

--
Laurent Constantin               Alliance Qualité Logiciel
tél: +33 (0) 2 99 12 50 00       fax: +33 (0) 2 99 63 70 40
laurent.constantin@aql.fr        http://www.aql.fr/
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
http://www.laurentconstantin.com/       [serveur principal]
http://go.to/laurentconstantin/        [serveur de secours]
http://laurentconstantin.est-la.com/   [serveur de secours]



Reply to: