create_room(BASEROOM, 0, "", 0, 1, 0);
create_room(AIDEROOM, 3, "", 0, 1, 0);
create_room(SYSCONFIGROOM, 3, "", 0, 1, 0);
create_room(BASEROOM, 0, "", 0, 1, 0);
create_room(AIDEROOM, 3, "", 0, 1, 0);
create_room(SYSCONFIGROOM, 3, "", 0, 1, 0);
urandom = fopen("/dev/urandom", "r");
if (urandom != NULL) {
fread(&seed, sizeof seed, 1, urandom);
urandom = fopen("/dev/urandom", "r");
if (urandom != NULL) {
fread(&seed, sizeof seed, 1, urandom);
con->FirstSessData->sym_id);
if (con->FirstSessData->sym_data != NULL)
phree(con->FirstSessData->sym_data);
con->FirstSessData->sym_id);
if (con->FirstSessData->sym_data != NULL)
phree(con->FirstSessData->sym_data);
/* Remove the context from the global context list. This needs
* to get done FIRST to avoid concurrency problems. It is *vitally*
* important to keep num_sessions accurate!!
*/
/* Remove the context from the global context list. This needs
* to get done FIRST to avoid concurrency problems. It is *vitally*
* important to keep num_sessions accurate!!
*/
/* Deallocate any user-data attached to this session */
deallocate_user_data(con);
/* If the client is still connected, blow 'em away. */
/* Deallocate any user-data attached to this session */
deallocate_user_data(con);
/* If the client is still connected, blow 'em away. */
/* Fail silently if the symbol is already registered. */
for (ptr = CC->FirstSessData; ptr != NULL; ptr = ptr->next) {
/* Fail silently if the symbol is already registered. */
for (ptr = CC->FirstSessData; ptr != NULL; ptr = ptr->next) {
*/
if (stat(PUBLIC_CLIENTS, &statbuf) != 0) {
/* No public_clients file exists, so bail out */
*/
if (stat(PUBLIC_CLIENTS, &statbuf) != 0) {
/* No public_clients file exists, so bail out */
strcpy(public_clients, "127.0.0.1");
if (hostname_to_dotted_quad(addrbuf, config.c_fqdn) == 0) {
strcpy(public_clients, "127.0.0.1");
if (hostname_to_dotted_quad(addrbuf, config.c_fqdn) == 0) {
CC->cs_addr);
for (i=0; i<num_parms(public_clients); ++i) {
extract(addrbuf, public_clients, i);
if (!strcasecmp(CC->cs_addr, addrbuf)) {
CC->cs_addr);
for (i=0; i<num_parms(public_clients); ++i) {
extract(addrbuf, public_clients, i);
if (!strcasecmp(CC->cs_addr, addrbuf)) {
if ((addr.s_addr = inet_addr(from_host)) != -1) {
locate_host(CC->cs_host, sizeof CC->cs_host,
NULL, 0,
if ((addr.s_addr = inet_addr(from_host)) != -1) {
locate_host(CC->cs_host, sizeof CC->cs_host,
NULL, 0,
begin_critical_section(S_SESSION_TABLE);
for (ccptr = ContextList; ccptr != NULL; ccptr = ccptr->next) {
if (session_num == ccptr->cs_pid) {
begin_critical_section(S_SESSION_TABLE);
for (ccptr = ContextList; ccptr != NULL; ccptr = ccptr->next) {
if (session_num == ccptr->cs_pid) {
/* Run any session startup routines registered by loadable modules */
PerformSessionHooks(EVT_START);
/* Run any session startup routines registered by loadable modules */
PerformSessionHooks(EVT_START);
time(&CC->lastcmd);
memset(cmdbuf, 0, sizeof cmdbuf); /* Clear it, just in case */
if (client_gets(cmdbuf) < 1) {
time(&CC->lastcmd);
memset(cmdbuf, 0, sizeof cmdbuf); /* Clear it, just in case */
if (client_gets(cmdbuf) < 1) {