Group :: Rede/Notícias
RPM: suck
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: suck-warn.patch
Download
Download
diff -u suck-4.3.0.orig/batch.c suck-4.3.0/batch.c
--- suck-4.3.0.orig/batch.c Wed Sep 12 01:24:48 2001
+++ suck-4.3.0/batch.c Wed Nov 28 00:52:44 2001
@@ -1,6 +1,7 @@
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
diff -u suck-4.3.0.orig/makephrases.c suck-4.3.0/makephrases.c
--- suck-4.3.0.orig/makephrases.c Thu Dec 28 00:40:23 2000
+++ suck-4.3.0/makephrases.c Wed Nov 28 00:52:44 2001
@@ -2,6 +2,7 @@
#include <stdio.h>
#include <ctype.h>
#include <string.h>
+#include <stdlib.h>
#include "suck_config.h"
/* create a text file with the default*phrases arrays in them */
diff -u suck-4.3.0.orig/rpost.c suck-4.3.0/rpost.c
--- suck-4.3.0.orig/rpost.c Mon Sep 17 23:12:30 2001
+++ suck-4.3.0/rpost.c Wed Nov 28 00:48:35 2001
@@ -27,7 +27,7 @@
#ifndef PL_na
# define PL_na (na)
#endif
-#endif /* OLD_PERL */u
+#endif /* OLD_PERL */
#endif
#ifdef HAVE_DIRENT_H
@@ -101,7 +101,7 @@
#define RNEWS_START "#! rnews" /* string that denotes the begin of a new message in rnews file */
#define RNEWS_START_LEN 8
-#define TEMP_ARTICLE "tmp-article" /* name for temp article in rnews_path */
+#define TEMP_ARTICLE "rpostXXXXXX" /* name for temp article in rnews_path */
/* stuff needed for language phrases */
/* set up defaults */
@@ -862,8 +862,8 @@
myargs->filter_args[argon] = NULL; /* just to be on the safe side */
if(myargs->filter_outfile == NULL) {
/* no outfile defined, use built-in default */
- myargs->filter_outfile = tmpnam(NULL);
- error_log(ERRLOG_REPORT, rpost_phrases[9], myargs->filter_outfile, NULL);
+ error_log(ERRLOG_REPORT, rpost_phrases[9], NULL);
+ retval = RETVAL_ERROR;
}
if(myargs->filter_infilenr < 0) {
error_log(ERRLOG_REPORT, rpost_phrases[10], NULL);
@@ -1046,6 +1046,7 @@
int do_rnews(Pargs myargs) {
/* handle rnews files */
int len, nrdone, nrok, retval = RETVAL_OK;
+ int fd;
DIR *dptr;
FILE *f_rnews, *f_temp;
char rnews_path[PATH_MAX+1], temp_path[PATH_MAX+1], linein[MAXLINLEN];
@@ -1101,9 +1102,14 @@
nrok++;
}
}
- if((f_temp = fopen(temp_path, "w")) == NULL) {
+ if((fd = mkstemp(temp_path)) == -1) {
+ f_temp = NULL;
MyPerror(temp_path);
retval = RETVAL_ERROR;
+ }
+ else if((f_temp = fdopen(fd, "w")) == NULL) {
+ MyPerror(temp_path);
+ retval = RETVAL_ERROR;
}
}
else if(f_temp != NULL) {
diff -u suck-4.3.0.orig/rpost_phrases.c suck-4.3.0/rpost_phrases.c
--- suck-4.3.0.orig/rpost_phrases.c Fri Mar 30 02:56:06 2001
+++ suck-4.3.0/rpost_phrases.c Tue Nov 27 22:59:33 2001
@@ -9,7 +9,7 @@
"Duplicate article, unable to post\n",
"Malfunction, Unable to post Article!\n%v1%",
"Invalid argument: %v1%\n",
- "Using Built-In default %v1%\n",
+ "No outfile specification, aborting\n",
"No infile specification, aborting\n", /* 10 */
"No file to process, aborting\n",
"Empty file, skipping\n",
diff -u suck-4.3.0.orig/ssort.c suck-4.3.0/ssort.c
--- suck-4.3.0.orig/ssort.c Mon Jan 3 04:46:50 2000
+++ suck-4.3.0/ssort.c Wed Nov 28 00:52:44 2001
@@ -1,4 +1,5 @@
#include <config.h>
+#include <string.h>
#ifdef DMALLOC
#include <dmalloc.h>