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
~/.ssh/known_hosts")
BUG=None
TEST=Hosts file remains intact after this change
Change-Id: I5284c47c0571c65b6ba7af96c31bdd7bbfe5760d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/2705327
Tested-by: Steve Kendall <skend@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed