Attempts to lock the file in the given mode; returns 0 for a successful lock, or an error code otherwise.
The caller should arrange for the file referred by fd to be opened in such a way as to allow the required lock.
Modes are given in <krb5/libos.h>
Attempts to (completely) unlock the file. Returns 0 if successful, or an error code otherwise.
Creates a file named pathname which can only be read by the current user.
Assures that the changes made to the file pointed to by the file handle fp are forced out to disk.