Sync OpenBSD patchset 464:
Sync OpenBSD patchset 464:

Reset the umask right after fopen to avoid leaving it changed on error, noticed
by deraadt@.


klaxalk/tmux,klaxalk/tmux,klaxalk/tmux,klaxalk/tmux,klaxalk/tmux