I added a small patch for getlist and actsync to connect to servers requiring authentication before using 'LIST ACTIVE' or similar commands. Patch appended. -- Master of Desaster Also known as Jochen Erwied -- Attached file included as plaintext by Listar -- Only in inn-2.4.0.prerelease: Makefile.global diff -ru2 inn-CURRENT-20010321/backends/actsync.c inn-2.4.0.prerelease/backends/actsync.c --- inn-CURRENT-20010321/backends/actsync.c Wed Mar 21 11:00:08 2001 +++ inn-2.4.0.prerelease/backends/actsync.c Thu Mar 22 09:51:54 2001 @@ -10,4 +10,5 @@ * [host1] host2 * + * -A use authentication to server * -b hostid ignore *.bork.bork.bork groups from: (def: -b 0) * 0 from neither host @@ -259,4 +260,5 @@ int v_flag = 0; /* default verbosity level */ int z_flag = 4; /* sleep z_flag sec per exec if -o x */ +int A_flag = 0; /* forward declarations */ @@ -356,6 +358,9 @@ /* parse args */ program = argv[0]; - while ((i = getopt(argc,argv,"b:d:g:i:I:kl:mn:o:p:q:s:t:Tv:z:")) != EOF) { + while ((i = getopt(argc,argv,"Ab:d:g:i:I:kl:mn:o:p:q:s:t:Tv:z:")) != EOF) { switch (i) { + case 'A': + A_flag = 1; + break; case 'b': /* -b {0|1|2|12|21} */ switch (atoi(optarg)) { @@ -682,5 +687,5 @@ { (void) fprintf(stderr, - "usage: %s [-b hostid][-d hostid][-i ignore_file][-I hostid][-k]\n", + "usage: %s [-A][-b hostid][-d hostid][-i ignore_file][-I hostid][-k]\n", program); (void) fprintf(stderr, @@ -691,4 +696,6 @@ (void) fprintf(stderr, + " -A\tuse authentication to server\n"); + (void) fprintf(stderr, " -b hostid\tignore *.bork.bork.bork groups from:\t(def: -b 0)\n"); (void) fprintf(stderr, @@ -879,4 +886,11 @@ exit(NOT_REACHED); } + + if(A_flag && NNTPsendpassword(rhost, FromServer, ToServer) < 0) { + (void) fprintf(stderr, "can't authenticate to server\n"); + DISPOSE(rhost); + exit(NOT_REACHED); + } + DISPOSE(rhost); diff -ru2 inn-CURRENT-20010321/frontends/getlist.c inn-2.4.0.prerelease/frontends/getlist.c --- inn-CURRENT-20010321/frontends/getlist.c Wed Mar 21 11:00:29 2001 +++ inn-2.4.0.prerelease/frontends/getlist.c Thu Mar 22 09:50:10 2001 @@ -20,5 +20,5 @@ Usage(void) { - fprintf(stderr, "Usage: getlist [-p port] [-h host] [type [pat [groups]]\n"); + fprintf(stderr, "Usage: getlist [-p port] [-h host] [-A] [type [pat [groups]]\n"); exit(1); } @@ -41,4 +41,5 @@ char buff[512 + 1]; int port; + int authinfo; int i; @@ -53,11 +54,15 @@ types = NULL; port = NNTP_PORT; + authinfo = 0; /* Parse JCL. */ - while ((i = getopt(ac, av, "h:p:")) != EOF) + while ((i = getopt(ac, av, "Ah:p:")) != EOF) switch (i) { default: Usage(); /* NOTREACHED */ + case 'A': + authinfo = 1; + break; case 'h': host = optarg; @@ -112,4 +117,8 @@ buff[0] ? buff : strerror(errno)); exit(1); + } + if(authinfo && NNTPsendpassword(host, FromServer, ToServer) < 0) { + (void)fprintf(stderr, "Can't authenticate to server\n"); + exit(1); }