From 24d87ae881b237aff752ef4cda98ed2ef69ea574 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 24 Aug 1997 11:42:52 +0000 Subject: [PATCH] syslog remote shells git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3128 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/rsh/rshd.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/appl/rsh/rshd.c b/appl/rsh/rshd.c index 2e10554d7..ae36d9b1c 100644 --- a/appl/rsh/rshd.c +++ b/appl/rsh/rshd.c @@ -137,8 +137,17 @@ recv_krb4_auth (int s, u_char *buf, if (kuserok (&auth, server_username) != 0) fatal (s, "Permission denied"); read_str (s, cmd, COMMAND_SZ, "command"); + + syslog(LOG_INFO|LOG_AUTH, + "kerberos v4 shell from %s on %s as %s, cmd '%.80s'", + krb_unparse_name_long(auth.pname, auth.pinst, auth.prealm), + inet_ntoa(thataddr.sin_addr), + server_username, + cmd); + return 0; } + #endif /* KRB4 */ static void @@ -277,6 +286,21 @@ recv_krb5_auth (int s, u_char *buf, do_encrypt = 1; memmove (cmd, cmd + 3, strlen(cmd) - 2); } + + { + char *name; + + if (krb5_unparse_name (context, ticket->client, &name) == 0) { + syslog(LOG_INFO|LOG_AUTH, + "kerberos v5 shell from %s on %s as %s, cmd '%.80s'", + name, + inet_ntoa(thataddr.sin_addr), + server_username, + cmd); + free (name); + } + } + return 0; } -- 2.11.4.GIT