shisa_principal_update3
Api function
Usage
#include <shisa.h>
int shisa_principal_update(Shisa * dbh, const char * realm, const char * principal, const Shisa_principal * ph);
Arguments
- Shisa * dbh
-
Shisa library handle created by
shisa().
- const char * realm
-
Name of the realm the principal belongs to.
- const char * principal
-
Name of principal to get information about.
- const Shisa_principal * ph
-
Pointer to an existing principal structure containing information to store in the database.
Overview
Modifies information stored about the given principal PRINCIPAL@REALM. Note that it is usually a good idea to set in ph only the fields that are to be updated.
It is generally suggested to first call shisa_principal_find(), to get the current information, then to modify one field and call shisa_principal_update().
Modifying several values is not recommended in general, as this will 1) overwrite any modifications made to other fields between the two calls (by other processes) and 2) will cause all values to be written again, which may generate more overhead.
Return value
Returns SHISA_OK if successful, SHISA_NO_REALM if the indicated realm does not exist, SHISA_NO_PRINCIPAL if the indicated principal does not exist, or an error code otherwise.
Releases
10 releases since Debian 4.0 (Etch); the text changed 5 times.