Andrew Hutchings wrote:
On Fri, 2005-10-14 at 14:43 -0500, Bob Hope wrote:
A patch would be nice as I'm sure MySQL won't give two sh**s about this. If you've got the time I'd appreciate it.
Thanks,
Savage
Hi Savage,
Here you go, I haven't tested it but it should be fine. I think Fedora do something similar at MySQL's build as there is no library conflict when building with 4.1 in FC4, haven't really investigated this though.
Regards Andrew -- Andrew Hutchings (A-Wing) - Linux Guru Netserve Consultants - http://www.domaincity.co.uk/ Linux CDs and DVDs - http://www.linuxiso.co.uk/ Random quote 119: "The best system is the one with the fewest operating systems." - BILL GATES
------------------------------------------------------------------------
diff -ur dovecot-1.0.alpha3.old/src/auth/password-scheme.c dovecot-1.0.alpha3/src/auth/password-scheme.c --- dovecot-1.0.alpha3.old/src/auth/password-scheme.c 2005-10-14 20:52:52.000000000 +0100 +++ dovecot-1.0.alpha3/src/auth/password-scheme.c 2005-10-14 21:00:38.000000000 +0100 @@ -193,7 +193,7 @@ sha1_init(&ctx); sha1_loop(&ctx, plaintext, strlen(plaintext)); sha1_loop(&ctx, salt, 4); - sha1_result(&ctx, ssha_digest); + sha1_res(&ctx, ssha_digest);
str = t_str_new(MAX_BASE64_ENCODED_SIZE(sizeof(ssha_digest))+1); base64_encode(ssha_digest, sizeof(ssha_digest), str); @@ -228,7 +228,7 @@ sha1_init(&ctx); sha1_loop(&ctx, plaintext, strlen(plaintext)); sha1_loop(&ctx, &data[SHA1_RESULTLEN], size-SHA1_RESULTLEN); - sha1_result(&ctx, sha1_digest); + sha1_res(&ctx, sha1_digest); return memcmp(sha1_digest, data, SHA1_RESULTLEN) == 0; }
diff -ur dovecot-1.0.alpha3.old/src/lib/sha1.c dovecot-1.0.alpha3/src/lib/sha1.c --- dovecot-1.0.alpha3.old/src/lib/sha1.c 2005-10-14 20:52:52.000000000 +0100 +++ dovecot-1.0.alpha3/src/lib/sha1.c 2005-10-14 20:59:57.000000000 +0100 @@ -229,7 +229,7 @@ }
void -sha1_result(struct sha1_ctxt *ctxt, void *digest0) +sha1_res(struct sha1_ctxt *ctxt, void *digest0) { uint8_t *digest;
@@ -259,5 +259,5 @@
sha1_init(&ctx); sha1_loop(&ctx, data, size); - sha1_result(&ctx, result); + sha1_res(&ctx, result); } diff -ur dovecot-1.0.alpha3.old/src/lib/sha1.h dovecot-1.0.alpha3/src/lib/sha1.h --- dovecot-1.0.alpha3.old/src/lib/sha1.h 2005-10-14 20:52:52.000000000 +0100 +++ dovecot-1.0.alpha3/src/lib/sha1.h 2005-10-14 20:59:33.000000000 +0100 @@ -57,14 +57,14 @@ extern void sha1_init(struct sha1_ctxt *); extern void sha1_pad(struct sha1_ctxt *); extern void sha1_loop(struct sha1_ctxt *, const void *, size_t); -extern void sha1_result(struct sha1_ctxt *, void *); +extern void sha1_res(struct sha1_ctxt *, void *);
/* compatibilty with other SHA1 source codes */ typedef struct sha1_ctxt SHA1_CTX; #define SHA1Init(x) sha1_init((x)) #define SHA1Update(x, y, z) sha1_loop((x), (y), (z)) -#define SHA1Final(x, y) sha1_result((y), (x)) +#define SHA1Final(x, y) sha1_res((y), (x))
#define SHA1_RESULTLEN (160/8)
Thanks alot Andrew. Everything seems to have compiled fine. I won't be able to install and test until at least tonight as my users are accessing mail until then. Keep up the great work on dovecot; I think it's a great program. Best regards, Savage