Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
cda6e6e0
Commit
cda6e6e0
authored
Mar 05, 1994
by
Per Cederqvist
Browse files
(shutdown_kom): Log who is shutting down the server.
parent
021ce2c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/admin.c
View file @
cda6e6e0
/*
* $Id: admin.c,v 0.1
3
1994/0
2/19 04:27:21
ceder Exp $
* $Id: admin.c,v 0.1
4
1994/0
3/05 22:14:36
ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -28,7 +28,7 @@
* Administrative calls.
*/
static
char
*
rcsid
=
"$Id: admin.c,v 0.1
3
1994/0
2/19 04:27:21
ceder Exp $"
;
static
char
*
rcsid
=
"$Id: admin.c,v 0.1
4
1994/0
3/05 22:14:36
ceder Exp $"
;
#include
"rcs.h"
USE
(
rcsid
);
...
...
@@ -52,6 +52,7 @@ USE(rcsid);
#include
"log.h"
#include
"send-async.h"
#include
"param.h"
#include
"string-malloc.h"
/* All of the fields in this structure except the version number
is set from the configuration file at startup (see ramkomd.c).
...
...
@@ -199,6 +200,10 @@ sync_kom (void)
extern
Success
shutdown_kom
(
int
exit_val
)
{
char
*
name
;
char
*
user
;
char
*
host
;
CHK_LOGIN
(
FAILURE
);
if
(
!
ENA
(
admin
,
1
)
)
{
...
...
@@ -206,6 +211,15 @@ shutdown_kom (int exit_val)
return
FAILURE
;
}
name
=
s_crea_c_str
(
active_connection
->
username
);
user
=
s_crea_c_str
(
active_connection
->
ident_user
);
host
=
s_crea_c_str
(
active_connection
->
hostname
);
log
(
"shutdown initiated by person %d (%s) via %s@%s.
\n
"
,
ACTPERS
,
name
,
user
,
host
);
string_free
(
host
);
string_free
(
user
);
string_free
(
name
);
go_and_die
=
TRUE
;
return
OK
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment