1 | #include "ca_defs.h" 2 | 3 | int bport = 43; 4 | 5 | GSList *sourceList = NULL; 6 | 7 | int testmode = 0; 8 | 9 | values_t globals[] = { 10 | {"43", &bport}, 11 | {"/ncc/db2/doc/HELP", "/ncc/db2/doc/HELP"}, 12 | {"% Rights restricted by copyright. See http://www.ripe.net/db/dbcopyright.html", "% Rights restricted by copyright. See http://www.ripe.net/db/dbcopyright.html"}, 13 | {"SourceList", NULL}, 14 | {"0", &testmode}, 15 | {"1Bt9RNSMWcA.Y", "1Bt9RNSMWcA.Y"}, 16 | {"/ncc/db2/doc/WHOIS-HELP", "/ncc/db2/doc/WHOIS-HELP"}, 17 | {"/ncc/db2/doc/AUTO-DBM-HELP", "/ncc/db2/doc/AUTO-DBM-HELP"}, 18 | {"/ncc/db2/etc/attr-desc.config", "/ncc/db2/etc/attr-desc.config"}, 19 | {"RIPE", "RIPE"}, 20 | {"RIPE /ncc/db2/data/ripe/ripe.db SPLIT", "RIPE /ncc/db2/data/ripe/ripe.db SPLIT"}, 21 | {"RIPE", "RIPE"}, 22 | {"SourceList", NULL}, 23 | {"dbase", "dbase"}, 24 | {"/ncc/db2/log/qry/qrylog", "/ncc/db2/log/qry/qrylog"}, 25 | {"/ncc/db2/log/qry/qry2log", "/ncc/db2/log/qry/qry2log"}, 26 | {"/ncc/db2/log/err/errlog", "/ncc/db2/log/err/errlog"}, 27 | {"/ncc/db2/log/audit/auditlog", "/ncc/db2/log/audit/auditlog"}, 28 | {"/ncc/db2/log/upd", "/ncc/db2/log/upd"}, 29 | {"/ncc/db2/log/ack", "/ncc/db2/log/ack"}, 30 | {"/ncc/db2/locks", "/ncc/db2/locks"}, 31 | {"whoisd.pid", "whoisd.pid"}, 32 | {"STOPUPDATES", "STOPUPDATES"}, 33 | {"CLEANDB.LOCK", "CLEANDB.LOCK"}, 34 | {"/ncc/db2/serials/current", "/ncc/db2/serials/current"}, 35 | {"/ncc/db2/serials/old", "/ncc/db2/serials/old"}, 36 | {"/ncc/db2/serials/incoming", "/ncc/db2/serials/incoming"}, 37 | {"180", "180"}, 38 | {"RIPE-NCC-HM-MNT ", "RIPE-NCC-HM-MNT "}, 39 | {"127.0.0.1", "127.0.0.1"}, 40 | {"193.0.0.1[345678][0-9]", "193.0.0.1[345678][0-9]"}, 41 | {"195.88.156.1", "195.88.156.1"}, 42 | {"/ncc/db2/tmp", "/ncc/db2/tmp"}, 43 | {"/usr/local/bin/pgpv", "/usr/local/bin/pgpv"}, 44 | {"/usr/local/bin/pgpk", "/usr/local/bin/pgpk"}, 45 | {"/ncc/db2/.pgp", "/ncc/db2/.pgp"}, 46 | {"/var/qmail/bin/qmail-inject -fripe-dbm", "/var/qmail/bin/qmail-inject -fripe-dbm"}, 47 | {"8096", "8096"}, 48 | {"2097152", "2097152"}, 49 | {"2", "2"}, 50 | {"ripe-dbm@ripe.net", "ripe-dbm@ripe.net"}, 51 | {"ripe-dbm@ripe.net", "ripe-dbm@ripe.net"}, 52 | {"auto-dbm@ripe.net", "auto-dbm@ripe.net"}, 53 | {"nostrict", "nostrict"}, 54 | {"% No entries found for the selected source(s).", "% No entries found for the selected source(s)."}, 55 | {"Subject: RIPE RR: Addition of overlapping routes", "Subject: RIPE RR: Addition of overlapping routes"}, 56 | {"Subject: RIPE RR: Removal of overlapping routes", "Subject: RIPE RR: Removal of overlapping routes"}, 57 | {"The addition of your route object ... ", "The addition of your route object ... "}, 58 | {"The deletion of your route object ... ", "The deletion of your route object ... "}, 59 | {"created new overlaps with the following routes ...", "created new overlaps with the following routes ..."}, 60 | {"removed the overlaps with the following routes ...", "removed the overlaps with the following routes ..."}, 61 | {"Subject: RIPE RR: Addition of overlapping routes", "Subject: RIPE RR: Addition of overlapping routes"}, 62 | {"Subject: RIPE RR: Removal of overlapping routes", "Subject: RIPE RR: Removal of overlapping routes"}, 63 | {"The addition of the route object ... ", "The addition of the route object ... "}, 64 | {"The deletion of the route object ... ", "The deletion of the route object ... "}, 65 | {"created new overlaps with your following routes ...", "created new overlaps with your following routes ..."}, 66 | {"removed the overlaps with your following routes ...", "removed the overlaps with your following routes ..."}, 67 | {"Your e-mail:", "Your e-mail:"}, 68 | {"From: RIPE Database Management <$HUMAILBOX>", "From: RIPE Database Management <$HUMAILBOX>"}, 69 | {"From: RIPE Database Management <$HUMAILBOX>", "From: RIPE Database Management <$HUMAILBOX>"}, 70 | {"Subject: SUCCEEDED: $SUBJECT", "Subject: SUCCEEDED: $SUBJECT"}, 71 | {"Help file requested so body of message ignored.", "Help file requested so body of message ignored."}, 72 | {"Objects that just generated a WARNING have been updated as shown.", "Objects that just generated a WARNING have been updated as shown."}, 73 | {"No errors were found in your database update. Congratulations.", "No errors were found in your database update. Congratulations."}, 74 | {"RIPE Database Maintenance Department (Automatic Section)", "RIPE Database Maintenance Department (Automatic Section)"}, 75 | {"This is to notify you that some object(s) in the RIPE database", "This is to notify you that some object(s) in the RIPE database"}, 76 | {"The update causing these changes had the following mail headers:", "The update causing these changes had the following mail headers:"}, 77 | {"The update causing these changes came from the following host:", "The update causing these changes came from the following host:"}, 78 | {"From: RIPE Database Notifications <$HUMAILBOX>", "From: RIPE Database Notifications <$HUMAILBOX>"}, 79 | {"From: RIPE Database Maintainer Forwarding <$HUMAILBOX>", "From: RIPE Database Maintainer Forwarding <$HUMAILBOX>"}, 80 | {"This is to notify you that some objects in which you are mentioned as", "This is to notify you that some objects in which you are mentioned as"}, 81 | {"The mail message causing these failures had the following mail headers:", "The mail message causing these failures had the following mail headers:"}, 82 | {"The update causing these failures came from the following host:", "The update causing these failures came from the following host:"}, 83 | {"From: RIPE Database Maintainer Creation <$HUMAILBOX>", "From: RIPE Database Maintainer Creation <$HUMAILBOX>"}, 84 | {"A maintainer object is requested by:", "A maintainer object is requested by:"}, 85 | {"* A C C E S S D E N I E D *", "* A C C E S S D E N I E D *"}, 86 | {"The object shown below is NOT in the RIPE database.", "The object shown below is NOT in the RIPE database."}, 87 | {"Referred query to host $REFERHOST at port $REFERPORT", "Referred query to host $REFERHOST at port $REFERPORT"}, 88 | {"Referral loop detected when querying ", "Referral loop detected when querying "}, 89 | {"Referred query to host $REFERHOST at port $REFERPORT", "Referred query to host $REFERHOST at port $REFERPORT"}, 90 | {"Result TRUNCATED. Answer lenght exceeded limit.", "Result TRUNCATED. Answer lenght exceeded limit."}, 91 | {"%%% End of referred query result", "%%% End of referred query result"}, 92 | {"10", "10"}, 93 | {"2000", "2000"}, 94 | {"Copyright (c)1992/1993/1994/1995/1996/1997/1998/1999 by RIPE NCC ", "Copyright (c)1992/1993/1994/1995/1996/1997/1998/1999 by RIPE NCC "}, 95 | {"IE ie", "IE ie"} 96 | }; 97 | values_t locals[] = { 98 | {"43", &bport}, 99 | {"/ncc/db2/doc/HELP", "/ncc/db2/doc/HELP"}, 100 | {"% Rights restricted by copyright. See http://www.ripe.net/db/dbcopyright.html", "% Rights restricted by copyright. See http://www.ripe.net/db/dbcopyright.html"}, 101 | {"SourceList", NULL}, 102 | {"0", &testmode}, 103 | {"1Bt9RNSMWcA.Y", "1Bt9RNSMWcA.Y"}, 104 | {"/ncc/db2/doc/WHOIS-HELP", "/ncc/db2/doc/WHOIS-HELP"}, 105 | {"/ncc/db2/doc/AUTO-DBM-HELP", "/ncc/db2/doc/AUTO-DBM-HELP"}, 106 | {"/ncc/db2/etc/attr-desc.config", "/ncc/db2/etc/attr-desc.config"}, 107 | {"RIPE", "RIPE"}, 108 | {"RIPE /ncc/db2/data/ripe/ripe.db SPLIT", "RIPE /ncc/db2/data/ripe/ripe.db SPLIT"}, 109 | {"RIPE", "RIPE"}, 110 | {"SourceList", NULL}, 111 | {"dbase", "dbase"}, 112 | {"/ncc/db2/log/qry/qrylog", "/ncc/db2/log/qry/qrylog"}, 113 | {"/ncc/db2/log/qry/qry2log", "/ncc/db2/log/qry/qry2log"}, 114 | {"/ncc/db2/log/err/errlog", "/ncc/db2/log/err/errlog"}, 115 | {"/ncc/db2/log/audit/auditlog", "/ncc/db2/log/audit/auditlog"}, 116 | {"/ncc/db2/log/upd", "/ncc/db2/log/upd"}, 117 | {"/ncc/db2/log/ack", "/ncc/db2/log/ack"}, 118 | {"/ncc/db2/locks", "/ncc/db2/locks"}, 119 | {"whoisd.pid", "whoisd.pid"}, 120 | {"STOPUPDATES", "STOPUPDATES"}, 121 | {"CLEANDB.LOCK", "CLEANDB.LOCK"}, 122 | {"/ncc/db2/serials/current", "/ncc/db2/serials/current"}, 123 | {"/ncc/db2/serials/old", "/ncc/db2/serials/old"}, 124 | {"/ncc/db2/serials/incoming", "/ncc/db2/serials/incoming"}, 125 | {"180", "180"}, 126 | {"RIPE-NCC-HM-MNT ", "RIPE-NCC-HM-MNT "}, 127 | {"127.0.0.1", "127.0.0.1"}, 128 | {"193.0.0.1[345678][0-9]", "193.0.0.1[345678][0-9]"}, 129 | {"195.88.156.1", "195.88.156.1"}, 130 | {"/ncc/db2/tmp", "/ncc/db2/tmp"}, 131 | {"/usr/local/bin/pgpv", "/usr/local/bin/pgpv"}, 132 | {"/usr/local/bin/pgpk", "/usr/local/bin/pgpk"}, 133 | {"/ncc/db2/.pgp", "/ncc/db2/.pgp"}, 134 | {"/var/qmail/bin/qmail-inject -fripe-dbm", "/var/qmail/bin/qmail-inject -fripe-dbm"}, 135 | {"8096", "8096"}, 136 | {"2097152", "2097152"}, 137 | {"2", "2"}, 138 | {"ripe-dbm@ripe.net", "ripe-dbm@ripe.net"}, 139 | {"ripe-dbm@ripe.net", "ripe-dbm@ripe.net"}, 140 | {"auto-dbm@ripe.net", "auto-dbm@ripe.net"}, 141 | {"nostrict", "nostrict"}, 142 | {"% No entries found for the selected source(s).", "% No entries found for the selected source(s)."}, 143 | {"Subject: RIPE RR: Addition of overlapping routes", "Subject: RIPE RR: Addition of overlapping routes"}, 144 | {"Subject: RIPE RR: Removal of overlapping routes", "Subject: RIPE RR: Removal of overlapping routes"}, 145 | {"The addition of your route object ... ", "The addition of your route object ... "}, 146 | {"The deletion of your route object ... ", "The deletion of your route object ... "}, 147 | {"created new overlaps with the following routes ...", "created new overlaps with the following routes ..."}, 148 | {"removed the overlaps with the following routes ...", "removed the overlaps with the following routes ..."}, 149 | {"Subject: RIPE RR: Addition of overlapping routes", "Subject: RIPE RR: Addition of overlapping routes"}, 150 | {"Subject: RIPE RR: Removal of overlapping routes", "Subject: RIPE RR: Removal of overlapping routes"}, 151 | {"The addition of the route object ... ", "The addition of the route object ... "}, 152 | {"The deletion of the route object ... ", "The deletion of the route object ... "}, 153 | {"created new overlaps with your following routes ...", "created new overlaps with your following routes ..."}, 154 | {"removed the overlaps with your following routes ...", "removed the overlaps with your following routes ..."}, 155 | {"Your e-mail:", "Your e-mail:"}, 156 | {"From: RIPE Database Management <$HUMAILBOX>", "From: RIPE Database Management <$HUMAILBOX>"}, 157 | {"From: RIPE Database Management <$HUMAILBOX>", "From: RIPE Database Management <$HUMAILBOX>"}, 158 | {"Subject: SUCCEEDED: $SUBJECT", "Subject: SUCCEEDED: $SUBJECT"}, 159 | {"Help file requested so body of message ignored.", "Help file requested so body of message ignored."}, 160 | {"Objects that just generated a WARNING have been updated as shown.", "Objects that just generated a WARNING have been updated as shown."}, 161 | {"No errors were found in your database update. Congratulations.", "No errors were found in your database update. Congratulations."}, 162 | {"RIPE Database Maintenance Department (Automatic Section)", "RIPE Database Maintenance Department (Automatic Section)"}, 163 | {"This is to notify you that some object(s) in the RIPE database", "This is to notify you that some object(s) in the RIPE database"}, 164 | {"The update causing these changes had the following mail headers:", "The update causing these changes had the following mail headers:"}, 165 | {"The update causing these changes came from the following host:", "The update causing these changes came from the following host:"}, 166 | {"From: RIPE Database Notifications <$HUMAILBOX>", "From: RIPE Database Notifications <$HUMAILBOX>"}, 167 | {"From: RIPE Database Maintainer Forwarding <$HUMAILBOX>", "From: RIPE Database Maintainer Forwarding <$HUMAILBOX>"}, 168 | {"This is to notify you that some objects in which you are mentioned as", "This is to notify you that some objects in which you are mentioned as"}, 169 | {"The mail message causing these failures had the following mail headers:", "The mail message causing these failures had the following mail headers:"}, 170 | {"The update causing these failures came from the following host:", "The update causing these failures came from the following host:"}, 171 | {"From: RIPE Database Maintainer Creation <$HUMAILBOX>", "From: RIPE Database Maintainer Creation <$HUMAILBOX>"}, 172 | {"A maintainer object is requested by:", "A maintainer object is requested by:"}, 173 | {"* A C C E S S D E N I E D *", "* A C C E S S D E N I E D *"}, 174 | {"The object shown below is NOT in the RIPE database.", "The object shown below is NOT in the RIPE database."}, 175 | {"Referred query to host $REFERHOST at port $REFERPORT", "Referred query to host $REFERHOST at port $REFERPORT"}, 176 | {"Referral loop detected when querying ", "Referral loop detected when querying "}, 177 | {"Referred query to host $REFERHOST at port $REFERPORT", "Referred query to host $REFERHOST at port $REFERPORT"}, 178 | {"Result TRUNCATED. Answer lenght exceeded limit.", "Result TRUNCATED. Answer lenght exceeded limit."}, 179 | {"%%% End of referred query result", "%%% End of referred query result"}, 180 | {"10", "10"}, 181 | {"2000", "2000"}, 182 | {"Copyright (c)1992/1993/1994/1995/1996/1997/1998/1999 by RIPE NCC ", "Copyright (c)1992/1993/1994/1995/1996/1997/1998/1999 by RIPE NCC "}, 183 | {"IE ie", "IE ie"} 184 | }; 185 | 186 | 187 | ca_database_t ripe = { 188 | "rowan.ripe.net", "4343", "Idiot", "scramble", "RIPE6" 189 | }; 190 | 191 | ca_database_t arin = { 192 | 193 | "rowan", "2005", "dbint", "passwrd", "ARIN2" 194 | }; 195 | 196 | /* 197 | * ca_database_t radb = { 198 | * "rowan", "default", "default", "default", "RADB1" 199 | * }; 200 | */ 201 | 202 | /* 203 | * ca_database_t radb = { 204 | * ca_defHost, ca_defPort, ca_defUser, ca_defPassword, "RADB1" 205 | * }; 206 | */ 207 | 208 | 209 | ca_database_t radb = { 210 | CA_DEFHOST, CA_DEFPORT, CA_DEFUSER, CA_DEFPASSWORD, "RADB1" 211 | }; 212 | 213 | ca_database_list_t ripeComponent = { 214 | "RIPE", 215 | { 216 | "rowan.ripe.net", 217 | "4343", 218 | "Idiot", 219 | "scramble", 220 | "RIPE6" 221 | } 222 | }; 223 | 224 | ca_database_list_t arinComponent = { 225 | "ARIN", 226 | { 227 | "rowan", 228 | "2005", 229 | "dbint", 230 | "passwd", 231 | "ARIN2" 232 | } 233 | }; 234 | 235 | /* 236 | * char ca_defHost[64] = "rowan"; 237 | * char ca_defPort[16] = "43"; 238 | * char ca_defUser[16] = "dbase"; 239 | * char ca_defPassword[9] = "encrypt1"; 240 | * char ca_defdbName[16] = "default-db"; 241 | */ 242 | 243 | ca_database_list_t radbComponent = { 244 | "RADB", 245 | { 246 | CA_DEFHOST, 247 | CA_DEFPORT, 248 | CA_DEFUSER, 249 | CA_DEFPASSWORD, 250 | "RADB1" 251 | } 252 | }; 253 | 254 | 255 | /* 256 | * The test configuration file. 257 | */ 258 | const char *testFile = "test.config"; 259 | const char *tempFile = "temp.config"; 260 | const char *dictFile = "dictionary.txt"; 261 | const char *confFile = "amrm.config"; 262 | 263 | values_t confVars[85]; 264 |