next up previous contents index
Next: Network based routines Up: Operating-system specific functions Previous: Configuration based functions   Contents   Index

Disk based functions

These functions all relate to disk based I/O.


\begin{funcdecl}{krb5_lock_file}{krb5_error_code}{\funcin}
\funcarg{krb5_context}{context}
\funcarg{in}{fd}
\funcarg{int}{mode}
\end{funcdecl}

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>


\begin{funcdecl}{krb5_unlock_file}{krb5_error_code}{\funcin}
\funcarg{krb5_context}{context}
\funcarg{int}{fd}
\end{funcdecl}

Attempts to (completely) unlock the file. Returns 0 if successful, or an error code otherwise.


\begin{funcdecl}{krb5_create_secure_file}{krb5_error_code}{\funcin}
\funcarg{krb5_context}{context}
\funcarg{const char *}{pathname}
\end{funcdecl}

Creates a file named pathname which can only be read by the current user.


\begin{funcdecl}{krb5_sync_disk_file}{krb5_error_code}{\funcin}
\funcarg{krb5_context}{context}
\funcarg{FILE *}{fp}
\end{funcdecl}

Assures that the changes made to the file pointed to by the file handle fp are forced out to disk.



Autobuild 2009-09-05