OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

249 lines
6.9 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../qmail/hotfixes.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. --- qmail-1.03/Makefile Mon Jun 15 06:53:16 1998
  17. +++ netqmail-1.05/Makefile Wed Jan 21 12:58:12 2004
  18. @@ -263,7 +263,7 @@
  19. cdbmake_add.o
  20. cdbmake_add.o: \
  21. -compile cdbmake_add.c cdbmake.h uint32.h
  22. +compile cdbmake_add.c cdbmake.h alloc.h uint32.h
  23. ./compile cdbmake_add.c
  24. cdbmake_hash.o: \
  25. @@ -1892,7 +1892,7 @@
  26. spawn.o: \
  27. compile chkspawn spawn.c sig.h wait.h substdio.h byte.h str.h \
  28. -stralloc.h gen_alloc.h select.h exit.h coe.h open.h error.h \
  29. +stralloc.h gen_alloc.h select.h exit.h alloc.h coe.h open.h error.h \
  30. auto_qmail.h auto_uids.h auto_spawn.h
  31. ./chkspawn
  32. ./compile spawn.c
  33. --- qmail-1.03/cdbmake_add.c Mon Jun 15 06:53:16 1998
  34. +++ netqmail-1.05/cdbmake_add.c Wed Jan 21 12:58:12 2004
  35. @@ -1,3 +1,4 @@
  36. +#include "alloc.h"
  37. #include "cdbmake.h"
  38. void cdbmake_init(cdbm)
  39. --- qmail-1.03/qmail-local.c Mon Jun 15 06:53:16 1998
  40. +++ netqmail-1.05/qmail-local.c Wed Jan 21 12:58:12 2004
  41. @@ -645,7 +645,7 @@
  42. {
  43. cmds.s[j] = 0;
  44. k = j;
  45. - while ((k > i) && (cmds.s[k - 1] == ' ') || (cmds.s[k - 1] == '\t'))
  46. + while ((k > i) && ((cmds.s[k - 1] == ' ') || (cmds.s[k - 1] == '\t')))
  47. cmds.s[--k] = 0;
  48. switch(cmds.s[i])
  49. {
  50. --- qmail-1.03/qmail-pop3d.c Mon Jun 15 06:53:16 1998
  51. +++ netqmail-1.05/qmail-pop3d.c Wed Jan 21 12:58:12 2004
  52. @@ -66,14 +66,14 @@
  53. void die_scan() { err("unable to scan $HOME/Maildir"); die(); }
  54. void err_syntax() { err("syntax error"); }
  55. -void err_unimpl() { err("unimplemented"); }
  56. +void err_unimpl(arg) char *arg; { err("unimplemented"); }
  57. void err_deleted() { err("already deleted"); }
  58. void err_nozero() { err("messages are counted from 1"); }
  59. void err_toobig() { err("not that many messages"); }
  60. void err_nosuch() { err("unable to open that message"); }
  61. void err_nounlink() { err("unable to unlink all deleted messages"); }
  62. -void okay() { puts("+OK \r\n"); flush(); }
  63. +void okay(arg) char *arg; { puts("+OK \r\n"); flush(); }
  64. void printfn(fn) char *fn;
  65. {
  66. @@ -146,7 +146,7 @@
  67. }
  68. }
  69. -void pop3_stat()
  70. +void pop3_stat(arg) char *arg;
  71. {
  72. int i;
  73. unsigned long total;
  74. @@ -161,15 +161,15 @@
  75. flush();
  76. }
  77. -void pop3_rset()
  78. +void pop3_rset(arg) char *arg;
  79. {
  80. int i;
  81. for (i = 0;i < numm;++i) m[i].flagdeleted = 0;
  82. last = 0;
  83. - okay();
  84. + okay(0);
  85. }
  86. -void pop3_last()
  87. +void pop3_last(arg) char *arg;
  88. {
  89. puts("+OK ");
  90. put(strnum,fmt_uint(strnum,last));
  91. @@ -177,7 +177,7 @@
  92. flush();
  93. }
  94. -void pop3_quit()
  95. +void pop3_quit(arg) char *arg;
  96. {
  97. int i;
  98. for (i = 0;i < numm;++i)
  99. @@ -192,7 +192,7 @@
  100. if (!stralloc_0(&line)) die_nomem();
  101. rename(m[i].fn,line.s); /* if it fails, bummer */
  102. }
  103. - okay();
  104. + okay(0);
  105. die();
  106. }
  107. @@ -214,7 +214,7 @@
  108. if (i == -1) return;
  109. m[i].flagdeleted = 1;
  110. if (i + 1 > last) last = i + 1;
  111. - okay();
  112. + okay(0);
  113. }
  114. void list(i,flaguidl)
  115. @@ -238,7 +238,7 @@
  116. list(i,flaguidl);
  117. }
  118. else {
  119. - okay();
  120. + okay(0);
  121. for (i = 0;i < numm;++i)
  122. if (!m[i].flagdeleted)
  123. list(i,flaguidl);
  124. @@ -267,7 +267,7 @@
  125. fd = open_read(m[i].fn);
  126. if (fd == -1) { err_nosuch(); return; }
  127. - okay();
  128. + okay(0);
  129. substdio_fdbuf(&ssmsg,read,fd,ssmsgbuf,sizeof(ssmsgbuf));
  130. blast(&ssmsg,limit);
  131. close(fd);
  132. @@ -299,7 +299,7 @@
  133. getlist();
  134. - okay();
  135. + okay(0);
  136. commands(&ssin,pop3commands);
  137. die();
  138. }
  139. --- qmail-1.03/qmail-popup.c Mon Jun 15 06:53:16 1998
  140. +++ netqmail-1.05/qmail-popup.c Wed Jan 21 12:58:12 2004
  141. @@ -64,10 +64,10 @@
  142. void err_syntax() { err("syntax error"); }
  143. void err_wantuser() { err("USER first"); }
  144. -void err_authoriz() { err("authorization first"); }
  145. +void err_authoriz(arg) char *arg; { err("authorization first"); }
  146. -void okay() { puts("+OK \r\n"); flush(); }
  147. -void pop3_quit() { okay(); die(); }
  148. +void okay(arg) char *arg; { puts("+OK \r\n"); flush(); }
  149. +void pop3_quit(arg) char *arg; { okay(0); die(); }
  150. char unique[FMT_ULONG + FMT_ULONG + 3];
  151. @@ -136,7 +136,7 @@
  152. void pop3_user(arg) char *arg;
  153. {
  154. if (!*arg) { err_syntax(); return; }
  155. - okay();
  156. + okay(0);
  157. seenuser = 1;
  158. if (!stralloc_copys(&username,arg)) die_nomem();
  159. if (!stralloc_0(&username)) die_nomem();
  160. --- qmail-1.03/qmail-smtpd.c Mon Jun 15 06:53:16 1998
  161. +++ netqmail-1.05/qmail-smtpd.c Wed Jan 21 12:58:12 2004
  162. @@ -51,12 +51,12 @@
  163. void err_bmf() { out("553 sorry, your envelope sender is in my badmailfrom list (#5.7.1)\r\n"); }
  164. void err_nogateway() { out("553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)\r\n"); }
  165. -void err_unimpl() { out("502 unimplemented (#5.5.1)\r\n"); }
  166. +void err_unimpl(arg) char *arg; { out("502 unimplemented (#5.5.1)\r\n"); }
  167. void err_syntax() { out("555 syntax error (#5.5.4)\r\n"); }
  168. void err_wantmail() { out("503 MAIL first (#5.5.1)\r\n"); }
  169. void err_wantrcpt() { out("503 RCPT first (#5.5.1)\r\n"); }
  170. -void err_noop() { out("250 ok\r\n"); }
  171. -void err_vrfy() { out("252 send some mail, i'll try my best\r\n"); }
  172. +void err_noop(arg) char *arg; { out("250 ok\r\n"); }
  173. +void err_vrfy(arg) char *arg; { out("252 send some mail, i'll try my best\r\n"); }
  174. void err_qqt() { out("451 qqt failure (#4.3.0)\r\n"); }
  175. @@ -67,11 +67,11 @@
  176. substdio_puts(&ssout,code);
  177. substdio_put(&ssout,greeting.s,greeting.len);
  178. }
  179. -void smtp_help()
  180. +void smtp_help(arg) char *arg;
  181. {
  182. out("214 qmail home page: http://pobox.com/~djb/qmail.html\r\n");
  183. }
  184. -void smtp_quit()
  185. +void smtp_quit(arg) char *arg;
  186. {
  187. smtp_greet("221 "); out("\r\n"); flush(); _exit(0);
  188. }
  189. @@ -232,7 +232,7 @@
  190. smtp_greet("250-"); out("\r\n250-PIPELINING\r\n250 8BITMIME\r\n");
  191. seenmail = 0; dohelo(arg);
  192. }
  193. -void smtp_rset()
  194. +void smtp_rset(arg) char *arg;
  195. {
  196. seenmail = 0;
  197. out("250 flushed\r\n");
  198. @@ -316,8 +316,8 @@
  199. if (flagmaybex) if (pos == 7) ++*hops;
  200. if (pos < 2) if (ch != "\r\n"[pos]) flagmaybey = 0;
  201. if (flagmaybey) if (pos == 1) flaginheader = 0;
  202. + ++pos;
  203. }
  204. - ++pos;
  205. if (ch == '\n') { pos = 0; flagmaybex = flagmaybey = flagmaybez = 1; }
  206. }
  207. switch(state) {
  208. @@ -365,7 +365,7 @@
  209. out("\r\n");
  210. }
  211. -void smtp_data() {
  212. +void smtp_data(arg) char *arg; {
  213. int hops;
  214. unsigned long qp;
  215. char *qqx;
  216. --- qmail-1.03/spawn.c Mon Jun 15 06:53:16 1998
  217. +++ netqmail-1.05/spawn.c Wed Jan 21 12:58:12 2004
  218. @@ -5,6 +5,7 @@
  219. #include "substdio.h"
  220. #include "byte.h"
  221. #include "str.h"
  222. +#include "alloc.h"
  223. #include "stralloc.h"
  224. #include "select.h"
  225. #include "exit.h"