NNTPC: rfc931 user identification bug fix

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

 



Access to certain (local) newsgroups needs to be restricted to particular  
users at our site.  Putting username@site into the nntpcache.access file
should enable us to do this.

It relies on having a RFC931-compliant authentication daemon running so  
that the username of the person connecting can be determined.

Even though my username was defined in nntpcache.access with access to read  
a particular group, nntpcached would not let me see the group.  The  
nntpcached log file recorded "unknown@<site> not permitted read access to  
<group>".  Meanwhile the authentication daemon's log file showed that it had  
given out the correct username information to nntpcached.

The problem appears to be in rfc931() in acc.c, where we send our request  
off to the authentication daemon.  Instead of getting the response from the  
daemon, we get echoed back exactly what we sent!

The fix is to make the connection unbuffered by adding:
  setbuf(fh, (char *) 0);
immediately after
  fh = fdopen (sock, "r+");
in acc.c line 50 (0.88.2).

We're running NeXTStep 3.3 here, but as other operating systems may also  
require this workaround, I guess it's best to slot it into the code for  
everyone.

Alasdair.


[Index of Archives]     [Yosemite]     [Yosemite Campsites]     [Bugtraq]     [Linux]     [Trn]

Powered by Linux