View | Details | Raw Unified | Return to bug 69983
Collapse All | Expand All

(-)s-news/files/patch-inews.c (+20 lines)
Line 0 Link Here
1
--- inews.c.orig	Wed Aug  4 03:21:19 2004
2
+++ inews.c	Wed Aug  4 03:28:27 2004
3
@@ -30,6 +30,8 @@
4
 #endif
5
 #ifdef HAVE_MALLOC_H
6
 #include <malloc.h>
7
+#else
8
+#include <stdlib.h>
9
 #endif
10
 #ifdef STDC_HEADERS
11
 #include <string.h>
12
@@ -463,7 +465,7 @@
13
 
14
 static char *message_id(void)
15
 {
16
-	sprintf(buff,"<%lx.%x@%s>",time(0),getpid(),fqdn);
17
+	sprintf(buff,"<%lx.%x@%s>",(unsigned long)time(0),getpid(),fqdn);
18
 	return (buff);
19
 }
20
 
(-)s-news/files/patch-nntpd.c (-9 / +18 lines)
Lines 1-5 Link Here
1
--- nntpd.c	Sat May 18 20:21:56 2002
1
--- nntpd.c.orig	Sat May 18 22:21:56 2002
2
+++ nntpd.c	Wed Aug 21 22:09:46 2002
2
+++ nntpd.c	Wed Aug  4 03:40:06 2004
3
@@ -2,6 +2,7 @@
3
@@ -2,6 +2,7 @@
4
  *  S-News version 0.1.9 - A Simple News Server
4
  *  S-News version 0.1.9 - A Simple News Server
5
  *  Copyright (C) 1998 Christopher John Purnell
5
  *  Copyright (C) 1998 Christopher John Purnell
Lines 8-14 Link Here
8
  *
8
  *
9
  *  This program is free software; you can redistribute it and/or modify
9
  *  This program is free software; you can redistribute it and/or modify
10
  *  it under the terms of the GNU General Public License as published by
10
  *  it under the terms of the GNU General Public License as published by
11
@@ -106,6 +107,7 @@
11
@@ -22,6 +23,8 @@
12
 #include "config.h"
13
 #endif
14
 
15
+#include <sys/types.h>
16
+#include <sys/socket.h>
17
 #include <sys/utsname.h>
18
 #include <sys/stat.h>
19
 #include <sys/wait.h>
20
@@ -106,6 +109,7 @@
12
 static void do_listgroup(char *);
21
 static void do_listgroup(char *);
13
 static void do_xover(char *);
22
 static void do_xover(char *);
14
 static void do_xhdr(char *);
23
 static void do_xhdr(char *);
Lines 16-22 Link Here
16
 static void do_xpath(char *);
25
 static void do_xpath(char *);
17
 static void do_ihave(char *);
26
 static void do_ihave(char *);
18
 static void do_post(char *);
27
 static void do_post(char *);
19
@@ -239,6 +241,10 @@
28
@@ -239,6 +243,10 @@
20
 		{
29
 		{
21
 			do_xhdr(arg);
30
 			do_xhdr(arg);
22
 		}
31
 		}
Lines 27-33 Link Here
27
 		else if (!strcasecmp(line,"xover"))
36
 		else if (!strcasecmp(line,"xover"))
28
 		{
37
 		{
29
 			do_xover(arg);
38
 			do_xover(arg);
30
@@ -811,10 +817,11 @@
39
@@ -811,10 +819,11 @@
31
 	printf(".\r\n");
40
 	printf(".\r\n");
32
 }
41
 }
33
 
42
 
Lines 41-47 Link Here
41
 	char *fmt,*cp;
50
 	char *fmt,*cp;
42
 	unsigned char c;
51
 	unsigned char c;
43
 	int i;
52
 	int i;
44
@@ -835,7 +842,7 @@
53
@@ -835,7 +844,7 @@
45
 	i = -1; fmt = "%u \r\n";
54
 	i = -1; fmt = "%u \r\n";
46
 	for (u=0; u<7; ++u)
55
 	for (u=0; u<7; ++u)
47
 	{
56
 	{
Lines 50-56 Link Here
50
 		{
59
 		{
51
 			fmt = ((i=u) < 5) ? "%u %s\r\n" : "%u %u\r\n";
60
 			fmt = ((i=u) < 5) ? "%u %s\r\n" : "%u %u\r\n";
52
 		}
61
 		}
53
@@ -1118,6 +1125,7 @@
62
@@ -1118,6 +1127,7 @@
54
 		printf("ARTICLE   HEAD      BODY      STAT\r\n");
63
 		printf("ARTICLE   HEAD      BODY      STAT\r\n");
55
 		printf("GROUP     LIST      NEXT      LAST\r\n");
64
 		printf("GROUP     LIST      NEXT      LAST\r\n");
56
 		printf("LISTGROUP XHDR      XOVER     XPATH\r\n");
65
 		printf("LISTGROUP XHDR      XOVER     XPATH\r\n");
Lines 58-64 Link Here
58
 	}
67
 	}
59
 	if (canpost)
68
 	if (canpost)
60
 	{
69
 	{
61
@@ -1127,7 +1135,7 @@
70
@@ -1127,7 +1137,7 @@
62
 	{
71
 	{
63
 		printf("IHAVE     ");
72
 		printf("IHAVE     ");
64
 	}
73
 	}
Lines 67-73 Link Here
67
 }
76
 }
68
 
77
 
69
 static int match_pat(char *pat,char *str)
78
 static int match_pat(char *pat,char *str)
70
@@ -1533,3 +1541,177 @@
79
@@ -1533,3 +1543,177 @@
71
 
80
 
72
 	return str;
81
 	return str;
73
 }
82
 }
(-)s-news/files/patch-qnews.c (-9 / +14 lines)
Lines 1-5 Link Here
1
--- qnews.c	2002-05-18 20:21:42.000000000 +0100
1
--- qnews.c.orig	Sat May 18 22:21:42 2002
2
+++ qnews.c	2002-10-12 19:23:55.000000000 +0100
2
+++ qnews.c	Wed Aug  4 03:24:43 2004
3
@@ -2,6 +2,8 @@
3
@@ -2,6 +2,8 @@
4
  *  S-News version 0.1.9 - A Simple News Server
4
  *  S-News version 0.1.9 - A Simple News Server
5
  *  Copyright (C) 1998 Christopher John Purnell
5
  *  Copyright (C) 1998 Christopher John Purnell
Lines 9-15 Link Here
9
  *
9
  *
10
  *  This program is free software; you can redistribute it and/or modify
10
  *  This program is free software; you can redistribute it and/or modify
11
  *  it under the terms of the GNU General Public License as published by
11
  *  it under the terms of the GNU General Public License as published by
12
@@ -22,7 +24,13 @@
12
@@ -22,7 +24,18 @@
13
 #include "config.h"
13
 #include "config.h"
14
 #endif
14
 #endif
15
 
15
 
Lines 20-29 Link Here
20
+#endif
20
+#endif
21
+#include <fcntl.h>
21
+#include <fcntl.h>
22
+
22
+
23
+#ifdef HAVE_MALLOC_H
24
+#include <malloc.h>
25
+#else
26
+#include <stdlib.h>
27
+#endif
23
 #ifdef HAVE_UNISTD_H
28
 #ifdef HAVE_UNISTD_H
24
 #include <unistd.h>
29
 #include <unistd.h>
25
 #endif
30
 #endif
26
@@ -79,15 +87,37 @@
31
@@ -79,15 +92,37 @@
27
 			if (match_group(ptr->value,line,end))
32
 			if (match_group(ptr->value,line,end))
28
 			{
33
 			{
29
 				FILE *fp;
34
 				FILE *fp;
Lines 44-50 Link Here
44
-					return (1);
49
-					return (1);
45
+				    perror(file);
50
+				    perror(file);
46
+				    return (1);
51
+				    return (1);
47
+				}
52
 				}
48
+				if (flock(fd,LOCK_EX) == -1)
53
+				if (flock(fd,LOCK_EX) == -1)
49
+				{
54
+				{
50
+				    perror(file);
55
+				    perror(file);
Lines 54-60 Link Here
54
+				{
59
+				{
55
+				    perror(file);
60
+				    perror(file);
56
+				    return (1);
61
+				    return (1);
57
 				}
62
+				}
58
+			#else
63
+			#else
59
+                                if (!(fp = fopen(file,"a")))
64
+                                if (!(fp = fopen(file,"a")))
60
+                                {
65
+                                {
Lines 65-71 Link Here
65
 
70
 
66
 				if (fputs(line,fp) < 0 ||
71
 				if (fputs(line,fp) < 0 ||
67
 				    fputc('\n',fp) < 0)
72
 				    fputc('\n',fp) < 0)
68
@@ -103,6 +133,9 @@
73
@@ -103,6 +138,9 @@
69
 					return (1);
74
 					return (1);
70
 				}
75
 				}
71
 
76
 
Lines 75-81 Link Here
75
 				break;
80
 				break;
76
 			}
81
 			}
77
 		}
82
 		}
78
@@ -204,7 +237,7 @@
83
@@ -204,7 +242,7 @@
79
 				return (0);
84
 				return (0);
80
 			break;
85
 			break;
81
 		case '[':
86
 		case '[':
Lines 84-90 Link Here
84
 			{
89
 			{
85
 				unsigned char rev,mat=0,l=0,h,u=*str;
90
 				unsigned char rev,mat=0,l=0,h,u=*str;
86
 
91
 
87
@@ -229,6 +262,8 @@
92
@@ -229,6 +267,8 @@
88
 				if (mat==rev)
93
 				if (mat==rev)
89
 					return (0);
94
 					return (0);
90
 			}
95
 			}
(-)s-news/files/patch-rnews.c (-8 / +7 lines)
Lines 1-5 Link Here
1
--- rnews.c	2002-05-18 20:21:26.000000000 +0100
1
--- rnews.c.orig	Sat May 18 22:21:26 2002
2
+++ rnews.c	2002-09-08 12:50:41.000000000 +0100
2
+++ rnews.c	Wed Aug  4 03:43:51 2004
3
@@ -2,6 +2,8 @@
3
@@ -2,6 +2,8 @@
4
  *  S-News version 0.1.9 - A Simple News Server
4
  *  S-News version 0.1.9 - A Simple News Server
5
  *  Copyright (C) 1998 Christopher John Purnell
5
  *  Copyright (C) 1998 Christopher John Purnell
Lines 119-125 Link Here
119
 	if (!queue) return (0);
119
 	if (!queue) return (0);
120
 
120
 
121
 	execl(QNEWSPATH,QNEWSARG0,article,0);
121
 	execl(QNEWSPATH,QNEWSARG0,article,0);
122
@@ -301,11 +344,79 @@
122
@@ -301,11 +344,78 @@
123
 			{
123
 			{
124
 				approved=1;
124
 				approved=1;
125
 			}
125
 			}
Lines 191-205 Link Here
191
 
191
 
192
+	if (vsender[0])
192
+	if (vsender[0])
193
+	{
193
+	{
194
+		int ires=isolate_addr(vsender);
195
+		DEBLOG((stderr,"vsender address = %s (result %d)\n",
194
+		DEBLOG((stderr,"vsender address = %s (result %d)\n",
196
+					vsender,ires));
195
+					vsender,isolate_addr(vsender)));
197
+	}
196
+	}
198
+	
197
+	
199
 	return (*msgid?ret:0);
198
 	return (*msgid?ret:0);
200
 }
199
 }
201
 
200
 
202
@@ -597,7 +708,10 @@
201
@@ -597,7 +707,10 @@
203
 	int ret;
202
 	int ret;
204
 
203
 
205
 	if (!(dbf = open_history(CONFDIR"/history",GDBM_READER)))
204
 	if (!(dbf = open_history(CONFDIR"/history",GDBM_READER)))
Lines 210-216 Link Here
210
 
209
 
211
 	key.dsize = strlen(key.dptr = id) + 1;
210
 	key.dsize = strlen(key.dptr = id) + 1;
212
 
211
 
213
@@ -605,6 +719,7 @@
212
@@ -605,6 +718,7 @@
214
 
213
 
215
 	gdbm_close(dbf);
214
 	gdbm_close(dbf);
216
 
215
 
Lines 218-224 Link Here
218
 	return (ret);
217
 	return (ret);
219
 }
218
 }
220
 
219
 
221
@@ -642,3 +757,232 @@
220
@@ -642,3 +756,232 @@
222
 	}
221
 	}
223
 	return (dbf);
222
 	return (dbf);
224
 }
223
 }

Return to bug 69983