[srvx-commits] arch commit: Fix bugs; better handle oplevels from ircu2.10.12
Brought to you by:
entrope
From: Michael P. <md...@tr...> - 2004-09-06 13:37:41
|
Revision: srvx--devo--1.3--patch-78 Archive: sr...@sr...--2004-srvx Creator: Michael Poole <md...@tr...> Date: Mon Sep 6 09:35:59 EDT 2004 Standard-date: 2004-09-06 13:35:59 GMT Modified-files: ChangeLog sockcheck.conf.example src/dict-splay.c src/modcmd.c src/nickserv.c src/proto-p10.c New-patches: sr...@sr...--2004-srvx/srvx--devo--1.3--patch-78 Summary: Fix bugs; better handle oplevels from ircu2.10.12 Keywords: * Fix order of port and IP in sample socks4 proxy test. * Fix a bug in dict_remove2() that corrupted the tree order if a cleanup function tried to delete another node. * Fix a buffer overflow in cmd_joiner. * Get rid of free_nick_info() since it is really just free(). * If our P10 uplink sends an oplevel in a burst, treat it as a chanop. * added files {arch}/srvx/srvx--devo/srvx--devo--1.3/sr...@sr...--2004-srvx/patch-log/patch-78 * modified files --- orig/ChangeLog +++ mod/ChangeLog @@ -2,6 +2,29 @@ # arch-tag: aut...@sr...--2004-srvx/srvx--devo--1.3 # +2004-09-06 13:35:59 GMT Michael Poole <md...@tr...> patch-78 + + Summary: + Fix bugs; better handle oplevels from ircu2.10.12 + Revision: + srvx--devo--1.3--patch-78 + + * Fix order of port and IP in sample socks4 proxy test. + + * Fix a bug in dict_remove2() that corrupted the tree order if a + cleanup function tried to delete another node. + + * Fix a buffer overflow in cmd_joiner. + + * Get rid of free_nick_info() since it is really just free(). + + * If our P10 uplink sends an oplevel in a burst, treat it as a chanop. + + modified files: + ChangeLog sockcheck.conf.example src/dict-splay.c src/modcmd.c + src/nickserv.c src/proto-p10.c + + 2004-08-12 16:06:55 GMT Zoot <zo...@ga...> patch-77 Summary: --- orig/sockcheck.conf.example +++ mod/sockcheck.conf.example @@ -17,7 +17,7 @@ * It would be generally wise to replace the $p$i with a hard-coded * one; many insecure proxies refuse to connect to themselves. */ -"1080:0401$i$p=p=r=o=x=y00" { +"1080:0401$p$i=p=r=o=x=y00" { "..5a...." "reject:Unsecured socks4"; }; --- orig/src/dict-splay.c +++ mod/src/dict-splay.c @@ -202,7 +202,7 @@ int dict_remove2(dict_t dict, const char *key, int no_dispose) { - struct dict_node *new_root; + struct dict_node *new_root, *old_root; if (!dict->root) return 0; @@ -220,13 +220,14 @@ if (dict->first == dict->root) dict->first = dict->first->next; if (dict->root->next) dict->root->next->prev = dict->root->prev; if (dict->last == dict->root) dict->last = dict->last->prev; + old_root = dict->root; + dict->root = new_root; + dict->count--; if (no_dispose) { - free(dict->root); + free(old_root); } else { - dict_dispose_node(dict->root, dict->free_keys, dict->free_data); + dict_dispose_node(old_root, dict->free_keys, dict->free_data); } - dict->root = new_root; - dict->count--; return 1; } --- orig/src/modcmd.c +++ mod/src/modcmd.c @@ -1464,7 +1464,7 @@ } static MODCMD_FUNC(cmd_joiner) { - char cmdname[80]; + char cmdname[MAXLEN]; if (argc < 2) { int len = sprintf(cmdname, "%s ", cmd->name); --- orig/src/nickserv.c +++ mod/src/nickserv.c @@ -429,13 +429,6 @@ } static void -free_nick_info(void *vni) -{ - struct nick_info *ni = vni; - free(ni); -} - -static void delete_nick(struct nick_info *ni) { struct nick_info *last, *next; @@ -3826,7 +3819,7 @@ dict_set_free_keys(nickserv_id_dict, free); nickserv_nick_dict = dict_new(); - dict_set_free_data(nickserv_nick_dict, free_nick_info); + dict_set_free_data(nickserv_nick_dict, free); nickserv_allow_auth_dict = dict_new(); --- orig/src/proto-p10.c +++ mod/src/proto-p10.c @@ -1076,7 +1076,10 @@ mode |= MODE_CHANOP; else if (sep == 'v') mode |= MODE_VOICE; - else + else if (isdigit(sep)) { + mode |= MODE_CHANOP; + while (isdigit(*end)) end++; + } else break; } if (rel_age < 0) |