$Log$
+ Revision 623.14 2004/08/05 02:02:33 ajc
+ * CtdlHostAlias() now accepts "localhost" as a localhost address.
+ * working_ignetcfg is now loaded during incoming NETP commands, which
+ should theoretically take care of the missing config problem.
+
Revision 623.13 2004/08/02 02:51:03 ajc
* utilsmenu: removed. Because most of the admin functions have been moved
into Citadel proper, what's left of this menu is now pathetic.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
if (fqdn == NULL) return(hostalias_nomatch);
if (strlen(fqdn) == 0) return(hostalias_nomatch);
+ if (!strcasecmp(fqdn, "localhost")) return(hostalias_localhost);
if (!strcasecmp(fqdn, config.c_fqdn)) return(hostalias_localhost);
if (!strcasecmp(fqdn, config.c_nodename)) return(hostalias_localhost);
if (inetcfg == NULL) return(hostalias_nomatch);
{
char node[SIZ];
char pass[SIZ];
+ int v;
char secret[SIZ];
char nexthop[SIZ];
if (doing_queue) {
- cprintf("%d spooling - try again in a few minutes\n", ERROR + RESOURCE_BUSY);
+ cprintf("%d spooling - try again in a few minutes\n",
+ ERROR + RESOURCE_BUSY);
return;
}
+ /* Authenticate */
extract(node, cmdbuf, 0);
extract(pass, cmdbuf, 1);
- if (is_valid_node(nexthop, secret, node) != 0) {
- cprintf("%d authentication failed\n", ERROR + PASSWORD_REQUIRED);
+ /* Briefly load the IGnet Configuration to check node validity */
+ working_ignetcfg = CtdlGetSysConfig(IGNETCFG);
+ v = is_valid_node(nexthop, secret, node);
+ free(working_ignetcfg);
+ working_ignetcfg = NULL;
+
+ if (v != 0) {
+ cprintf("%d authentication failed\n",
+ ERROR + PASSWORD_REQUIRED);
return;
}
if (strcasecmp(pass, secret)) {
- cprintf("%d authentication failed\n", ERROR + PASSWORD_REQUIRED);
+ cprintf("%d authentication failed\n",
+ ERROR + PASSWORD_REQUIRED);
return;
}
if (network_talking_to(node, NTT_CHECK)) {
- cprintf("%d Already talking to %s right now\n", ERROR + RESOURCE_BUSY, node);
+ cprintf("%d Already talking to %s right now\n",
+ ERROR + RESOURCE_BUSY, node);
return;
}