[1234] in Hesiod

home help back first fref pref prev next nref lref last post

Re: [Hesiod] Hesiod and long group records

daemon@ATHENA.MIT.EDU (Win Treese)
Tue Sep 4 22:10:57 2018

Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\))
From: Win Treese <treese@mit.edu>
In-Reply-To: <20180904222447.GD31892@odinseye.genomecenter.ucdavis.edu>
Date: Tue, 4 Sep 2018 22:10:21 -0400
Message-Id: <200D68E7-A1BE-4744-A416-C497A305C468@mit.edu>
To: Richard Feltstykket <rafeltstykket@ucdavis.edu>
Cc: hesiod@mit.edu
Content-Type: text/plain; charset="utf-8"
Errors-To: hesiod-bounces@mit.edu
Content-Transfer-Encoding: 8bit


Hi, Richard.

I took a quick look at the code. Unfortunately, I don’t have a relevant working environment to poke at things.

The call to res_mkquery is just using the buffers to construct the query, not to handle the response. The array abuf will hold the response, and it seems to be big enough (1024 bytes) in both the hesinfo library code and glibc.

Looking at glibc/hesiod/hesiod.c, I’d guess that the exit status of 2 from getent that you saw is coming from the __set_errno to ENOENT, which is 2. This suggests that there is something the code doesn’t like about the response. The most likely thing is that the class or type doesn’t match, since that seems to be the only clear path in the code to ENOENT.

Does the configuration of the classes to be used in /etc/hesiod.conf match the class (IN or HS) being used in your DNS server? If not, that’s likely the problem.

Best,

Win Treese
treese@acm.org / treese@mit.edu

> On Sep 4, 2018, at 6:24 PM, Richard Feltstykket <rafeltstykket@ucdavis.edu> wrote:
> 
> Hi List,
> 
> We are running into a problem with large groups on ubuntu 16.04.  Hesinfo returns the correct record but getent does not.
> 
> rf@odinseye:~$ hesinfo workshop group
> workshop:x:2029:fugon,dshill,rpnagarajan,tkremin,dalhindi,cprator,niyer,lixinzhe,rbellone,abzzram,paulae,sefeeney,yyaqiaoo,oanh,yiklim,joshi,skinnerjs,mclewis,jltanaka,dlebron,malbrown,xycheng,jli,shiqizh,kroy,bpdurbin,emilyk,csbenton,sharifdvm,bridget,nikj,mltu,kjennings,alaahmed,rkallen,lifswaro,datawrangler,jennifermoussa,ruta,jaime,markjs,zephyryi,ghanna,jbmiesfeld,shayne,cjjacob,mquesta,limchen,ajmichael,sfyanw,carfranc,agingrich,kluepdan,minyuan,arios,yangx,msettles,adwright,pmhenry,acartwright,kmlewald,devanmurphy,loxiles,yuabai,hforbes,onoses,eokello,ghwada,jfass,jabaily,cincinhuang,yaoluo,stafford,sleepery,ragrahn,karin,rf,mbritton,hergarden,cpinzari,ebattivelli,vwang
> 
> rf@odinseye:~$ getent group workshop
> rf@odinseye:~$ echo $?
> 2
> 
> The workshop.group.ns record is in in a single TXT record in DNS like this:
> "workshop:x:2029:fugon,dshill,rpnagarajan,tkremin,dalhindi,cprator,niyer,lixinzhe,rbellone,abzzram,paulae,sefeeney,yyaqiaoo,oanh,yiklim,joshi,skinnerjs,mclewis,jltanaka,dlebron,malbrown,xycheng,jli,shiqizh,kroy,bpdurbin,emilyk,csbenton,sharifdvm,bridg" "et,nikj,mltu,kjennings,alaahmed,rkallen,lifswaro,datawrangler,jennifermoussa,ruta,jaime,markjs,zephyryi,ghanna,jbmiesfeld,shayne,cjjacob,mquesta,limchen,ajmichael,sfyanw,carfranc,agingrich,kluepdan,minyuan,arios,yangx,msettles,adwright,pmhenry,acartw" "right,kmlewald,devanmurphy,loxiles,yuabai,hforbes,onoses,eokello,ghwada,jfass,jabaily,cincinhuang,yaoluo,stafford,sleepery,ragrahn,karin,rf,mbritton,hergarden,cpinzari,ebattivelli,vwang"
> 
> I was perusing the nss_hesiod directory in the glibc (2.23) source package for ubuntu 16.04 and also the source for the utility hesinfo and it looks like the version in glibc may not be new enough to support responses larger than 1024 bytes.  Does that sound accurate?
> 
> In hesiod.c for the hesinfo program I see:
> 
> /* Construct the query. */
> n = res_mkquery(QUERY, name, C_IN, T_TXT, NULL, 0, NULL, qbuf, PACKETSZ);
> 
> Whereas in nss_hesiod I see:
> /*
>  * Construct the query and send it.
>  */
>  n = res_mkquery(QUERY, name, class, T_TXT, NULL, 0, NULL, qbuf, MAX_HESRESP);
> 
> Am I on the right track here?
> 
> Thanks!
> Richard
> _______________________________________________
> Hesiod@mit.edu
> http://mailman.mit.edu/mailman/listinfo/hesiod


_______________________________________________
Hesiod@mit.edu
http://mailman.mit.edu/mailman/listinfo/hesiod


home help back first fref pref prev next nref lref last post