diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-05 09:48:26 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-04-05 09:48:26 -0700 |
commit | c6a8e270ab694c2291216b8c554c2f5f9dcf0fd0 (patch) | |
tree | d964a27ef6a135377ef09358e9414af5ac747ca4 /config-bot.h | |
parent | 8c105a156601216de19ff17fca1ab34fe798f1c5 (diff) | |
download | vyatta-bash-c6a8e270ab694c2291216b8c554c2f5f9dcf0fd0.tar.gz vyatta-bash-c6a8e270ab694c2291216b8c554c2f5f9dcf0fd0.zip |
Add auditing support to bash
This is based on earlier (unaccepted) patch to add auditing
support which wasd done by Steve Grubb at Redhat.
This patch depends on audit 1.4 to provide a logging function.
The resulting audit message looks like this:
time->Tue Jan 30 18:23:45 2007
type=USER_CMD msg=audit(1170199425.793:143): user pid=22862 uid=0 auid=0
subj=system_u:system_r:unconfined_t:s0-s0:c0.c1023
msg='cwd=2F726F6F742F7465737420646972 cmd=6C73202D6C (terminal=tty1
res=success)'
Which translates to:
type=USER_CMD msg=audit(01/30/2007 18:23:45.793:143) : user pid=22862 uid=root
auid=root subj=system_u:system_r:unconfined_t:s0-s0:c0.c1023
msg='cwd=/root/test dir cmd=ls -l (terminal=tty1 res=success)'
This patch causes bash to log all command line arguments when the shell
is started as aubash or "bash --audit". The preferred methos is to make a
symlink frp, bash to aubash and then add aubash to /etc/shells. Then you
can change root's shell to aubash.
Diffstat (limited to 'config-bot.h')
-rw-r--r-- | config-bot.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config-bot.h b/config-bot.h index 1b8fd5d..a4f95cf 100644 --- a/config-bot.h +++ b/config-bot.h @@ -97,6 +97,11 @@ # define RESTRICTED_SHELL_NAME "rbash" #endif +/* If the shell is called by this name, it will become audited. */ +#if defined (AUDIT_SHELL) +# define AUDIT_SHELL_NAME "aubash" +#endif + /***********************************************************/ /* Make sure feature defines have necessary prerequisites. */ /***********************************************************/ |