comparison src/noffle.c @ 391:6cb66f5a0479 noffle

[svn] * docs/noffle.1,src/configure.h,src/configfile.c,src/noffle.c: Add optional "auth" parameter to '--server' option. This turns on client authorisation regardless of the setting of authenticate-client. Useful if you want the same Noffle to authenticate or not depending on what/how it gets invoked.
author bears
date Fri, 23 May 2003 10:33:10 +0100
parents 2ad4c1c97734
children b540ecb6f218
comparison
equal deleted inserted replaced
390:2ad4c1c97734 391:6cb66f5a0479
8 not as server. If noffle runs as server, locking is performed while 8 not as server. If noffle runs as server, locking is performed while
9 executing NNTP commands, but temporarily released if no new command is 9 executing NNTP commands, but temporarily released if no new command is
10 received for some seconds (to allow multiple clients connect at the same 10 received for some seconds (to allow multiple clients connect at the same
11 time). 11 time).
12 12
13 $Id: noffle.c 532 2003-05-22 09:04:38Z bears $ 13 $Id: noffle.c 533 2003-05-23 09:33:10Z bears $
14 */ 14 */
15 15
16 #if HAVE_CONFIG_H 16 #if HAVE_CONFIG_H
17 #include <config.h> 17 #include <config.h>
18 #endif 18 #endif
572 " -o | --offline Switch to offline mode\n" 572 " -o | --offline Switch to offline mode\n"
573 " -O | --outgoing [server] List articles queued for posting\n" 573 " -O | --outgoing [server] List articles queued for posting\n"
574 " -p | --post Post article on stdin\n" 574 " -p | --post Post article on stdin\n"
575 " -q | --query groups [server] Get group list from server\n" 575 " -q | --query groups [server] Get group list from server\n"
576 " -q | --query desc [server] Get group descriptions from server\n" 576 " -q | --query desc [server] Get group descriptions from server\n"
577 " -r | --server Run as server on stdin/stdout\n" 577 " -r | --server [auth] Run as server on stdin/stdout\n"
578 " -R | --requested List articles marked for download\n" 578 " -R | --requested List articles marked for download\n"
579 " -s | --subscribe-over <grp> Add group to fetch list (overview)\n" 579 " -s | --subscribe-over <grp> Add group to fetch list (overview)\n"
580 " -S | --subscribe-full <grp> Add group to fetch list (full)\n" 580 " -S | --subscribe-full <grp> Add group to fetch list (full)\n"
581 " -t | --subscribe-thread <grp> Add group to fetch list (thread)\n" 581 " -t | --subscribe-thread <grp> Add group to fetch list (thread)\n"
582 " -u | --unsubscribe <grp> Remove group from fetch list\n" 582 " -u | --unsubscribe <grp> Remove group from fetch list\n"
1037 noffle.serverPattern = *argv; 1037 noffle.serverPattern = *argv;
1038 doQuery(); 1038 doQuery();
1039 } 1039 }
1040 break; 1040 break;
1041 case 'r': 1041 case 'r':
1042 Log_inf( "Starting as server" ); 1042 if ( *argv != NULL )
1043 {
1044 if ( strcmp( *argv, "auth" ) != 0 )
1045 {
1046 fprintf( stderr, "Unknown argument -r %s\n", *argv );
1047 result = EXIT_FAILURE;
1048 break;
1049 }
1050
1051 Cfg_setClientAuth( TRUE );
1052 p = ", authentication enabled from command line";
1053 }
1054 else
1055 p = "";
1056
1057 Log_inf( "Starting as server%s", p );
1043 Server_run(); 1058 Server_run();
1044 break; 1059 break;
1045 case 'R': 1060 case 'R':
1046 doRequested( *argv ); 1061 doRequested( *argv );
1047 break; 1062 break;