# HG changeset patch # User Matt Johnston # Date 1154958083 0 # Node ID 01e4180895ba1330057d3fb688d8d5303c9b4350 # Parent bf29e6659fb9994eed08801b96f825efe5179e17# Parent dba106bf6b347abe3689f62fcf6208c877de4429 merge of '9a4e042fd565f46141e81e0c1ab90260303348fe' and 'bea3887a5875cf3ab8a1331e15e698b37b61fe37' diff -r bf29e6659fb9 -r 01e4180895ba options.h --- a/options.h Thu Jul 27 01:24:39 2006 +0000 +++ b/options.h Mon Aug 07 13:41:23 2006 +0000 @@ -199,8 +199,10 @@ * not using the Dropbear client, you'll need to change it */ #define _PATH_SSH_PROGRAM "/usr/bin/dbclient" -/* Multi-purpose binary configuration has now moved. Look at the top - * of the Makefile for instructions, or INSTALL */ +/* Whether to log commands executed by a client. This only logs the + * (single) command sent to the server, not what a user did in a + * shell/sftp session etc. */ +/* #define LOG_COMMANDS */ /******************************************************************* * You shouldn't edit below here unless you know you need to. diff -r bf29e6659fb9 -r 01e4180895ba svr-chansession.c --- a/svr-chansession.c Thu Jul 27 01:24:39 2006 +0000 +++ b/svr-chansession.c Mon Aug 07 13:41:23 2006 +0000 @@ -588,6 +588,16 @@ } } +#ifdef LOG_COMMANDS + if (chansess->cmd) { + dropbear_log(LOG_INFO, "user %s executing '%s'", + ses.authstate.printableuser, chansess->cmd); + } else { + dropbear_log(LOG_INFO, "user %s executing login shell", + ses.authstate.printableuser); + } +#endif + if (chansess->term == NULL) { /* no pty */ ret = noptycommand(channel, chansess);