chromeos-setdevpasswd: fix permissions on devmode.passwd

By default, this file gets created with 0644 perms which allows any
non-root user to read it (and thus be able to extract & crack offline).

Make sure we create the file with 0600 perms since only root is allowed
to create it, and only root (via pam) needs to read it.

BUG=chromium:374911
TEST=ran script and checked perms, then checked `sudo` as chronos still worked

Change-Id: Ic0fcfb018f16321087178d108ac3b9c500dec357
Reviewed-on: https://chromium-review.googlesource.com/200481
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
1 file changed