From dfdbea029cced659655aaa58c608e4d64aa5182a Mon Sep 17 00:00:00 2001 From: Bob Lantz Date: Wed, 6 May 2015 18:01:43 -0700 Subject: [PATCH] Private utmp and wtmp for w and last --- examples/fakecluster.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/fakecluster.py b/examples/fakecluster.py index b9ea6f5..32a1f95 100755 --- a/examples/fakecluster.py +++ b/examples/fakecluster.py @@ -98,7 +98,7 @@ class Server( Host ): class MininetServer( Server ): "A server (for nested Mininet) that can run ssh and ovsdb" - overlayDirs = ( '/etc', '/var/run' ) + overlayDirs = ( '/etc', '/var/run', '/var/log' ) privateDirs = ( '/var/run/sshd', '/var/run/openvswitch', '/var/log/openvswitch' ) @@ -118,6 +118,7 @@ class MininetServer( Server ): bfile = '/etc/ssh/ssh_banner' self.cmd( 'echo "%s" > %s' % ( msg, bfile ) ) self.cmd( 'echo "Banner %s" >> /etc/ssh/sshd_config' % bfile ) + self.cmd( 'truncate -s0 /var/run/utmp /var/log/wtmp*' ) # This pid file should really be in /var/run/sshd self.cmd( 'rm /var/run/sshd.pid' ) self.cmd( '/etc/init.d/ssh start' )