From: "Devon H. O'Dell" <devon.odell@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] dns poisoning
Date: Wed, 29 Aug 2012 12:26:39 -0400 [thread overview]
Message-ID: <CAFgOgC9myn7ScUsumiE3+NYTWsDiuY+CxQJ5pGv-ZWfupq+x+Q@mail.gmail.com> (raw)
In-Reply-To: <824997a9f2cda909d1c0a19e4e6aa377@rei2.9hal>
Nice catch!
2012/8/29 <cinap_lenrek@gmx.de>:
> you are right!
>
> baddelegation() is checking for that, but it was not effective because it
> bailed out before even entering that for loop because of:
>
> if(t == nil)
> t = lookupinfo("dom");
> if(t == nil)
> return 0; <- delegation loop will not be checked :(
>
> the following patch makes it work:
>
> dblookup.c:799,806 - /sys/src/cmd/ndb/dblookup.c:799,804
>
> if(t == nil)
> t = lookupinfo("dom");
> - if(t == nil)
> - return 0;
>
> for(; rp; rp = rp->next){
> if(rp->type != Tns)
> dblookup.c:816,821 - /sys/src/cmd/ndb/dblookup.c:814,822
> return 1;
> }
>
> + if(t == nil)
> + continue;
> +
> /* see if delegating to us what we don't own */
> for(nt = t; nt != nil; nt = nt->entry)
> if(rp->host && cistrcmp(rp->host->name, nt->val) == 0)
> --
> cinap
>
next prev parent reply other threads:[~2012-08-29 16:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-29 3:29 cinap_lenrek
2012-08-29 4:22 ` erik quanstrom
2012-08-29 16:16 ` cinap_lenrek
2012-08-29 16:26 ` Devon H. O'Dell [this message]
2012-08-29 16:37 ` erik quanstrom
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFgOgC9myn7ScUsumiE3+NYTWsDiuY+CxQJ5pGv-ZWfupq+x+Q@mail.gmail.com \
--to=devon.odell@gmail.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).