1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2//EN">
4 <TITLE> [IRCServices] ircservices-
5.0.57 convert-db utility crashes
5 when converting from anope db.
7 <LINK REL=
"Index" HREF=
"index.html" >
8 <LINK REL=
"made" HREF=
"mailto:ircservices%40ircservices.esper.net?Subject=%5BIRCServices%5D%20ircservices-5.0.57%20convert-db%20utility%20crashes%20%0A%09when%20converting%20from%20anope%20db.&In-Reply-To=4498c676.54766%40msgid.achurch.org">
9 <META NAME=
"robots" CONTENT=
"index,nofollow">
10 <META http-equiv=
"Content-Type" content=
"text/html; charset=us-ascii">
11 <LINK REL=
"Previous" HREF=
"005154.html">
12 <LINK REL=
"Next" HREF=
"005156.html">
14 <BODY BGCOLOR=
"#ffffff">
15 <H1>[IRCServices] ircservices-
5.0.57 convert-db utility crashes
16 when converting from anope db.
</H1>
18 <A HREF=
"mailto:ircservices%40ircservices.esper.net?Subject=%5BIRCServices%5D%20ircservices-5.0.57%20convert-db%20utility%20crashes%20%0A%09when%20converting%20from%20anope%20db.&In-Reply-To=4498c676.54766%40msgid.achurch.org"
19 TITLE=
"[IRCServices] ircservices-5.0.57 convert-db utility crashes
20 when converting from anope db.">gabriel.baez at solid-ircd.com
22 <I>Tue Jun
20 23:
02:
02 PDT
2006</I>
24 <LI>Previous message:
<A HREF=
"005154.html">[IRCServices] ircservices-
5.0.57 convert-db utility crashes when
25 converting from anope db.
27 <LI>Next message:
<A HREF=
"005156.html">[IRCServices] Services
5.0.58 released
29 <LI> <B>Messages sorted by:
</B>
30 <a href=
"date.html#5155">[ date ]
</a>
31 <a href=
"thread.html#5155">[ thread ]
</a>
32 <a href=
"subject.html#5155">[ subject ]
</a>
33 <a href=
"author.html#5155">[ author ]
</a>
38 <PRE>This worked, thank you.
41 ><i> Okay, I took a look and (with a pointer from Craig McLure) discovered
42 </I>><i> that Anope still has the bug present in old versions of IRC Services (and
43 </I>><i> fixed in Services
4.5) which causes passwords to be encrypted incorrectly.
44 </I>><i> Try applying the patch below to your copy of Services; if it works, I'll
45 </I>><i> release a new version of Services with the patch included.
47 </I>><i> --Andrew Church
48 </I>><i> <A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices">achurch at achurch.org
</A>
49 </I>><i> <A HREF=
"http://achurch.org/">http://achurch.org/
</A>
51 </I>><i> ---------------------------------------------------------------------------
53 </I>><i> Index: defs.h
54 </I>><i> ===================================================================
55 </I>><i> RCS file: /var/local/cvsroot/ircservices/defs.h,v
56 </I>><i> retrieving revision
2.29.2.3
57 </I>><i> diff -u -r2.29
.2.3 defs.h
58 </I>><i> --- defs.h
8 Jan
2006 16:
48:
11 -
0000 2.29.2.3
59 </I>><i> +++ defs.h
21 Jun
2006 04:
05:
47 -
0000
60 </I>><i> @@ -
41,
6 +
41,
14 @@
61 </I>><i> * only). These commands are undocumented;
"use the source, Luke!
" */
62 </I>><i> #define DEBUG_COMMANDS
65 </I>><i> +/******** Other configuration ********/
67 </I>><i> +/* Define this to enable compatibility mode for encrypted passwords as
68 </I>><i> + * used in the Epona and Anope (through at least version
1.7.14)
70 </I>><i> + * Note that this may have a detrimental effect on password security. */
71 </I>><i> +#define ANOPE_MD5_HACK
73 </I>><i> /*************************************************************************/
74 </I>><i> /******************* END OF USER-CONFIGURABLE SECTION
75 </I>><i> ********************/
76 </I>><i> /*************************************************************************/
77 </I>><i> Index: modules/encryption/md5.c
78 </I>><i> ===================================================================
79 </I>><i> RCS file: /var/local/cvsroot/ircservices/modules/encryption/md5.c,v
80 </I>><i> retrieving revision
2.11.2.4
81 </I>><i> diff -u -r2.11
.2.4 md5.c
82 </I>><i> --- modules/encryption/md5.c
8 Jan
2006 16:
48:
13 -
0000 2.11.2.4
83 </I>><i> +++ modules/encryption/md5.c
21 Jun
2006 04:
05:
47 -
0000
84 </I>><i> @@ -
16,
6 +
16,
10 @@
86 </I>><i> static Module *module;
88 </I>><i> +#ifdef ANOPE_MD5_HACK
89 </I>><i> +# define XTOI(c) ((c)
>9 ? (c)-'A'+
10 : (c)-'
0')
92 </I>><i> /*************************************************************************/
94 </I>><i> /* Copyright (C)
1991-
2, RSA Data Security, Inc. Created
1991. All
95 </I>><i> @@ -
335,
8 +
339,
6 @@
97 </I>><i> /* Our own high-level routines. See encrypt.h for documentation. */
99 </I>><i> -#define XTOI(c) ((c)
>9 ? (c)-'A'+
10 : (c)-'
0')
101 </I>><i> static int md5_encrypt(const char *src, int len, char *dest, int size)
103 </I>><i> MD5_CTX context;
104 </I>><i> @@ -
376,
11 +
378,
21 @@
105 </I>><i> static int md5_check_password(const char *plaintext, const char
106 </I>><i> *password)
108 </I>><i> char buf[BUFSIZE];
109 </I>><i> +#ifdef ANOPE_MD5_HACK
110 </I>><i> + char tmpbuf[
8];
114 </I>><i> if (encrypt(plaintext, strlen(plaintext), buf, sizeof(buf))
< 0)
115 </I>><i> return -
1;
116 </I>><i> if (memcmp(buf, password,
16) ==
0)
117 </I>><i> return
1;
118 </I>><i> +#ifdef ANOPE_MD5_HACK
119 </I>><i> + for (i =
0; i
< 16; i +=
2)
120 </I>><i> + tmpbuf[i/
2] = XTOI(buf[i])
<<4 | XTOI(buf[i+
1]);
121 </I>><i> + if (memcmp(tmpbuf, password,
8) ==
0)
122 </I>><i> + return
1;
124 </I>><i> return
0;
127 </I>><i> ------------------------------------------------------------------
128 </I>><i> To unsubscribe or change your subscription options, visit:
129 </I>><i> <A HREF=
"http://lists.ircservices.za.net/mailman/listinfo/ircservices">http://lists.ircservices.za.net/mailman/listinfo/ircservices
</A>
139 <LI>Previous message:
<A HREF=
"005154.html">[IRCServices] ircservices-
5.0.57 convert-db utility crashes when
140 converting from anope db.
142 <LI>Next message:
<A HREF=
"005156.html">[IRCServices] Services
5.0.58 released
144 <LI> <B>Messages sorted by:
</B>
145 <a href=
"date.html#5155">[ date ]
</a>
146 <a href=
"thread.html#5155">[ thread ]
</a>
147 <a href=
"subject.html#5155">[ subject ]
</a>
148 <a href=
"author.html#5155">[ author ]
</a>