Shishi * shishi
( void)
Initializes the Shishi library, and set up, using
shishi_set_outputtype(), the library so that future warnings and
informational messages are printed to stderr. If this function
fails, it may print diagnostic errors to stderr.
Return value: Returns Shishi library handle, or NULL on error.
Shishi * shishi_server
( void)
Initializes the Shishi library, and set up, using
shishi_set_outputtype(), the library so that future warnings and
informational messages are printed to the syslog. If this function
fails, it may print diagnostic errors to the syslog.
Return value: Returns Shishi library handle, or NULL on error.
void shishi_done
(Shishi * handle)
handle: shishi handle as allocated by shishi_init().
Deallocates the shishi library handle. The handle must not be used in any calls to shishi functions after this.
If there is a default tkts, it is written to the default tkts file (call shishi_tkts_default_file_set() to change the default tkts file). If you do not wish to write the default tkts file, close the default tkts with shishi_tkts_done(handle, NULL) before calling this function.
int shishi_init
(Shishi ** handle)
handle: pointer to handle to be created.
Create a Shishi library handle, using shishi(), and read the system configuration file, user configuration file and user tickets from their default locations. The paths to the system configuration file is decided at compile time, and is $sysconfdir/shishi.conf. The user configuration file is $HOME/.shishi/config, and the user ticket file is $HOME/.shishi/ticket.
The handle is allocated regardless of return values, except for SHISHI_HANDLE_ERROR which indicates a problem allocating the handle. (The other error conditions comes from reading the files.)
Return value: Returns SHISHI_OK iff successful.
int shishi_init_with_paths
(Shishi ** handle, const char * tktsfile, const char * systemcfgfile, const char * usercfgfile)
handle: pointer to handle to be created.
tktsfile: Filename of ticket file, or NULL.
systemcfgfile: Filename of system configuration, or NULL.
usercfgfile: Filename of user configuration, or NULL.
Create a Shishi library handle, using shishi(), and read the system configuration file, user configuration file, and user tickets from the specified locations. If any of usercfgfile or systemcfgfile is NULL, the file is read from its default location, which for the system configuration file is decided at compile time, and is $sysconfdir/shishi.conf, and for the user configuration file is $HOME/.shishi/config. If the ticket file is NULL, a ticket file is not read at all.
The handle is allocated regardless of return values, except for SHISHI_HANDLE_ERROR which indicates a problem allocating the handle. (The other error conditions comes from reading the files.)
Return value: Returns SHISHI_OK iff successful.
int shishi_init_server
(Shishi ** handle)
handle: pointer to handle to be created.
Create a Shishi library handle, using shishi_server(), and read the system configuration file. The paths to the system configuration file is decided at compile time, and is $sysconfdir/shishi.conf.
The handle is allocated regardless of return values, except for SHISHI_HANDLE_ERROR which indicates a problem allocating the handle. (The other error conditions comes from reading the file.)
Return value: Returns SHISHI_OK iff successful.
int shishi_init_server_with_paths
(Shishi ** handle, const char * systemcfgfile)
handle: pointer to handle to be created.
systemcfgfile: Filename of system configuration, or NULL.
Create a Shishi library handle, using shishi_server(), and read the system configuration file from specified location. The paths to the system configuration file is decided at compile time, and is $sysconfdir/shishi.conf. The handle is allocated regardless of return values, except for SHISHI_HANDLE_ERROR which indicates a problem allocating the handle. (The other error conditions comes from reading the file.)
Return value: Returns SHISHI_OK iff successful.
int shishi_cfg
(Shishi * handle, char * option)
handle: Shishi library handle create by shishi_init().
option: string with shishi library option.
Configure shishi library with given option.
Return Value: Returns SHISHI_OK if option was valid.
int shishi_cfg_from_file
(Shishi * handle, const char * cfg)
handle: Shishi library handle create by shishi_init().
cfg: filename to read configuration from.
Configure shishi library using configuration file.
Return Value: Returns SHISHI_OK iff succesful.
int shishi_cfg_print
(Shishi * handle, FILE * fh)
handle: Shishi library handle create by shishi_init().
fh: file descriptor opened for writing.
Print library configuration status, mostly for debugging purposes.
Return Value: Returns SHISHI_OK.
const char * shishi_cfg_default_systemfile
(Shishi * handle)
handle: Shishi library handle create by shishi_init().
Return value: Return system configuration filename.
const char * shishi_cfg_default_userdirectory
(Shishi * handle)
handle: Shishi library handle create by shishi_init().
Return value: Return directory with configuration files etc.
const char * shishi_cfg_default_userfile
(Shishi * handle)
handle: Shishi library handle create by shishi_init().
Return value: Return user configuration filename.
int shishi_cfg_clientkdcetype
(Shishi * handle, int32_t ** etypes)
handle: Shishi library handle create by shishi_init().
etypes: output array with encryption types.
Set the etypes variable to the array of preferred client etypes.
Return value: Return the number of encryption types in the array, 0 means none.
int shishi_cfg_clientkdcetype_set
(Shishi * handle, char * value)
handle: Shishi library handle create by shishi_init().
value: string with encryption types.
Set the "client-kdc-etypes" configuration option from given string. The string contains encryption types (integer or names) separated by comma or whitespace, e.g. "aes256-cts-hmac-sha1-96 des3-cbc-sha1-kd des-cbc-md5".
Return value: Return SHISHI_OK iff successful.
int shishi_cfg_authorizationtype_set
(Shishi * handle, char * value)
handle: Shishi library handle create by shishi_init().
value: string with authorization types.
Set the "authorization-types" configuration option from given string. The string contains authorization types (integer or names) separated by comma or whitespace, e.g. "basic k5login".
Return value: Return SHISHI_OK iff successful.