Article delegate-en/4589 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A4586@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: DeleGate as a caching NNTP server
25 Sep 2009 08:57:11 GMT feedback@delegate.org (Yutaka Sato)
The DeleGate Project


Hi,

In message <_A4586@delegate-en.ML_> on 09/25/09(01:14:47) I wrote:
 |In message <_A4584@delegate-en.ML_> on 09/24/09(21:17:08)
 |you Florent Bautista <pyyiqbdyi-rn3efjo2yhtr.ml@ml.delegate.org> wrote:
 | |09/24 14:07:26.10 [20016] 61+0: DO_INIT
 | |09/24 14:07:26.10 [20016] 61+0: #### AUTHINFO: USER gn585168
 | |09/24 13:07:26.10 [20016] 61+0: ==== stab [1] Q: [] AUTHINFO USER gn585168^M
 | |09/24 13:07:26.10 [20016] 61+0: ==== stab #### [1] CONNECTING to 'news-europe.giganews.com:119' for: AUTHINFO USER gn585168^M
 |...
 | |NNTPCONF=ondemand
 | |MOUNT="* nntp://gn585168:mypassword@giganews../*"
 |
 |Hmm... You might be able to escape the problem with
...
 |(I'll fix it in the next release)

I found that MYAUTH is not supported for NNTP server and it does not
solve the above problem.  So I made a modification to enable
NNTPC0NF="ondemand" for NNTP servers with authentication, as the enclosed
patch.  The modified version was uploaded as 9.9.5-pre14.

Cheers,
Yutaka
--
  9 9   Yutaka Sato <y.sato@delegate.org> http://delegate.org/y.sato/
 ( ~ )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller

*** dist/src/delegate9.9.5-pre13/src/nntp.c	Thu Sep 24 08:37:33 2009
--- ./src/nntp.c	Fri Sep 25 16:56:55 2009
***************
*** 2464,2469 ****
--- 2464,2472 ----
  	/*
  	doNntpAUTH(ns);
  	*/
+ 	if( NX.ne_ondemand ){
+ 		/* 9.9.5 do auth. on demand */
+ 	}else
  	if( doNntpAUTH(ns) != 0 ){
  		sv1tlog("-- NO getCONFIG on ERROR %d\n",ns->ns_authERR);
  		return;
***************
*** 5672,5677 ****
--- 5675,5689 ----
  	if( LCfp(ns,LI_ACTIVE) == NULL )
  		setLISTcache(ns,LI_ACTIVE);
  	ns->ns_isCC = ServViaCc;
+ 	if( ns->ns_auser == 0 || *ns->ns_auser == 0 ){
+ 		IStr(auth,256);
+ 		if( get_MYAUTH(Conn,AVStr(auth),"nntp",host,port) ){
+ 			IStr(user,256);
+ 			IStr(pass,256);
+ 			Xsscanf(auth,"%[^:]:%[^\r\n]",AVStr(user),AVStr(pass));
+ 			setAuth(ns,user,pass);
+ 		}
+ 	}
  	return nsid;
  }
  
***************
*** 8267,8272 ****
--- 8279,8292 ----
  	int anum = ns->ns_curanum;
  
  	TRACE("==== curgroup[%s:%d]\n",group,anum);
+ 	if( ns->ns_auser && *ns->ns_auser ){
+ 		NewsServer nsb;
+ 		int aok;
+ 		nsb = *ns;
+ 		nsb.ns_wfp = ts;
+ 		nsb.ns_rfp = fs;
+ 		aok = doNntpAUTH(&nsb);
+ 	}
  	if( *group ){
  		fprintf(ts,"GROUP %s\r\n",group);
  		fflush(ts);

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V