Mercurial > dropbear
comparison svr-chansession.c @ 349:dba106bf6b34
Add (disabled by default) LOG_COMMANDS option to log the commands executed
by clients.
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 07 Aug 2006 13:41:16 +0000 |
parents | 1f5ec029dfe8 |
children | 01e4180895ba |
comparison
equal
deleted
inserted
replaced
295:03f65e461915 | 349:dba106bf6b34 |
---|---|
586 return DROPBEAR_FAILURE; | 586 return DROPBEAR_FAILURE; |
587 } | 587 } |
588 } | 588 } |
589 } | 589 } |
590 | 590 |
591 #ifdef LOG_COMMANDS | |
592 if (chansess->cmd) { | |
593 dropbear_log(LOG_INFO, "user %s executing '%s'", | |
594 ses.authstate.printableuser, chansess->cmd); | |
595 } else { | |
596 dropbear_log(LOG_INFO, "user %s executing login shell", | |
597 ses.authstate.printableuser); | |
598 } | |
599 #endif | |
600 | |
591 if (chansess->term == NULL) { | 601 if (chansess->term == NULL) { |
592 /* no pty */ | 602 /* no pty */ |
593 ret = noptycommand(channel, chansess); | 603 ret = noptycommand(channel, chansess); |
594 } else { | 604 } else { |
595 /* want pty */ | 605 /* want pty */ |