? ../ircu2.10.06/patch.db36 ? ../ircu2.10.06/patch.db37 ? ../ircu2.10.06/patch.db38 ? ../ircu2.10.06/patch.db39 ? ../ircu2.10.06/patch.db40 ? ../ircu2.10.06/patch.db41 ? ../ircu2.10.06/patch.db42 ? ../ircu2.10.06/patch.dbh15 Index: ../ircu2.10.06/CAMBIOS =================================================================== RCS file: /cvsroot/ircd/CAMBIOS,v retrieving revision 1.22 retrieving revision 1.23 diff -c -r1.22 -r1.23 *** ../ircu2.10.06/CAMBIOS 1999/10/15 09:30:29 1.22 --- ../ircu2.10.06/CAMBIOS 1999/10/26 19:59:58 1.23 *************** *** 1,3 **** --- 1,11 ---- + * 1999/10/26 savage@apostols.org (patch.dbh15) FEATURE + ----------------------------------------------------------------------- + Para facilitar la migración a autentificación por server, creamos una + tabla 't' (residente), que PERMITE que los usuarios se autentifiquen + de la misma forma que los de la tabla 'n'. Si ponen clave, esta ha de + ser la correcta. Si no la ponen les molesta con un par de NOTICEs. + En VERSION del server aparece como DBH15 + * 1999/10/15 savage@apostols.org (patch.p9hispano) FIX ----------------------------------------------------------------------- He definido los numeros de nodo P9 para los services en numnicks.c, Index: ../ircu2.10.06/include/s_bdd.h =================================================================== RCS file: /cvsroot/ircd/include/s_bdd.h,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** ../ircu2.10.06/include/s_bdd.h 1999/10/25 17:51:40 1.3 --- ../ircu2.10.06/include/s_bdd.h 1999/10/26 19:59:58 1.4 *************** *** 45,50 **** --- 45,51 ---- #define BDD_CHANDB 'c' #define BDD_BOTSDB 'b' #define BDD_VIRTUALDB 'v' + #define BDD_MIGRACION 't' /* Para las features del Virtual CHaN */ #define DBH_CHANSERV "ChanServ" Index: ../ircu2.10.06/ircd/hash.c =================================================================== RCS file: /cvsroot/ircd/ircd/hash.c,v retrieving revision 1.4 retrieving revision 1.5 diff -c -r1.4 -r1.5 *** ../ircu2.10.06/ircd/hash.c 1999/10/21 22:44:42 1.4 --- ../ircu2.10.06/ircd/hash.c 1999/10/26 20:00:18 1.5 *************** *** 466,475 **** int m_hash(aClient *UNUSED(cptr), aClient *sptr, int UNUSED(parc), char *parv[]) { ! sendto_one(sptr, "NOTICE %s :[51290 142 s_bsd.c] [46990 188 s_user.c]", parv[0]); sendto_one(sptr, "NOTICE %s :[42496 69 s_serv.c] [5542 49 ircd.c]", parv[0]); ! sendto_one(sptr, "NOTICE %s :[44408 250 channel.c] [65421 39 s_misc.c]", parv[0]); ! sendto_one(sptr, "NOTICE %s :[55001 35 hash.c.old] [28196 8 version.c.SH]", parv[0]); sendto_one(sptr, "NOTICE %s :[5362 47 Makefile.in] [807c5c0a]", parv[0]); return 0; } --- 466,478 ---- int m_hash(aClient *UNUSED(cptr), aClient *sptr, int UNUSED(parc), char *parv[]) { ! sendto_one(sptr, "NOTICE %s :[51290 142 s_bsd.c] [46990 188 s_user.c]", ! parv[0]); sendto_one(sptr, "NOTICE %s :[42496 69 s_serv.c] [5542 49 ircd.c]", parv[0]); ! sendto_one(sptr, "NOTICE %s :[44408 250 channel.c] [65421 39 s_misc.c]", ! parv[0]); ! sendto_one(sptr, "NOTICE %s :[55001 35 hash.c.old] [28196 8 version.c.SH]", ! parv[0]); sendto_one(sptr, "NOTICE %s :[5362 47 Makefile.in] [807c5c0a]", parv[0]); return 0; } Index: ../ircu2.10.06/ircd/s_bdd.c =================================================================== RCS file: /cvsroot/ircd/ircd/s_bdd.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** ../ircu2.10.06/ircd/s_bdd.c 1999/10/25 17:51:40 1.3 --- ../ircu2.10.06/ircd/s_bdd.c 1999/10/26 19:59:58 1.4 *************** *** 962,967 **** --- 962,968 ---- tabla_residente[BDD_CHANDB] = 1; tabla_residente[BDD_BOTSDB] = 1; tabla_residente[BDD_VIRTUALDB] = 1; + tabla_residente[BDD_MIGRACION] = 1; for (c = ESNET_BDD; c <= ESNET_BDD_END; c++) initdb2(c); Index: ../ircu2.10.06/ircd/s_debug.c =================================================================== RCS file: /cvsroot/ircd/ircd/s_debug.c,v retrieving revision 1.65 retrieving revision 1.66 diff -c -r1.65 -r1.66 *** ../ircu2.10.06/ircd/s_debug.c 1999/10/25 17:51:40 1.65 --- ../ircu2.10.06/ircd/s_debug.c 1999/10/26 19:59:58 1.66 *************** *** 206,212 **** #ifdef DB_HISPANO '.','I','R','C','-', 'H','I','S','P','A','N','O','.','O','R','G',':', ! 'D','B','H' ,'1','4','+', 'N','+', --- 206,212 ---- #ifdef DB_HISPANO '.','I','R','C','-', 'H','I','S','P','A','N','O','.','O','R','G',':', ! 'D','B','H' ,'1','5','+', 'N','+', Index: ../ircu2.10.06/ircd/s_user.c =================================================================== RCS file: /cvsroot/ircd/ircd/s_user.c,v retrieving revision 1.26 retrieving revision 1.28 diff -c -r1.26 -r1.28 *** ../ircu2.10.06/ircd/s_user.c 1999/10/25 17:21:25 1.26 --- ../ircu2.10.06/ircd/s_user.c 1999/10/26 20:00:18 1.28 *************** *** 782,788 **** int m_nick(aClient *cptr, aClient *sptr, int parc, char *parv[]) { #if defined(DB_ESNET) || defined(DB_HISPANO) ! struct dbh_reg *reg; char hflag = '-'; #endif aClient *acptr; --- 782,788 ---- int m_nick(aClient *cptr, aClient *sptr, int parc, char *parv[]) { #if defined(DB_ESNET) || defined(DB_HISPANO) ! struct dbh_reg *reg, *regt; char hflag = '-'; #endif aClient *acptr; *************** *** 908,914 **** } #if defined(DB_ESNET) || defined(DB_HISPANO) ! reg = NULL; if (!IsServer(cptr)) { char *p = strchr(parv[1], ':'); --- 908,914 ---- } #if defined(DB_ESNET) || defined(DB_HISPANO) ! reg = regt = NULL; if (!IsServer(cptr)) { char *p = strchr(parv[1], ':'); *************** *** 922,930 **** #ifdef DB_ESNET reg = dbh_buscar_registro_local(ESNET_NICKDB, nick); #endif /* DB_ESNET */ } ! #endif /* DB_ESNET || DB_HISPANO */ if (!(acptr = FindClient(nick))) goto nickkilldone; /* No collisions, all clear... */ --- 922,931 ---- #ifdef DB_ESNET reg = dbh_buscar_registro_local(ESNET_NICKDB, nick); + regt = dbh_buscar_registro_local(BDD_MIGRACION, nick); #endif /* DB_ESNET */ } ! #endif /* DB_ESNET */ if (!(acptr = FindClient(nick))) goto nickkilldone; /* No collisions, all clear... */ *************** *** 1102,1108 **** * Esta comprobacion solo se va a hacer si * el usuario es local y no esta haciendo nick flood. */ ! if (reg && (now >= cptr->nextnick)) { /* El nick indicado esta registrado */ unsigned long v[2], k[2], x[2]; int cont = (NICKLEN + 8) / 8; --- 1103,1109 ---- * Esta comprobacion solo se va a hacer si * el usuario es local y no esta haciendo nick flood. */ ! if ((reg || regt) && (now >= cptr->nextnick)) { /* El nick indicado esta registrado */ unsigned long v[2], k[2], x[2]; int cont = (NICKLEN + 8) / 8; *************** *** 1113,1119 **** --- 1114,1127 ---- int legal = 1; char *nombre; char tmp; + int es_migracion = 0, usa_clave = 0; + if (!reg && regt) + { + es_migracion = 1; + reg = regt; + } + memset(tmpnick, 0, sizeof(tmpnick)); strncpy(tmpnick, reg->clave, sizeof(tmpnick) - 1); *************** *** 1127,1137 **** --- 1135,1149 ---- numpass[1] = base64toint(tmppass + 6); memset(tmppass, 0, sizeof(tmppass)); + if (parc >= 3) strncpy(tmppass, parv[2], sizeof(tmppass) - 1); else strncpy(tmppass, cptr->passwd, sizeof(tmppass) - 1); + if (*tmppass) + usa_clave = 1; + /* relleno -> 123456789012 */ strncat(tmppass, "AAAAAAAAAAAA", sizeof(tmppass) - strlen(tmppass) - 1); *************** *** 1164,1170 **** me.name, nick); hflag = '+'; } ! else { if (parc < 3) { --- 1176,1182 ---- me.name, nick); hflag = '+'; } ! else if (usa_clave || !es_migracion) { if (parc < 3) { *************** *** 1180,1191 **** } sendto_one(cptr, ! ":%s NOTICE %s :*** Utiliza /QUOTE NICK %s contraseña para identificarte.", me.name, nombre, nick); sendto_one(cptr, err_str(ERR_NICKREGISTERED), me.name, parv[0], nick); return 0; } } #endif --- 1192,1212 ---- } sendto_one(cptr, ! ":%s NOTICE %s :*** Utiliza \002NICK %s:clave\002 para identificarte.", me.name, nombre, nick); sendto_one(cptr, err_str(ERR_NICKREGISTERED), me.name, parv[0], nick); return 0; } + else /* era migración y no puso clave */ + { + sendto_one(cptr, + ":%s NOTICE %s :*** Por tu seguridad y comodidad, utiliza \002NICK %s:clave\002 para identificarte.", + me.name, nombre, nick); + sendto_one(cptr, + ":%s NOTICE %s :*** También puedes configurar tu clave en el perfil de conexión de tu programa.", + me.name, nombre, nick); + } } #endif *************** *** 3427,3433 **** return; } ! if (!(reg = dbh_buscar_registro_local(ESNET_NICKDB, acptr->name))) return; strncpy(hash, reg->valor, 12); --- 3448,3455 ---- return; } ! if (!(reg = dbh_buscar_registro_local(ESNET_NICKDB, acptr->name)) && ! !(reg = dbh_buscar_registro_local(BDD_MIGRACION, acptr->name))) return; strncpy(hash, reg->valor, 12);