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