/*
- * $Id$
- *
* Main source module for the Citadel server
*
* Copyright (c) 1987-2010 by the citadel.org team
else {
cprintf("0\n"); /* OpenID is disabled when using non-native auth */
}
+
+ cprintf("%d\n", config.c_guest_logins);
cprintf("000\n");
}
return(-1);
}
+ if ((required_level >= ac_logged_in_or_guest) && (CC->logged_in == 0) && (!config.c_guest_logins)) {
+ cprintf("%d Not logged in.\n", ERROR + NOT_LOGGED_IN);
+ return(-1);
+ }
+
if ((required_level >= ac_logged_in) && (CC->logged_in == 0)) {
cprintf("%d Not logged in.\n", ERROR + NOT_LOGGED_IN);
return(-1);
con->cs_host[sizeof con->cs_host - 1] = 0;
len = sizeof sin;
if (!CC->is_local_socket) {
- if (!getpeername(con->client_socket, (struct sockaddr *) &sin, &len)) {
- locate_host(con->cs_host, sizeof con->cs_host,
- con->cs_addr, sizeof con->cs_addr,
- &sin.sin_addr
- );
- }
+ locate_host(con->cs_host, sizeof con->cs_host,
+ con->cs_addr, sizeof con->cs_addr,
+ con->client_socket
+ );
}
else {
- strcpy(con->cs_host, "");
+ con->cs_host[0] = 0;
+ con->cs_addr[0] = 0;
#ifdef HAVE_STRUCT_UCRED
{
/* as http://www.wsinnovations.com/softeng/articles/uds.html told us... */
CtdlRegisterProtoHook(cmd_scdn, "SCDN", "schedule or cancel a server shutdown");
CtdlRegisterProtoHook(cmd_time, "TIME", "fetch the date and time from the server");
}
- /* return our Subversion id for the Log */
- return "$Id$";
+ /* return our id for the Log */
+ return "citserver";
}