diff --git a/inn/Makefile b/inn/Makefile index ee70fda..5a2d53e 100644 --- a/inn/Makefile +++ b/inn/Makefile @@ -6,12 +6,12 @@ include Makefile.global ## different mode than the rest. INSTDIRS = $(PATHNEWS) $(PATHBIN) $(PATHAUTH) $(PATHAUTHRESOLV) \ $(PATHAUTHPASSWD) $(PATHCONTROL) $(PATHFILTER) \ - $(PATHRNEWS) $(PATHDB) $(PATHDOC) $(PATHETC) $(PATHHTTP) $(PATHLIB) \ + $(PATHRNEWS) $(PATHDB) $(PATHDOC) $(PATHETC) $(PATHHTTP) $(PATHLIB) $(PATHNEWSLIB) \ $(PATHLIBPERL) $(PATHLIBPERL)/INN $(PATHDATASHARE) \ $(PATHMAN) $(MAN1) $(MAN3) $(MAN3PM) $(MAN5) $(MAN8) $(PATHSPOOL) \ $(PATHTMP) $(PATHARCHIVE) $(PATHARTICLES) $(PATHINCOMING) \ $(PATHINBAD) $(PATHTAPE) $(PATHOVERVIEW) $(PATHOUTGOING) \ - $(PATHLOG) $(PATHLOGOLD) $(PATHINCLUDE) + $(PATHLOG) $(PATHINCLUDE) ## LIBDIRS are built before PROGDIRS, make update runs in all UPDATEDIRS, ## and make install runs in all ALLDIRS. Nothing runs in test except the @@ -102,9 +102,9 @@ install: directories directories: @chmod +x support/install-sh for D in $(INSTDIRS) ; do \ - support/install-sh $(OWNER) -m 0755 -d $(D)$$D ; \ + support/install-sh -m 0755 -d $(D)$$D ; \ done - support/install-sh $(OWNER) -m 0750 -d $(D)$(PATHRUN) + support/install-sh -m 0750 -d $(D)$(PATHRUN) update: @chmod +x support/install-sh diff --git a/inn/Makefile.global.in b/inn/Makefile.global.in index d22590d..2a1d36c 100644 --- a/inn/Makefile.global.in +++ b/inn/Makefile.global.in @@ -237,20 +237,22 @@ PATHETC = $(sysconfdir) PATHMAN = $(mandir) PATHINCLUDE = $(includedir) PATHLIB = $(libdir) +PATHNEWSLIB = @NEWSLIBDIR@ PATHLIBPERL = @LIBPERLDIR@ PATHCONTROL = @CONTROLDIR@ PATHFILTER = @FILTERDIR@ PATHRUN = @RUNDIR@ PATHHTTP = @HTTPDIR@ PATHLOG = @LOGDIR@ -PATHLOGOLD = $(PATHLOG)/OLD +PATHLOGOLD = $(PATHLOG) +PATHSYSLOG = @SYSLOGDIR@ PATHDB = @DBDIR@ PATHSPOOL = @SPOOLDIR@ PATHTMP = $(tmpdir) -PATHAUTH = $(PATHBIN)/auth +PATHAUTH = @AUTHDIR@ PATHAUTHRESOLV = $(PATHAUTH)/resolv PATHAUTHPASSWD = $(PATHAUTH)/passwd -PATHRNEWS = $(PATHBIN)/rnews.libexec +PATHRNEWS = @RNEWSDIR@ PATHARCHIVE = $(PATHSPOOL)/archive PATHARTICLES = $(PATHSPOOL)/articles PATHINCOMING = $(PATHSPOOL)/incoming @@ -305,20 +307,21 @@ INSTALL = $(top)/support/install-sh -c BACKUP_OPTION = -B .OLD -LI_SPRI = $(LIBTOOLINST) $(INSTALL) -o root -g $(RUNASGROUP) -m 4550 $(BACKUP_OPTION) -LI_XPRI = $(LIBTOOLINST) $(INSTALL) $(OWNER) -m 0550 $(BACKUP_OPTION) -LI_XPUB = $(LIBTOOLINST) $(INSTALL) $(OWNER) -m 0555 $(BACKUP_OPTION) +LI_SPRI = $(LIBTOOLINST) $(INSTALL) -m 0550 +LI_XPRI = $(LIBTOOLINST) $(INSTALL) -m 0550 +LI_XPUB = $(LIBTOOLINST) $(INSTALL) -m 0555 +LI_PUB = $(LIBTOOLINST) $(INSTALL) -m 0644 -LI_INEWS = $(LIBTOOLINST) $(INSTALL) $(OWNER) -m $(INEWSMODE) $(BACKUP_OPTION) -LI_RNEWS = $(LIBTOOLINST) $(INSTALL) $(ROWNER) -m $(RNEWSMODE) $(BACKUP_OPTION) +LI_INEWS = $(LIBTOOLINST) $(INSTALL) +LI_RNEWS = $(LIBTOOLINST) $(INSTALL) -CP_RPRI = $(INSTALL) $(OWNER) -m 0640 $(BACKUP_OPTION) -CP_RPUB = $(INSTALL) $(OWNER) -m 0644 $(BACKUP_OPTION) -CP_XPRI = $(INSTALL) $(OWNER) -m 0550 $(BACKUP_OPTION) -CP_XPUB = $(INSTALL) $(OWNER) -m 0555 $(BACKUP_OPTION) +CP_RPRI = $(INSTALL) -m 0640 +CP_RPUB = $(INSTALL) -m 0644 +CP_XPRI = $(INSTALL) -m 0550 +CP_XPUB = $(INSTALL) -m 0555 -CP_DATA = $(INSTALL) $(OWNER) -m $(FILEMODE) $(BACKUP_OPTION) -CP_MAN = $(INSTALL) $(OWNER) -m 0444 +CP_DATA = $(INSTALL) -m $(FILEMODE) +CP_MAN = $(INSTALL) -m 0444 ## Some additional definitions needed by some versions of make, to ensure a ## consistant set of variables are available. diff --git a/inn/backends/Makefile b/inn/backends/Makefile index 3e05704..eadd5ed 100644 --- a/inn/backends/Makefile +++ b/inn/backends/Makefile @@ -27,8 +27,8 @@ install: all send-uucp sendinpaths sendxbatches ; do \ $(CP_XPUB) $$F $D$(PATHBIN)/$$F ; \ done - $(CP_XPRI) mod-active $D$(PATHBIN)/mod-active - $(LI_XPRI) overchan $D$(PATHBIN)/overchan + $(CP_XPUB) mod-active $D$(PATHBIN)/mod-active + $(LI_XPUB) overchan $D$(PATHBIN)/overchan for F in actsync archive batcher buffchan cvtbatch filechan inndf \ innxbatch innxmit ninpaths nntpget shlock shrinkfile ; do \ $(LI_XPUB) $$F $D$(PATHBIN)/$$F ; \ diff --git a/inn/backends/archive.c b/inn/backends/archive.c index b152ab9..3a248b1 100644 --- a/inn/backends/archive.c +++ b/inn/backends/archive.c @@ -401,10 +401,6 @@ main(int argc, char *argv[]) argv += optind; if (argc > 1) die("usage error"); - if (redirect) { - file = concatpath(innconf->pathlog, INN_PATH_ERRLOG); - freopen(file, "a", stderr); - } if (argc == 1) if (freopen(argv[0], "r", stdin) == NULL) sysdie("cannot open %s for input", argv[0]); diff --git a/inn/backends/batcher.c b/inn/backends/batcher.c index 91a83a0..053d0c7 100644 --- a/inn/backends/batcher.c +++ b/inn/backends/batcher.c @@ -42,7 +42,6 @@ static size_t MaxArts; static size_t MaxBytes; static sig_atomic_t GotInterrupt; static const char *Separator = "#! rnews %ld"; -static char *ERRLOG; /* ** Start a batch process. @@ -202,7 +201,6 @@ main(int ac, char *av[]) exit(1); Redirect = true; umask(NEWSUMASK); - ERRLOG = concatpath(innconf->pathlog, INN_PATH_ERRLOG); /* By default, statistics only go to syslog. */ message_handlers_notice(1, message_log_syslog_notice); @@ -263,8 +261,6 @@ main(int ac, char *av[]) sysdie("%s cannot open %s", Host, Input); } - if (Redirect) - freopen(ERRLOG, "a", stderr); /* Set initial counters, etc. */ BytesInCB = 0; diff --git a/inn/backends/buffchan.c b/inn/backends/buffchan.c index db4ea70..29e62e9 100644 --- a/inn/backends/buffchan.c +++ b/inn/backends/buffchan.c @@ -337,7 +337,6 @@ main(int ac, char *av[]) char *Directory; bool Redirect; FILE *F; - char *ERRLOG; /* First thing, set up our identity. */ message_program_name = "buffchan"; @@ -345,7 +344,6 @@ main(int ac, char *av[]) /* Set defaults. */ if (!innconf_read(NULL)) exit(1); - ERRLOG = concatpath(innconf->pathlog, INN_PATH_ERRLOG); Directory = NULL; Fields = 1; Format = NULL; @@ -414,8 +412,6 @@ main(int ac, char *av[]) die("usage error"); /* Do some basic set-ups. */ - if (Redirect) - freopen(ERRLOG, "a", stderr); if (Format == NULL) { Format = concatpath(innconf->pathoutgoing, "%s"); } diff --git a/inn/control/controlchan.in b/inn/control/controlchan.in old mode 100644 new mode 100755 diff --git a/inn/expire/Makefile b/inn/expire/Makefile index 991098a..6c7b18f 100644 --- a/inn/expire/Makefile +++ b/inn/expire/Makefile @@ -21,9 +21,9 @@ install: all $(LI_XPUB) $$F $D$(PATHBIN)/$$F ; \ done for F in expire expireover makedbz makehistory prunehistory ; do \ - $(LI_XPRI) $$F $D$(PATHBIN)/$$F ; \ + $(LI_XPUB) $$F $D$(PATHBIN)/$$F ; \ done - $(CP_XPRI) expirerm $D$(PATHBIN)/expirerm + $(CP_XPUB) expirerm $D$(PATHBIN)/expirerm bootstrap: diff --git a/inn/frontends/Makefile b/inn/frontends/Makefile index 27a2293..8ae81a8 100644 --- a/inn/frontends/Makefile +++ b/inn/frontends/Makefile @@ -16,8 +16,6 @@ SOURCES = ctlinnd.c decode.c encode.c getlist.c inews.c innconfval.c \ ovdb_init.c ovdb_monitor.c ovdb_server.c ovdb_stat.c rnews.c \ sm.c -PATHRNEWS = $(PATHBIN)/rnews.libexec - all: $(ALL) $(MAN) warnings: @@ -26,21 +24,21 @@ warnings: install: all $(LI_INEWS) inews $D$(PATHBIN)/inews $(LI_RNEWS) rnews $D$(PATHBIN)/rnews - $(CP_XPRI) cnfsheadconf $D$(PATHBIN)/cnfsheadconf + $(CP_XPUB) cnfsheadconf $D$(PATHBIN)/cnfsheadconf for F in cnfsstat mailpost pullnews scanspool ; do \ $(CP_XPUB) $$F $D$(PATHBIN)/$$F ; \ done for F in ctlinnd ovdb_init ovdb_monitor ovdb_server ovdb_stat ; do \ - $(LI_XPRI) $$F $D$(PATHBIN)/$$F ; \ + $(LI_XPUB) $$F $D$(PATHBIN)/$$F ; \ done for F in getlist innconfval sm ; do \ $(LI_XPUB) $$F $D$(PATHBIN)/$$F ; \ done - $(CP_XPUB) bunbatch $D$(PATHBIN)/rnews.libexec/bunbatch - $(CP_XPUB) c7unbatch $D$(PATHBIN)/rnews.libexec/c7unbatch - $(LI_XPUB) decode $D$(PATHBIN)/rnews.libexec/decode - $(LI_XPUB) encode $D$(PATHBIN)/rnews.libexec/encode - $(CP_XPUB) gunbatch $D$(PATHBIN)/rnews.libexec/gunbatch + $(CP_XPUB) bunbatch $D$(PATHRNEWS)/bunbatch + $(CP_XPUB) c7unbatch $D$(PATHRNEWS)/c7unbatch + $(LI_XPUB) decode $D$(PATHRNEWS)/decode + $(LI_XPUB) encode $D$(PATHRNEWS)/encode + $(CP_XPUB) gunbatch $D$(PATHRNEWS)/gunbatch bootstrap: $(MAN) diff --git a/inn/history/Makefile b/inn/history/Makefile index 5bd8a71..08c4f91 100644 --- a/inn/history/Makefile +++ b/inn/history/Makefile @@ -21,7 +21,7 @@ warnings: $(MAKE) COPT='$(WARNINGS)' all install: all - $(LI_XPUB) libinnhist.$(EXTLIB) $D$(PATHLIB)/libinnhist.$(EXTLIB) + $(LI_PUB) libinnhist.$(EXTLIB) $D$(PATHLIB)/libinnhist.$(EXTLIB) bootstrap: Make.methods diff --git a/inn/include/Makefile b/inn/include/Makefile index 9a71e2d..639afd5 100644 --- a/inn/include/Makefile +++ b/inn/include/Makefile @@ -45,7 +45,10 @@ inn/version.h: $(top)/support/mkversion $(top)/Makefile.global ## Installation rules. install: - $(top)/support/install-sh $(OWNER) -m 0755 -d $D$(PATHINCLUDE)/inn + $(top)/support/install-sh -m 0755 -d $D$(PATHINCLUDE)/inn + for F in $(PUBLIC) ; do \ + $(CP_RPUB) $$F $D$(PATHINCLUDE)/inn/$$F ; \ + done for F in inn/*.h ; do \ $(CP_RPUB) $$F $D$(PATHINCLUDE)/$$F ; \ done diff --git a/inn/include/inn/innconf.h b/inn/include/inn/innconf.h index 0884fe2..d011312 100644 --- a/inn/include/inn/innconf.h +++ b/inn/include/inn/innconf.h @@ -190,6 +190,7 @@ struct innconf { char *pathrun; /* Runtime state and sockets */ char *pathspool; /* Root of news spool hierarchy */ char *pathtmp; /* Temporary files for the news system */ + char *pathsyslog; /* syslog path */ }; /* The global innconf variable used in programs. */ diff --git a/inn/include/inn/paths.h.in b/inn/include/inn/paths.h.in index 63f03f7..286b44e 100644 --- a/inn/include/inn/paths.h.in +++ b/inn/include/inn/paths.h.in @@ -74,10 +74,6 @@ #define INN_PATH_SPOOL "articles" #define INN_PATH_BADNEWS "bad" -/* Default prefix path is pathlog. */ -#define INN_PATH_LOGFILE "news" -#define INN_PATH_ERRLOG "errlog" - /* Paths to various programs. */ #define INN_PATH_COMPRESS "@COMPRESS@" #define INN_PATH_GZIP "@GZIP@" diff --git a/inn/innd/Makefile b/inn/innd/Makefile index c7f735d..c35d8c9 100644 --- a/inn/innd/Makefile +++ b/inn/innd/Makefile @@ -21,7 +21,7 @@ warnings: $(MAKE) COPT='$(WARNINGS)' all install: all - $(LI_XPRI) innd $D$(PATHBIN)/innd + $(LI_XPUB) innd $D$(PATHBIN)/innd $(LI_XPUB) tinyleaf $D$(PATHBIN)/tinyleaf bootstrap: diff --git a/inn/innd/art.c b/inn/innd/art.c index b166392..bc612f7 100644 --- a/inn/innd/art.c +++ b/inn/innd/art.c @@ -307,23 +307,19 @@ ARTlog(const ARTDATA *data, char code, const char *text) * but who really wants to log at the Microsec level? */ Done = code == ART_ACCEPT || code == ART_JUNK; if (text) - i = fprintf(Log, "%.15s.%03d %c %s %s %s%s", + syslog(L_NOTICE, "%.15s.%03d %c %s %s %s%s", ctime(&Now.tv_sec) + 4, (int)(Now.tv_usec / 1000), code, data->Feedsite != NULL ? data->Feedsite : "(null)", HDR_FOUND(HDR__MESSAGE_ID) ? HDR(HDR__MESSAGE_ID) : "(null)", - text, Done ? "" : "\n"); + text,Done ? "" : "\n"); else - i = fprintf(Log, "%.15s.%03d %c %s %s%s", + + syslog(L_NOTICE, "%.15s.%03d %c %s %s%s", ctime(&Now.tv_sec) + 4, (int)(Now.tv_usec / 1000), code, data->Feedsite != NULL ? data->Feedsite : "(null)", HDR_FOUND(HDR__MESSAGE_ID) ? HDR(HDR__MESSAGE_ID) : "(null)", Done ? "" : "\n"); - if (i == EOF || (Done && !BufferedLogs && fflush(Log)) || ferror(Log)) { - i = errno; - syslog(L_ERROR, "%s cant write log_start %m", LogName); - IOError("logging article", i); - clearerr(Log); - } + TMRstop(TMR_ARTLOG); } @@ -1758,24 +1754,27 @@ ARTpropagate(ARTDATA *data, const char **hops, int hopcount, char **list, /* Write that the site is getting it, and flag to send it. */ if (innconf->logsitename) { - if (fprintf(Log, " %s", sp->Name) == EOF || ferror(Log)) { +/* if (fprintf(Log, " %s", sp->Name) == EOF || ferror(Log)) { j = errno; syslog(L_ERROR, "%s cant write log_site %m", LogName); IOError("logging site", j); clearerr(Log); } +*/ + syslog(L_NOTICE," %s",sp->Name); } sp->Sendit = true; sp->Seenit = true; if (sp->Master != NOSITE) Sites[sp->Master].Seenit = true; } - if (putc('\n', Log) == EOF +/* if (putc('\n', Log) == EOF || (!BufferedLogs && fflush(Log)) || ferror(Log)) { syslog(L_ERROR, "%s cant write log_end %m", LogName); clearerr(Log); } +*/ /* Handle funnel sites. */ for (sp = Sites, i = nSites; --i >= 0; sp++) { @@ -1939,6 +1938,8 @@ ARTpost(CHANNEL *cp) char *filterrc; #endif /* defined(DO_PERL) || defined(DO_PYTHON) */ OVADDRESULT result; + char syslog_buf[4096]; + char tmp_buf[1024]; /* Check whether we are receiving the article via IHAVE or TAKETHIS. */ ihave = (cp->Sendid.size > 3) ? false : true; @@ -2564,14 +2565,18 @@ ARTpost(CHANNEL *cp) /* We have another ARTlog() for the same article just after. */ ARTlog(data, ART_STRSTR, cp->Error); } - ARTlog(data, Accepted ? ART_ACCEPT : ART_JUNK, (char *)NULL); - if ((innconf->nntplinklog) && +// ARTlog(data, Accepted ? ART_ACCEPT : ART_JUNK, (char *)NULL); +/* if ((innconf->nntplinklog) && (fprintf(Log, " (%s)", data->TokenText) == EOF || ferror(Log))) { oerrno = errno; syslog(L_ERROR, "%s cant write log_nntplink %m", LogName); IOError("logging nntplink", oerrno); clearerr(Log); } +*/ + memset(syslog_buf,0,sizeof(syslog_buf)); + if (innconf->nntplinklog) sprintf(syslog_buf," (%s)",data->TokenText); + /* Calculate Max Article Time */ i = Now.tv_sec - cp->ArtBeg; if(i > cp->ArtMax) @@ -2580,14 +2585,20 @@ ARTpost(CHANNEL *cp) cp->Size += data->BytesValue; if (innconf->logartsize) { - if (fprintf(Log, " %ld", data->BytesValue) == EOF || ferror (Log)) { +/* if (fprintf(Log, " %ld", data->BytesValue) == EOF || ferror (Log)) { oerrno = errno; syslog(L_ERROR, "%s cant write artsize %m", LogName); IOError("logging artsize", oerrno); clearerr(Log); } +*/ + memset(tmp_buf,0,sizeof(tmp_buf)); + sprintf(tmp_buf," %ld",data->BytesValue); + strcat(syslog_buf,tmp_buf); } + ARTlog(data, Accepted ? ART_ACCEPT : ART_JUNK, syslog_buf); + ARTpropagate(data, (const char **)hops, hopcount, data->Distribution.List, ControlStore, OverviewCreated, Filtered); diff --git a/inn/innd/cc.c b/inn/innd/cc.c index e604bf3..e6b1c34 100644 --- a/inn/innd/cc.c +++ b/inn/innd/cc.c @@ -638,8 +638,8 @@ CCflushlogs(char *unused[]) ICDwrite(); syslog(L_NOTICE, "%s flushlogs %s", LogName, CCcurrmode()); - ReopenLog(Log); - ReopenLog(Errlog); + //ReopenLog(Log); + //ReopenLog(Errlog); return NULL; } diff --git a/inn/innd/icd.c b/inn/innd/icd.c index 0da50d4..7bc67b0 100644 --- a/inn/innd/icd.c +++ b/inn/innd/icd.c @@ -114,10 +114,11 @@ ICDwrite(void) } /* Flush log and error log. */ - if (fflush(Log) == EOF) +/* if (fflush(Log) == EOF) syslog(L_ERROR, "%s cant fflush log %m", LogName); if (fflush(Errlog) == EOF) syslog(L_ERROR, "%s cant fflush errlog %m", LogName); +*/ } diff --git a/inn/innd/innd.c b/inn/innd/innd.c index cea3f26..546b8a9 100644 --- a/inn/innd/innd.c +++ b/inn/innd/innd.c @@ -43,8 +43,8 @@ bool BufferedLogs = true; /* FILEs for logs and error logs. Everything should just use stdout and stderr. */ -FILE *Log = NULL; -FILE *Errlog = NULL; +//FILE *Log = NULL; +//FILE *Errlog = NULL; /* Some very old systems have a completely inadequate BUFSIZ buffer size, at least for our logging purposes. */ @@ -307,6 +307,7 @@ JustCleanup(void) ** Flush one log file, re-establishing buffering if necessary. stdout is ** block-buffered, stderr is line-buffered. */ +/* void ReopenLog(FILE *F) { @@ -330,7 +331,7 @@ ReopenLog(FILE *F) if (BufferedLogs) setvbuf(F, NULL, (F == stdout) ? _IOFBF : _IOLBF, LOG_BUFSIZ); } - +*/ /* ** Print a usage message and exit. @@ -573,19 +574,7 @@ main(int ac, char *av[]) articles and stderr is used to log serious error conditions (as well as to capture stderr from embedded filters). Both are normally fully buffered. */ - path = concatpath(innconf->pathlog, INN_PATH_LOGFILE); - if (freopen(path, "a", stdout) == NULL) - sysdie("SERVER cant freopen stdout to %s", path); - setvbuf(stdout, NULL, _IOFBF, LOG_BUFSIZ); - free(path); - path = concatpath(innconf->pathlog, INN_PATH_ERRLOG); - if (freopen(path, "a", stderr) == NULL) - sysdie("SERVER cant freopen stderr to %s", path); - setvbuf(stderr, NULL, _IOLBF, BUFSIZ); - free(path); } - Log = stdout; - Errlog = stderr; /* Initialize overview if necessary. */ if (innconf->enableoverview && !OVopen(OV_WRITE)) diff --git a/inn/innd/innd.h b/inn/innd/innd.h index a1980ec..c42dfe2 100644 --- a/inn/innd/innd.h +++ b/inn/innd/innd.h @@ -639,8 +639,8 @@ EXTERN char * ModeReason; /* NNTP reject message */ EXTERN char * NNRPReason; /* NNRP reject message */ EXTERN char * Reservation; /* Reserved lock message */ EXTERN char * RejectReason; /* NNTP reject message */ -EXTERN FILE * Errlog; -EXTERN FILE * Log; +//EXTERN FILE * Errlog; +//EXTERN FILE * Log; extern char LogName[]; extern int ErrorCount; EXTERN unsigned long ICDactivedirty; diff --git a/inn/innd/site.c b/inn/innd/site.c index 01f9169..fc521b3 100644 --- a/inn/innd/site.c +++ b/inn/innd/site.c @@ -543,7 +543,7 @@ SITEsend(SITE *sp, ARTDATA *Data) } /* Start the process. */ - i = Spawn(sp->Nice, 0, fileno(Errlog), fileno(Errlog), argv); + i = Spawn(sp->Nice, 0, 1, 2, argv); if (i >= 0) PROCwatch(i, -1); break; @@ -613,8 +613,9 @@ SITEstartprocess(SITE *sp) } /* Fork a child. */ - i = Spawn(sp->Nice, pan[PIPE_READ], (int)fileno(Errlog), - (int)fileno(Errlog), argv); +// i = Spawn(sp->Nice, pan[PIPE_READ], (int)fileno(Errlog), +// (int)fileno(Errlog), argv); + i = Spawn(sp->Nice, pan[PIPE_READ], 1, 2, argv); if (i > 0) { sp->pid = i; sp->Spooling = false; diff --git a/inn/innfeed/Makefile b/inn/innfeed/Makefile index 43fc558..8930472 100644 --- a/inn/innfeed/Makefile +++ b/inn/innfeed/Makefile @@ -25,9 +25,9 @@ warnings: $(MAKE) COPT='$(WARNINGS)' all install: all - $(LI_XPRI) innfeed $D$(PATHBIN)/innfeed - $(LI_XPRI) imapfeed $D$(PATHBIN)/imapfeed - $(CP_XPRI) procbatch $D$(PATHBIN)/procbatch + $(LI_XPUB) innfeed $D$(PATHBIN)/innfeed + $(LI_XPUB) imapfeed $D$(PATHBIN)/imapfeed + $(CP_XPUB) procbatch $D$(PATHBIN)/procbatch bootstrap: config_y.c config_y.h config_l.c diff --git a/inn/lib/Makefile b/inn/lib/Makefile index 8bc3186..9d944ff 100644 --- a/inn/lib/Makefile +++ b/inn/lib/Makefile @@ -35,7 +35,7 @@ warnings: $(MAKE) COPT='$(WARNINGS)' all install: all - $(LI_XPUB) libinn.$(EXTLIB) $D$(PATHLIB)/libinn.$(EXTLIB) + $(LI_PUB) libinn.$(EXTLIB) $D$(PATHLIB)/libinn.$(EXTLIB) bootstrap: diff --git a/inn/lib/innconf.c b/inn/lib/innconf.c index acc3a9a..c337c79 100644 --- a/inn/lib/innconf.c +++ b/inn/lib/innconf.c @@ -147,6 +147,8 @@ const struct config config_table[] = { { K(pathrun), STRING (NULL) }, { K(pathspool), STRING (NULL) }, { K(pathtmp), STRING (NULL) }, + { K(pathsyslog), STRING (NULL) }, + /* The following settings are specific to innd. */ { K(artcutoff), UNUMBER (10) }, @@ -341,6 +343,8 @@ innconf_set_defaults(void) innconf->pathrun = concatpath(innconf->pathnews, "run"); if (innconf->pathlog == NULL) innconf->pathlog = concatpath(innconf->pathnews, "log"); + if (innconf->pathsyslog == NULL) + innconf->pathsyslog = concatpath(innconf->pathnews, "log"); if (innconf->pathhttp == NULL) innconf->pathhttp = concatpath(innconf->pathnews, "http"); if (innconf->pathspool == NULL) diff --git a/inn/m4/paths.m4 b/inn/m4/paths.m4 index d0e09d9..bb2b30f 100644 --- a/inn/m4/paths.m4 +++ b/inn/m4/paths.m4 @@ -47,6 +47,18 @@ _INN_ARG_DIR([spool], ['${prefix}/spool'], [SPOOLDIR], _INN_ARG_DIR([tmp], ['${prefix}/tmp'], [tmpdir], [AS_HELP_STRING([--with-tmp-dir=PATH], [Path for temporary files [PREFIX/tmp]])]) +_INN_ARG_DIR([auth], ['${bindir}/auth'], [AUTHDIR], + [AS_HELP_STRING([--with-auth-dir=PATH], + [Path for auth files [PREFIX/bin/auth]])]) +_INN_ARG_DIR([rnews], ['${bindir}/rnews.libexec'], [RNEWSDIR], + [AS_HELP_STRING([--with-rnews-dir=PATH], + [Path for rnews files [PREFIX/bin/rnews.libexec]])]) +_INN_ARG_DIR([newslib], ['${prefix}/lib'], [NEWSLIBDIR], + [AS_HELP_STRING([--with-newslib-dir=PATH], + [Path for news lib files [PREFIX/lib]])]) +_INN_ARG_DIR([syslog], ['${prefix}/log'], [SYSLOGDIR], + [AS_HELP_STRING([--with-syslog-dir=PATH], + [Path for syslog files [PREFIX/log]])]) dnl Some additional paths used by inn/paths.h. eval PATH_CONFIG="$sysconfdir" diff --git a/inn/samples/cycbuff.conf b/inn/samples/cycbuff.conf index 9884792..98c4bc8 100644 --- a/inn/samples/cycbuff.conf +++ b/inn/samples/cycbuff.conf @@ -28,9 +28,9 @@ refreshinterval:30 ## ## If you're trying to stay under 2 GB, keep your sizes below 2097152. -cycbuff:ONE:/export/cycbuffs/one:512000 -cycbuff:TWO:/export/cycbuffs/two:512000 -cycbuff:THREE:/export/cycbuffs/three:512000 +cycbuff:ONE:/var/spool/news/articles/one:512000 +cycbuff:TWO:/var/spool/news/articles/two:512000 +cycbuff:THREE:/var/spool/news/articles/three:512000 ## 2. Meta-cyclic buffers ## Format: diff --git a/inn/samples/inn.conf.in b/inn/samples/inn.conf.in index 94e5358..39d6095 100644 --- a/inn/samples/inn.conf.in +++ b/inn/samples/inn.conf.in @@ -21,7 +21,7 @@ mta: "@SENDMAIL@ -oi -oem %s" organization: "A poorly-installed InterNetNews site" ovmethod: tradindexed hismethod: hisv6 -pathhost: @HOSTNAME@ +pathhost: localhost pathnews: @prefix@ #runasuser: @@ -140,7 +140,7 @@ backofftrigger: 10000 # Monitoring -doinnwatch: true +doinnwatch: false innwatchbatchspace: 4000 innwatchlibspace: 25000 innwatchloload: 1000 @@ -155,7 +155,7 @@ innwatchspoolspace: 25000 docnfsstat: false incominglogfrequency: 200 logartsize: true -logcancelcomm: false +logcancelcomm: true logcycles: 3 logipaddr: true logsitename: true @@ -178,7 +178,7 @@ icdsynccount: 10 keepmmappedthreshold: 1024 #maxcmdreadsize: maxforks: 10 -nicekids: 4 +nicekids: 0 nicenewnews: 0 nicennrpd: 0 pauseretrytime: 300 @@ -202,3 +202,4 @@ pathoverview: @SPOOLDIR@/overview pathrun: @RUNDIR@ pathspool: @SPOOLDIR@ pathtmp: @tmpdir@ +pathsyslog: @SYSLOGDIR@ diff --git a/inn/samples/innreport.conf.in b/inn/samples/innreport.conf.in index ce48714..c4fceba 100644 --- a/inn/samples/innreport.conf.in +++ b/inn/samples/innreport.conf.in @@ -10,7 +10,7 @@ # Default parameters section default { - libpath "@libdir@"; + libpath "@NEWSLIBDIR@"; logpath "@LOGDIR@"; unknown true; # want unknown entries. html-unknown true; # want unknown entries in HTML reports. diff --git a/inn/scripts/Makefile b/inn/scripts/Makefile index a46bf05..b7a057a 100644 --- a/inn/scripts/Makefile +++ b/inn/scripts/Makefile @@ -11,7 +11,7 @@ include ../Makefile.global top = .. ALL = inncheck innmail innreport innstat innupgrade innwatch \ - news.daily rc.news scanlogs simpleftp tally.control writelog + news.daily scanlogs simpleftp tally.control writelog EXTRA = innshellvars innshellvars.pl innshellvars.tcl @@ -21,13 +21,13 @@ install: all for F in innmail innreport simpleftp ; do \ $(CP_XPUB) $$F $D$(PATHBIN)/$$F ; \ done - for F in inncheck innstat innupgrade innwatch news.daily rc.news \ + for F in inncheck innstat innupgrade innwatch news.daily \ scanlogs tally.control writelog ; do \ - $(CP_XPRI) $$F $D$(PATHBIN)/$$F ; \ + $(CP_XPUB) $$F $D$(PATHBIN)/$$F ; \ done for F in innreport_inn.pm innshellvars innshellvars.pl \ innshellvars.tcl ; do \ - $(CP_RPUB) $$F $D$(PATHLIB)/$$F ; \ + $(CP_XPUB) $$F $D$(PATHNEWSLIB)/$$F ; \ done bootstrap: @@ -58,7 +58,6 @@ innstat: innstat.in $(FIX) ; $(FIX) innstat.in innupgrade: innupgrade.in $(FIX) ; $(FIX) -i innupgrade.in innwatch: innwatch.in $(FIX) ; $(FIX) innwatch.in news.daily: news.daily.in $(FIX) ; $(FIX) news.daily.in -rc.news: rc.news.in $(FIX) ; $(FIX) rc.news.in scanlogs: scanlogs.in $(FIX) ; $(FIX) scanlogs.in simpleftp: simpleftp.in $(FIX) ; $(FIX) -i simpleftp.in tally.control: tally.control.in $(FIX) ; $(FIX) tally.control.in diff --git a/inn/scripts/inncheck.in b/inn/scripts/inncheck.in old mode 100644 new mode 100755 index 3e870d1..4ca9105 --- a/inn/scripts/inncheck.in +++ b/inn/scripts/inncheck.in @@ -30,17 +30,16 @@ $ST_GID = 5; 'moderators', "$INN::Config::pathetc/moderators", 'most_logs', "$INN::Config::pathlog", 'newsbin', "$INN::Config::pathbin", - 'newsboot', "$INN::Config::pathbin/rc.news", 'newsfeeds', "$INN::Config::newsfeeds", 'newsetc', "$INN::Config::pathetc", - 'newslib', "$INN::Config::newslib", + 'newslib', "@NEWSLIBDIR@", 'nnrpd', "$INN::Config::pathbin/nnrpd", 'nntpsend.ctl', "$INN::Config::pathetc/nntpsend.ctl", - 'oldlogs', "$INN::Config::pathlog/OLD", + 'oldlogs', "$INN::Config::pathlog", 'passwd.nntp', "$INN::Config::pathetc/passwd.nntp", 'readers.conf', "$INN::Config::pathetc/readers.conf", 'rnews', "$INN::Config::rnews", - 'rnewsprogs', "$INN::Config::pathbin/rnews.libexec", + 'rnewsprogs', "@NEWSLIBDIR@/rnews.libexec", 'spooltemp', "$INN::Config::pathtmp", 'spool', "$INN::Config::patharticles", 'spoolnews', "$INN::Config::pathincoming" @@ -66,7 +65,7 @@ $ST_GID = 5; ## 0600 is allowed, but not 0500 for instance (not executable). ## 0660 is used when the file can contain passwords. %modes = ( - 'active', [0600, $INN::Config::filemode], + 'active', [0600, 0644], 'incoming.conf', [0400, 0660], 'inn.conf', [0400, 0664], 'moderators', [0400, 0664], @@ -690,9 +689,18 @@ intersect } @directories = ( - 'archive', 'badnews', 'batchdir', 'ctlprogs', 'most_logs', 'newsbin', - 'newsetc', 'newslib', 'oldlogs', 'rnewsprogs', 'spooltemp', 'spool', 'spoolnews' + 'archive', 'badnews', 'batchdir', 'most_logs', + 'oldlogs', 'spool', 'spoolnews' ); + +@directories2 = ( + 'ctlprogs', 'rnewsprogs', 'newsbin', 'newslib' +); + +@directories3 = ( + 'newsetc' +); + @rnews_programs = ( 'bunbatch', 'c7unbatch', 'decode', 'encode', 'gunbatch' ); @@ -713,11 +721,11 @@ intersect ## The modes (min and max) for the various programs. %prog_modes = ( - 'inews', [0500, $INN::Config::inewsmode], - 'innd', [0500, 0550], - 'newsboot', [0500, 0550], - 'nnrpd', [0500, 0555], - 'rnews', [0500, $INN::Config::rnewsmode], + 'inews', [0500, 0755], + 'innd', [0500, 0755], + 'newsboot', [0500, 0755], + 'nnrpd', [0500, 0755], + 'rnews', [0500, 0755], ); ## Check the permissions of nearly every file in an INN installation. @@ -729,18 +737,28 @@ check_all_perms #local ($newslib) = $paths{'newslib'}; foreach ( @directories ) { - &checkperm($paths{$_}, [0755, 0775]); + &checkperm($paths{$_}, [0750, 0770]); } - &checkperm($paths{'innddir'}, [0750, 0775]); - &checkperm($paths{'innbind'}, [04500, 04550], 'root', $INN::Config::runasgroup); + foreach ( @directories2 ) { + &checkperm($paths{$_}, [0750, 0755], 'root', 'root'); + } + foreach ( @directories3 ) { + &checkperm($paths{$_}, [0750, 0755], 'root', '@NEWSUSER@'); + } + &checkperm($paths{'innddir'}, [0750, 0770]); + &checkperm($paths{'innbind'}, [0750, 0755], 'root', 'root'); foreach ( keys %prog_modes ) { - &checkperm($paths{$_}, $prog_modes{$_}); + &checkperm($paths{$_}, $prog_modes{$_}, 'root', 'root'); } foreach ( keys %paths ) { - &checkperm($paths{$_}, $modes{$_}) - if defined $modes{$_}; + if ( defined $modes{$_} && $_ ne 'active') { + &checkperm($paths{$_}, $modes{$_}); + } + if ( defined $modes{$_} && $_ eq 'active') { + &checkperm($paths{$_}, $modes{$_}, '@NEWSUSER@', 'root'); + } } - &checkperm($paths{'history'}, [0600, $INN::Config::filemode]); + &checkperm($paths{'history'}, [0600, 0644], '@NEWSUSER@', 'root'); # Commented out for now since it depends on the history type. #&checkperm($paths{'history'} . ".dir", [0600, $INN::Config::filemode]); #&checkperm($paths{'history'} . ".index", [0600, $INN::Config::filemode]); @@ -749,13 +767,13 @@ check_all_perms # &checkperm("$newslib/$_", [0400, 0440]); #} foreach ( @newsbin_private ) { - &checkperm("$newsbin/$_", [0500, 0550]); + &checkperm("$newsbin/$_", [0700, 0755], 'root', 'root'); } foreach ( @newsbin_public ) { - &checkperm("$newsbin/$_", [0500, 0555]); + &checkperm("$newsbin/$_", [0700, 0755], 'root', 'root'); } foreach ( @rnews_programs ) { - &checkperm("$rnewsprogs/$_", [0500, 0555]); + &checkperm("$rnewsprogs/$_", [0700, 0755], 'root', 'root'); } ## Also make sure that @rnews_programs are the *only* programs in there; @@ -873,7 +891,10 @@ action: foreach $workfile ( @todo ) { next action; } &checkperm($file, $modes{$workfile}) - if $noperms == 0 && !$perms && defined $modes{$workfile}; + if $noperms == 0 && !$perms && defined $modes{$workfile} && $workfile ne "active"; + if ($noperms == 0 && !$perms && defined $modes{$workfile} && $workfile eq "active") { + &checkperm($file, $modes{$workfile}, '@NEWSUSER@', 'root'); + } $line = 0; eval "&$checklist{$workfile}" || warn "$@"; close(IN); diff --git a/inn/scripts/innshellvars.in b/inn/scripts/innshellvars.in index 2e5327b..41680e7 100644 --- a/inn/scripts/innshellvars.in +++ b/inn/scripts/innshellvars.in @@ -25,8 +25,9 @@ INNDDIR=${PATHRUN} LOCKS=${PATHRUN} export NEWSBIN NEWSETC NEWSLIB INNDDIR LOCKS -ERRLOG=${MOST_LOGS}/errlog -LOG=${MOST_LOGS}/news +SYSLOG_ERR=${PATHSYSLOG}/errors +SYSLOG_NOTICE=${PATHSYSLOG}/info +SYSLOG_WARNING=${PATHSYSLOG}/warnings ARCHIVEDIR=${PATHARCHIVE} SPOOL=${PATHARTICLES} diff --git a/inn/scripts/innshellvars.pl.in b/inn/scripts/innshellvars.pl.in index 97f76a8..adab496 100644 --- a/inn/scripts/innshellvars.pl.in +++ b/inn/scripts/innshellvars.pl.in @@ -37,8 +37,9 @@ $ENV{'NEWSLIB'} = $newslib; $ENV{'INNDDIR'} = $innddir; $ENV{'LOCKS'} = $locks; -$errlog = "${most_logs}/errlog"; -$log = "${most_logs}/news"; +$syslog_err = "${pathsyslog}/errors"; +$syslog_notice = "${pathsyslog}/info"; +$syslog_warning = "${pathsyslog}/warnings"; $archivedir = $patharchive; $spool = $patharticles; diff --git a/inn/scripts/innshellvars.tcl.in b/inn/scripts/innshellvars.tcl.in index 4050dd9..7d6b557 100644 --- a/inn/scripts/innshellvars.tcl.in +++ b/inn/scripts/innshellvars.tcl.in @@ -32,8 +32,9 @@ set env(NEWSLIB) "$inn_newslib" set env(INNDDIR) "$inn_innddir" set env(LOCKS) "$inn_locks" -set inn_errlog "${inn_most_logs}/errlog" -set inn_log "${inn_most_logs}/news" +set inn_syslog_err "${inn_pathsyslog}/errors" +set inn_syslog_notice "${inn_path_syslog}/info" +set inn_syslog_warning "${inn_pathsyslog}/warnings" set inn_archivedir "${inn_patharchive}" set inn_spool "${inn_patharticles}" diff --git a/inn/scripts/innstat.in b/inn/scripts/innstat.in old mode 100644 new mode 100755 index 928d1db..69b1fa3 --- a/inn/scripts/innstat.in +++ b/inn/scripts/innstat.in @@ -5,23 +5,7 @@ ## Display status of INN. ## Written by Landon Curt Noll . -SYSLOG_CRIT=news.crit -SYSLOG_ERR=news.err -SYSLOG_NOTICE=news.notice -SYSLOGS="${SYSLOG_CRIT} ${SYSLOG_ERR} ${SYSLOG_NOTICE}" - -## Set up the list of log files. -LOGS="${SYSLOGS}" -if [ -f "${MOST_LOGS}/`basename ${ERRLOG}`" ]; then - LOGS="${LOGS} `basename ${ERRLOG}`" -else - LOGS="${LOGS} ${ERRLOG}" -fi -if [ -f "${MOST_LOGS}/`basename ${LOG}`" ]; then - LOGS="${LOGS} `basename ${LOG}`" -else - LOGS="${LOGS} ${LOG}" -fi +LOGS="${SYSLOG_WARNING} ${SYSLOG_ERR} ${SYSLOG_NOTICE}" ## Show INND status. echo 'Server status:' @@ -31,7 +15,7 @@ ctlinnd mode 2>&1 echo '' echo 'Disk usage:' ${INNDF} ${SPOOL} ${OVERVIEWDIR} ${PATHETC} ${INCOMING} ${BATCH} \ - ${PATHDB} ${MOST_LOGS} | ${SORT} -u + ${PATHDB} ${MOST_LOGS} ${PATHSYSLOG} | ${SORT} -u ## Show overview usage for buffindexed. [ ${OVMETHOD} = 'buffindexed' ] && { @@ -48,7 +32,8 @@ echo 'Batch file sizes:' ## Show size of log files. echo '' echo 'Log file sizes:' -( cd ${MOST_LOGS}; ls -Cs ${LOGS} *.log 2>&1 ) +( cd ${PATHSYSLOG}; ls -Cs ${LOGS} 2>&1 ) +( cd ${MOST_LOGS}; ls -Cs *.log 2>&1 ) ## Show the lock files echo '' diff --git a/inn/scripts/innwatch.in b/inn/scripts/innwatch.in old mode 100644 new mode 100755 index 04390a7..c4374e3 --- a/inn/scripts/innwatch.in +++ b/inn/scripts/innwatch.in @@ -21,7 +21,7 @@ DAILY=${LOCKS}/LOCK.news.daily TIMESTAMP=${LOCKS}/${PROGNAME}.time ## Logfile to watch. Comment out if no logwatch. -LOGFILE=${MOST_LOGS}/news.crit +LOGFILE=${PATHSYSLOG}/news.crit ## Default value in case there is no definition in inn.conf. : ${INNWATCHPAUSELOAD:=1500} diff --git a/inn/scripts/news.daily.in b/inn/scripts/news.daily.in old mode 100644 new mode 100755 diff --git a/inn/scripts/scanlogs.in b/inn/scripts/scanlogs.in old mode 100644 new mode 100755 index b8bb83a..531e98a --- a/inn/scripts/scanlogs.in +++ b/inn/scripts/scanlogs.in @@ -10,7 +10,7 @@ ## norotate Do not rotate logfiles. ## Directory where old log files are kept. -OLD=${MOST_LOGS}/OLD +OLD=${MOST_LOGS} ## Files defined in innshellvars. We repeat them for clarity. ERRLOG=${MOST_LOGS}/errlog @@ -45,7 +45,7 @@ EXPLOG=${MOST_LOGS}/expire.log SYSLOG_CRIT=${MOST_LOGS}/news.crit SYSLOG_ERR=${MOST_LOGS}/news.err SYSLOG_NOTICE=${MOST_LOGS}/news.notice -SYSLOGS="${SYSLOG_CRIT} ${SYSLOG_ERR} ${SYSLOG_NOTICE}" +SYSLOGS="${SYSLOG_WARNING} ${SYSLOG_ERR} ${SYSLOG_NOTICE}" ## Where tally control processor is found. TALLY_CONTROL=${PATHBIN}/tally.control @@ -57,7 +57,7 @@ test -f ${MOST_LOGS}/rmgroup.log \ && CONTROL_DATA="${CONTROL_DATA} ${MOST_LOGS}/rmgroup.log" ## Build up the list of log files to process. -LOGS="${ERRLOG} ${LOG} ${ACTIVEFILE} ${EXPLOG} ${SYSLOGS} ${UNWANTED_LOG}" +LOGS="${EXPLOG} ${ACTIVEFILE} ${UNWANTED_LOG}" for F in ${LIVEFILES} ; do test -n "${F}" -a -f "${F}" && LOGS="${LOGS} ${F}" @@ -120,7 +120,7 @@ if ${ROTATE} ; then fi ## Make sure these .old files exist, in case innd is down. - for F in ${LOG} ${ERRLOG} ; do + for F in ${EXPLOG} ; do if [ ! -f ${F}.old ]; then rm -f ${F}.old cp ${F} ${F}.old @@ -128,12 +128,6 @@ if ${ROTATE} ; then fi done - ## Copy syslog files, truncating old inode since syslog has it open. - for F in ${SYSLOGS}; do - rm -f ${F}.old - cp ${F} ${F}.old - cat /dev/null >${F} - done ctlinnd -s logmode ## Make a copy of the active file. @@ -165,7 +159,7 @@ if ${ROTATE} ; then BASE=`basename ${F}` rm -f ${OLD}/${BASE} case ${F} in - ${SYSLOG_CRIT}|${ERRLOG}|${LOG}|${SYSLOG_NOTICE}) + ${EXPLOG}) ## Make a link that can be deleted (since if not rotating ## we delete the copy that is made in ${TMPDIR}). mv ${F}.old ${OLD}/${BASE} @@ -175,9 +169,6 @@ if ${ROTATE} ; then ${ACTIVEFILE}) mv ${BASE}.old ${OLD}/${BASE} ;; - ${SYSLOG_ERR}) - mv ${F}.old ${OLD}/${BASE} - ;; ${UNWANTED_LOG}) ## Rotate and compress the file. BASE=`basename ${F}` @@ -227,13 +218,13 @@ else OLD=${TMPDIR} ## Make a snapshot of what we need for below. - ctlinnd -s pause "Snapshot log and syslog files" 2>&1 - for F in ${SYSLOG_CRIT} ${ERRLOG} ${LOG} ${SYSLOG_NOTICE} ; do + ctlinnd -s pause "Snapshot log files" 2>&1 + for F in ${EXPLOG} ; do BASE=`basename ${F}` rm -f ${OLD}/${BASE}.0 cp ${F} ${OLD}/${BASE}.0 done - ctlinnd -s go "Snapshot log and syslog files" 2>&1 + ctlinnd -s go "Snapshot log" 2>&1 fi ## @@ -241,44 +232,36 @@ fi ## ## Display syslog critical messages. -BASE=`basename ${SYSLOG_CRIT}` -OLD_SYSLOG=${OLD}/${BASE}.0 +OLD_SYSLOG=${SYSLOG_WARNING}.0 if [ -s ${OLD_SYSLOG} ] ; then echo Syslog critical messages: cat ${OLD_SYSLOG} echo --------- echo '' fi -rm -f ${OLD_SYSLOG} - -## Display error log. -BASE=`basename ${ERRLOG}` -OLD_ERRLOG=${OLD}/${BASE}.0 -if [ -s ${OLD_ERRLOG} ] ; then - echo Error log: - cat ${OLD_ERRLOG} + +## Display syslog error log. +OLD_SYSLOG=${SYSLOG_ERR}.0 +if [ -s ${OLD_SYSLOG} ] ; then + echo Syslog error messages: + cat ${OLD_SYSLOG} echo --------- echo '' fi -rm -f ${OLD_ERRLOG} ## Scan for various problems in articles we were offered or sent... -BASE=`basename ${LOG}` -OLD_LOG=${OLD}/${BASE}.0 ## and summarize syslog information. -BASE=`basename ${SYSLOG_NOTICE}` -OLD_SYSLOG=${OLD}/${BASE}.0 +OLD_SYSLOG=${SYSLOG_NOTICE}.0 INNREPORT=${TMPDIR}/innreport$$ -if [ -s ${OLD_SYSLOG} -o -s ${OLD_LOG} ] ; then - ${PATHBIN}/innreport -f ${PATHETC}/innreport.conf ${OLD_SYSLOG} ${OLD_LOG} > ${INNREPORT} +if [ -s ${OLD_SYSLOG} -o ] ; then + ${PATHBIN}/innreport -f ${PATHETC}/innreport.conf ${OLD_SYSLOG} > ${INNREPORT} if [ -s ${INNREPORT} ] ; then cat ${INNREPORT} echo --------- echo '' fi fi -rm -f ${OLD_LOG} ${OLD_SYSLOG} ${INNREPORT} ## Now that innreport has finished, we can move unwanted.log. This ## file is not reset because it keeps the count of unwanted newsgroups. diff --git a/inn/scripts/simpleftp.in b/inn/scripts/simpleftp.in old mode 100644 new mode 100755 diff --git a/inn/site/Makefile b/inn/site/Makefile index 4a2d1c7..fc990af 100644 --- a/inn/site/Makefile +++ b/inn/site/Makefile @@ -20,7 +20,6 @@ PATH_PYTHON_FILTER_INND = ${PATHFILTER}/filter_innd.py PATH_PYTHON_INN_MODULE = ${PATHFILTER}/INN.py PATH_PYTHON_NNRPD_MODULE= ${PATHFILTER}/nnrpd.py PATH_NNRPAUTH = ${PATHFILTER}/nnrpd_auth.pl -PATH_NNRPYAUTH = ${PATHFILTER}/nnrpd_auth.py PATH_NNRPACCESS = ${PATHFILTER}/nnrpd_access.pl PATH_NNRPYACCESS = ${PATHFILTER}/nnrpd_access.py PATH_NNRPYDYNAMIC = ${PATHFILTER}/nnrpd_dynamic.py @@ -140,15 +139,10 @@ $D$(PATH_ACTIVE): ; $(CP_DATA) active.minimal $@ $D$(PATH_NEWSGROUPS): ; $(CP_DATA) newsgroups.minimal $@ $D$(PATH_ACTIVE_TIMES): touch $@ - chown $(RUNASUSER) $@ - chgrp $(RUNASGROUP) $@ chmod $(FILEMODE) $@ $D$(PATH_HISTORY): touch $@ - chown $(RUNASUSER) $@ - chgrp $(RUNASGROUP) $@ chmod $(FILEMODE) $@ - test -z "$D" && $(PATHBIN)/makedbz -i -o bootstrap: @@ -176,10 +170,10 @@ COPY_XPRI = $(CP_XPRI) COPY_XPUB = $(CP_XPUB) ## Files to copy. -$D$(PATH_INNDHOSTS): incoming.conf ; $(COPY_RPRI) $? $@ +$D$(PATH_INNDHOSTS): incoming.conf ; $(COPY_RPUB) $? $@ $D$(PATH_NEWSFEEDS): newsfeeds ; $(COPY_RPUB) $? $@ $D$(PATH_READERSCONF): readers.conf ; $(COPY_RPUB) $? $@ -$D$(PATH_RADIUS_CONF): radius.conf ; $(COPY_RPRI) $? $@ +$D$(PATH_RADIUS_CONF): radius.conf ; $(COPY_RPUB) $? $@ $D$(PATH_NNRPDTRACK): nnrpd.track ; $(COPY_RPUB) $? $@ $D$(PATH_CONTROLCTL): control.ctl ; $(COPY_RPUB) $? $@ $D$(PATH_CONTROLCTLLOCAL): control.ctl.local ; $(COPY_RPUB) $? $@ @@ -189,7 +183,7 @@ $D$(PATH_CONFIG): inn.conf ; $(COPY_RPUB) $? $@ $D$(PATH_MODERATORS): moderators ; $(COPY_RPUB) $? $@ $D$(PATH_DISTPATS): distrib.pats ; $(COPY_RPUB) $? $@ $D$(PATH_DISTRIBUTIONS): distributions ; $(COPY_RPUB) $? $@ -$D$(PATH_NNTPPASS): passwd.nntp ; $(COPY_RPRI) $? $@ +$D$(PATH_NNTPPASS): passwd.nntp ; $(COPY_RPUB) $? $@ $D$(PATHETC)/nntpsend.ctl: nntpsend.ctl ; $(COPY_RPUB) $? $@ $D$(PATHETC)/news2mail.cf: news2mail.cf ; $(COPY_RPUB) $? $@ $D$(PATHETC)/innreport.conf: innreport.conf ; $(COPY_RPUB) $? $@ @@ -214,7 +208,7 @@ $D$(PATHETC)/nocem.ctl: nocem.ctl ; $(COPY_RPUB) $? $@ $D$(PATH_ACTSYNC_CFG): actsync.cfg ; $(COPY_RPUB) $? $@ $D$(PATH_ACTSYNC_IGN): actsync.ign ; $(COPY_RPUB) $? $@ $D$(PATH_MOTD): motd.news ; $(COPY_RPUB) $? $@ -$D$(PATH_INNFEEDCTL): innfeed.conf ; $(COPY_RPRI) $? $@ +$D$(PATH_INNFEEDCTL): innfeed.conf ; $(COPY_RPUB) $? $@ $D$(PATH_SENDUUCP_CF): send-uucp.cf ; $(COPY_RPUB) $? $@ $D$(PATH_SUBSCRIPTIONS): subscriptions ; $(COPY_RPUB) $? $@ diff --git a/inn/storage/Makefile b/inn/storage/Makefile index f0b5587..4bb7e2a 100644 --- a/inn/storage/Makefile +++ b/inn/storage/Makefile @@ -22,9 +22,9 @@ warnings: $(MAKE) COPT='$(WARNINGS)' all install: all - $(LI_XPUB) libstorage.$(EXTLIB) $D$(PATHLIB)/libstorage.$(EXTLIB) + $(LI_PUB) libstorage.$(EXTLIB) $D$(PATHLIB)/libstorage.$(EXTLIB) for F in $(PROGRAMS) ; do \ - $(LI_XPRI) $$F $D$(PATHBIN)/`basename $$F` ; \ + $(LI_XPUB) $$F $D$(PATHBIN)/`basename $$F` ; \ done bootstrap: Make.methods diff --git a/inn/support/fixscript.in b/inn/support/fixscript.in old mode 100644 new mode 100755 index 112ed58..6852d67 --- a/inn/support/fixscript.in +++ b/inn/support/fixscript.in @@ -24,7 +24,7 @@ PERLPATH='@PERL@' prefix="@prefix@" exec_prefix="@exec_prefix@" -libdir="@libdir@" +libdir="@NEWSLIBDIR@" libperldir="@LIBPERLDIR@" # We can probably just assume sed is on the path, but since we have it, we may