Since swtpm does not use concurrency while writing state files, set the process umask to 0 when the state file is created or truncated for writing and the user requested specific mode bits. This avoids an additional syscall in the possibly timing critical path when processing a TPM command and having to write the state.
Since swtpm does not use concurrency while writing state files, set the process umask to 0 when the state file is created or truncated for writing and the user requested specific mode bits. This avoids an additional syscall in the possibly timing critical path when processing a TPM command and having to write the state.