X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fcontext.c;h=8b06ab5c811b1d352edd8c30673a2c6fdff45321;hb=bdfa2e9b6af7e32b11461433a28dd6551f830888;hp=88ddbe21bd6581f3693bfafa0f52612e5e29c021;hpb=e55c9fac2d5ce1ccc9239fb4155428f9c7d1bb6d;p=citadel.git diff --git a/citadel/context.c b/citadel/context.c index 88ddbe21b..8b06ab5c8 100644 --- a/citadel/context.c +++ b/citadel/context.c @@ -2,7 +2,7 @@ * Citadel context management stuff. * Here's where we (hopefully) have all the code that manipulates contexts. * - * Copyright (c) 1987-2018 by the citadel.org team + * Copyright (c) 1987-2019 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 3. @@ -490,15 +490,12 @@ void begin_session(CitContext *con) strcpy(con->lastcmdname, " "); strcpy(con->cs_clientname, "(unknown)"); strcpy(con->curr_user, NLI); - *con->fake_username = '\0'; - *con->fake_hostname = '\0'; - *con->fake_roomname = '\0'; *con->cs_clientinfo = '\0'; safestrncpy(con->cs_host, CtdlGetConfigStr("c_fqdn"), sizeof con->cs_host); safestrncpy(con->cs_addr, "", sizeof con->cs_addr); con->cs_UDSclientUID = -1; con->cs_host[sizeof con->cs_host - 1] = 0; - if (!CC->is_local_socket) { + if (!CC->is_local_client) { locate_host(con->cs_host, sizeof con->cs_host, con->cs_addr, sizeof con->cs_addr, con->client_socket @@ -548,12 +545,9 @@ void begin_session(CitContext *con) con->nologin = 1; } - if (!CC->is_local_socket) { - syslog(LOG_INFO, "context: session (%s) started from %s (%s)", con->ServiceName, con->cs_host, con->cs_addr); - } - else { - syslog(LOG_INFO, "context: session (%s) started via local socket with uid=%d", con->ServiceName, con->cs_UDSclientUID); - } + syslog(LOG_INFO, "context: session (%s) started from %s (%s) uid=%d", + con->ServiceName, con->cs_host, con->cs_addr, con->cs_UDSclientUID + ); /* Run any session startup routines registered by loadable modules */ PerformSessionHooks(EVT_START); @@ -574,7 +568,7 @@ void CtdlFillSystemContext(CitContext *context, char *name) context->cs_pid = 0; strcpy (sysname, "SYS_"); strcat (sysname, name); - len = cutuserkey(sysname); + len = cutusername(sysname); memcpy(context->curr_user, sysname, len + 1); context->client_socket = (-1); context->state = CON_SYS;