Commit 8fde5bb8 authored by Per Cederqvist's avatar Per Cederqvist

(login_old, login): Log successful login attempts together with

username and host.
parent e6a7a475
/*
* $Id: session.c,v 0.21 1994/02/27 15:24:54 ceder Exp $
* $Id: session.c,v 0.22 1994/02/27 17:05:52 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* Session control and miscellaneous.
*/
static char *rcsid = "$Id: session.c,v 0.21 1994/02/27 15:24:54 ceder Exp $";
static char *rcsid = "$Id: session.c,v 0.22 1994/02/27 17:05:52 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -59,6 +59,7 @@ USE(rcsid);
#include "server/smalloc.h"
#include "param.h"
#include "kom-memory.h"
#include "string-malloc.h"
/*
* Create an oldstyle username, user%host.domain@host.domain.
......@@ -174,9 +175,16 @@ login_old (Pers_no pers_no,
restart_kom("prot_a_parse_packet: s_strcat II\n");
mark_person_as_changed( pers_no );
if (param.log_login == TRUE)
{
char *id = s_crea_c_str (pers_p->username);
log ("Login %d %s", ACTPERS, id);
string_free (id);
}
async_login(ACTPERS, active_connection->session_no);
return OK;
}
......@@ -254,6 +262,13 @@ login (Pers_no pers_no,
mark_person_as_changed( pers_no );
if (param.log_login == TRUE)
{
char *id = s_crea_c_str (pers_p->username);
log ("Login %d %s", ACTPERS, id);
string_free (id);
}
if (!active_connection->invisible)
async_login(ACTPERS, active_connection->session_no);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment