carta
krb5_store_int8(3)

krb5_store_int83

Operates on the kerberos datatype krb5_storage

Part of krb5_store_stringz(3).

Usage

struct krb5_storage;

krb5_storage *

krb5_storage *

krb5_storage *

krb5_storage *

void

void

krb5_boolean

void

krb5_flags

void

off_t

krb5_ssize_t

krb5_ssize_t

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

krb5_error_code

Library

Kerberos 5 Library (libkrb5, -lkrb5)

Overview

The krb5_storage structure holds a storage element that is used for data manipulation. The structure contains no public accessible elements.

krb5_storage_emem() create a memory based krb5 storage unit that dynamicly resized to the ammount of data stored in. The storage never returns errors, on memory allocation errors exit(3) will be called.

krb5_storage_from_data() create a krb5 storage unit that will read is data from a krb5_data. There is no copy made of the data, so the caller must not free data until the storage is freed.

krb5_storage_from_fd() create a krb5 storage unit that will read is data from a file descriptor. The descriptor must be seekable if krb5_storage_seek() is used. Caller must not free the file descriptor before the storage is freed.

krb5_storage_from_mem() create a krb5 storage unit that will read is data from a memory region. There is no copy made of the data, so the caller must not free data until the storage is freed.

krb5_storage_set_flags() and krb5_storage_clear_flags() modifies the behavior of the storage functions. krb5_storage_is_flags() tests if the flags are set on the krb5_storage. Valid flags to set, is and clear is are:

KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS

Stores the number of principal componets one too many when storing principal namees, used for compatibility with version 1 of file keytabs and version 1 of file credential caches.

KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE

Doesn't store the name type in when storing a principal name, used for compatibility with version 1 of file keytabs and version 1 of file credential caches.

KRB5_STORAGE_KEYBLOCK_KEYTYPE_TWICE

Stores the keyblock type twice storing a keyblock, used for compatibility version 3 of file credential caches.

KRB5_STORAGE_BYTEORDER_MASK

bitmask that can be used to and out what type of byte order order is used.

KRB5_STORAGE_BYTEORDER_BE

Store integers in in big endian byte order, this is the default mode.

KRB5_STORAGE_BYTEORDER_LE

Store integers in in little endian byte order.

KRB5_STORAGE_BYTEORDER_HOST

Stores the integers in host byte order, used for compatibility with version 1 of file keytabs and version 1 and 2 of file credential caches.

KRB5_STORAGE_CREDS_FLAGS_WRONG_BITORDER

Store the credential flags in a krb5_creds in the reverse bit order.

krb5_storage_set_byteorder() and krb5_storage_get_byteorder() modifies the byte order used in the storage for integers. The flags used is same as above. The valid flags are KRB5_STORAGE_BYTEORDER_BE, KRB5_STORAGE_BYTEORDER_LE and KRB5_STORAGE_BYTEORDER_HOST.

krb5_storage_set_eof_code() sets the error code that will be returned on end of file condition to code.

krb5_storage_seek() seeks offset bytes in the storage sp. The whence argument is one of

SEEK_SET

offset is from begining of storage.

SEEK_CUR

offset is relative from current offset.

SEEK_END

offset is from end of storage.

krb5_storage_read() reads len (or less bytes in case of end of file) into buf from the current offset in the storage sp.

krb5_storage_write() writes len or (less bytes in case of end of file) from buf from the current offset in the storage sp.

krb5_storage_free() frees the storage sp.

krb5_storage_to_data() converts the data in storage sp into a krb5_data structure. data must be freed with krb5_data_free() by the caller when done with the data.

All krb5_store and krb5_ret functions move the current offset forward when the functions returns.

krb5_store_int32(), krb5_ret_int32(), krb5_store_uint32(), krb5_ret_uint32(), krb5_store_int16(), krb5_ret_int16(), krb5_store_uint16(), krb5_ret_uint16(), krb5_store_int8(), krb5_ret_int8() krb5_store_uint8(), and krb5_ret_uint8() stores and reads an integer from sp in the byte order specified by the flags set on the sp.

krb5_store_data() and krb5_ret_data() store and reads a krb5_data. The length of the data is stored with krb5_store_int32().

krb5_store_string() and krb5_ret_string() store and reads a string by storing the length of the string with krb5_store_int32() followed by the string itself.

krb5_store_stringnl() and krb5_ret_stringnl() store and reads a string by storing string followed by a '0.

krb5_store_stringz() and krb5_ret_stringz() store and reads a string by storing string followed by a NUL.

krb5_store_principal() and krb5_ret_principal() store and reads a principal.

krb5_store_keyblock() and krb5_ret_keyblock() store and reads a krb5_keyblock.

krb5_store_times() krb5_ret_times() store and reads krb5_times structure .

krb5_store_address() and krb5_ret_address() store and reads a krb5_address.

krb5_store_addrs() and krb5_ret_addrs() store and reads a krb5_addresses.

krb5_store_authdata() and krb5_ret_authdata() store and reads a krb5_authdata.

krb5_store_creds() and krb5_ret_creds() store and reads a krb5_creds.

History

  • Debian 5.0 (Lenny): the text shown here
  • Debian 4.0 (Etch)

From heimdal-dev 1.2.dfsg.1-2.1+lenny1 in Debian 5.0 (Lenny). Parsed by carta from the page's mdoc source.