nnrpd SSL patch fix

Jeffrey M. Vinocur jeff at litech.org
Fri Mar 9 18:10:49 UTC 2001


Of late nnrpd in CURRENT hasn't been compiling with SSL -- it appears the
code had been reworked a little bit after the version that I was using
when I wrote the patch for the ssl_required flag in readers.conf
(MatchClient was changed to MatchHost and thus didn't have the write
parameters).  Anyway, this ought to fix it.  (At least, it will compile --
I didn't actually test it.)

(diff is against latest CURRENT)

Jeff


-- 
Jeffrey M. Vinocur
jeff at litech.org


-- Attached file included as plaintext by Listar --
-- File: nnrpd-ssl-fix

diff -rc inn-CURRENT-20010308/nnrpd/perm.c inn-CURRENT-20010308-modified/nnrpd/perm.c
*** inn-CURRENT-20010308/nnrpd/perm.c	Thu Mar  8 05:00:57 2001
--- inn-CURRENT-20010308-modified/nnrpd/perm.c	Fri Mar  9 13:01:57 2001
***************
*** 1171,1177 ****
  	    if (tok->type == PERMrbrace) {
  		inwhat = 0;
  
! 		if (curauth->name && MatchHost(curauth->hosts, ClientHost, ClientIp)) {
  		    if (!MatchHost(curauth->localaddress, ServerHost, ServerIp)) {
  			syslog(L_TRACE, "Auth strategy '%s' does not match localhost.  Removing.",
  			   curauth->name == NULL ? "(NULL)" : curauth->name);
--- 1171,1181 ----
  	    if (tok->type == PERMrbrace) {
  		inwhat = 0;
  
! 		if (curauth->name
! #ifdef HAVE_SSL
! 		    && ((curauth->require_ssl == FALSE) || (ClientSSL == TRUE))
! #endif
! 		    && MatchHost(curauth->hosts, ClientHost, ClientIp)) {
  		    if (!MatchHost(curauth->localaddress, ServerHost, ServerIp)) {
  			syslog(L_TRACE, "Auth strategy '%s' does not match localhost.  Removing.",
  			   curauth->name == NULL ? "(NULL)" : curauth->name);
***************
*** 1501,1512 ****
      int	    iter;
      char    *pat, 
  	    *p;
- 
- #ifdef HAVE_SSL
-     if ((group->require_ssl == TRUE) && (ClientSSL == FALSE)) {
-         return(0);
-     }
- #endif
  
      /*	If no hostlist are specified, by default they match.   */
  
--- 1505,1510 ----



More information about the inn-patches mailing list