This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Minires truncates host names


On Jul  6 19:47, Pierre A. Humblet wrote:
> > -----Original Message-----
> > From: D. Boland
> > Sent: Sunday, July 06, 2014 03:08
> > 
> > Thanks for the swift reply!
> > 
> > I looked at Sendmails' source code. Here's the snippet which produces 
> > the output from my first email. It's taken from the file
> sendmail/domain.c:
> > 
> >                         sm_dprintf("dns_getcanonname: trying %s.%s
> (%s)\n",
> >                                 host, *dp, # if NETINET6
> >                                 qtype == T_AAAA ? "AAAA" :
> > # endif /* NETINET6 */
> >                                 qtype == T_A ? "A" :
> >                                 qtype == T_MX ? "MX" :
> >                                 "???");
> >                 errno = 0;
> >                 ret = res_querydomain(host, *dp, C_IN, qtype,
> >                                       answer.qb2, sizeof(answer.qb2));
> > 
> > 
> > As you can see, it first prints the host to be looked up, and then 
> > passes the string unaltered to res_querydomain.
> > 
> 
> You are right, there is a bug in res_querydomain, 
> Line 737 *(ptr++ - 1) = '.';   should be
> *ptr++ = '.';
>  
> I would also add a debug printf at the top of the function:
> DPRINTF(statp->options & RES_DEBUG, "querydomain \"%s\"  \"%s\" type %d\n",
> Name, DomName, Type);
> 
> Unfortunately I am not setup to build Cygwin so I can't test the above nor
> submit a proper patch.

I've checked that in.  I also changed the debug output to print
"Resolv" instead of "Minires" to make sure that people don't think
they are stil using the external Minres lib.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpLhyrCVbhg3.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]