Don't clear the caller's existing known_hosts file.

Replace truncate call with touch call to avoid truncating user's
existing known_hosts file.  We don't want the caller's known_hosts
file to be erased when entering a chroot.

This was introduced with commit add9976e45a9 ("enter_chroot: bind mount

TEST=Hosts file remains intact after this change

Change-Id: I5284c47c0571c65b6ba7af96c31bdd7bbfe5760d
Tested-by: Steve Kendall <>
Reviewed-by: Mike Frysinger <>
1 file changed