fsync() and check inode number for changes before writing.
fsync() and check inode number for changes before writing.

When writing the new secret file, call fsync() to ensure the subsequent
atomic rename is working with data that is actually flushed out to disk.

Also check the inode to ensure we haven't happened to have just done
several updates within the past second that haven't changed the
filesize.

google/google-authenticator-libpam,google/google-authenticator-libpam,google/google-authenticator-libpam,google/google-authenticator-libpam