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.

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