]> jfr.im git - irc.git/blob - software/!RELEASES/ircservices/achurch.org/services/lists/ircservices-coding/2007.txt
RELEASE -> !RELEASE
[irc.git] / software / !RELEASES / ircservices / achurch.org / services / lists / ircservices-coding / 2007.txt
1 From tigra.ru at gmail.com Sat Jan 13 06:37:12 2007
2 From: tigra.ru at gmail.com (Tigra)
3 Date: Sat Jan 13 06:37:51 2007
4 Subject: [IRCServices Coding] configure error, 5.1a11 on FreeBSD 4.11
5 Message-ID: <9098af010701130637o3ac7c57bpda4686da6280b427@mail.gmail.com>
6
7 Hello Andrew
8
9 there is a configure error under FreeBSD 4.11
10
11 look at configure, lines 2614, 2615, 2626, 2627, 2637,2638, 2648, 2649,
12 missing $ sign when creating config.h file:
13
14 typedef signed $TYPE_INT8 int8;
15 typedef unsigned $TYPE_INT8 uint8;
16
17 and so on.
18
19
20 ---
21 wbr, Tigra
22 -------------- next part --------------
23 An HTML attachment was scrubbed...
24 URL: http://lists.ircservices.za.net/pipermail/ircservices-coding/attachments/20070113/322778af/attachment.html
25 From surreal.w00t at gmail.com Sat Jan 13 10:40:30 2007
26 From: surreal.w00t at gmail.com (Robin Burchell)
27 Date: Sat Jan 13 10:40:35 2007
28 Subject: [IRCServices Coding] configure error, 5.1a11 on FreeBSD 4.11
29 In-Reply-To: <9098af010701130637o3ac7c57bpda4686da6280b427@mail.gmail.com>
30 References: <9098af010701130637o3ac7c57bpda4686da6280b427@mail.gmail.com>
31 Message-ID: <b19eae4e0701131040v54244964w323dfd8a557be511@mail.gmail.com>
32
33 I'm not sure as to whether there's a problem, but you may want to look
34 at upgrading anyway. FreeBSD 4.x is about to leave it's extended
35 support period.
36
37 On 1/13/07, Tigra <tigra.ru@gmail.com> wrote:
38 > Hello Andrew
39 >
40 > there is a configure error under FreeBSD 4.11
41 >
42 > look at configure, lines 2614, 2615, 2626, 2627, 2637,2638, 2648, 2649,
43 > missing $ sign when creating config.h file:
44 >
45 > typedef signed $TYPE_INT8 int8;
46 > typedef unsigned $TYPE_INT8 uint8;
47 >
48 > and so on.
49 >
50 >
51 > ---
52 > wbr, Tigra
53 > ------------------------------------------------------------------
54 > To unsubscribe or change your subscription options, visit:
55 > http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
56 >
57 >
58 From achurch at achurch.org Sun Jan 14 05:00:54 2007
59 From: achurch at achurch.org (Andrew Church)
60 Date: Sat Jan 13 12:03:19 2007
61 Subject: [IRCServices Coding] configure error, 5.1a11 on FreeBSD 4.11
62 In-Reply-To: <9098af010701130637o3ac7c57bpda4686da6280b427@mail.gmail.com>
63 Message-ID: <45a93b05.70336@msgid.achurch.org>
64
65 >look at configure, lines 2614, 2615, 2626, 2627, 2637,2638, 2648, 2649,
66 >missing $ sign when creating config.h file:
67 >
68 >typedef signed $TYPE_INT8 int8;
69 >typedef unsigned $TYPE_INT8 uint8;
70 >
71 >and so on.
72
73 Fixed, thanks for the report. Apply the patch below until I get a
74 new release out.
75
76 --Andrew Church
77 achurch@achurch.org
78 http://achurch.org/
79
80 Index: configure
81 ===================================================================
82 RCS file: /var/local/cvsroot/ircservices/configure,v
83 retrieving revision 2.135
84 diff -u -r2.135 configure
85 --- configure 6 Dec 2006 06:49:49 -0000 2.135
86 +++ configure 13 Jan 2007 20:02:55 -0000
87 @@ -2612,8 +2612,8 @@
88 EOT
89 else
90 cat >>config.h.new <<EOT
91 -typedef signed TYPE_INT8 int8;
92 -typedef unsigned TYPE_INT8 uint8;
93 +typedef signed $TYPE_INT8 int8;
94 +typedef unsigned $TYPE_INT8 uint8;
95 EOT
96 fi
97 if [ "$TYPE_INT16" = int16_t ] ; then
98 @@ -2623,8 +2623,8 @@
99 EOT
100 else
101 cat >>config.h.new <<EOT
102 -typedef signed TYPE_INT16 int16;
103 -typedef unsigned TYPE_INT16 uint16;
104 +typedef signed $TYPE_INT16 int16;
105 +typedef unsigned $TYPE_INT16 uint16;
106 EOT
107 fi
108 if [ "$TYPE_INT32" = int32_t ] ; then
109 @@ -2634,8 +2634,8 @@
110 EOT
111 else
112 cat >>config.h.new <<EOT
113 -typedef signed TYPE_INT32 int32;
114 -typedef unsigned TYPE_INT32 uint32;
115 +typedef signed $TYPE_INT32 int32;
116 +typedef unsigned $TYPE_INT32 uint32;
117 EOT
118 fi
119 if [ "$TYPE_INT64" = int64_t ] ; then
120 @@ -2645,8 +2645,8 @@
121 EOT
122 else
123 cat >>config.h.new <<EOT
124 -typedef signed TYPE_INT64 int64;
125 -typedef unsigned TYPE_INT64 uint64;
126 +typedef signed $TYPE_INT64 int64;
127 +typedef unsigned $TYPE_INT64 uint64;
128 EOT
129 fi
130 cat >>config.h.new <<EOT
131 From surreal.w00t at gmail.com Sat Jan 13 13:19:04 2007
132 From: surreal.w00t at gmail.com (Robin Burchell)
133 Date: Sat Jan 13 13:19:11 2007
134 Subject: [IRCServices Coding] Progress / testing?
135 Message-ID: <b19eae4e0701131319n2824911ew5b02dbc8cf879a1c@mail.gmail.com>
136
137 Just a little curious as to how progress is going on 5.1, now major
138 milestones (database API) and technical docs have been done, and as to
139 whether it's in use on any networks with more than 5 users. (i.e. how
140 it performs, stability, etc)
141
142 Anyone out there (including Andrew, on the first point) able to enlighten me?
143 From achurch at achurch.org Sun Jan 14 06:19:38 2007
144 From: achurch at achurch.org (Andrew Church)
145 Date: Sat Jan 13 13:23:37 2007
146 Subject: [IRCServices Coding] Progress / testing?
147 In-Reply-To: <b19eae4e0701131319n2824911ew5b02dbc8cf879a1c@mail.gmail.com>
148 Message-ID: <45a94dd6.71647@msgid.achurch.org>
149
150 >Just a little curious as to how progress is going on 5.1, now major
151 >milestones (database API) and technical docs have been done, and as to
152 >whether it's in use on any networks with more than 5 users. (i.e. how
153 >it performs, stability, etc)
154 >
155 >Anyone out there (including Andrew, on the first point) able to enlighten me?
156
157 I can't speak to the second point, but as to the first, I'm afraid
158 I've been a little burdened with work lately (various circumstances led to
159 my changing jobs late last year), so I haven't really had a chance to work
160 on Services since the last release. Hopefully things will calm down over
161 the next couple of months; in the meantime, please be patient.
162
163 --Andrew Church
164 achurch@achurch.org
165 http://achurch.org/
166 From tigra.ru at gmail.com Sat Jan 13 21:45:16 2007
167 From: tigra.ru at gmail.com (Tigra)
168 Date: Sat Jan 13 21:45:21 2007
169 Subject: [IRCServices Coding] configure error, 5.1a11 on FreeBSD 4.11
170 In-Reply-To: <b19eae4e0701131040v54244964w323dfd8a557be511@mail.gmail.com>
171 References: <9098af010701130637o3ac7c57bpda4686da6280b427@mail.gmail.com>
172 <b19eae4e0701131040v54244964w323dfd8a557be511@mail.gmail.com>
173 Message-ID: <9098af010701132145ub66715fuaebec158b2f0caf@mail.gmail.com>
174
175 On 1/13/07, Robin Burchell <surreal.w00t@gmail.com> wrote:
176 >
177 > I'm not sure as to whether there's a problem, but you may want to look
178 > at upgrading anyway. FreeBSD 4.x is about to leave it's extended
179 > support period.
180
181
182 yes, I know, but problem can exist not only on FreeBSD 4.x.
183 -------------- next part --------------
184 An HTML attachment was scrubbed...
185 URL: http://lists.ircservices.za.net/pipermail/ircservices-coding/attachments/20070114/e0bf073b/attachment.html
186 From richard at squarecows.com Fri Feb 16 06:04:12 2007
187 From: richard at squarecows.com (Richard Harvey)
188 Date: Fri Feb 16 06:04:23 2007
189 Subject: [IRCServices Coding] 5.1 -import problem
190 Message-ID: <5b6dfd25fcf922a76e2e40f337cd5e7b@mail.squarecows.com>
191
192 Hi guys,
193
194 I'm trying to use the alpha version of ircservices because i have upgraded my ircd to solid-ircd because i'm looking to impliment SSL connections. I have come from a bahamut 1.8.4 server.
195
196 I've follow the upgrade path of
197
198 shutdown the ircservices
199
200 installing the new .deb (dpkg -i ircservices_5.1a11-1.deb) -seems to work ok
201
202 then i run (ircservices -export=database.xml) -seems to work out
203
204 then i try and run (ircservices -import=database.xml) -errors with this
205
206 root@HOSTNAME /etc/ircservices# ircservices -import=database.xml
207 Initialization failed, exiting.
208
209 Can anyone help? Then i can get submitting performance stats and bugs for 5.1.
210
211 Cheers Ric
212
213 --
214 Richard Harvey
215 ~~~~~~~~~~~~~
216 Email: richard@squarecows.com
217 Web: www.squarecows.com
218 Mobile: 07798 656 019
219 Skype In: 020 8816 8343
220
221 Fingerprint: B9A6 97CD 5941 9EC2 45F4 BCF2 961E DD64 9D0F CA37
222
223 From achurch at achurch.org Sat Feb 17 02:19:13 2007
224 From: achurch at achurch.org (Andrew Church)
225 Date: Fri Feb 16 09:24:01 2007
226 Subject: [IRCServices Coding] 5.1 -import problem
227 In-Reply-To: <5b6dfd25fcf922a76e2e40f337cd5e7b@mail.squarecows.com>
228 Message-ID: <45d5e8ae.40332@msgid.achurch.org>
229
230 >then i try and run (ircservices -import=database.xml) -errors with this
231 >
232 >root@HOSTNAME /etc/ircservices# ircservices -import=database.xml
233 >Initialization failed, exiting.
234
235 Are there any error messages in the log file? Did you remember to
236 enable the misc/xml-import module in ircservices.conf? Try adding the
237 -debug and -nofork options to the command line (in import mode, Services
238 won't fork a child process anyway, but -nofork will cause log messages to
239 be printed to the console).
240
241 --Andrew Church
242 achurch@achurch.org
243 http://achurch.org/
244 From achurch at achurch.org Sat Feb 17 12:00:00 2007
245 From: achurch at achurch.org (Andrew Church)
246 Date: Fri Feb 16 19:01:31 2007
247 Subject: [IRCServices Coding] Services 5.1a12 released
248 Message-ID: <45d67008.27327@msgid.achurch.org>
249
250 Services 5.1a12 has been released, and can be downloaded from:
251
252 http://www.ircservices.za.net/download/testing/ (Japan)
253 ftp://ftp.esper.net/ircservices/testing/ (Western USA)
254
255 ed7bcd7cdcd10ab90c0b1e6b1f9d4e3e ircservices-5.1a12.tar.gz
256 9e90be42d3f8b76d6c7df69708047a9e ircservices-5.1a12.diff.gz
257 e8556080ff70b2d37a7259b19b67b7b7 ircservices-5.1a12-1.i386.rpm
258 814bbbd28b6b92443b095a9061de8a40 ircservices_5.1a12-1_i386.deb
259
260 The mirrors should have it shortly.
261
262 This release takes care of a number of comparatively minor issues I
263 had encountered and noted while writing the Services technical manual.
264 This covers the last of my currently planned changes for 5.1; if nothing
265 comes up, I'll probably release a beta version before too long. (This of
266 course assumes that I can find the time to do so. There's a reason all
267 those change log entries are clustered in a single day--I didn't dare waste
268 my rare moments of freedom!)
269
270 Changes in version 5.1a12
271 -------------------------
272 2007/02/16 Fixed possibly incorrect handling by convert-db of nonstandard
273 channel fields FREASON and FTIME in HybServ databases.
274 2007/02/16 Fixed result message for SET TIMEZONE by a Services
275 administrator whose timezone is set to the default.
276 2007/02/16 Fixed a duplicate WALLOPS for NickServ SET PASSWORD by
277 Services administrators.
278 2007/02/16 Removed all support for "modeless" channels (+name).
279 2007/02/16 Fixed httpd/redirect handling of nicknames and channel
280 names containing slashes. (As a side effect, URLs with
281 trailing slashes are no longer accepted.)
282 2007/02/16 The httpd/top-page module now only responds to requests for
283 the top page, rather than for any URL.
284 2007/02/16 The built-in HTTP server now reports an error on overlength
285 HTTP request lines rather than silently splitting them.
286 2007/02/16 Added password obscurity check to ChanServ REGISTER and SET
287 PASSWORD. Suggested by Dionisios K. <vonitsa_net@yahoo.gr>
288 2007/02/16 Changed NSRejectEmail configuration directive to RejectEmail,
289 and added rejection checks to NickServ/ChanServ SET EMAIL.
290 2007/02/16 Changed MD_EXCLUSION constant name to MD_EXCLUDE to match
291 the OperServ command name.
292 2007/02/16 Add get/put-field wrapper routines to database code to
293 remove unnecessary complexity from database modules.
294 2007/02/16 Fixed bug causing PID file to not be removed on exit.
295 2007/01/14 Fixed bug in configure type definitions. Reported by
296 <tigra.ru@gmail.com>
297
298 --Andrew Church
299 achurch@achurch.org
300 http://achurch.org/
301 From achurch at achurch.org Sat Mar 24 03:33:26 2007
302 From: achurch at achurch.org (Andrew Church)
303 Date: Fri Mar 23 11:34:17 2007
304 Subject: [IRCServices Coding] Services 5.1a13 released
305 Message-ID: <46041da5.40557@msgid.achurch.org>
306
307 Services 5.1a13 has been released, and can be downloaded from:
308
309 http://www.ircservices.za.net/download/testing/ (Japan)
310 ftp://ftp.esper.net/ircservices/testing/ (Western USA)
311
312 4fb234f4992460dcb486b73aef1f6816 ircservices-5.1a13.tar.gz
313 678e17d3c06789e531125c80012f80c2 ircservices-5.1a13.diff.gz
314 1f22cc67e7efb00153396be687b6175f ircservices-5.1a13-1.i386.rpm
315 f2d816b689f1e63e3986cb7e5e5836f9 ircservices_5.1a13-1_i386.deb
316
317 The mirrors should have it shortly.
318
319 This release changes the semantics of the ChanServ SET PASSWORD
320 command to remove founder privileges from all users who had previously
321 identified for the channel, to prevent users who do not know the new
322 password from performing founder-level operations. (This is the same
323 change applied to version 5.0.60.)
324
325 Changes in version 5.1a13
326 -------------------------
327 2007/03/24 Changed ChanServ SET PASSWORD to remove founder privileges
328 from any users who had previously identified for the
329 channel. Reported by ongeboren <xxx.coder@gmail.com>
330
331 --Andrew Church
332 achurch@achurch.org
333 http://achurch.org/
334 From v.ovsyannikov at kr.ru Thu Mar 29 22:45:28 2007
335 From: v.ovsyannikov at kr.ru (Vitaliy Ovsyannikov)
336 Date: Thu Mar 29 22:45:54 2007
337 Subject: [IRCServices Coding] proxy checking
338 In-Reply-To: <46041da5.40557@msgid.achurch.org>
339 References: <46041da5.40557@msgid.achurch.org>
340 Message-ID: <277339607.20070330134528@kr.ru>
341
342 Hello,
343
344 Somebody has a module for checking client's IP address is an open
345 proxy?
346
347 --
348 wbr
349
350 From bender_54 at msn.com Mon Apr 16 02:36:59 2007
351 From: bender_54 at msn.com (Nick Bent)
352 Date: Mon Apr 16 02:37:03 2007
353 Subject: [IRCServices Coding] Feature Suggestions
354 Message-ID: <BAY115-F128D33FFCBF18F53D54FE381520@phx.gbl>
355
356 An HTML attachment was scrubbed...
357 URL: http://lists.ircservices.za.net/pipermail/ircservices-coding/attachments/20070416/565eab6f/attachment.html
358 From ron2k.za at gmail.com Mon Apr 16 03:27:12 2007
359 From: ron2k.za at gmail.com (Kieron Thwaites)
360 Date: Mon Apr 16 03:27:16 2007
361 Subject: [IRCServices Coding] Feature Suggestions
362 In-Reply-To: <BAY115-F128D33FFCBF18F53D54FE381520@phx.gbl>
363 References: <BAY115-F128D33FFCBF18F53D54FE381520@phx.gbl>
364 Message-ID: <debb3bc0704160327j6d7e7bb4ta442f7960f840eaf@mail.gmail.com>
365
366 > 1. /ns set autoop [on|off] - Just like Anope
367
368 If this is what I think it is, which is that the nick in question
369 won't be auto-opped on any channel (next time please elaborate on what
370 Anope does), I believe that Andrew may have been considering this at
371 one point (I think it was in one of the TODO lists). That being said,
372 I haven't seen this in 5.1, so it may have been dropped or thrown out.
373
374 > 2. I think channel passwords suck, so:
375 >
376 > - Leave /cs register the same, but ignore the password field, like on
377 > Surreal Services
378 >
379 > - Add an xOP level called QOP or CF or Co-Founder, access level 900 (not 999
380 > please).
381 >
382 > - Only the "true founder" can set successor.
383 >
384 > - Remove /cs identify
385 >
386 > - /cs drop won't require the user to do /cs identify first
387 >
388 > - Add commands owner and deowner, and levels autoowner and owner
389 >
390 > - /cs deprotect will no longer set mode -q, it will do -a only
391
392 I was actually thinking of something like this a while back. I'll
393 leave it up to Andrew to make the final call on this one, but I
394 suggest a few more things: firstly, regarding the "only the 'true
395 founder' can set successor" bit, go further - only the true founder
396 should be able to modify such a list in the first place. Secondly,
397 dropping a channel should always require a password, for security
398 reasons and to guard against accidental drops.
399
400 What I like about this method is that it reduces the possibility of
401 someone changing the "true founder" of a channel, as I assume that
402 users on a "co-founder" list wouldn't be given that permission.
403
404 As a sidenote, 5.1 has dropped support for the channel owner mode (+q
405 on UnrealIRCd for example); channel owners will be given the same
406 modes as those on the SOP list or access level >= 100.
407
408 > 3. /cs clear #channel users - make this only kick users who don't have the
409 > access to use it.
410
411 No opinion on this.
412
413 > 4. When someone sets a new founder for the channel, they immediately lose
414 > their founder-level access.
415
416 Kind of stupid, as someone losing their founder-level access and
417 knowing the channel password could just identify using the channel
418 password and get founder-level access straight back. If the system
419 mentioned in your second point were to be implemented, then I could
420 see a use for this, but right now it makes no sense at all.
421
422 > 5. /ns listchans - make this list all of the user's channel accesses, like
423 > /ns alist in Anope
424
425 If I understand you correctly, you want this to display the access
426 list for a channel as well. Services already does this. (/msg ChanServ
427 ACCESS #channel LIST - or something like that)
428
429 > 6. When someone does /cs info #channel, and it shows the mode lock, make it
430 > show the locked mode paramaters too.
431
432 Bad idea. I'm sure that no-one wants to see their channel key
433 displayed in this manner. :)
434
435 --K
436 From achurch at achurch.org Tue Apr 17 15:53:22 2007
437 From: achurch at achurch.org (Andrew Church)
438 Date: Tue Apr 17 00:12:03 2007
439 Subject: [IRCServices Coding] Feature Suggestions
440 In-Reply-To: <debb3bc0704160327j6d7e7bb4ta442f7960f840eaf@mail.gmail.com>
441 Message-ID: <4624733c.06344@msgid.achurch.org>
442
443 To the original poster: Don't use HTML mail on this list.
444
445 >> 1. /ns set autoop [on|off] - Just like Anope
446 >
447 >If this is what I think it is, which is that the nick in question
448 >won't be auto-opped on any channel (next time please elaborate on what
449 >Anope does), I believe that Andrew may have been considering this at
450 >one point (I think it was in one of the TODO lists). That being said,
451 >I haven't seen this in 5.1, so it may have been dropped or thrown out.
452
453 I've never seen the point to this option (if you don't want auto-ops,
454 don't have people give you auto-op access), so I won't be adding it.
455
456 >> 2. I think channel passwords suck, so:
457 [...]
458
459 I agree, but removing them at this point is not feasible, so I've left
460 it documented as something for future developers to think about (technical
461 manual section 11).
462
463 >> 3. /cs clear #channel users - make this only kick users who don't have the
464 >> access to use it.
465
466 I'd rather keep it the way it is--kick everybody out and let the users
467 sort things out afterwards. (Changing it as you suggest would undoubtedly
468 leave users wondering "why didn't user X get kicked?")
469
470 >> 4. When someone sets a new founder for the channel, they immediately lose
471 >> their founder-level access.
472
473 This is already the case (unless the founder used the IDENTIFY command
474 to gain privileges, in which case there would be no point in dropping
475 privileges because he could just identify again).
476
477 >> 5. /ns listchans - make this list all of the user's channel accesses, like
478 >> /ns alist in Anope
479 >
480 >If I understand you correctly, you want this to display the access
481 >list for a channel as well. Services already does this. (/msg ChanServ
482 >ACCESS #channel LIST - or something like that)
483
484 I think the intention was a new command to list every channel the user
485 has a nonzero access level on, along with that access level. I don't see
486 that as necessary, because (as you say) ChanServ ACCESS can already display
487 the access level of a particular list; also, the time required to search
488 through all access lists of all channels could be prohibitively long on
489 large networks.
490
491 >> 6. When someone does /cs info #channel, and it shows the mode lock, make it
492 >> show the locked mode paramaters too.
493 >
494 >Bad idea. I'm sure that no-one wants to see their channel key
495 >displayed in this manner. :)
496
497 Exactly. As for other modes, just look at the channel's current mode
498 set, which will naturally be the same as what's set in the mode lock.
499
500 --Andrew Church
501 achurch@achurch.org
502 http://achurch.org/
503 From tim at retout.co.uk Tue May 15 19:18:19 2007
504 From: tim at retout.co.uk (Tim Retout)
505 Date: Tue May 15 19:19:51 2007
506 Subject: [IRCServices Coding] Debian packages
507 Message-ID: <1179281899.26496.23.camel@regulus.retout.co.uk>
508
509 Hello!
510
511 I maintain an IRC server for a group of very happy ircservices users. We
512 are about to move to some amd64 machines, and run Debian.
513
514 I notice that binary Debian packages are available for i386 from your
515 website - but would it be helpful if I packaged ircservices and
516 submitted it to the main Debian archive? This would make it even easier
517 for Debian users like myself to use your software, especially if they
518 are using a different architecture.
519
520 Thanks for your time,
521
522 --
523 Tim Retout <tim@retout.co.uk>
524
525 From tim at retout.co.uk Wed May 16 05:55:10 2007
526 From: tim at retout.co.uk (Tim Retout)
527 Date: Wed May 16 05:56:48 2007
528 Subject: [IRCServices Coding] md5 licensing
529 Message-ID: <1179320110.6934.18.camel@regulus.retout.co.uk>
530
531 The copyright notice on the md5 hashing code used in ircservices does
532 not grant a licence to redistribute modified versions. The clause about
533 mentioning "RSA Data Security, Inc." looks GPL-incompatible to me as
534 well. The same code was removed from Apache last year:
535 http://bugs.debian.org/340538
536
537 Please review this patch (against 5.1pre1) to port the md5 code to an
538 implementation licensed under a revised-BSD-style licence, found at:
539 http://sourceforge.net/project/showfiles.php?group_id=42360
540
541 I have tested it briefly, and it seems to work.
542
543 Thanks,
544
545 --
546 Tim Retout <tim@retout.co.uk>
547 -------------- next part --------------
548 A non-text attachment was scrubbed...
549 Name: ircservices-md5.diff
550 Type: text/x-patch
551 Size: 29252 bytes
552 Desc: not available
553 Url : http://lists.ircservices.za.net/pipermail/ircservices-coding/attachments/20070516/83119243/ircservices-md5-0001.bin
554 From achurch at achurch.org Thu May 17 04:42:54 2007
555 From: achurch at achurch.org (Andrew Church)
556 Date: Wed May 16 12:43:59 2007
557 Subject: [IRCServices Coding] Debian packages
558 In-Reply-To: <1179281899.26496.23.camel@regulus.retout.co.uk>
559 Message-ID: <464b5efb.10707@msgid.achurch.org>
560
561 >I notice that binary Debian packages are available for i386 from your
562 >website - but would it be helpful if I packaged ircservices and
563 >submitted it to the main Debian archive? This would make it even easier
564 >for Debian users like myself to use your software, especially if they
565 >are using a different architecture.
566
567 If you'd be willing to do that, I'd certainly appreciate it! Please
568 let me know if there are any issues regarding packaging (such as file
569 layout), and I'll see if I can resolve them.
570
571 --Andrew Church
572 achurch@achurch.org
573 http://achurch.org/
574 From achurch at achurch.org Thu May 17 04:48:47 2007
575 From: achurch at achurch.org (Andrew Church)
576 Date: Wed May 16 12:59:05 2007
577 Subject: [IRCServices Coding] md5 licensing
578 In-Reply-To: <1179320110.6934.18.camel@regulus.retout.co.uk>
579 Message-ID: <464b6285.20022@msgid.achurch.org>
580
581 >The copyright notice on the md5 hashing code used in ircservices does
582 >not grant a licence to redistribute modified versions. The clause about
583 >mentioning "RSA Data Security, Inc." looks GPL-incompatible to me as
584 >well. The same code was removed from Apache last year:
585 >http://bugs.debian.org/340538
586 >
587 >Please review this patch (against 5.1pre1) to port the md5 code to an
588 >implementation licensed under a revised-BSD-style licence, found at:
589 >http://sourceforge.net/project/showfiles.php?group_id=42360
590
591 Thanks for pointing this out. I've applied the patch below to
592 5.1pre1; let me know if you see any problems.
593
594 --Andrew Church
595 achurch@achurch.org
596 http://achurch.org/
597
598 ------------------------------------------------------------------------
599
600 Index: docs/3.html
601 ===================================================================
602 RCS file: /var/local/cvsroot/ircservices/docs/3.html,v
603 retrieving revision 2.74
604 diff -u -r2.74 3.html
605 --- docs/3.html 6 May 2007 06:49:48 -0000 2.74
606 +++ docs/3.html 16 May 2007 19:58:14 -0000
607 @@ -2279,10 +2279,10 @@
608 <p>The available encryption modules are as follows:
609
610 <p><ul>
611 -<li><b><tt>encryption/md5</tt></b>: Uses the MD5 hashing
612 -algorithm<sup>1</sup> to encrypt passwords. This is a one-way encryption
613 -algorithm which generates a 128-bit "digest" of the password, and is used
614 -by several Unix systems to encrypt user passwords as well.
615 +<li><b><tt>encryption/md5</tt></b>: Uses the MD5 hashing algorithm to
616 +encrypt passwords. This is a one-way encryption algorithm which generates
617 +a 128-bit "digest" of the password, and is used by several Unix systems to
618 +encrypt user passwords as well.
619 <p><li><b><tt>encryption/unix-crypt</tt></b>: <b>DISCOURAGED.</b> Uses the
620 <tt>crypt()</tt> function available in most Unix systems, typically a
621 variant of the DES encryption algorithm, to encrypt passwords. This is a
622 @@ -2300,9 +2300,6 @@
623 older passwords can still be used (provided the appropriate module is
624 loaded).
625
626 -<p><sup>1</sup><font size=-1>Technically, the "RSA Data Security, Inc. MD5
627 -Message-Digest Algorithm".</font>
628 -
629 <p align=right><font size="-1"><a href="#top">Back to top</a></font>
630
631 <!------------------------------------------------------------------------>
632 Index: docs/Changes
633 ===================================================================
634 RCS file: /var/local/cvsroot/ircservices/docs/Changes,v
635 retrieving revision 2.7
636 diff -u -r2.7 Changes
637 --- docs/Changes 13 May 2007 16:40:05 -0000 2.7
638 +++ docs/Changes 16 May 2007 19:58:14 -0000
639 @@ -1,5 +1,8 @@
640 Version 5.1
641 -----------
642 +2007/05/17 Replaced RSA's MD5 implementation with one licensed under
643 + more lenient terms. Suggested by Tim Retout
644 + <tim@retout.co.uk>
645 2007/05/14 pre1 Fixed a bug in XML import that caused channel mode locks to
646 be lost. Reported by <loverboy@irc.doruk.net.tr>
647 2007/05/14 Fixed Services being unable to start if both the compatibility
648 Index: modules/encryption/md5.c
649 ===================================================================
650 RCS file: /var/local/cvsroot/ircservices/modules/encryption/md5.c,v
651 retrieving revision 2.24
652 diff -u -r2.24 md5.c
653 --- modules/encryption/md5.c 15 Feb 2007 14:53:30 -0000 2.24
654 +++ modules/encryption/md5.c 16 May 2007 19:58:14 -0000
655 @@ -22,322 +22,483 @@
656 #define XTOI(c) ((c)>9 ? (c)-'A'+10 : (c)-'0')
657
658 /*************************************************************************/
659 -/*======== Beginning of RSA's md5c.c ========*/
660 -
661 -/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
662 -rights reserved.
663 -
664 -License to copy and use this software is granted provided that it
665 -is identified as the "RSA Data Security, Inc. MD5 Message-Digest
666 -Algorithm" in all material mentioning or referencing this software
667 -or this function.
668 -
669 -License is also granted to make and use derivative works provided
670 -that such works are identified as "derived from the RSA Data
671 -Security, Inc. MD5 Message-Digest Algorithm" in all material
672 -mentioning or referencing the derived work.
673 -
674 -RSA Data Security, Inc. makes no representations concerning either
675 -the merchantability of this software or the suitability of this
676 -software for any particular purpose. It is provided "as is"
677 -without express or implied warranty of any kind.
678 +/*======== Beginning of L. Peter Deutsch's md5.h ========*/
679 +/*
680 + Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved.
681
682 -These notices must be retained in any copies of any part of this
683 -documentation and/or software.
684 - */
685 + This software is provided 'as-is', without any express or implied
686 + warranty. In no event will the authors be held liable for any damages
687 + arising from the use of this software.
688
689 -#include <string.h>
690 + Permission is granted to anyone to use this software for any purpose,
691 + including commercial applications, and to alter it and redistribute it
692 + freely, subject to the following restrictions:
693
694 -typedef unsigned int UINT4;
695 + 1. The origin of this software must not be misrepresented; you must not
696 + claim that you wrote the original software. If you use this software
697 + in a product, an acknowledgment in the product documentation would be
698 + appreciated but is not required.
699 + 2. Altered source versions must be plainly marked as such, and must not be
700 + misrepresented as being the original software.
701 + 3. This notice may not be removed or altered from any source distribution.
702
703 -/* MD5 context. */
704 -typedef struct {
705 - UINT4 state[4]; /* state (ABCD) */
706 - UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
707 - unsigned char buffer[64]; /* input buffer */
708 -} MD5_CTX;
709 + L. Peter Deutsch
710 + ghost@aladdin.com
711
712 -/* MD5C.C - RSA Data Security, Inc., MD5 message-digest algorithm
713 */
714 +/* $Id: md5.h,v 1.4 2002/04/13 19:20:28 lpd Exp $ */
715 +/*
716 + Independent implementation of MD5 (RFC 1321).
717
718 -typedef void *POINTER;
719 -
720 -/* Constants for MD5Transform routine.
721 + This code implements the MD5 Algorithm defined in RFC 1321, whose
722 + text is available at
723 + http://www.ietf.org/rfc/rfc1321.txt
724 + The code is derived from the text of the RFC, including the test suite
725 + (section A.5) but excluding the rest of Appendix A. It does not include
726 + any code or documentation that is identified in the RFC as being
727 + copyrighted.
728 +
729 + The original and principal author of md5.h is L. Peter Deutsch
730 + <ghost@aladdin.com>. Other authors are noted in the change history
731 + that follows (in reverse chronological order):
732 +
733 + 2002-04-13 lpd Removed support for non-ANSI compilers; removed
734 + references to Ghostscript; clarified derivation from RFC 1321;
735 + now handles byte order either statically or dynamically.
736 + 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
737 + 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5);
738 + added conditionalization for C++ compilation from Martin
739 + Purschke <purschke@bnl.gov>.
740 + 1999-05-03 lpd Original version.
741 */
742 -#define S11 7
743 -#define S12 12
744 -#define S13 17
745 -#define S14 22
746 -#define S21 5
747 -#define S22 9
748 -#define S23 14
749 -#define S24 20
750 -#define S31 4
751 -#define S32 11
752 -#define S33 16
753 -#define S34 23
754 -#define S41 6
755 -#define S42 10
756 -#define S43 15
757 -#define S44 21
758 -
759 -static void MD5Transform (UINT4 [4], unsigned char [64]);
760 -static void Encode (unsigned char *, UINT4 *, unsigned int);
761 -static void Decode (UINT4 *, unsigned char *, unsigned int);
762 -
763 -static unsigned char PADDING[64] = {
764 - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
765 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
766 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
767 -};
768
769 -/* F, G, H and I are basic MD5 functions.
770 - */
771 -#define F(x, y, z) (((x) & (y)) | ((~x) & (z)))
772 -#define G(x, y, z) (((x) & (z)) | ((y) & (~z)))
773 -#define H(x, y, z) ((x) ^ (y) ^ (z))
774 -#define I(x, y, z) ((y) ^ ((x) | (~z)))
775 +#ifndef md5_INCLUDED
776 +# define md5_INCLUDED
777
778 -/* ROTATE_LEFT rotates x left n bits.
779 +/*
780 + * This package supports both compile-time and run-time determination of CPU
781 + * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be
782 + * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is
783 + * defined as non-zero, the code will be compiled to run only on big-endian
784 + * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to
785 + * run on either big- or little-endian CPUs, but will run slightly less
786 + * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined.
787 */
788 -#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
789
790 -/* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4.
791 -Rotation is separate from addition to prevent recomputation.
792 - */
793 -#define FF(a, b, c, d, x, s, ac) { \
794 - (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \
795 - (a) = ROTATE_LEFT ((a), (s)); \
796 - (a) += (b); \
797 - }
798 -#define GG(a, b, c, d, x, s, ac) { \
799 - (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \
800 - (a) = ROTATE_LEFT ((a), (s)); \
801 - (a) += (b); \
802 - }
803 -#define HH(a, b, c, d, x, s, ac) { \
804 - (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \
805 - (a) = ROTATE_LEFT ((a), (s)); \
806 - (a) += (b); \
807 - }
808 -#define II(a, b, c, d, x, s, ac) { \
809 - (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \
810 - (a) = ROTATE_LEFT ((a), (s)); \
811 - (a) += (b); \
812 - }
813 +typedef unsigned char md5_byte_t; /* 8-bit byte */
814 +typedef unsigned int md5_word_t; /* 32-bit word */
815
816 -/* MD5 initialization. Begins an MD5 operation, writing a new context.
817 - */
818 -static void MD5Init (context)
819 -MD5_CTX *context; /* context */
820 -{
821 - context->count[0] = context->count[1] = 0;
822 - /* Load magic initialization constants.
823 -*/
824 - context->state[0] = 0x67452301;
825 - context->state[1] = 0xefcdab89;
826 - context->state[2] = 0x98badcfe;
827 - context->state[3] = 0x10325476;
828 -}
829 +/* Define the state of the MD5 Algorithm. */
830 +typedef struct md5_state_s {
831 + md5_word_t count[2]; /* message length in bits, lsw first */
832 + md5_word_t abcd[4]; /* digest buffer */
833 + md5_byte_t buf[64]; /* accumulate block */
834 +} md5_state_t;
835
836 -/* MD5 block update operation. Continues an MD5 message-digest
837 - operation, processing another message block, and updating the
838 - context.
839 - */
840 -static void MD5Update (context, input, inputLen)
841 -MD5_CTX *context; /* context */
842 -unsigned char *input; /* input block */
843 -unsigned int inputLen; /* length of input block */
844 +#ifdef __cplusplus
845 +extern "C"
846 {
847 - unsigned int i, index, partLen;
848 +#endif
849
850 - /* Compute number of bytes mod 64 */
851 - index = (unsigned int)((context->count[0] >> 3) & 0x3F);
852 +/* Initialize the algorithm. */
853 +void md5_init(md5_state_t *pms);
854
855 - /* Update number of bits */
856 - if ((context->count[0] += ((UINT4)inputLen << 3))
857 - < ((UINT4)inputLen << 3))
858 - context->count[1]++;
859 - context->count[1] += ((UINT4)inputLen >> 29);
860 -
861 - partLen = 64 - index;
862 -
863 - /* Transform as many times as possible.
864 -*/
865 - if (inputLen >= partLen) {
866 - memcpy
867 - ((POINTER)&context->buffer[index], (POINTER)input, partLen);
868 - MD5Transform (context->state, context->buffer);
869 -
870 - for (i = partLen; i + 63 < inputLen; i += 64)
871 - MD5Transform (context->state, &input[i]);
872 -
873 - index = 0;
874 - }
875 - else
876 - i = 0;
877 -
878 - /* Buffer remaining input */
879 - memcpy
880 - ((POINTER)&context->buffer[index], (POINTER)&input[i],
881 - inputLen-i);
882 -}
883 +/* Append a string to the message. */
884 +void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes);
885
886 -/* MD5 finalization. Ends an MD5 message-digest operation, writing the
887 - the message digest and zeroizing the context.
888 - */
889 -static void MD5Final (digest, context)
890 -unsigned char digest[16]; /* message digest */
891 -MD5_CTX *context; /* context */
892 -{
893 - unsigned char bits[8];
894 - unsigned int index, padLen;
895 +/* Finish the message and return the digest. */
896 +void md5_finish(md5_state_t *pms, md5_byte_t digest[16]);
897
898 - /* Save number of bits */
899 - Encode (bits, context->count, 8);
900 +#ifdef __cplusplus
901 +} /* end extern "C" */
902 +#endif
903
904 - /* Pad out to 56 mod 64.
905 -*/
906 - index = (unsigned int)((context->count[0] >> 3) & 0x3f);
907 - padLen = (index < 56) ? (56 - index) : (120 - index);
908 - MD5Update (context, PADDING, padLen);
909 -
910 - /* Append length (before padding) */
911 - MD5Update (context, bits, 8);
912 - /* Store state in digest */
913 - Encode (digest, context->state, 16);
914 -
915 - /* Zeroize sensitive information.
916 -*/
917 - memset ((POINTER)context, 0, sizeof (*context));
918 -}
919 +#endif /* md5_INCLUDED */
920 +/*======== End of L. Peter Deutsch's md5.h ========*/
921
922 -/* MD5 basic transformation. Transforms state based on block.
923 - */
924 -static void MD5Transform (state, block)
925 -UINT4 state[4];
926 -unsigned char block[64];
927 -{
928 - UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16];
929 +/*======== Beginning of L. Peter Deutsch's md5.c (with the line ========
930 + ======== [#include "md5.h"] removed) ========*/
931 +/*
932 + Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved.
933
934 - Decode (x, block, 64);
935 + This software is provided 'as-is', without any express or implied
936 + warranty. In no event will the authors be held liable for any damages
937 + arising from the use of this software.
938
939 - /* Round 1 */
940 - FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */
941 - FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */
942 - FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */
943 - FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */
944 - FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */
945 - FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */
946 - FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */
947 - FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */
948 - FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */
949 - FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */
950 - FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */
951 - FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */
952 - FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */
953 - FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */
954 - FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */
955 - FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */
956 -
957 - /* Round 2 */
958 - GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */
959 - GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */
960 - GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */
961 - GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */
962 - GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */
963 - GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */
964 - GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */
965 - GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */
966 - GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */
967 - GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */
968 - GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */
969 - GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */
970 - GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */
971 - GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */
972 - GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */
973 - GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */
974 -
975 - /* Round 3 */
976 - HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */
977 - HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */
978 - HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */
979 - HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */
980 - HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */
981 - HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */
982 - HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */
983 - HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */
984 - HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */
985 - HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */
986 - HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */
987 - HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */
988 - HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */
989 - HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */
990 - HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */
991 - HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */
992 -
993 - /* Round 4 */
994 - II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */
995 - II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */
996 - II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */
997 - II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */
998 - II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */
999 - II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */
1000 - II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */
1001 - II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */
1002 - II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */
1003 - II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */
1004 - II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */
1005 - II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */
1006 - II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */
1007 - II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */
1008 - II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */
1009 - II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */
1010 -
1011 - state[0] += a;
1012 - state[1] += b;
1013 - state[2] += c;
1014 - state[3] += d;
1015 -
1016 - /* Zeroize sensitive information.
1017 -*/
1018 - memset ((POINTER)x, 0, sizeof (x));
1019 -}
1020 + Permission is granted to anyone to use this software for any purpose,
1021 + including commercial applications, and to alter it and redistribute it
1022 + freely, subject to the following restrictions:
1023
1024 -/* Encodes input (UINT4) into output (unsigned char). Assumes len is
1025 - a multiple of 4.
1026 - */
1027 -static void Encode (output, input, len)
1028 -unsigned char *output;
1029 -UINT4 *input;
1030 -unsigned int len;
1031 -{
1032 - unsigned int i, j;
1033 + 1. The origin of this software must not be misrepresented; you must not
1034 + claim that you wrote the original software. If you use this software
1035 + in a product, an acknowledgment in the product documentation would be
1036 + appreciated but is not required.
1037 + 2. Altered source versions must be plainly marked as such, and must not be
1038 + misrepresented as being the original software.
1039 + 3. This notice may not be removed or altered from any source distribution.
1040
1041 - for (i = 0, j = 0; j < len; i++, j += 4) {
1042 - output[j] = (unsigned char)(input[i] & 0xff);
1043 - output[j+1] = (unsigned char)((input[i] >> 8) & 0xff);
1044 - output[j+2] = (unsigned char)((input[i] >> 16) & 0xff);
1045 - output[j+3] = (unsigned char)((input[i] >> 24) & 0xff);
1046 - }
1047 -}
1048 + L. Peter Deutsch
1049 + ghost@aladdin.com
1050
1051 -/* Decodes input (unsigned char) into output (UINT4). Assumes len is
1052 - a multiple of 4.
1053 */
1054 -static void Decode (output, input, len)
1055 -UINT4 *output;
1056 -unsigned char *input;
1057 -unsigned int len;
1058 -{
1059 - unsigned int i, j;
1060 +/* $Id: md5.c,v 1.6 2002/04/13 19:20:28 lpd Exp $ */
1061 +/*
1062 + Independent implementation of MD5 (RFC 1321).
1063
1064 - for (i = 0, j = 0; j < len; i++, j += 4)
1065 - output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) |
1066 - (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24);
1067 -}
1068 + This code implements the MD5 Algorithm defined in RFC 1321, whose
1069 + text is available at
1070 + http://www.ietf.org/rfc/rfc1321.txt
1071 + The code is derived from the text of the RFC, including the test suite
1072 + (section A.5) but excluding the rest of Appendix A. It does not include
1073 + any code or documentation that is identified in the RFC as being
1074 + copyrighted.
1075 +
1076 + The original and principal author of md5.c is L. Peter Deutsch
1077 + <ghost@aladdin.com>. Other authors are noted in the change history
1078 + that follows (in reverse chronological order):
1079 +
1080 + 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order
1081 + either statically or dynamically; added missing #include <string.h>
1082 + in library.
1083 + 2002-03-11 lpd Corrected argument list for main(), and added int return
1084 + type, in test program and T value program.
1085 + 2002-02-21 lpd Added missing #include <stdio.h> in test program.
1086 + 2000-07-03 lpd Patched to eliminate warnings about "constant is
1087 + unsigned in ANSI C, signed in traditional"; made test program
1088 + self-checking.
1089 + 1999-11-04 lpd Edited comments slightly for automatic TOC extraction.
1090 + 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5).
1091 + 1999-05-03 lpd Original version.
1092 + */
1093
1094 -/*======== End of md5c.c ========*/
1095 +#include <string.h>
1096 +
1097 +#undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */
1098 +#ifdef ARCH_IS_BIG_ENDIAN
1099 +# define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1)
1100 +#else
1101 +# define BYTE_ORDER 0
1102 +#endif
1103 +
1104 +#define T_MASK ((md5_word_t)~0)
1105 +#define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87)
1106 +#define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9)
1107 +#define T3 0x242070db
1108 +#define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111)
1109 +#define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050)
1110 +#define T6 0x4787c62a
1111 +#define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec)
1112 +#define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe)
1113 +#define T9 0x698098d8
1114 +#define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850)
1115 +#define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e)
1116 +#define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841)
1117 +#define T13 0x6b901122
1118 +#define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c)
1119 +#define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71)
1120 +#define T16 0x49b40821
1121 +#define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d)
1122 +#define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf)
1123 +#define T19 0x265e5a51
1124 +#define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855)
1125 +#define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2)
1126 +#define T22 0x02441453
1127 +#define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e)
1128 +#define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437)
1129 +#define T25 0x21e1cde6
1130 +#define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829)
1131 +#define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278)
1132 +#define T28 0x455a14ed
1133 +#define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa)
1134 +#define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07)
1135 +#define T31 0x676f02d9
1136 +#define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375)
1137 +#define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd)
1138 +#define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e)
1139 +#define T35 0x6d9d6122
1140 +#define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3)
1141 +#define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb)
1142 +#define T38 0x4bdecfa9
1143 +#define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f)
1144 +#define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f)
1145 +#define T41 0x289b7ec6
1146 +#define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805)
1147 +#define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a)
1148 +#define T44 0x04881d05
1149 +#define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6)
1150 +#define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a)
1151 +#define T47 0x1fa27cf8
1152 +#define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a)
1153 +#define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb)
1154 +#define T50 0x432aff97
1155 +#define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58)
1156 +#define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6)
1157 +#define T53 0x655b59c3
1158 +#define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d)
1159 +#define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82)
1160 +#define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e)
1161 +#define T57 0x6fa87e4f
1162 +#define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f)
1163 +#define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb)
1164 +#define T60 0x4e0811a1
1165 +#define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d)
1166 +#define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca)
1167 +#define T63 0x2ad7d2bb
1168 +#define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e)
1169 +
1170 +
1171 +static void
1172 +md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/)
1173 +{
1174 + md5_word_t
1175 + a = pms->abcd[0], b = pms->abcd[1],
1176 + c = pms->abcd[2], d = pms->abcd[3];
1177 + md5_word_t t;
1178 +#if BYTE_ORDER > 0
1179 + /* Define storage only for big-endian CPUs. */
1180 + md5_word_t X[16];
1181 +#else
1182 + /* Define storage for little-endian or both types of CPUs. */
1183 + md5_word_t xbuf[16];
1184 + const md5_word_t *X;
1185 +#endif
1186 +
1187 + {
1188 +#if BYTE_ORDER == 0
1189 + /*
1190 + * Determine dynamically whether this is a big-endian or
1191 + * little-endian machine, since we can use a more efficient
1192 + * algorithm on the latter.
1193 + */
1194 + static const int w = 1;
1195 +
1196 + if (*((const md5_byte_t *)&w)) /* dynamic little-endian */
1197 +#endif
1198 +#if BYTE_ORDER <= 0 /* little-endian */
1199 + {
1200 + /*
1201 + * On little-endian machines, we can process properly aligned
1202 + * data without copying it.
1203 + */
1204 + if (!((data - (const md5_byte_t *)0) & 3)) {
1205 + /* data are properly aligned */
1206 + X = (const md5_word_t *)data;
1207 + } else {
1208 + /* not aligned */
1209 + memcpy(xbuf, data, 64);
1210 + X = xbuf;
1211 + }
1212 + }
1213 +#endif
1214 +#if BYTE_ORDER == 0
1215 + else /* dynamic big-endian */
1216 +#endif
1217 +#if BYTE_ORDER >= 0 /* big-endian */
1218 + {
1219 + /*
1220 + * On big-endian machines, we must arrange the bytes in the
1221 + * right order.
1222 + */
1223 + const md5_byte_t *xp = data;
1224 + int i;
1225 +
1226 +# if BYTE_ORDER == 0
1227 + X = xbuf; /* (dynamic only) */
1228 +# else
1229 +# define xbuf X /* (static only) */
1230 +# endif
1231 + for (i = 0; i < 16; ++i, xp += 4)
1232 + xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24);
1233 + }
1234 +#endif
1235 + }
1236 +
1237 +#define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n))))
1238 +
1239 + /* Round 1. */
1240 + /* Let [abcd k s i] denote the operation
1241 + a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */
1242 +#define F(x, y, z) (((x) & (y)) | (~(x) & (z)))
1243 +#define SET(a, b, c, d, k, s, Ti)\
1244 + t = a + F(b,c,d) + X[k] + Ti;\
1245 + a = ROTATE_LEFT(t, s) + b
1246 + /* Do the following 16 operations. */
1247 + SET(a, b, c, d, 0, 7, T1);
1248 + SET(d, a, b, c, 1, 12, T2);
1249 + SET(c, d, a, b, 2, 17, T3);
1250 + SET(b, c, d, a, 3, 22, T4);
1251 + SET(a, b, c, d, 4, 7, T5);
1252 + SET(d, a, b, c, 5, 12, T6);
1253 + SET(c, d, a, b, 6, 17, T7);
1254 + SET(b, c, d, a, 7, 22, T8);
1255 + SET(a, b, c, d, 8, 7, T9);
1256 + SET(d, a, b, c, 9, 12, T10);
1257 + SET(c, d, a, b, 10, 17, T11);
1258 + SET(b, c, d, a, 11, 22, T12);
1259 + SET(a, b, c, d, 12, 7, T13);
1260 + SET(d, a, b, c, 13, 12, T14);
1261 + SET(c, d, a, b, 14, 17, T15);
1262 + SET(b, c, d, a, 15, 22, T16);
1263 +#undef SET
1264 +
1265 + /* Round 2. */
1266 + /* Let [abcd k s i] denote the operation
1267 + a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */
1268 +#define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
1269 +#define SET(a, b, c, d, k, s, Ti)\
1270 + t = a + G(b,c,d) + X[k] + Ti;\
1271 + a = ROTATE_LEFT(t, s) + b
1272 + /* Do the following 16 operations. */
1273 + SET(a, b, c, d, 1, 5, T17);
1274 + SET(d, a, b, c, 6, 9, T18);
1275 + SET(c, d, a, b, 11, 14, T19);
1276 + SET(b, c, d, a, 0, 20, T20);
1277 + SET(a, b, c, d, 5, 5, T21);
1278 + SET(d, a, b, c, 10, 9, T22);
1279 + SET(c, d, a, b, 15, 14, T23);
1280 + SET(b, c, d, a, 4, 20, T24);
1281 + SET(a, b, c, d, 9, 5, T25);
1282 + SET(d, a, b, c, 14, 9, T26);
1283 + SET(c, d, a, b, 3, 14, T27);
1284 + SET(b, c, d, a, 8, 20, T28);
1285 + SET(a, b, c, d, 13, 5, T29);
1286 + SET(d, a, b, c, 2, 9, T30);
1287 + SET(c, d, a, b, 7, 14, T31);
1288 + SET(b, c, d, a, 12, 20, T32);
1289 +#undef SET
1290 +
1291 + /* Round 3. */
1292 + /* Let [abcd k s t] denote the operation
1293 + a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */
1294 +#define H(x, y, z) ((x) ^ (y) ^ (z))
1295 +#define SET(a, b, c, d, k, s, Ti)\
1296 + t = a + H(b,c,d) + X[k] + Ti;\
1297 + a = ROTATE_LEFT(t, s) + b
1298 + /* Do the following 16 operations. */
1299 + SET(a, b, c, d, 5, 4, T33);
1300 + SET(d, a, b, c, 8, 11, T34);
1301 + SET(c, d, a, b, 11, 16, T35);
1302 + SET(b, c, d, a, 14, 23, T36);
1303 + SET(a, b, c, d, 1, 4, T37);
1304 + SET(d, a, b, c, 4, 11, T38);
1305 + SET(c, d, a, b, 7, 16, T39);
1306 + SET(b, c, d, a, 10, 23, T40);
1307 + SET(a, b, c, d, 13, 4, T41);
1308 + SET(d, a, b, c, 0, 11, T42);
1309 + SET(c, d, a, b, 3, 16, T43);
1310 + SET(b, c, d, a, 6, 23, T44);
1311 + SET(a, b, c, d, 9, 4, T45);
1312 + SET(d, a, b, c, 12, 11, T46);
1313 + SET(c, d, a, b, 15, 16, T47);
1314 + SET(b, c, d, a, 2, 23, T48);
1315 +#undef SET
1316 +
1317 + /* Round 4. */
1318 + /* Let [abcd k s t] denote the operation
1319 + a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */
1320 +#define I(x, y, z) ((y) ^ ((x) | ~(z)))
1321 +#define SET(a, b, c, d, k, s, Ti)\
1322 + t = a + I(b,c,d) + X[k] + Ti;\
1323 + a = ROTATE_LEFT(t, s) + b
1324 + /* Do the following 16 operations. */
1325 + SET(a, b, c, d, 0, 6, T49);
1326 + SET(d, a, b, c, 7, 10, T50);
1327 + SET(c, d, a, b, 14, 15, T51);
1328 + SET(b, c, d, a, 5, 21, T52);
1329 + SET(a, b, c, d, 12, 6, T53);
1330 + SET(d, a, b, c, 3, 10, T54);
1331 + SET(c, d, a, b, 10, 15, T55);
1332 + SET(b, c, d, a, 1, 21, T56);
1333 + SET(a, b, c, d, 8, 6, T57);
1334 + SET(d, a, b, c, 15, 10, T58);
1335 + SET(c, d, a, b, 6, 15, T59);
1336 + SET(b, c, d, a, 13, 21, T60);
1337 + SET(a, b, c, d, 4, 6, T61);
1338 + SET(d, a, b, c, 11, 10, T62);
1339 + SET(c, d, a, b, 2, 15, T63);
1340 + SET(b, c, d, a, 9, 21, T64);
1341 +#undef SET
1342 +
1343 + /* Then perform the following additions. (That is increment each
1344 + of the four registers by the value it had before this block
1345 + was started.) */
1346 + pms->abcd[0] += a;
1347 + pms->abcd[1] += b;
1348 + pms->abcd[2] += c;
1349 + pms->abcd[3] += d;
1350 +}
1351 +
1352 +void
1353 +md5_init(md5_state_t *pms)
1354 +{
1355 + pms->count[0] = pms->count[1] = 0;
1356 + pms->abcd[0] = 0x67452301;
1357 + pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476;
1358 + pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301;
1359 + pms->abcd[3] = 0x10325476;
1360 +}
1361 +
1362 +void
1363 +md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes)
1364 +{
1365 + const md5_byte_t *p = data;
1366 + int left = nbytes;
1367 + int offset = (pms->count[0] >> 3) & 63;
1368 + md5_word_t nbits = (md5_word_t)(nbytes << 3);
1369 +
1370 + if (nbytes <= 0)
1371 + return;
1372 +
1373 + /* Update the message length. */
1374 + pms->count[1] += nbytes >> 29;
1375 + pms->count[0] += nbits;
1376 + if (pms->count[0] < nbits)
1377 + pms->count[1]++;
1378 +
1379 + /* Process an initial partial block. */
1380 + if (offset) {
1381 + int copy = (offset + nbytes > 64 ? 64 - offset : nbytes);
1382 +
1383 + memcpy(pms->buf + offset, p, copy);
1384 + if (offset + copy < 64)
1385 + return;
1386 + p += copy;
1387 + left -= copy;
1388 + md5_process(pms, pms->buf);
1389 + }
1390 +
1391 + /* Process full blocks. */
1392 + for (; left >= 64; p += 64, left -= 64)
1393 + md5_process(pms, p);
1394 +
1395 + /* Process a final partial block. */
1396 + if (left)
1397 + memcpy(pms->buf, p, left);
1398 +}
1399 +
1400 +void
1401 +md5_finish(md5_state_t *pms, md5_byte_t digest[16])
1402 +{
1403 + static const md5_byte_t pad[64] = {
1404 + 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1405 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1406 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1407 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1408 + };
1409 + md5_byte_t data[8];
1410 + int i;
1411 +
1412 + /* Save the length before padding. */
1413 + for (i = 0; i < 8; ++i)
1414 + data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
1415 + /* Pad to 56 bytes mod 64. */
1416 + md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
1417 + /* Append the length. */
1418 + md5_append(pms, data, 8);
1419 + for (i = 0; i < 16; ++i)
1420 + digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
1421 +}
1422 +/*======== End of L. Peter Deutsch's md5.c ========*/
1423 /*************************************************************************/
1424 /*************************************************************************/
1425
1426 @@ -347,13 +508,13 @@
1427
1428 static int md5_encrypt(const char *src, int len, char *dest, int size)
1429 {
1430 - MD5_CTX context;
1431 + md5_state_t context;
1432
1433 if (size < 16)
1434 return 16;
1435 - MD5Init(&context);
1436 - MD5Update(&context, (unsigned char *)src, len);
1437 - MD5Final((unsigned char *)dest, &context);
1438 + md5_init(&context);
1439 + md5_append(&context, (unsigned char *)src, len);
1440 + md5_finish(&context, (unsigned char *)dest);
1441 return 0;
1442 }
1443
1444 From bender_54 at msn.com Thu May 17 01:07:12 2007
1445 From: bender_54 at msn.com (Nick Bent)
1446 Date: Thu May 17 01:07:16 2007
1447 Subject: [IRCServices Coding] RE: IRCServices-Coding Digest, Vol 33, Issue 1
1448 Message-ID: <BAY115-W187D4F1BEA5BC303C569D181330@phx.gbl>
1449
1450 Skipped content of type multipart/alternative-------------- next part --------------
1451 > Message: 6
1452 > Date: Tue, 17 Apr 2007 15:53:22 JST
1453 > From: achurch@achurch.org (Andrew Church)
1454 > Subject: Re: [IRCServices Coding] Feature Suggestions
1455 > To: ircservices-coding@ircservices.za.net
1456 > Message-ID: <4624733c.06344@msgid.achurch.org>
1457 > Content-Type: text/plain; charset=ISO-2022-JP
1458 >
1459 > To the original poster: Don't use HTML mail on this list.
1460 >
1461 > >> 1. /ns set autoop [on|off] - Just like Anope
1462 > >
1463 > >If this is what I think it is, which is that the nick in question
1464 > >won't be auto-opped on any channel (next time please elaborate on what
1465 > >Anope does), I believe that Andrew may have been considering this at
1466 > >one point (I think it was in one of the TODO lists). That being said,
1467 > >I haven't seen this in 5.1, so it may have been dropped or thrown out.
1468 >
1469 > I've never seen the point to this option (if you don't want auto-ops,
1470 > don't have people give you auto-op access), so I won't be adding it.
1471
1472 You can't stop people from giving you access. This is an attitude thing,
1473 where a user has chosen to only give themselves staus when they need it.
1474
1475 >
1476 > >> 6. When someone does /cs info #channel, and it shows the mode lock, make it
1477 > >> show the locked mode paramaters too.
1478 > >
1479 > >Bad idea. I'm sure that no-one wants to see their channel key
1480 > >displayed in this manner. :)
1481 >
1482 > Exactly. As for other modes, just look at the channel's current mode
1483 > set, which will naturally be the same as what's set in the mode lock.
1484 >
1485 > --Andrew Church
1486
1487 Perhaps show parameters for all modes but k? Using one command instead of two to
1488 see the full mode lock would be nice.
1489
1490 Nick
1491 From ron2k.za at gmail.com Thu May 17 01:14:48 2007
1492 From: ron2k.za at gmail.com (Kieron Thwaites)
1493 Date: Thu May 17 01:14:52 2007
1494 Subject: [IRCServices Coding] RE: IRCServices-Coding Digest, Vol 33,
1495 Issue 1
1496 In-Reply-To: <BAY115-W187D4F1BEA5BC303C569D181330@phx.gbl>
1497 References: <BAY115-W187D4F1BEA5BC303C569D181330@phx.gbl>
1498 Message-ID: <debb3bc0705170114p799455f2gac77808b854103cc@mail.gmail.com>
1499
1500 OK, why the text file? It makes your message rather inconvenient to
1501 read. Either that, or I'm just lazy. :)
1502
1503 Now to respond to your points.
1504
1505 1. I'm in agreement with Andrew. If you don't want access, tell
1506 whoever is controlling the channel not to give you access, or write a
1507 script in your client (if your client supports it) to remove said
1508 access.
1509
1510 If you want this functionality to be in Services, feel free to write a
1511 module that does this. :)
1512
1513 2. In my opinion, totally unnecessary.
1514
1515 --K
1516
1517 On 17/05/07, Nick Bent <bender_54@msn.com> wrote:
1518 > .txt file attached
1519 > ________________________________
1520 > Invite your mail contacts to join your friends list with Windows Live
1521 > Spaces. It's easy! Try it!
1522 > ------------------------------------------------------------------
1523 > To unsubscribe or change your subscription options, visit:
1524 > http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
1525 >
1526 >
1527 From surreal.w00t at gmail.com Thu May 17 03:53:56 2007
1528 From: surreal.w00t at gmail.com (Robin Burchell)
1529 Date: Thu May 17 03:54:02 2007
1530 Subject: [IRCServices Coding] RE: IRCServices-Coding Digest, Vol 33,
1531 Issue 1
1532 In-Reply-To: <debb3bc0705170114p799455f2gac77808b854103cc@mail.gmail.com>
1533 References: <BAY115-W187D4F1BEA5BC303C569D181330@phx.gbl>
1534 <debb3bc0705170114p799455f2gac77808b854103cc@mail.gmail.com>
1535 Message-ID: <b19eae4e0705170353w7e21e997sc22961481f80e170@mail.gmail.com>
1536
1537 Is it actually possible to remove your own access (vop, whatever) from
1538 a channel? If not, that might be something to think about instead.
1539
1540 On 5/17/07, Kieron Thwaites <ron2k.za@gmail.com> wrote:
1541 > OK, why the text file? It makes your message rather inconvenient to
1542 > read. Either that, or I'm just lazy. :)
1543 >
1544 > Now to respond to your points.
1545 >
1546 > 1. I'm in agreement with Andrew. If you don't want access, tell
1547 > whoever is controlling the channel not to give you access, or write a
1548 > script in your client (if your client supports it) to remove said
1549 > access.
1550 >
1551 > If you want this functionality to be in Services, feel free to write a
1552 > module that does this. :)
1553 >
1554 > 2. In my opinion, totally unnecessary.
1555 >
1556 > --K
1557 >
1558 > On 17/05/07, Nick Bent <bender_54@msn.com> wrote:
1559 > > .txt file attached
1560 > > ________________________________
1561 > > Invite your mail contacts to join your friends list with Windows Live
1562 > > Spaces. It's easy! Try it!
1563 > > ------------------------------------------------------------------
1564 > > To unsubscribe or change your subscription options, visit:
1565 > > http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
1566 > >
1567 > >
1568 > ------------------------------------------------------------------
1569 > To unsubscribe or change your subscription options, visit:
1570 > http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
1571 >
1572 From tim at retout.co.uk Thu May 17 05:50:40 2007
1573 From: tim at retout.co.uk (Tim Retout)
1574 Date: Thu May 17 05:52:12 2007
1575 Subject: [IRCServices Coding] Debian packages
1576 In-Reply-To: <464b5efb.10707@msgid.achurch.org>
1577 References: <464b5efb.10707@msgid.achurch.org>
1578 Message-ID: <1179406240.3796.20.camel@regulus.retout.co.uk>
1579
1580 On Thu, 2007-05-17 at 04:42 +0000, Andrew Church wrote:
1581 > >I notice that binary Debian packages are available for i386 from your
1582 > >website - but would it be helpful if I packaged ircservices and
1583 > >submitted it to the main Debian archive? This would make it even easier
1584 > >for Debian users like myself to use your software, especially if they
1585 > >are using a different architecture.
1586 >
1587 > If you'd be willing to do that, I'd certainly appreciate it! Please
1588 > let me know if there are any issues regarding packaging (such as file
1589 > layout), and I'll see if I can resolve them.
1590
1591 I have filed an ITP: http://bugs.debian.org/424844
1592
1593 It would be nice to update support for ircd-irc2 and ircd-ircu, both of
1594 which appear to use newer server protocols these days.
1595
1596 --
1597 Tim Retout <tim@retout.co.uk>
1598
1599 From omster at gmail.com Thu May 17 06:58:12 2007
1600 From: omster at gmail.com (Om)
1601 Date: Thu May 17 06:58:33 2007
1602 Subject: [IRCServices Coding] RE: IRCServices-Coding Digest, Vol 33, Issue
1603 1
1604 In-Reply-To: <b19eae4e0705170353w7e21e997sc22961481f80e170@mail.gmail.com>
1605 References: <BAY115-W187D4F1BEA5BC303C569D181330@phx.gbl> <debb3bc0705170114p799455f2gac77808b854103cc@mail.gmail.com>
1606 <b19eae4e0705170353w7e21e997sc22961481f80e170@mail.gmail.com>
1607 Message-ID: <464C5F74.7060108@gmail.com>
1608
1609 Robin Burchell wrote:
1610 > Is it actually possible to remove your own access (vop, whatever) from
1611 > a channel? If not, that might be something to think about instead.
1612
1613 As long as it doesn't let you remove a negative access level ;p
1614 From achurch at achurch.org Fri May 18 01:23:34 2007
1615 From: achurch at achurch.org (Andrew Church)
1616 Date: Thu May 17 09:25:07 2007
1617 Subject: [IRCServices Coding] Debian packages
1618 In-Reply-To: <1179406240.3796.20.camel@regulus.retout.co.uk>
1619 Message-ID: <464c81de.46627@msgid.achurch.org>
1620
1621 >I have filed an ITP: http://bugs.debian.org/424844
1622 >
1623 >It would be nice to update support for ircd-irc2 and ircd-ircu, both of
1624 >which appear to use newer server protocols these days.
1625
1626 I'll take a look and see if it's feasible (my recollection at least
1627 as far as ircu is concerned is that P10 was missing some critical features
1628 that made it incompatible with Services) Do you know where documentation
1629 on the protocols used by these servers can be found?
1630
1631 --Andrew Church
1632 achurch@achurch.org
1633 http://achurch.org/
1634 From achurch at achurch.org Fri May 18 01:29:39 2007
1635 From: achurch at achurch.org (Andrew Church)
1636 Date: Thu May 17 09:31:36 2007
1637 Subject: [IRCServices Coding] RE: IRCServices-Coding Digest, Vol 33,
1638 Issue 1
1639 In-Reply-To: <b19eae4e0705170353w7e21e997sc22961481f80e170@mail.gmail.com>
1640 Message-ID: <464c8366.46635@msgid.achurch.org>
1641
1642 >Is it actually possible to remove your own access (vop, whatever) from
1643 >a channel? If not, that might be something to think about instead.
1644
1645 I couldn't read the original message, but this looks like something
1646 worth thinking about. I'll consider it.
1647
1648 --Andrew Church
1649 achurch@achurch.org
1650 http://achurch.org/
1651 From tim at retout.co.uk Fri May 18 00:46:09 2007
1652 From: tim at retout.co.uk (Tim Retout)
1653 Date: Fri May 18 00:47:35 2007
1654 Subject: [IRCServices Coding] md5 licensing
1655 In-Reply-To: <464b6285.20022@msgid.achurch.org>
1656 References: <464b6285.20022@msgid.achurch.org>
1657 Message-ID: <1179474369.4232.7.camel@regulus.retout.co.uk>
1658
1659 On Thu, 2007-05-17 at 04:48 +0000, Andrew Church wrote:
1660 > >Please review this patch (against 5.1pre1) to port the md5 code to an
1661 > >implementation licensed under a revised-BSD-style licence, found at:
1662 > >http://sourceforge.net/project/showfiles.php?group_id=42360
1663 >
1664 > Thanks for pointing this out. I've applied the patch below to
1665 > 5.1pre1; let me know if you see any problems.
1666
1667 The docs/Changes hunk didn't apply for me, but that's trivial. The code
1668 passes my brief, brief testing. :)
1669
1670 Thanks,
1671
1672 --
1673 Tim Retout <tim@retout.co.uk>
1674
1675 From tim at retout.co.uk Fri May 18 01:58:01 2007
1676 From: tim at retout.co.uk (Tim Retout)
1677 Date: Fri May 18 01:59:24 2007
1678 Subject: [IRCServices Coding] Debian packages
1679 In-Reply-To: <464c81de.46627@msgid.achurch.org>
1680 References: <464c81de.46627@msgid.achurch.org>
1681 Message-ID: <1179478681.4232.15.camel@regulus.retout.co.uk>
1682
1683 On Fri, 2007-05-18 at 01:23 +0000, Andrew Church wrote:
1684 > >I have filed an ITP: http://bugs.debian.org/424844
1685 > >
1686 > >It would be nice to update support for ircd-irc2 and ircd-ircu, both of
1687 > >which appear to use newer server protocols these days.
1688 >
1689 > I'll take a look and see if it's feasible (my recollection at least
1690 > as far as ircu is concerned is that P10 was missing some critical features
1691 > that made it incompatible with Services) Do you know where documentation
1692 > on the protocols used by these servers can be found?
1693
1694 For ircu, there's:
1695 http://web.mit.edu/klmitch/Sipb/devel/src/ircu2.10.11/doc/p10.html
1696
1697 ircnet's appears to have docs in the tarball:
1698 ftp://ftp.irc.org/irc/server/irc2.11.1p1.tgz
1699
1700 I'll see what I can do to help with these. Meanwhile, I'll just make a
1701 package, since I need one.
1702
1703 There's also been a request that I use a different name for the package,
1704 as 'ircservices' is 'very generic'. I'm not sure what you think about
1705 that.
1706
1707 --
1708 Tim Retout <tim@retout.co.uk>
1709
1710 From achurch at achurch.org Fri May 18 18:10:27 2007
1711 From: achurch at achurch.org (Andrew Church)
1712 Date: Fri May 18 02:21:31 2007
1713 Subject: [IRCServices Coding] Debian packages
1714 In-Reply-To: <1179478681.4232.15.camel@regulus.retout.co.uk>
1715 Message-ID: <464d7017.47545@msgid.achurch.org>
1716
1717 >> I'll take a look and see if it's feasible (my recollection at least
1718 >> as far as ircu is concerned is that P10 was missing some critical features
1719 >> that made it incompatible with Services) Do you know where documentation
1720 >> on the protocols used by these servers can be found?
1721 >
1722 >For ircu, there's:
1723 >http://web.mit.edu/klmitch/Sipb/devel/src/ircu2.10.11/doc/p10.html
1724
1725 Unfortunately, this is very incomplete, so I'll have to put it off
1726 until I have the time to study the source code myself.
1727
1728 >ircnet's appears to have docs in the tarball:
1729 >ftp://ftp.irc.org/irc/server/irc2.11.1p1.tgz
1730
1731 I can't find any technical documentation in there aside from the
1732 base RFCs, so this will also have to wait for a closer look at the
1733 source code.
1734
1735 >There's also been a request that I use a different name for the package,
1736 >as 'ircservices' is 'very generic'. I'm not sure what you think about
1737 >that.
1738
1739 I think I'm going to have to say no to that, since ircservices is
1740 the official name of the package--and to be honest, as the author of the
1741 first widely used Services package, I think I have a right to the name. :)
1742 See e.g.: http://freshmeat.net/projects/ircservices/
1743
1744 --Andrew Church
1745 achurch@achurch.org
1746 http://achurch.org/
1747 From tim at retout.co.uk Fri Jul 13 03:18:39 2007
1748 From: tim at retout.co.uk (Tim Retout)
1749 Date: Fri Jul 13 03:20:58 2007
1750 Subject: [IRCServices Coding] Build prefix/FHS compliance
1751 Message-ID: <1184321919.6368.14.camel@regulus.retout.co.uk>
1752
1753 Hi! After a bit of a hiatus for DebConf, I'm catching up with my
1754 packaging work.
1755
1756 I've worked out three changes that I'd like to make for Debian:
1757
1758 * You may have noticed that the consensus on the Debian bug
1759 tracker is that I need to change the package name to something
1760 other than 'ircservices' to fit into the package namespace - so
1761 I'd like to change the binary name as well. Currently the value
1762 of $(PROGRAM) in the Makefile doesn't affect the pidfile or the
1763 ircservices-chk script.
1764 * I need to be able to change the build prefix independently for
1765 'make install' - i.e. as if installing into a chroot. I could
1766 either add an $(INSTALL_PREFIX) variable, or possibly modify
1767 $(PREFIX) in a backwards-compatible way.
1768 * The default locations of the installed files will need modifying
1769 to fit into the Filesystem Hierarchy Standard. This will be the
1770 most complicated patch, I expect.
1771
1772 I realise this is at a really bad time in your release process, so if I
1773 don't get all of these done in time, I can maintain patches against the
1774 released version.
1775
1776 Thanks,
1777
1778 --
1779 Tim Retout <tim@retout.co.uk>
1780
1781 From achurch at achurch.org Fri Jul 13 19:54:25 2007
1782 From: achurch at achurch.org (Andrew Church)
1783 Date: Fri Jul 13 03:59:54 2007
1784 Subject: [IRCServices Coding] Build prefix/FHS compliance
1785 In-Reply-To: <1184321919.6368.14.camel@regulus.retout.co.uk>
1786 Message-ID: <46975b27.53464@msgid.achurch.org>
1787
1788 Thanks for the notes. I'm swamped with work at the moment, but I'll
1789 definitely look into addressing the first two points for the next beta
1790 release.
1791
1792 As far as FHS compliance goes, can you make any specific suggestions?
1793 I'm not sure how much I can do, since Services' design requires all data
1794 under a common hierarchy, and at this point it's a bit late to go back and
1795 change that so it works reliably with scattered files. It may suffice in
1796 at least some cases to use absolute rather than relative paths, though, so
1797 let me know what changes you'd recommend and I'll see how feasable they
1798 are.
1799
1800 --Andrew Church
1801 achurch@achurch.org
1802 http://achurch.org/
1803
1804 >Hi! After a bit of a hiatus for DebConf, I'm catching up with my
1805 >packaging work.
1806 >
1807 >I've worked out three changes that I'd like to make for Debian:
1808 >
1809 > * You may have noticed that the consensus on the Debian bug
1810 > tracker is that I need to change the package name to something
1811 > other than 'ircservices' to fit into the package namespace - so
1812 > I'd like to change the binary name as well. Currently the value
1813 > of $(PROGRAM) in the Makefile doesn't affect the pidfile or the
1814 > ircservices-chk script.
1815 > * I need to be able to change the build prefix independently for
1816 > 'make install' - i.e. as if installing into a chroot. I could
1817 > either add an $(INSTALL_PREFIX) variable, or possibly modify
1818 > $(PREFIX) in a backwards-compatible way.
1819 > * The default locations of the installed files will need modifying
1820 > to fit into the Filesystem Hierarchy Standard. This will be the
1821 > most complicated patch, I expect.
1822 >
1823 >I realise this is at a really bad time in your release process, so if I
1824 >don't get all of these done in time, I can maintain patches against the
1825 >released version.
1826 >
1827 >Thanks,
1828 >
1829 >--
1830 >Tim Retout <tim@retout.co.uk>
1831 >
1832 >------------------------------------------------------------------
1833 >To unsubscribe or change your subscription options, visit:
1834 >http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
1835 From tim at retout.co.uk Fri Jul 20 06:43:16 2007
1836 From: tim at retout.co.uk (Tim Retout)
1837 Date: Fri Jul 20 06:44:50 2007
1838 Subject: [IRCServices Coding] Build prefix/FHS compliance
1839 In-Reply-To: <46975b27.53464@msgid.achurch.org>
1840 References: <46975b27.53464@msgid.achurch.org>
1841 Message-ID: <1184938996.8469.15.camel@regulus.retout.co.uk>
1842
1843 Skipped content of type multipart/mixed-------------- next part --------------
1844 A non-text attachment was scrubbed...
1845 Name: not available
1846 Type: application/pgp-signature
1847 Size: 189 bytes
1848 Desc: This is a digitally signed message part
1849 Url : http://lists.ircservices.za.net/pipermail/ircservices-coding/attachments/20070720/7e722ea8/attachment.pgp
1850 From achurch at achurch.org Sun Jul 22 23:48:53 2007
1851 From: achurch at achurch.org (Andrew Church)
1852 Date: Sun Jul 22 07:50:22 2007
1853 Subject: [IRCServices Coding] Build prefix/FHS compliance
1854 In-Reply-To: <1184938996.8469.15.camel@regulus.retout.co.uk>
1855 Message-ID: <46a36ea2.54537@msgid.achurch.org>
1856
1857 Just a note to let you know I've got the patch--thanks. I'll take a look
1858 at it when I have a chance.
1859
1860 --Andrew Church
1861 achurch@achurch.org
1862 http://achurch.org/
1863
1864 >On Fri, 2007-07-13 at 19:54 +0000, Andrew Church wrote:
1865 >> As far as FHS compliance goes, can you make any specific suggestions?
1866 >> I'm not sure how much I can do, since Services' design requires all data
1867 >> under a common hierarchy, and at this point it's a bit late to go back and
1868 >> change that so it works reliably with scattered files. It may suffice in
1869 >> at least some cases to use absolute rather than relative paths, though, so
1870 >> let me know what changes you'd recommend and I'll see how feasable they
1871 >> are.
1872 >
1873 >Attached is a patch I'm currently using in the package - I've not
1874 >finished testing it, but the idea is that things like modules, config
1875 >files, language files and the helpfiles are opened only in one place, so
1876 >are easy to relocate. Anything else can be fixed with absolute paths in
1877 >the config files.
1878 >
1879 >The build system gets patched to add some configuration options to
1880 >support this - it also implements the $(DESTDIR) prefix for the install
1881 >target.
1882 >
1883 >(I'm happy to hand over whatever little copyright is in this patch.)
1884 >
1885 >--
1886 >Tim Retout <tim@retout.co.uk>
1887 From tim at retout.co.uk Sat Jul 28 07:51:04 2007
1888 From: tim at retout.co.uk (Tim Retout)
1889 Date: Sat Jul 28 07:51:59 2007
1890 Subject: [IRCServices Coding] FTBFS on amd64
1891 Message-ID: <1185634264.12950.7.camel@regulus.retout.co.uk>
1892
1893 Skipped content of type multipart/mixed-------------- next part --------------
1894 A non-text attachment was scrubbed...
1895 Name: not available
1896 Type: application/pgp-signature
1897 Size: 189 bytes
1898 Desc: This is a digitally signed message part
1899 Url : http://lists.ircservices.za.net/pipermail/ircservices-coding/attachments/20070728/dc2f45d2/attachment-0001.pgp
1900 From tim at retout.co.uk Sat Jul 28 07:51:03 2007
1901 From: tim at retout.co.uk (Tim Retout)
1902 Date: Sat Jul 28 07:52:00 2007
1903 Subject: [IRCServices Coding] FTBFS on amd64
1904 Message-ID: <1185634263.12950.6.camel@regulus.retout.co.uk>
1905
1906 Skipped content of type multipart/mixed-------------- next part --------------
1907 A non-text attachment was scrubbed...
1908 Name: not available
1909 Type: application/pgp-signature
1910 Size: 189 bytes
1911 Desc: This is a digitally signed message part
1912 Url : http://lists.ircservices.za.net/pipermail/ircservices-coding/attachments/20070728/3b5f4e9f/attachment.pgp
1913 From achurch at achurch.org Sun Jul 29 23:32:00 2007
1914 From: achurch at achurch.org (Andrew Church)
1915 Date: Sun Jul 29 08:08:59 2007
1916 Subject: [IRCServices Coding] FTBFS on amd64
1917 In-Reply-To: <1185634264.12950.7.camel@regulus.retout.co.uk>
1918 Message-ID: <46acad80.20264@msgid.achurch.org>
1919
1920 Thanks for the note, but I'm going to reject most of this as unnecessary;
1921 Services doesn't use the int*_t types for historical reasons (see section
1922 11-1 of the technical manual), and the pointer->int conversions, while bad
1923 practice, are known to always fit in 32 bits. I've corrected the two
1924 format string bits, since pointer differences and size_t could legitimately
1925 be wider than an int.
1926
1927 --Andrew Church
1928 achurch@achurch.org
1929 http://achurch.org/
1930
1931 >
1932 >--===============1334927669==
1933 >Content-Type: multipart/signed; micalg=pgp-sha1;
1934 > protocol="application/pgp-signature";
1935 > boundary="=-9UM9eTCG9p0bZ0vGzUkL"
1936 >
1937 >
1938 >--=-9UM9eTCG9p0bZ0vGzUkL
1939 >Content-Type: multipart/mixed; boundary="=-P2RArCa9ERxXvALoWALg"
1940 >
1941 >
1942 >--=-P2RArCa9ERxXvALoWALg
1943 >Content-Type: text/plain
1944 >Content-Transfer-Encoding: quoted-printable
1945 >
1946 >Hi,
1947 >
1948 >It seems that the header <sys/types.h> does not define uint32_t on all
1949 >architectures, so this patch uses <inttypes.h> by default instead, and
1950 >fixes most of the build warnings.
1951 >
1952 >Thanks,
1953 >
1954 >--=20
1955 >Tim Retout <tim@retout.co.uk>
1956 >
1957 >--=-P2RArCa9ERxXvALoWALg
1958 >Content-Disposition: attachment; filename=inttypes.diff
1959 >Content-Type: text/x-patch; name=inttypes.diff; charset=UTF-8
1960 >Content-Transfer-Encoding: base64
1961 >
1962 >SW5kZXg6IGlyY3NlcnZpY2VzLWNodXJjaC01LjF+cHJlMy9kZWZzLmgNCj09PT09PT09PT09PT09
1963 >PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCi0t
1964 >LSBpcmNzZXJ2aWNlcy1jaHVyY2gtNS4xfnByZTMub3JpZy9kZWZzLmgJMjAwNy0wNy0yOCAxNTox
1965 >NToyNy4wMDAwMDAwMDAgKzAxMDANCisrKyBpcmNzZXJ2aWNlcy1jaHVyY2gtNS4xfnByZTMvZGVm
1966 >cy5oCTIwMDctMDctMjggMTU6MTU6MjcuMDAwMDAwMDAwICswMTAwDQpAQCAtMTM3LDcgKzEzNyw3
1967 >IEBADQogI2luY2x1ZGUgPGVycm5vLmg+DQogI2luY2x1ZGUgPGxpbWl0cy5oPg0KICNpbmNsdWRl
1968 >IDxtYXRoLmg+DQotI2luY2x1ZGUgPHN5cy90eXBlcy5oPg0KKyNpbmNsdWRlIDxpbnR0eXBlcy5o
1969 >Pg0KICNpbmNsdWRlIDxzeXMvdGltZS5oPg0KIA0KICN1bmRlZiBlbmNyeXB0DQpJbmRleDogaXJj
1970 >c2VydmljZXMtY2h1cmNoLTUuMX5wcmUzL2xhbmd1YWdlLmMNCj09PT09PT09PT09PT09PT09PT09
1971 >PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0NCi0tLSBpcmNz
1972 >ZXJ2aWNlcy1jaHVyY2gtNS4xfnByZTMub3JpZy9sYW5ndWFnZS5jCTIwMDctMDctMjggMTU6MTU6
1973 >MjcuMDAwMDAwMDAwICswMTAwDQorKysgaXJjc2VydmljZXMtY2h1cmNoLTUuMX5wcmUzL2xhbmd1
1974 >YWdlLmMJMjAwNy0wNy0yOCAxNToxNToyNy4wMDAwMDAwMDAgKzAxMDANCkBAIC0yOTAsNyArMjkw
1975 >LDcgQEANCiAgICAgRklMRSAqZjsNCiAgICAgY2hhciBidWZbQlVGU0laRV0sICpzOw0KICAgICBj
1976 >aGFyICoqbmV3dGV4dHNbTlVNX0xBTkdTXTsNCi0gICAgdWludDMyIG5ld3NpemVzW05VTV9MQU5H
1977 >U107DQorICAgIHVpbnRwdHJfdCBuZXdzaXplc1tOVU1fTEFOR1NdOw0KICAgICBpbnQgaSwgY3Vy
1978 >c3RyLCBjdXJsYW5nLCBsaW5lOw0KICAgICBpbnQgcmV0dmFsID0gMSwgZmlyc3RsaW5lID0gMTsN
1979 >CiANCkBAIC00MTUsMTAgKzQxNSwxMCBAQA0KICAgICAgICAgICAgIG5ld3RleHRzW2N1cmxhbmdd
1980 >WzBdID0gbmV3YnVmOw0KICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBudW1fc3RyaW5nczsg
1981 >aSsrKSB7DQogICAgICAgICAgICAgICAgIGlmIChuZXd0ZXh0c1tjdXJsYW5nXVtpKzFdKSB7DQot
1982 >ICAgICAgICAgICAgICAgICAgICBpbnQgb2ZzID0gKGludCluZXd0ZXh0c1tjdXJsYW5nXVtpKzFd
1983 >IC0gMTsNCisgICAgICAgICAgICAgICAgICAgIGludHB0cl90IG9mcyA9IChpbnRwdHJfdCluZXd0
1984 >ZXh0c1tjdXJsYW5nXVtpKzFdIC0gMTsNCiAgICAgICAgICAgICAgICAgICAgIG5ld3RleHRzW2N1
1985 >cmxhbmddW2krMV0gPSBuZXdidWYrNCArIG9sZGxlbiArIG9mczsNCiAgICAgICAgICAgICAgICAg
1986 >fSBlbHNlIGlmIChsYW5ndGV4dHNbY3VybGFuZ11baSsxXSkgew0KLSAgICAgICAgICAgICAgICAg
1987 >ICAgaW50IG9mcyA9IGxhbmd0ZXh0c1tjdXJsYW5nXVtpKzFdDQorICAgICAgICAgICAgICAgICAg
1988 >ICBpbnRwdHJfdCBvZnMgPSBsYW5ndGV4dHNbY3VybGFuZ11baSsxXQ0KICAgICAgICAgICAgICAg
1989 >ICAgICAgICAgICAgICAgIC0gbGFuZ3RleHRzW2N1cmxhbmddWzBdOw0KICAgICAgICAgICAgICAg
1990 >ICAgICAgbmV3dGV4dHNbY3VybGFuZ11baSsxXSA9IG5ld2J1ZiArIG9mczsNCiAgICAgICAgICAg
1991 >ICAgICAgfSBlbHNlIHsNCkluZGV4OiBpcmNzZXJ2aWNlcy1jaHVyY2gtNS4xfnByZTMvc29ja2V0
1992 >cy5jDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
1993 >PT09PT09PT09PT09PT09DQotLS0gaXJjc2VydmljZXMtY2h1cmNoLTUuMX5wcmUzLm9yaWcvc29j
1994 >a2V0cy5jCTIwMDctMDYtMTAgMTQ6MTM6MDQuMDAwMDAwMDAwICswMTAwDQorKysgaXJjc2Vydmlj
1995 >ZXMtY2h1cmNoLTUuMX5wcmUzL3NvY2tldHMuYwkyMDA3LTA3LTI4IDE1OjM2OjQ0LjAwMDAwMDAw
1996 >MCArMDEwMA0KQEAgLTE4MTAsOCArMTgxMCw4IEBADQogICAgIEVOVEVSKCIlcCwldSIsIHMsIHNp
1997 >emUpOw0KICAgICBpZiAoc2l6ZSA8PSByZWFkX2J1ZmZlcl9sZW4ocykpIHsNCiAgICAgICAgIGxv
1998 >Zygic29ja2V0czogQlVHOiByZXNpemVfcmJ1ZiglZCk6IHNpemUgKCVkKSA8PSBybGVuICglZCki
1999 >DQotICAgICAgICAgICAgIiAoY3Vyc2l6ZSAlZCkiLCBzLT5mZCwgc2l6ZSwgcmVhZF9idWZmZXJf
2000 >bGVuKHMpLA0KLSAgICAgICAgICAgIHMtPnJ0b3AgLSBzLT5yYnVmKTsNCisgICAgICAgICAgICAi
2001 >IChjdXJzaXplICVsZCkiLCBzLT5mZCwgc2l6ZSwgcmVhZF9idWZmZXJfbGVuKHMpLA0KKyAgICAg
2002 >ICAgICAgIChsb25nKShzLT5ydG9wIC0gcy0+cmJ1ZikpOw0KICAgICAgICAgUkVUVVJOX1dJVEgo
2003 >MCk7DQogICAgIH0NCiAgICAgUkVUVVJOX1dJVEgocmVzaXplX2J1Zigmcy0+cmJ1ZiwgJnMtPnJw
2004 >dHIsICZzLT5yZW5kLCAmcy0+cnRvcCwgc2l6ZSkpOw0KQEAgLTE4MjMsOCArMTgyMyw4IEBADQog
2005 >ICAgIEVOVEVSKCIlcCwldSIsIHMsIHNpemUpOw0KICAgICBpZiAoc2l6ZSA8PSB3cml0ZV9idWZm
2006 >ZXJfbGVuKHMpKSB7DQogICAgICAgICBsb2coInNvY2tldHM6IEJVRzogcmVzaXplX3didWYoJWQp
2007 >OiBzaXplICglZCkgPD0gd2xlbiAoJWQpIg0KLSAgICAgICAgICAgICIgKGN1cnNpemUgJWQpIiwg
2008 >cy0+ZmQsIHNpemUsIHdyaXRlX2J1ZmZlcl9sZW4ocyksDQotICAgICAgICAgICAgcy0+d3RvcCAt
2009 >IHMtPndidWYpOw0KKyAgICAgICAgICAgICIgKGN1cnNpemUgJWxkKSIsIHMtPmZkLCBzaXplLCB3
2010 >cml0ZV9idWZmZXJfbGVuKHMpLA0KKyAgICAgICAgICAgIChsb25nKShzLT53dG9wIC0gcy0+d2J1
2011 >ZikpOw0KICAgICAgICAgUkVUVVJOX1dJVEgoMCk7DQogICAgIH0NCiAgICAgUkVUVVJOX1dJVEgo
2012 >cmVzaXplX2J1Zigmcy0+d2J1ZiwgJnMtPndwdHIsICZzLT53ZW5kLCAmcy0+d3RvcCwgc2l6ZSkp
2013 >Ow0KQEAgLTIwODcsNyArMjA4Nyw3IEBADQogICAgICAgICBlcnJubyA9IEVJTlZBTDsNCiAgICAg
2014 >ICAgIFJFVFVSTl9XSVRIKC0xKTsNCiAgICAgfQ0KLSAgICBpZiAoKHMtPmZsYWdzICYgU0ZfRElT
2015 >Q09OTkVDVElORykgJiYgISgoaW50KWNvZGUgJiBESVNDT05OX1JFU1VNRV9GTEFHKSkNCisgICAg
2016 >aWYgKChzLT5mbGFncyAmIFNGX0RJU0NPTk5FQ1RJTkcpICYmICEoKGludHB0cl90KWNvZGUgJiBE
2017 >SVNDT05OX1JFU1VNRV9GTEFHKSkNCiAgICAgICAgIFJFVFVSTl9XSVRIKDApOw0KICAgICBpZiAo
2018 >KHMtPmZsYWdzICYgU0ZfRElTQ09OTl9SRVEpICYmIGNvZGUgPT0gRElTQ09OTl9MT0NBTCkNCiAg
2019 >ICAgICAgIFJFVFVSTl9XSVRIKDApOw0KQEAgLTIxMjIsNyArMjEyMiw3IEBADQogICAgICAgICAv
2020 >KiBUaGUgZGlzY29ubmVjdCBjYWxsYmFjayBkb2Vzbid0IG5lZWQgdG8gY2hlY2sgZm9yIGRpc2Nv
2021 >bm5lY3Rpb24sDQogICAgICAgICAgKiBzbyB3ZSBqdXN0IGNhbGwgaXQgZGlyZWN0bHkgKi8NCiAg
2022 >ICAgICAgIGVycm5vID0gZXJybm9fc2F2ZTsNCi0gICAgICAgIHMtPmNiX2Rpc2Nvbm4ocywgKHZv
2023 >aWQgKikoKGludCljb2RlICYgfkRJU0NPTk5fUkVTVU1FX0ZMQUcpKTsNCisgICAgICAgIHMtPmNi
2024 >X2Rpc2Nvbm4ocywgKHZvaWQgKikoKGludHB0cl90KWNvZGUgJiB+RElTQ09OTl9SRVNVTUVfRkxB
2025 >RykpOw0KICAgICB9DQogICAgIHMtPmZsYWdzICY9IH5TRl9ESVNDT05ORUNUSU5HOw0KICAgICBp
2026 >ZiAocy0+ZmQgPj0gMCkgew0KSW5kZXg6IGlyY3NlcnZpY2VzLWNodXJjaC01LjF+cHJlMy9tb2R1
2027 >bGVzL2VuY3J5cHRpb24vdW5peC1jcnlwdC5jDQo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
2028 >PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09DQotLS0gaXJjc2VydmljZXMt
2029 >Y2h1cmNoLTUuMX5wcmUzLm9yaWcvbW9kdWxlcy9lbmNyeXB0aW9uL3VuaXgtY3J5cHQuYwkyMDA3
2030 >LTA2LTEwIDE0OjEzOjA1LjAwMDAwMDAwMCArMDEwMA0KKysrIGlyY3NlcnZpY2VzLWNodXJjaC01
2031 >LjF+cHJlMy9tb2R1bGVzL2VuY3J5cHRpb24vdW5peC1jcnlwdC5jCTIwMDctMDctMjggMTU6MTU6
2032 >MjcuMDAwMDAwMDAwICswMTAwDQpAQCAtNDQsNyArNDQsNyBAQA0KICAgICB9DQogICAgIGlmIChz
2033 >dHJsZW4ocmVzKSA+IHNpemUtMSkgew0KICAgICAgICAgbW9kdWxlX2xvZygiZW5jcnlwdDogY3J5
2034 >cHQoKSByZXR1cm5lZCB0b28gbG9uZyBhIHN0cmluZyEgKCVkIg0KLSAgICAgICAgICAgICAgICAg
2035 >ICAiIGNoYXJhY3RlcnMpIiwgc3RybGVuKHJlcykpOw0KKyAgICAgICAgICAgICAgICAgICAiIGNo
2036 >YXJhY3RlcnMpIiwgKGludClzdHJsZW4ocmVzKSk7DQogICAgICAgICByZXR1cm4gc3RybGVuKHJl
2037 >cykgKyAxOw0KICAgICB9DQogICAgIHN0cnNjcHkoZGVzdCwgcmVzLCBzaXplKTsNCn==
2038 >
2039 >
2040 >--=-P2RArCa9ERxXvALoWALg--
2041 >
2042 >--=-9UM9eTCG9p0bZ0vGzUkL
2043 >Content-Type: application/pgp-signature; name=signature.asc
2044 >Content-Description: This is a digitally signed message part
2045 >
2046 >-----BEGIN PGP SIGNATURE-----
2047 >Version: GnuPG v1.4.6 (GNU/Linux)
2048 >
2049 >iD8DBQBGq1fYOHNNd4eQFFIRAvuZAKDq4k4Jn0eL0fyu3P/D7qwsn4T24wCfSMAI
2050 >90bFNYpl49Pnnn8mygn3/ls=
2051 >=ixXP
2052 >-----END PGP SIGNATURE-----
2053 >
2054 >--=-9UM9eTCG9p0bZ0vGzUkL--
2055 >
2056 >
2057 >--===============1334927669==
2058 >Content-Type: text/plain; charset="us-ascii"
2059 >MIME-Version: 1.0
2060 >Content-Transfer-Encoding: 7bit
2061 >Content-Disposition: inline
2062 >
2063 >------------------------------------------------------------------
2064 >To unsubscribe or change your subscription options, visit:
2065 >http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
2066 >--===============1334927669==--
2067 >
2068 From dmartin at tekconxus.com Sun Aug 5 01:14:11 2007
2069 From: dmartin at tekconxus.com (Dereck Martin)
2070 Date: Sun Aug 5 01:14:07 2007
2071 Subject: [IRCServices Coding] XML Export to mySQL with PHP
2072 Message-ID: <46B586D3.8030205@tekconxus.com>
2073
2074 -----BEGIN PGP SIGNED MESSAGE-----
2075 Hash: SHA1
2076
2077 Hello All,
2078
2079 I have wrote a php script that will essentially sync up the services xml
2080 export found in the /dbaccess/xml-export/ of http server to mysql. It
2081 doesn't do all the values, but most of the them (at least the ones most
2082 care about). I will run this as a night cron job.
2083
2084 This script basically takes the most current xml export, parses it, and
2085 then compares it to the mysql database. If there are new or modified
2086 entries it will add or update them. If there are any entries that are
2087 old and need to be removed (expired nicks/channels/unlinked nicks), it
2088 deletes them.
2089
2090 I am sharing this script in hopes someone else may find it useful. The
2091 are two scripts. One script creates the tables in mysql. The second
2092 script does all the other work.
2093
2094 The script is designed to only be ran once a day. I am using DATE
2095 stamps to distinguish between out of date entries and new ones.
2096 Multiple runs in the same day will only update or add new entries.
2097 Expired entries will only be removed the following day.
2098
2099 You can find my script here:
2100 http://www.tekconxus.com/files/ircservices-xml2mysql-0.5.tag.gz
2101
2102 Setup Instructions:
2103
2104 1. You will need to perform this command in mysql:
2105
2106 CREATE DATABASE ircservices;
2107
2108 2. Modify the create_tables.php database variables.
2109 3 Run "php -f create_tables.php" (only needs to be done once)
2110 4. Modify the ircservices-xml2mysql.php database & xml variables.
2111 5. Run "php -f ircservices-xml2mysql.php"
2112
2113 It will do its magic and even display some little progress graphics.
2114 (+) Add, (-) Delete, (^) Update
2115
2116 If there is enough curiosity in this script, I will add all entries from
2117 the XML file. For those interested in the output...during this run one
2118 nick was added and one deleted. The rest of the entries were synced.
2119
2120 ###########################################################
2121 fatbastard scripts # php -f ircservices-xml2mysql.php
2122 - --04:10:49-- http://10.10.0.4:8080/dbaccess/xml-export/
2123 => `ircservices.xml'
2124 Connecting to 10.10.0.4:8080... connected.
2125 HTTP request sent, awaiting response... 200 OK
2126 Length: unspecified [text/plain]
2127
2128 [ <=>
2129 ] 11,225 --.--K/s
2130
2131 04:10:49 (13.59 MB/s) - `ircservices.xml' saved [11225]
2132
2133 Processing NickInfo Section:
2134 ^^+^-
2135 Processing ChannelInfo Section:
2136 ^^^^
2137 Processing NickGroupInfo Section:
2138 ^^^^
2139 Updated: 11
2140 Added: 1
2141 Deleted: 1
2142
2143 ###########################################################
2144 -----BEGIN PGP SIGNATURE-----
2145 Version: GnuPG v1.4.7 (MingW32)
2146 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
2147
2148 iD8DBQFGtYbTZgcWLP4PXgERAouDAJ4/g8VQMCO1vgEX5Yd4SZtAJLgsPQCgnwdm
2149 BXbK3a2j5efoIMru76pxkKA=
2150 =pxA1
2151 -----END PGP SIGNATURE-----
2152 -------------- next part --------------
2153 A non-text attachment was scrubbed...
2154 Name: ircservices-xml2mysql-0.5.tar.gz
2155 Type: application/gzip
2156 Size: 2814 bytes
2157 Desc: not available
2158 Url : http://lists.ircservices.za.net/pipermail/ircservices-coding/attachments/20070805/bc355b84/ircservices-xml2mysql-0.5.tar.bin
2159 From achurch at achurch.org Sun Aug 5 20:09:25 2007
2160 From: achurch at achurch.org (Andrew Church)
2161 Date: Sun Aug 5 04:24:35 2007
2162 Subject: [IRCServices Coding] Build prefix/FHS compliance
2163 In-Reply-To: <1184938996.8469.15.camel@regulus.retout.co.uk>
2164 Message-ID: <46b5b36c.65741@msgid.achurch.org>
2165
2166 >Attached is a patch I'm currently using in the package - I've not
2167 >finished testing it, but the idea is that things like modules, config
2168 >files, language files and the helpfiles are opened only in one place, so
2169 >are easy to relocate. Anything else can be fixed with absolute paths in
2170 >the config files.
2171
2172 Thanks for the patch, but after some thought I've decided I'm not going
2173 to make Services FHS-compliant, so I'll have to ask you to make those
2174 changes as a distribution-local patch. It looks like the changes you
2175 propose are sufficient, but the binary-plus-single-data-directory scheme
2176 has been part of Services since the earliest versions, and I'm reluctant
2177 to make such a change to the design without a thorough review of all
2178 potential effects of the change, which I'm afraid I no longer have time
2179 for at this point.
2180
2181 I have, however, added support for alternate installation paths and
2182 changing the executable name to the next beta, which should be out soon.
2183
2184 --Andrew Church
2185 achurch@achurch.org
2186 http://achurch.org/
2187 From aragon at phat.za.net Fri Sep 7 16:43:42 2007
2188 From: aragon at phat.za.net (Aragon Gouveia)
2189 Date: Fri Sep 7 16:43:55 2007
2190 Subject: [IRCServices Coding] block nick registrations whose email address
2191 is suspended
2192 Message-ID: <20070907234342.GA37186@phat.za.net>
2193
2194 Hi,
2195
2196 We've been having fun and games with a particular user recently. This
2197 person accesses our network from a 3G internet connection whose IP address
2198 is allocated from a pool of IP addresses NAT'd and shared by thousands of
2199 other users of this particular ISP. Sadly many people subscribe to this
2200 poor excuse for an internet connection, and consequently a largish chunk of
2201 our users all appear to be connecting from the same IP address, even though
2202 they're completely seperate and unrelated entities in real life.
2203
2204 Needless to say, dealing with abusive users from this ISP isn't easy. One
2205 saving grace we have is that many of our channels set +R, so I needed a way
2206 to make endless reregistering of nicks more complicated.
2207
2208 I've written a patch that adds a checkpoint to the do_register function of
2209 nickserv that checks to see if the email address of a nick being registered
2210 is already set on another registered nickname that is suspended. If it
2211 finds a suspended nick with the same email address, it disallows the
2212 registration.
2213
2214 This allows me to suspend an offending nick and force the person to go
2215 through the agony of creating a new email address if he wants to come back
2216 and cause more trouble in +R channels. Hopefully this will frustrate
2217 idiots enough to loose interest. :)
2218
2219 Patch is attached. It would be nice to have module_log show what nick the
2220 new registration is colliding with, but I'll settle with having to guess for
2221 now. Suggestions welcome!
2222
2223 I think this might come in handy to others, so maybe worth pulling into
2224 official releases?
2225
2226
2227 Regards,
2228 Aragon
2229 -------------- next part --------------
2230 --- ircservices-5.0.62/modules/nickserv/main.c Sun Jun 10 15:26:58 2007
2231 +++ ircservices-5.0.62.blabbernet/modules/nickserv/main.c Sat Sep 8 00:49:44 2007
2232 @@ -523,6 +523,10 @@
2233 NSRegEmailMax);
2234 }
2235
2236 + } else if (email && !is_services_admin(u) && is_email_suspended(email)) {
2237 + module_log("%s@%s tried to register nick %s whose email address %s is suspended elsewhere",
2238 + u->username, u->host, u->nick, email);
2239 + notice_lang(s_NickServ, u, NICK_CANNOT_BE_REGISTERED, u->nick);
2240 } else {
2241 int replied = 0;
2242 int len = strlen(pass), max;
2243 --- ircservices-5.0.62/modules/nickserv/util.c Sun Jun 10 15:26:58 2007
2244 +++ ircservices-5.0.62.blabbernet/modules/nickserv/util.c Sat Sep 8 00:45:59 2007
2245 @@ -855,6 +855,24 @@
2246 return has_authcode ? -count : count;
2247 }
2248
2249 +/***********************************************************************/
2250 +
2251 +/* Check if any nicknames with the given E-mail address are suspended.
2252 + */
2253 +
2254 +int is_email_suspended (const char *email)
2255 +{
2256 + NickGroupInfo *ngi;
2257 +
2258 + for (ngi = first_nickgroupinfo(); ngi; ngi = next_nickgroupinfo()) {
2259 + if (ngi->email && stricmp(ngi->email, email) == 0) {
2260 + if (ngi->suspendinfo)
2261 + return 1;
2262 + }
2263 + }
2264 + return 0;
2265 +}
2266 +
2267 /*************************************************************************/
2268 /*************************************************************************/
2269
2270 --- ircservices-5.0.62/modules/nickserv/ns-local.h Sun Jun 10 15:26:58 2007
2271 +++ ircservices-5.0.62.blabbernet/modules/nickserv/ns-local.h Sat Sep 8 00:54:28 2007
2272 @@ -96,6 +96,7 @@
2273 E int nick_check_password(User *u, NickInfo *ni, const char *password,
2274 const char *command, int failure_msg);
2275 E int count_nicks_with_email(const char *email);
2276 +E int is_email_suspended(const char *email);
2277
2278 E int init_util(Module *module);
2279 E void exit_util(void);
2280 From achurch at achurch.org Mon Sep 10 11:08:16 2007
2281 From: achurch at achurch.org (Andrew Church)
2282 Date: Sun Sep 9 19:09:21 2007
2283 Subject: [IRCServices Coding] block nick registrations whose email address
2284 is suspended
2285 In-Reply-To: <20070907234342.GA37186@phat.za.net>
2286 Message-ID: <46e4a748.43764@msgid.achurch.org>
2287
2288 I've added similar functionality to 5.1. Thanks for the suggestion!
2289
2290 --Andrew Church
2291 achurch@achurch.org
2292 http://achurch.org/
2293
2294 >Hi,
2295 >
2296 >We've been having fun and games with a particular user recently. This
2297 >person accesses our network from a 3G internet connection whose IP address
2298 >is allocated from a pool of IP addresses NAT'd and shared by thousands of
2299 >other users of this particular ISP. Sadly many people subscribe to this
2300 >poor excuse for an internet connection, and consequently a largish chunk of
2301 >our users all appear to be connecting from the same IP address, even though
2302 >they're completely seperate and unrelated entities in real life.
2303 >
2304 >Needless to say, dealing with abusive users from this ISP isn't easy. One
2305 >saving grace we have is that many of our channels set +R, so I needed a way
2306 >to make endless reregistering of nicks more complicated.
2307 >
2308 >I've written a patch that adds a checkpoint to the do_register function of
2309 >nickserv that checks to see if the email address of a nick being registered
2310 >is already set on another registered nickname that is suspended. If it
2311 >finds a suspended nick with the same email address, it disallows the
2312 >registration.
2313 >
2314 >This allows me to suspend an offending nick and force the person to go
2315 >through the agony of creating a new email address if he wants to come back
2316 >and cause more trouble in +R channels. Hopefully this will frustrate
2317 >idiots enough to loose interest. :)
2318 >
2319 >Patch is attached. It would be nice to have module_log show what nick the
2320 >new registration is colliding with, but I'll settle with having to guess for
2321 >now. Suggestions welcome!
2322 >
2323 >I think this might come in handy to others, so maybe worth pulling into
2324 >official releases?
2325 >
2326 >
2327 >Regards,
2328 >Aragon
2329 From tim at retout.co.uk Sun Oct 21 12:32:51 2007
2330 From: tim at retout.co.uk (Tim Retout)
2331 Date: Sun Oct 21 12:58:56 2007
2332 Subject: [IRCServices Coding] ircservices-church ITP
2333 Message-ID: <1192995171.7726.14.camel@regulus.retout.co.uk>
2334
2335 Having given it some thought, and considering that
2336
2337 * IRC Services as shipped will not build on 64-bit architectures,
2338 * Andrew Church does not want the patch to fix this, for
2339 historical reasons,
2340 * my original intent for this software was for use on amd64
2341 servers,
2342 * I am unwilling to maintain large patches against upstream,
2343
2344 regrettably I have lost interest in packaging IRC Services for Debian. I
2345 am therefore closing the ITP.
2346
2347 Sorry for taking so long to come to this conclusion.
2348
2349 --
2350 Tim Retout <tim@retout.co.uk>
2351
2352 From achurch at achurch.org Tue Oct 30 00:45:50 2007
2353 From: achurch at achurch.org (Andrew Church)
2354 Date: Mon Oct 29 08:50:22 2007
2355 Subject: [IRCServices Coding] Analysis of the 5.1.2 bug
2356 Message-ID: <4726015c.15341@msgid.achurch.org>
2357
2358 Now that a bit of time has passed since the release of Services
2359 5.1.2, and (hopefully) everyone has upgraded, I thought I'd post a more
2360 detailed explanation of exactly how the critical bug that prompted this
2361 release came about. (As you are probably aware, various and sundry bugs
2362 have pushed Services all the way to 5.1.6 since then, but in this text
2363 I'll focus on the bug that was fixed by 5.1.2. Just as a reminder, all
2364 5.1.x releases through 5.1.5 have bugs allowing users to crash Services,
2365 so you should immediately upgrade to 5.1.6 if you haven't already.)
2366
2367 The Bug
2368 =======
2369
2370 The bug itself is fairly straightforward (as those who read the
2371 diff file will have already realized): using the ChanServ AKICK VIEW
2372 command on a channel with at least one autokick caused Services to
2373 crash, without exception. By default, the AKICK command requires
2374 channel access level 100 to use; this is the basis for the "sufficiently
2375 privileged users" text in the announcement. In reality, unless channel
2376 registration was disabled, any user could register a new channel (thus
2377 gaining founder status) and use the AKICK command on that channel,
2378 effectively allowing any user to crash Services. (Ironically, when
2379 channel registration was disabled, a separate bug--fixed in 5.1.3--had
2380 the potential to let any user cause a crash.)
2381
2382 A most embarrassing bug, indeed...
2383
2384 How It Came About
2385 =================
2386
2387 One of the changes implemented in Services 5.1 was to unify (from
2388 an interface standpoint, at least; internally, there's still far too
2389 much code duplication) the listing functionality of all pseudoclient
2390 commands. Among other things, this included removing the entry numbers
2391 from the ChanServ ACCESS, XOP (SOP/AOP/HOP/VOP/NOP), and AKICK commands,
2392 mostly to avoid the confusion that can result from multiple users
2393 deleting entries in the middle of the list.
2394
2395 Conceptually, this is a simple change, only requiring the removal
2396 of the corresponding parameter from the code that outputs entries to the
2397 user. But theory and practice are different beasts, as they say; in the
2398 case of AKICK VIEW, the data for each entry is formatted using a
2399 language-specific string, requiring a change not only in the code itself
2400 but also in each of the language files. I actually made this latter
2401 change, presumably with the intent of going back and updating the code
2402 once I had all the language files updates out of the way. However, it
2403 seems that I forgot to make that final update, leaving the entry number
2404 present in the the code that formatted autokick entries for the VIEW
2405 subcommand. This resulted, eventually, in something like printf("%s",1)
2406 --which of course crashed when the program tried to dereference the
2407 entry number as a pointer.
2408
2409 Ordinarily, GCC can catch inconsistencies between format strings
2410 and parameters like this; I always compile Services using GCC's -Werror
2411 option, to ensure I catch as many potential problems as possible. With
2412 language strings, however, the format string itself is located in a data
2413 file separate from the source code. Since the data isn't accessible to
2414 the compiler, these checks can't be made, and the error slipped by
2415 unnoticed until this bug was reported.
2416
2417 Are Any Other Commands At Risk?
2418 ===============================
2419
2420 With respect to this particular change, no. The removal of list
2421 entry numbers affected only the ChanServ ACCESS LIST, XOP LIST, and
2422 AKICK LIST/VIEW commands. Of these, XOP LIST and AKICK LIST use literal
2423 format strings for their output, which were corrected as part of the
2424 code change; ACCESS LIST uses the language system, but its code and
2425 format strings were both updated properly, and it is likewise not
2426 susceptible to this problem.
2427
2428 With respect to all commands in general, all I can say is "I hope
2429 not." I've done my best, within the constraints of time and an eleven-
2430 year-old codebase, to program defensively; since 5.1.2, I've also gone
2431 over all uses of language strings, and added some checks to my release
2432 process (see below) to help avoid any more slipping in. But given that
2433 I let these bugs by, who knows what else might be hiding?
2434
2435 Lessons To Be Learned
2436 =====================
2437
2438 Lesson 1: Test suites
2439
2440 Ah, our good old friend, testing. I actually had started work on a
2441 test suite for Services at one point, which was the main motivation for
2442 the OperServ debug commands. Regrettably, between a lack of time in my
2443 earlier days of Services development (being not nearly as fluent in
2444 progamming then as I am now, writing a test suite to interact with a
2445 server was a formidable task, and I chose to use my time working on
2446 Services itself instead) and a lack of interest later, I never took the
2447 test suite beyond simple nickname operations.
2448
2449 Of course, even a basic test that just ran through all the commands
2450 would have caught this bug, and to that I can only say: Mea culpa.
2451 Lack of interest or otherwise, I failed to follow best practices, and
2452 that failure came back to bite me.
2453
2454 Lesson 2: Format strings are dangerous
2455
2456 Services makes use of the standard printf()-style format strings in
2457 its language files, partly out of convenience and partly because I
2458 didn't know any better when I designed the language system. While the
2459 flexibility of format strings is undeniably useful, their implementation
2460 leaves much to be desired--especially in a language like C that does not
2461 pass type information around. In fact, inconsistencies between format
2462 strings in different language files has resulted in similar crashes in
2463 the past (including the less-dangerous one fixed in version 5.1.3). Of
2464 course, most of the danger in using format strings comes from the fact
2465 that strings are second-class citizens in the C data type world: to
2466 process a string, you access successive bytes through a pointer--and if
2467 that particular value happens to be something that's not a pointer,
2468 BOOM. So this lesson could just as easily be "C strings are dangerous".
2469
2470 So what can be done about it? Well, one of the obvious solutions--
2471 and probably the best idea in the long run--is to rewrite the
2472 pseudoclients in a higher-level language, such as Perl; Perl's dynamic
2473 typing ensures that this sort of problem can't occur. (Then again,
2474 dynamically typed languages have their own problems, so this isn't a
2475 perfect solution.) I'd actually had thoughts about implementing a Perl
2476 base for pseudoclients in a future version of Services, but I don't have
2477 nearly enough time or interest to do so at this point.
2478
2479 Another option would be to change the language file system to use a
2480 custom formatting system. Parameters could be named, for example, and
2481 an array of structures including parameter names and data types along
2482 with the parameters themselves could be passed to routines like
2483 notice_lang(). Of course, this has the downside of turning what's
2484 currently a simple list of parameters into a more complex variable
2485 declaration; and since the data types would have to be specified
2486 manually, there's still the danger of mismatched types, leading to
2487 potential crashes. Nonetheless, this might be a more feasible approach
2488 for those who are interested in improving Services' robustness but don't
2489 want to go as far as rewriting half of it in Perl.
2490
2491 I've implemented two crude solutions in Services 5.1.3. One is the
2492 use of a script, modified from one provided by German translator Jacek
2493 Margos, to check all language files for format string inconsistencies at
2494 release time. The other is a simple compilation check: at release time,
2495 I run a test compilation where notice_lang() and notice_help() calls
2496 using fixed message IDs are replaced with notice() calls that use the
2497 corresponding strings from the English language file (lang/en_us.l).
2498 The resulting executable is of course useless from a multilingual point
2499 of view, but the compiler will complain about any cases where format
2500 strings and parameters don't match. While this won't catch cases where
2501 the format string is selected by a variable, it would have found the
2502 particular bug fixed in version 5.1.2.
2503
2504 Final Thoughts
2505 ==============
2506
2507 Needless to say, this bug in particular, as well as the fact that I
2508 had to make five releases of a supposedly "stable" version of Services
2509 in the space of ten days to correct other bugs of varying seriousness,
2510 is quite embarrassing. I'm of course acutely aware of the trouble it's
2511 caused everyone using Services, of the repeated interruptions in normal
2512 network operations that will have resulted from upgrades (if not
2513 crashes)--and let none say that it's "just IRC"! But at the same time,
2514 I take pride in my work as a software developer, and seeing myself make
2515 such trivial mistakes as these is, well, depressing to say the least.
2516 I could make excuses that the code base is aging (which is true), or
2517 that I've lost too much interest in the program to do a proper job
2518 (which is also true, to be honest--that's the main reason I declared 5.1
2519 to be the final version of Services). I could even claim that I've got
2520 another project twice the sice of Services that's considerably more
2521 stable (which is true as well, thanks in no small part to the experience
2522 I've gained from Services itself). But since none of that changes the
2523 facts, all I can say in the end is that I screwed up, and I'm sorry.
2524
2525 --Andrew Church
2526 achurch@achurch.org
2527 http://achurch.org/
2528 From Craig at frostycoolslug.com Mon Oct 29 10:39:34 2007
2529 From: Craig at frostycoolslug.com (Craig McLure)
2530 Date: Mon Oct 29 10:39:06 2007
2531 Subject: [IRCServices Coding] Analysis of the 5.1.2 bug
2532 In-Reply-To: <4726015c.15341@msgid.achurch.org>
2533 References: <4726015c.15341@msgid.achurch.org>
2534 Message-ID: <8a79f15a0710291039x2f818a73j3b37007f853d8f05@mail.gmail.com>
2535
2536 No apology necessary my good friend, everyone screws up, even myself,
2537 On one or two occasions i've written code which in theory was solid,
2538 just to have it come back and bite me in the ass several times a few
2539 weeks on, each time i fixed a part of it, another part came along and
2540 took another bite (I'm missing half a buttock at this point) it's an
2541 unfortunate part of the development cycle. Sure it's an embarrassment
2542 and can induce a really bad day, but no one will think any less of
2543 you, especially if they know the effort and general requirements which
2544 go into making such a large package as services.
2545
2546 I've been on these lists now since 2001 (admittedly, I was a LOT
2547 younger back then (15ish?)), and i've found your general dedication to
2548 the software to be inspirational, and it was tweaking IRCServices that
2549 kickstarted my coding career. IRCServices has always been well
2550 written, and always will be well written. I'm sure someone will pick
2551 up the baton and continue the IRCServices package far into the future,
2552 but i doubt they will have the same dedication and motivation to
2553 improve this as you have had. I know from experience that coding
2554 something for many, many years has some diminishing returns on the
2555 mind of the developer (not that i'm saying you've lost your mind), but
2556 dispite this, you've continued to fully support a package which you
2557 have lost interest in.
2558
2559 You say you're a proud person when it comes to code, well, you damn
2560 well should be. You've created a rock solid piece of software, you've
2561 taken no crap over the years, and you've continued to evolve it to a
2562 point where it's probably the best services package in existence.
2563
2564 Don't be depressed, don't be ashamed, don't be embarrassed, hold your
2565 head up high, for the unfortunate events of the last week can't even
2566 place a scratch on the quality you've provided over the years.
2567
2568 --
2569 /**********************************************
2570 * Craig "FrostyCoolSlug" McLure
2571 * ChatSpike - http://www.chatspike.net
2572 * InspIRCd - http://www.inspircd.org
2573 **********************************************/
2574
2575 On 29/10/2007, Andrew Church <achurch@achurch.org> wrote:
2576 > Now that a bit of time has passed since the release of Services
2577 > 5.1.2, and (hopefully) everyone has upgraded, I thought I'd post a more
2578 > detailed explanation of exactly how the critical bug that prompted this
2579 > release came about. (As you are probably aware, various and sundry bugs
2580 > have pushed Services all the way to 5.1.6 since then, but in this text
2581 > I'll focus on the bug that was fixed by 5.1.2. Just as a reminder, all
2582 > 5.1.x releases through 5.1.5 have bugs allowing users to crash Services,
2583 > so you should immediately upgrade to 5.1.6 if you haven't already.)
2584 >
2585 > The Bug
2586 > =======
2587 >
2588 > The bug itself is fairly straightforward (as those who read the
2589 > diff file will have already realized): using the ChanServ AKICK VIEW
2590 > command on a channel with at least one autokick caused Services to
2591 > crash, without exception. By default, the AKICK command requires
2592 > channel access level 100 to use; this is the basis for the "sufficiently
2593 > privileged users" text in the announcement. In reality, unless channel
2594 > registration was disabled, any user could register a new channel (thus
2595 > gaining founder status) and use the AKICK command on that channel,
2596 > effectively allowing any user to crash Services. (Ironically, when
2597 > channel registration was disabled, a separate bug--fixed in 5.1.3--had
2598 > the potential to let any user cause a crash.)
2599 >
2600 > A most embarrassing bug, indeed...
2601 >
2602 > How It Came About
2603 > =================
2604 >
2605 > One of the changes implemented in Services 5.1 was to unify (from
2606 > an interface standpoint, at least; internally, there's still far too
2607 > much code duplication) the listing functionality of all pseudoclient
2608 > commands. Among other things, this included removing the entry numbers
2609 > from the ChanServ ACCESS, XOP (SOP/AOP/HOP/VOP/NOP), and AKICK commands,
2610 > mostly to avoid the confusion that can result from multiple users
2611 > deleting entries in the middle of the list.
2612 >
2613 > Conceptually, this is a simple change, only requiring the removal
2614 > of the corresponding parameter from the code that outputs entries to the
2615 > user. But theory and practice are different beasts, as they say; in the
2616 > case of AKICK VIEW, the data for each entry is formatted using a
2617 > language-specific string, requiring a change not only in the code itself
2618 > but also in each of the language files. I actually made this latter
2619 > change, presumably with the intent of going back and updating the code
2620 > once I had all the language files updates out of the way. However, it
2621 > seems that I forgot to make that final update, leaving the entry number
2622 > present in the the code that formatted autokick entries for the VIEW
2623 > subcommand. This resulted, eventually, in something like printf("%s",1)
2624 > --which of course crashed when the program tried to dereference the
2625 > entry number as a pointer.
2626 >
2627 > Ordinarily, GCC can catch inconsistencies between format strings
2628 > and parameters like this; I always compile Services using GCC's -Werror
2629 > option, to ensure I catch as many potential problems as possible. With
2630 > language strings, however, the format string itself is located in a data
2631 > file separate from the source code. Since the data isn't accessible to
2632 > the compiler, these checks can't be made, and the error slipped by
2633 > unnoticed until this bug was reported.
2634 >
2635 > Are Any Other Commands At Risk?
2636 > ===============================
2637 >
2638 > With respect to this particular change, no. The removal of list
2639 > entry numbers affected only the ChanServ ACCESS LIST, XOP LIST, and
2640 > AKICK LIST/VIEW commands. Of these, XOP LIST and AKICK LIST use literal
2641 > format strings for their output, which were corrected as part of the
2642 > code change; ACCESS LIST uses the language system, but its code and
2643 > format strings were both updated properly, and it is likewise not
2644 > susceptible to this problem.
2645 >
2646 > With respect to all commands in general, all I can say is "I hope
2647 > not." I've done my best, within the constraints of time and an eleven-
2648 > year-old codebase, to program defensively; since 5.1.2, I've also gone
2649 > over all uses of language strings, and added some checks to my release
2650 > process (see below) to help avoid any more slipping in. But given that
2651 > I let these bugs by, who knows what else might be hiding?
2652 >
2653 > Lessons To Be Learned
2654 > =====================
2655 >
2656 > Lesson 1: Test suites
2657 >
2658 > Ah, our good old friend, testing. I actually had started work on a
2659 > test suite for Services at one point, which was the main motivation for
2660 > the OperServ debug commands. Regrettably, between a lack of time in my
2661 > earlier days of Services development (being not nearly as fluent in
2662 > progamming then as I am now, writing a test suite to interact with a
2663 > server was a formidable task, and I chose to use my time working on
2664 > Services itself instead) and a lack of interest later, I never took the
2665 > test suite beyond simple nickname operations.
2666 >
2667 > Of course, even a basic test that just ran through all the commands
2668 > would have caught this bug, and to that I can only say: Mea culpa.
2669 > Lack of interest or otherwise, I failed to follow best practices, and
2670 > that failure came back to bite me.
2671 >
2672 > Lesson 2: Format strings are dangerous
2673 >
2674 > Services makes use of the standard printf()-style format strings in
2675 > its language files, partly out of convenience and partly because I
2676 > didn't know any better when I designed the language system. While the
2677 > flexibility of format strings is undeniably useful, their implementation
2678 > leaves much to be desired--especially in a language like C that does not
2679 > pass type information around. In fact, inconsistencies between format
2680 > strings in different language files has resulted in similar crashes in
2681 > the past (including the less-dangerous one fixed in version 5.1.3). Of
2682 > course, most of the danger in using format strings comes from the fact
2683 > that strings are second-class citizens in the C data type world: to
2684 > process a string, you access successive bytes through a pointer--and if
2685 > that particular value happens to be something that's not a pointer,
2686 > BOOM. So this lesson could just as easily be "C strings are dangerous".
2687 >
2688 > So what can be done about it? Well, one of the obvious solutions--
2689 > and probably the best idea in the long run--is to rewrite the
2690 > pseudoclients in a higher-level language, such as Perl; Perl's dynamic
2691 > typing ensures that this sort of problem can't occur. (Then again,
2692 > dynamically typed languages have their own problems, so this isn't a
2693 > perfect solution.) I'd actually had thoughts about implementing a Perl
2694 > base for pseudoclients in a future version of Services, but I don't have
2695 > nearly enough time or interest to do so at this point.
2696 >
2697 > Another option would be to change the language file system to use a
2698 > custom formatting system. Parameters could be named, for example, and
2699 > an array of structures including parameter names and data types along
2700 > with the parameters themselves could be passed to routines like
2701 > notice_lang(). Of course, this has the downside of turning what's
2702 > currently a simple list of parameters into a more complex variable
2703 > declaration; and since the data types would have to be specified
2704 > manually, there's still the danger of mismatched types, leading to
2705 > potential crashes. Nonetheless, this might be a more feasible approach
2706 > for those who are interested in improving Services' robustness but don't
2707 > want to go as far as rewriting half of it in Perl.
2708 >
2709 > I've implemented two crude solutions in Services 5.1.3. One is the
2710 > use of a script, modified from one provided by German translator Jacek
2711 > Margos, to check all language files for format string inconsistencies at
2712 > release time. The other is a simple compilation check: at release time,
2713 > I run a test compilation where notice_lang() and notice_help() calls
2714 > using fixed message IDs are replaced with notice() calls that use the
2715 > corresponding strings from the English language file (lang/en_us.l).
2716 > The resulting executable is of course useless from a multilingual point
2717 > of view, but the compiler will complain about any cases where format
2718 > strings and parameters don't match. While this won't catch cases where
2719 > the format string is selected by a variable, it would have found the
2720 > particular bug fixed in version 5.1.2.
2721 >
2722 > Final Thoughts
2723 > ==============
2724 >
2725 > Needless to say, this bug in particular, as well as the fact that I
2726 > had to make five releases of a supposedly "stable" version of Services
2727 > in the space of ten days to correct other bugs of varying seriousness,
2728 > is quite embarrassing. I'm of course acutely aware of the trouble it's
2729 > caused everyone using Services, of the repeated interruptions in normal
2730 > network operations that will have resulted from upgrades (if not
2731 > crashes)--and let none say that it's "just IRC"! But at the same time,
2732 > I take pride in my work as a software developer, and seeing myself make
2733 > such trivial mistakes as these is, well, depressing to say the least.
2734 > I could make excuses that the code base is aging (which is true), or
2735 > that I've lost too much interest in the program to do a proper job
2736 > (which is also true, to be honest--that's the main reason I declared 5.1
2737 > to be the final version of Services). I could even claim that I've got
2738 > another project twice the sice of Services that's considerably more
2739 > stable (which is true as well, thanks in no small part to the experience
2740 > I've gained from Services itself). But since none of that changes the
2741 > facts, all I can say in the end is that I screwed up, and I'm sorry.
2742 >
2743 > --Andrew Church
2744 > achurch@achurch.org
2745 > http://achurch.org/
2746 > ------------------------------------------------------------------
2747 > To unsubscribe or change your subscription options, visit:
2748 > http://lists.ircservices.za.net/mailman/listinfo/ircservices-coding
2749 >
2750 From manual4000 at yahoo.com Fri Dec 14 05:12:47 2007
2751 From: manual4000 at yahoo.com (MaNUaL)
2752 Date: Fri Dec 14 11:53:19 2007
2753 Subject: [IRCServices Coding] samode
2754 Message-ID: <35304.61536.qm@web53012.mail.re2.yahoo.com>
2755
2756 Hi. I am using ircservices-5.1.10 with Unreal3.2.7 ircd.
2757
2758 When i use /samode #channel +o mynick the chanserv deops me because i
2759 am not in the access list of the channel. If i am, no problem occurs..
2760
2761 Help from unreal shows the following:
2762
2763
2764
2765 ***** Samode *****
2766
2767 Allows a Services Administrator to change the mode on a channel,
2768
2769 without having Operator status.
2770
2771 Services Admin Command
2772
2773 Syntax: SAMODE <channel> <mode>
2774
2775 Example: SAMODE #Support +m
2776
2777
2778
2779 I am a services admin but i all i get is this:
2780
2781
2782 /samode #opers +o MaNUaL
2783
2784 [14:56] * irc.example.net sets mode: +o MaNUaL
2785
2786 [14:56] * ChanServ sets mode: -o MaNUaL
2787
2788
2789
2790 Is this a normal behavior or is it a bug? I think when i use samode the chanserv should comply with it...
2791
2792 Thanks in advance
2793
2794
2795 ____________________________________________________________________________________
2796 Never miss a thing. Make Yahoo your home page.
2797 http://www.yahoo.com/r/hs
2798 From achurch at achurch.org Sat Dec 15 13:16:57 2007
2799 From: achurch at achurch.org (Andrew Church)
2800 Date: Fri Dec 14 20:19:16 2007
2801 Subject: [IRCServices Coding] samode
2802 In-Reply-To: <35304.61536.qm@web53012.mail.re2.yahoo.com>
2803 Message-ID: <476355c0.55637@msgid.achurch.org>
2804
2805 >Hi. I am using ircservices-5.1.10 with Unreal3.2.7 ircd.
2806 >
2807 >When i use /samode #channel +o mynick the chanserv deops me because i
2808 >am not in the access list of the channel. If i am, no problem occurs..
2809
2810 This is designed behavior. If you need to override the channel access
2811 list, use the OperServ MODE command.
2812
2813 --Andrew Church
2814 achurch@achurch.org
2815 http://achurch.org/