NNTPC: Realm Authentication in Server config

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

 




In the authentication scheme it would be nice to be able to add a realm to 
the userid portion of the userid... for authenticating in the servers 
config... Example of what I'd like to do...

#-----------------------------------------------------------------------------
# Example: firewall proxy (no caching), one NNTP server, no local groups
# /* timeouts */
# host:port Interface Active Act.tim Newsgrp Group Xover Arts
userid@domain.net:passwd@news.server.com x.x.62.21 0 0 0 0 0 0
%BeginGroups
# Group pattern Host
* news.server.com
#-----------------------------------------------------------------------------

missing password in 
nntpcache.servers:4:userid@domain.net:passwd@news.server.com 208.235.62.21 
0 0 0 0 0 0
Segmentation fault (core dumped)

is what I get now...

I've taken the liberty of modifying the code as such in nntpcache.c
---------------------------------------------------------------------------------
  /* if there's a @ in host there's a user and password */
             hostname = username = password = NULL;
         if ((hostname = strchr(host, '@')) != NULL)
         {
             if ((hostname = strchr(hostname+1, '@')) != NULL)
             {
                 *(hostname++) = '\0';
             }
             else
             {
                 hostname = strchr(host, '@');
                 *(hostname++) = '\0';
             }
             if ((password = strchr(host, ':')) != NULL)
                 *(password++) = '\0';
             else
             {
                  loge (("missing password in %s:%d: %s", file, n, buf));
                  continue;
             }
             username = host;
---------------------------------------------------------------------------------

It seems to work for the most part, but not as pretty as it could be I guess...


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

Powered by Linux