Mercurial > noffle
view src/client.h @ 288:c02c4eb95f95 noffle
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
and noffle-group configs.
* src/configfile.c,src/fetch.c,src/fetchlist.c,src/protocol.c,
src/server.c: Replace strcpy() with Utl_cpyStr() where appropriate.
See Debian bug 168128.
* src/control.c,src/configfile.c,src/noffle.c: Replace [s]scanf("%s")
with [s]scanf(MAXCHAR_FMT).
* src/noffle.c: Log warning if noffle.conf is world readable.
* src/noffle.c: Restrict most options to news admins; i.e. those who
are root or news on running Noffle.
* Makefile.in,acconfig.h,aclocal.m4,config.h.in,configure,configure.in,
docs/Makefile.in,docs/noffle.conf.5,packages/Makefile.in,
packages/redhat/Makefile.in,src/Makefile.am,src/Makefile.in,
src/authenticate.c,src/authenticate.h,src/noffle.c,src/server.c:
Add basic authentication using either Noffle-specific user file
or authenticating via PAM (service 'noffle'). PAM authentication
needs to run as root, so a Noffle server that needs PAM
must be started by root. Helpful (?) error messages will be logged
if not. Noffle will switch ruid and euid to 'news' (or whatever
is configured) ASAP.
* src/noffle.c: Add uid checking.
author | bears |
---|---|
date | Fri, 10 Jan 2003 23:25:45 +0000 |
parents | f1bacee93ca6 |
children |
line wrap: on
line source
/* client.h Noffle acting as client to other NNTP-servers $Id: client.h 307 2001-09-12 20:33:44Z bears $ */ #ifndef CLIENT_H #define CLIENT_H #if HAVE_CONFIG_H #include <config.h> #endif #if TIME_WITH_SYS_TIME #include <sys/time.h> #include <time.h> #else #if HAVE_SYS_TIME_H #include <sys/time.h> #else #include <time.h> #endif #endif #include "common.h" #include "database.h" #include "fetchlist.h" /* Status values returned by client routines. These will be NNTP status values or the two below, which are not valid NNTP result codes. */ #define STAT_OK 0 #define STAT_CONNECTION_LOST (-1) #define STAT_NEWSBASE_FATAL (-2) #define IS_FATAL(stat) (stat < 0) /* Format of server name: <host>[:<port>] */ Bool Client_connect( const char *serv ); void Client_disconnect( void ); int Client_getGrps( void ); int Client_getDsc( void ); int Client_getNewgrps( const time_t *lastTime ); /* Change to group <name> at server if it is also in current local grouplist. Returns TRUE at success. */ int Client_changeToGrp( const Str name ); /* Get overviews <rmtFirst> - <rmtLast> from server and append it to the current content. For articles that are to be fetched due to FULL or THREAD mode, store IDs in request database. */ int Client_getOver( const char *grp, int rmtFirst, int rmtLast, FetchMode mode ); /* Retrieve full article text and store it into database. */ int Client_retrieveArt( const char *msgId ); /* Same, but for a list of msgId's (new line after each msgId). All ARTICLE commands are sent and then all answers read. */ int Client_retrieveArtList( const char *list, int *artcnt, int artmax ); /* Store IDs of first and last article of group selected by Client_changeToGroup at remote server. */ void Client_rmtFirstLast( int *first, int *last ); int Client_postArt( const char *msgId, const char *artTxt, Str errStr ); #endif