55 +} |
45 +} |
56 + |
46 + |
57 +# vim: ft=sh |
47 +# vim: ft=sh |
58 + |
48 + |
59 +# optimization OK |
49 +# optimization OK |
|
50 diff --git a/source/custom/vmailmgr/compile-0.96.9.patch b/source/custom/vmailmgr/compile-0.96.9.patch |
|
51 new file mode 100644 |
|
52 index 0000000..35ffcd5 |
|
53 --- /dev/null |
|
54 +++ b/source/custom/vmailmgr/compile-0.96.9.patch |
|
55 @@ -0,0 +1,344 @@ |
|
56 +string.h fix |
|
57 + |
|
58 +diff -r 6f7a81934006 authenticate/Makefile.in |
|
59 +--- a/authenticate/Makefile.in Wed Jan 16 22:39:43 2008 +0100 |
|
60 ++++ b/authenticate/Makefile.in Sun Jan 20 01:57:01 2008 +0100 |
|
61 +@@ -93,7 +93,7 @@ CLEANFILES = $(man_MANS) $(noinst_HTMLS) |
|
62 + |
|
63 + EXTRA_DIST = $(man_MANS) $(noinst_HTMLS) $(noinst_PODS) |
|
64 + |
|
65 +-CXXLINK = $(CC) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
66 ++CXXLINK = $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
67 + INCLUDES = $(CIINCLUDES) -I../lib |
|
68 + |
|
69 + checkvpw_SOURCES = checkvpw.cc authvlib.cc authvlib.h |
|
70 +diff -r 6f7a81934006 authenticate/authvmailmgr.cc |
|
71 +--- a/authenticate/authvmailmgr.cc Wed Jan 16 22:39:43 2008 +0100 |
|
72 ++++ b/authenticate/authvmailmgr.cc Sun Jan 20 01:57:01 2008 +0100 |
|
73 +@@ -15,6 +15,8 @@ |
|
74 + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
75 + |
|
76 + #include <config.h> |
|
77 ++#include <stdlib.h> |
|
78 ++#include <string.h> |
|
79 + #include "misc/exec.h" |
|
80 + #include "authvlib.h" |
|
81 + // Courier-IMAP includes |
|
82 +diff -r 6f7a81934006 authenticate/checkvpw.cc |
|
83 +--- a/authenticate/checkvpw.cc Wed Jan 16 22:39:43 2008 +0100 |
|
84 ++++ b/authenticate/checkvpw.cc Sun Jan 20 01:57:01 2008 +0100 |
|
85 +@@ -16,6 +16,7 @@ |
|
86 + |
|
87 + #include <config.h> |
|
88 + #include <errno.h> |
|
89 ++#include <stdlib.h> |
|
90 + #include <string.h> |
|
91 + #include <sys/types.h> |
|
92 + #include "config/configrc.h" |
|
93 +diff -r 6f7a81934006 authenticate/vauthenticate.cc |
|
94 +--- a/authenticate/vauthenticate.cc Wed Jan 16 22:39:43 2008 +0100 |
|
95 ++++ b/authenticate/vauthenticate.cc Sun Jan 20 01:57:01 2008 +0100 |
|
96 +@@ -16,6 +16,7 @@ |
|
97 + |
|
98 + #include <config.h> |
|
99 + #include <errno.h> |
|
100 ++#include <stdlib.h> |
|
101 + #include <unistd.h> |
|
102 + #include "authvlib.h" |
|
103 + #include "fdbuf/fdbuf.h" |
|
104 +diff -r 6f7a81934006 cgi/Makefile.in |
|
105 +--- a/cgi/Makefile.in Wed Jan 16 22:39:43 2008 +0100 |
|
106 ++++ b/cgi/Makefile.in Sun Jan 20 01:57:01 2008 +0100 |
|
107 +@@ -86,7 +86,7 @@ cgi_PROGRAMS = vpasswd vadduser vdeluser |
|
108 + cgi_PROGRAMS = vpasswd vadduser vdeluser vaddalias vchattr vchforwards listvdomain |
|
109 + |
|
110 + |
|
111 +-CXXLINK = $(CC) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
112 ++CXXLINK = $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
113 + INCLUDES = -I../lib |
|
114 + |
|
115 + vpasswd_SOURCES = vpasswd.cc |
|
116 +diff -r 6f7a81934006 commands/Makefile.in |
|
117 +--- a/commands/Makefile.in Wed Jan 16 22:39:43 2008 +0100 |
|
118 ++++ b/commands/Makefile.in Sun Jan 20 01:57:01 2008 +0100 |
|
119 +@@ -99,7 +99,7 @@ EXTRA_PROGRAMS = vpasswd2cdb vrehash |
|
120 + EXTRA_PROGRAMS = vpasswd2cdb vrehash |
|
121 + EXTRA_SCRIPTS = allvpasswd2cdb |
|
122 + |
|
123 +-CXXLINK = $(CC) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
124 ++CXXLINK = $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
125 + INCLUDES = -I../lib -DBINDIR=\"@bindir@\" |
|
126 + |
|
127 + listvdomain_SOURCES = listvdomain.cc vcommand.cc |
|
128 +diff -r 6f7a81934006 commands/vcheckquota.cc |
|
129 +--- a/commands/vcheckquota.cc Wed Jan 16 22:39:43 2008 +0100 |
|
130 ++++ b/commands/vcheckquota.cc Sun Jan 20 01:57:01 2008 +0100 |
|
131 +@@ -31,10 +31,10 @@ |
|
132 + |
|
133 + const char* cli_program = "vcheckquota"; |
|
134 + const char* cli_help_prefix = "vmailmgr quota enforcement program\n"; |
|
135 +-const char* cli_help_suffix = " |
|
136 +-Warning: the soft-message is linked into the users maildir once for each |
|
137 +-message that is received while the account is over its soft quota. This may |
|
138 +-result in multiple warning messages.\n"; |
|
139 ++const char* cli_help_suffix = |
|
140 ++"Warning: the soft-message is linked into the users maildir once for each" |
|
141 ++"message that is received while the account is over its soft quota. This may" |
|
142 ++"result in multiple warning messages.\n"; |
|
143 + const char* cli_args_usage = ""; |
|
144 + const int cli_args_min = 0; |
|
145 + const int cli_args_max = 0; |
|
146 +diff -r 6f7a81934006 commands/vchforwards.cc |
|
147 +--- a/commands/vchforwards.cc Wed Jan 16 22:39:43 2008 +0100 |
|
148 ++++ b/commands/vchforwards.cc Sun Jan 20 01:57:01 2008 +0100 |
|
149 +@@ -25,8 +25,7 @@ const char* cli_help_prefix = |
|
150 + const char* cli_help_prefix = |
|
151 + "Change virtual user forwarding addresses.\n"; |
|
152 + const char* cli_help_suffix = |
|
153 +-"If no forwarding addresses are given, forwarding is disabled. |
|
154 +-"; |
|
155 ++"If no forwarding addresses are given, forwarding is disabled."; |
|
156 + const char* cli_args_usage = "USERNAME [DESTINATION1 ...]"; |
|
157 + const int cli_args_min = 1; |
|
158 + const int cli_args_max = -1; |
|
159 +diff -r 6f7a81934006 commands/vpasswd2cdb.cc |
|
160 +--- a/commands/vpasswd2cdb.cc Wed Jan 16 22:39:43 2008 +0100 |
|
161 ++++ b/commands/vpasswd2cdb.cc Sun Jan 20 01:57:01 2008 +0100 |
|
162 +@@ -27,9 +27,9 @@ const char* cli_program = "vpasswd2cdb"; |
|
163 + const char* cli_program = "vpasswd2cdb"; |
|
164 + const char* cli_help_prefix = "Converts text password tables to CDB format\n"; |
|
165 + const char* cli_help_suffix = |
|
166 +-"Reads in a standard virtual password table in the current directory, |
|
167 +-and writes it out to a CDB table. The file names for the text and CDB |
|
168 +-tables are determined from the configuration file."; |
|
169 ++"Reads in a standard virtual password table in the current directory," |
|
170 ++"and writes it out to a CDB table. The file names for the text and CDB" |
|
171 ++"tables are determined from the configuration file."; |
|
172 + const char* cli_args_usage = ""; |
|
173 + const int cli_args_min = 0; |
|
174 + const int cli_args_max = 0; |
|
175 +diff -r 6f7a81934006 commands/vpasswd2db.cc |
|
176 +--- a/commands/vpasswd2db.cc Wed Jan 16 22:39:43 2008 +0100 |
|
177 ++++ b/commands/vpasswd2db.cc Sun Jan 20 01:57:01 2008 +0100 |
|
178 +@@ -26,9 +26,9 @@ const char* cli_program = "vpasswd2db"; |
|
179 + const char* cli_program = "vpasswd2db"; |
|
180 + const char* cli_help_prefix = "Converts text password tables to current vpwtable DB format\n"; |
|
181 + const char* cli_help_suffix = |
|
182 +-"Reads in a standard virtual password table in the current directory, |
|
183 +-and writes it out to a table. The file names for the input and output |
|
184 +-tables are determined from the configuration file."; |
|
185 ++"Reads in a standard virtual password table in the current directory," |
|
186 ++"and writes it out to a table. The file names for the input and output" |
|
187 ++"tables are determined from the configuration file."; |
|
188 + const char* cli_args_usage = ""; |
|
189 + const int cli_args_min = 0; |
|
190 + const int cli_args_max = 0; |
|
191 +diff -r 6f7a81934006 daemon/Makefile.in |
|
192 +--- a/daemon/Makefile.in Wed Jan 16 22:39:43 2008 +0100 |
|
193 ++++ b/daemon/Makefile.in Sun Jan 20 01:57:01 2008 +0100 |
|
194 +@@ -91,7 +91,7 @@ CLEANFILES = $(man_MANS) $(noinst_HTMLS) |
|
195 + |
|
196 + EXTRA_DIST = $(man_MANS) $(noinst_HTMLS) $(noinst_PODS) |
|
197 + |
|
198 +-CXXLINK = $(CC) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
199 ++CXXLINK = $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ |
|
200 + INCLUDES = -I../lib |
|
201 + |
|
202 + vmailmgrd_SOURCES = daemon.h adduser2.cc autoresponse.cc chattr.cc check.cc command.h command.cc deluser.cc dispatch.cc listdomain.cc log.h log.cc lookup.cc main.cc state.h state.cc |
|
203 +diff -r 6f7a81934006 lib/courier-authlib/changeuidgid.c |
|
204 +--- a/lib/courier-authlib/changeuidgid.c Wed Jan 16 22:39:43 2008 +0100 |
|
205 ++++ b/lib/courier-authlib/changeuidgid.c Sun Jan 20 01:57:01 2008 +0100 |
|
206 +@@ -12,6 +12,7 @@ |
|
207 + #endif |
|
208 + #include <stdio.h> |
|
209 + #include <stdlib.h> |
|
210 ++#include <string.h> |
|
211 + #include <grp.h> |
|
212 + #include <pwd.h> |
|
213 + #include <errno.h> |
|
214 +diff -r 6f7a81934006 lib/misc/crc32.h |
|
215 +--- a/lib/misc/crc32.h Wed Jan 16 22:39:43 2008 +0100 |
|
216 ++++ b/lib/misc/crc32.h Sun Jan 20 01:57:01 2008 +0100 |
|
217 +@@ -45,4 +45,4 @@ public: |
|
218 + (unsigned char)(octet) ] ^ ( ((crc32)>>8) & 0x00FFFFFFL ) ) |
|
219 + #endif |
|
220 + |
|
221 +-#endif CRC32INIT |
|
222 ++#endif /* CRC32INIT */ |
|
223 +diff -r 6f7a81934006 lib/misc/exec.cc |
|
224 +--- a/lib/misc/exec.cc Wed Jan 16 22:39:43 2008 +0100 |
|
225 ++++ b/lib/misc/exec.cc Sun Jan 20 01:57:01 2008 +0100 |
|
226 +@@ -17,10 +17,12 @@ |
|
227 + #include <config.h> |
|
228 + #include <errno.h> |
|
229 + #include <stdlib.h> |
|
230 ++#include <string.h> |
|
231 + #include <sys/stat.h> |
|
232 + #include <sys/types.h> |
|
233 + #include <sys/wait.h> |
|
234 + #include <unistd.h> |
|
235 ++#include <string.h> |
|
236 + #include "exec.h" |
|
237 + #include "config/configrc.h" |
|
238 + |
|
239 +diff -r 6f7a81934006 lib/misc/keystrlist.cc |
|
240 +--- a/lib/misc/keystrlist.cc Wed Jan 16 22:39:43 2008 +0100 |
|
241 ++++ b/lib/misc/keystrlist.cc Sun Jan 20 01:57:01 2008 +0100 |
|
242 +@@ -15,6 +15,7 @@ |
|
243 + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
244 + |
|
245 + #include <config.h> |
|
246 ++#include <string.h> |
|
247 + #include "strlist.h" |
|
248 + |
|
249 + void keystrlist::set(const mystring& var, const mystring& val) |
|
250 +diff -r 6f7a81934006 lib/misc/md5-crypt.c |
|
251 +--- a/lib/misc/md5-crypt.c Wed Jan 16 22:39:43 2008 +0100 |
|
252 ++++ b/lib/misc/md5-crypt.c Sun Jan 20 01:57:01 2008 +0100 |
|
253 +@@ -32,7 +32,7 @@ static const char md5_salt_prefix[] = "$ |
|
254 + static const char md5_salt_prefix[] = "$1$"; |
|
255 + |
|
256 + /* Table with characters for base64 transformation. */ |
|
257 +-static const char b64t[64] = |
|
258 ++static const char b64t[] = |
|
259 + "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; |
|
260 + |
|
261 + |
|
262 +@@ -53,11 +53,7 @@ extern char *md5_crypt __P ((const char |
|
263 + /* This entry point is equivalent to the `crypt' function in Unix |
|
264 + libcs. */ |
|
265 + char * |
|
266 +-md5_crypt_r (key, salt, buffer, buflen) |
|
267 +- const char *key; |
|
268 +- const char *salt; |
|
269 +- char *buffer; |
|
270 +- int buflen; |
|
271 ++md5_crypt_r (const char *key, const char *salt, char *buffer, int buflen) |
|
272 + { |
|
273 + unsigned char alt_result[16]; |
|
274 + struct md5_ctx ctx; |
|
275 +@@ -213,9 +209,7 @@ md5_crypt_r (key, salt, buffer, buflen) |
|
276 + |
|
277 + |
|
278 + char * |
|
279 +-md5_crypt (key, salt) |
|
280 +- const char *key; |
|
281 +- const char *salt; |
|
282 ++md5_crypt (const char *key, const char *salt) |
|
283 + { |
|
284 + /* We don't want to have an arbitrary limit in the size of the |
|
285 + password. We can compute the size of the result in advance and |
|
286 +@@ -227,7 +221,7 @@ md5_crypt (key, salt) |
|
287 + if (buflen < needed) |
|
288 + { |
|
289 + buflen = needed; |
|
290 +- if ((buffer = realloc (buffer, buflen)) == NULL) |
|
291 ++ if ((buffer = (char *)realloc (buffer, buflen)) == NULL) |
|
292 + return NULL; |
|
293 + } |
|
294 + |
|
295 +diff -r 6f7a81934006 lib/misc/md5.c |
|
296 +--- a/lib/misc/md5.c Wed Jan 16 22:39:43 2008 +0100 |
|
297 ++++ b/lib/misc/md5.c Sun Jan 20 01:57:01 2008 +0100 |
|
298 +@@ -69,8 +69,7 @@ static const unsigned char fillbuf[64] = |
|
299 + /* Initialize structure containing state of computation. |
|
300 + (RFC 1321, 3.3: Step 3) */ |
|
301 + void |
|
302 +-md5_init_ctx (ctx) |
|
303 +- struct md5_ctx *ctx; |
|
304 ++md5_init_ctx (struct md5_ctx *ctx) |
|
305 + { |
|
306 + ctx->A = 0x67452301; |
|
307 + ctx->B = 0xefcdab89; |
|
308 +@@ -87,9 +86,7 @@ md5_init_ctx (ctx) |
|
309 + IMPORTANT: On some systems it is required that RESBUF is correctly |
|
310 + aligned for a 32 bits value. */ |
|
311 + void * |
|
312 +-md5_read_ctx (ctx, resbuf) |
|
313 +- const struct md5_ctx *ctx; |
|
314 +- void *resbuf; |
|
315 ++md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) |
|
316 + { |
|
317 + ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A); |
|
318 + ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B); |
|
319 +@@ -105,9 +102,7 @@ md5_read_ctx (ctx, resbuf) |
|
320 + IMPORTANT: On some systems it is required that RESBUF is correctly |
|
321 + aligned for a 32 bits value. */ |
|
322 + void * |
|
323 +-md5_finish_ctx (ctx, resbuf) |
|
324 +- struct md5_ctx *ctx; |
|
325 +- void *resbuf; |
|
326 ++md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) |
|
327 + { |
|
328 + /* Take yet unprocessed bytes into account. */ |
|
329 + md5_uint32 bytes = ctx->buflen; |
|
330 +@@ -136,9 +131,7 @@ md5_finish_ctx (ctx, resbuf) |
|
331 + resulting message digest number will be written into the 16 bytes |
|
332 + beginning at RESBLOCK. */ |
|
333 + int |
|
334 +-md5_stream (stream, resblock) |
|
335 +- FILE *stream; |
|
336 +- void *resblock; |
|
337 ++md5_stream (FILE *stream, void *resblock) |
|
338 + { |
|
339 + /* Important: BLOCKSIZE must be a multiple of 64. */ |
|
340 + #define BLOCKSIZE 4096 |
|
341 +@@ -193,10 +186,7 @@ md5_stream (stream, resblock) |
|
342 + output yields to the wanted ASCII representation of the message |
|
343 + digest. */ |
|
344 + void * |
|
345 +-md5_buffer (buffer, len, resblock) |
|
346 +- const char *buffer; |
|
347 +- size_t len; |
|
348 +- void *resblock; |
|
349 ++md5_buffer (const char *buffer, size_t len, void *resblock) |
|
350 + { |
|
351 + struct md5_ctx ctx; |
|
352 + |
|
353 +@@ -212,10 +202,7 @@ md5_buffer (buffer, len, resblock) |
|
354 + |
|
355 + |
|
356 + void |
|
357 +-md5_process_bytes (buffer, len, ctx) |
|
358 +- const void *buffer; |
|
359 +- size_t len; |
|
360 +- struct md5_ctx *ctx; |
|
361 ++md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) |
|
362 + { |
|
363 + /* When we already have some bits in our internal buffer concatenate |
|
364 + both inputs first. */ |
|
365 +@@ -270,13 +257,10 @@ md5_process_bytes (buffer, len, ctx) |
|
366 + It is assumed that LEN % 64 == 0. */ |
|
367 + |
|
368 + void |
|
369 +-md5_process_block (buffer, len, ctx) |
|
370 +- const void *buffer; |
|
371 +- size_t len; |
|
372 +- struct md5_ctx *ctx; |
|
373 ++md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) |
|
374 + { |
|
375 + md5_uint32 correct_words[16]; |
|
376 +- const md5_uint32 *words = buffer; |
|
377 ++ const md5_uint32 *words = (const md5_uint32 *)buffer; |
|
378 + size_t nwords = len / sizeof (md5_uint32); |
|
379 + const md5_uint32 *endp = words + nwords; |
|
380 + md5_uint32 A = ctx->A; |
|
381 +diff -r 6f7a81934006 lib/misc/strlist.cc |
|
382 +--- a/lib/misc/strlist.cc Wed Jan 16 22:39:43 2008 +0100 |
|
383 ++++ b/lib/misc/strlist.cc Sun Jan 20 01:57:01 2008 +0100 |
|
384 +@@ -15,6 +15,7 @@ |
|
385 + // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
386 + |
|
387 + #include <config.h> |
|
388 ++#include <string.h> |
|
389 + #include "strlist.h" |
|
390 + |
|
391 + static const char* compare(const char* ptr, const char* end, |
|
392 +diff -r 6f7a81934006 lib/mystring/append.cc |
|
393 +--- a/lib/mystring/append.cc Wed Jan 16 22:39:43 2008 +0100 |
|
394 ++++ b/lib/mystring/append.cc Sun Jan 20 01:57:01 2008 +0100 |
|
395 +@@ -1,3 +1,4 @@ |
|
396 ++#include <string.h> |
|
397 + #include "mystring.h" |
|
398 + #include "trace.h" |
|
399 + |
60 diff --git a/source/custom/vmailmgr/vmailmgr.install b/source/custom/vmailmgr/vmailmgr.install |
400 diff --git a/source/custom/vmailmgr/vmailmgr.install b/source/custom/vmailmgr/vmailmgr.install |
61 new file mode 100644 |
401 new file mode 100644 |
62 index 0000000..9b9b1e5 |
402 index 0000000..9b9b1e5 |
63 --- /dev/null |
403 --- /dev/null |
64 +++ b/source/custom/vmailmgr/vmailmgr.install |
404 +++ b/source/custom/vmailmgr/vmailmgr.install |