/*
- * $Id$
- *
* Main source module for the Citadel server
*
* Copyright (c) 1987-2010 by the citadel.org team
strings = backtrace_symbols(stack_frames, size);
for (i = 0; i < size; i++) {
if (strings != NULL)
- CtdlLogPrintf(1, "%s\n", strings[i]);
+ CtdlLogPrintf(CTDL_ALERT, "%s\n", strings[i]);
else
- CtdlLogPrintf(1, "%p\n", stack_frames[i]);
+ CtdlLogPrintf(CTDL_ALERT, "%p\n", stack_frames[i]);
}
free(strings);
#endif
strings = backtrace_symbols(stack_frames, size);
for (i = 0; i < size; i++) {
if (strings != NULL)
- CtdlLogPrintf(1, "%s\n", strings[i]);
+ CtdlLogPrintf(CTDL_ALERT, "%s\n", strings[i]);
else
- CtdlLogPrintf(1, "%p\n", stack_frames[i]);
+ CtdlLogPrintf(CTDL_ALERT, "%p\n", stack_frames[i]);
}
free(strings);
#endif
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->fake_username = '\0';
*con->fake_hostname = '\0';
*con->fake_roomname = '\0';
+ *con->cs_clientinfo = '\0';
generate_nonce(con);
safestrncpy(con->cs_host, config.c_fqdn, sizeof con->cs_host);
safestrncpy(con->cs_addr, "", sizeof con->cs_addr);
database, after a reverse lookup on the UID to get the account name.
We can take this opportunity to check to see if this is a legit account.
*/
+ snprintf(con->cs_clientinfo, sizeof(con->cs_clientinfo),
+ "PID: "F_PID_T"; UID: "F_UID_T"; GID: "F_XPID_T" ",
+ credentials.pid,
+ credentials.uid,
+ credentials.gid);
}
}
#endif
/* Log the server command, but don't show passwords... */
if ( (strncasecmp(cmdbuf, "PASS", 4)) && (strncasecmp(cmdbuf, "SETP", 4)) ) {
- CtdlLogPrintf(CTDL_INFO, "%s\n", cmdbuf);
+ CtdlLogPrintf(CTDL_INFO, "CtdlCommand [%s] [%s] %s\n", CTDLUSERIP, CC->curr_user, cmdbuf);
}
else {
- CtdlLogPrintf(CTDL_INFO, "<password command hidden from log>\n");
+ CtdlLogPrintf(CTDL_INFO, "CtdlCommand [%s] [%s] <password command hidden from log>\n", CTDLUSERIP, CC->curr_user);
}
buffer_output();
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";
}