1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
--- logging.b.c 2006-01-21 15:49:27.000000000 +0100
+++ logging.c 2006-01-21 18:47:05.000000000 +0100
@@ -301,9 +301,9 @@
else
message = "unknown error ; ";
- easprintf(&logline, "%sTTY=%s ; PWD=%s ; USER=%s ; COMMAND=%s%s%s",
+ easprintf(&logline, "%sTTY=%s ; PWD=%s ; USER=%s ; COMMAND=%s%s%s ; SSH_CLIENT=%s",
message, user_tty, user_cwd, *user_runas, user_cmnd,
- user_args ? " " : "", user_args ? user_args : "");
+ user_args ? " " : "", user_args ? user_args : "", user_ssh_client ? user_ssh_client : "" );
mail_auth(status, logline); /* send mail based on status */
--- env.b.c 2005-02-06 16:37:01.000000000 +0100
+++ env.c 2006-01-21 18:42:41.000000000 +0100
@@ -183,6 +183,8 @@
user_prompt = *ep + 12;
else if (strncmp("SUDO_USER=", *ep, 10) == 0)
prev_user = *ep + 10;
+ else if (strncmp("SSH_CLIENT=", *ep, 11) == 0)
+ user_ssh_client = *ep + 11;
continue;
case 'T':
if (strncmp("TZ=", *ep, 3) == 0)
--- sudo.b.h 2005-03-24 00:44:46.000000000 +0100
+++ sudo.h 2006-01-21 18:51:34.000000000 +0100
@@ -38,6 +38,7 @@
struct stat *cmnd_stat;
char *path;
char *shell;
+ char *user_ssh_client;
char *tty;
char cwd[PATH_MAX];
char *host;
@@ -127,6 +128,7 @@
#define user_shell (sudo_user.shell)
#define user_tty (sudo_user.tty)
#define user_cwd (sudo_user.cwd)
+#define user_ssh_client (sudo_user.user_ssh_client)
#define user_runas (sudo_user.runas)
#define user_cmnd (sudo_user.cmnd)
#define user_args (sudo_user.cmnd_args)
|