krb5_storage(3)
πΎ krb5_storage β Heimdal Kerberos 5 library, section 3
okay bestie, sit DOWN, because we're about to talk about storage β the Heimdal Kerberos 5 storage functions. this is the whole vibe of krb5_storage(3), and it's a lot, so buckle up. β¨
πΈ NAME πΈ
krb5_storage β Heimdal Kerberos 5 storage functions π
β¨ SYNOPSIS β¨
π«Ά Functions
no cap, there are SO many of these. every single one of them, exactly as written, here we go:
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_flags
(krb5_storage *sp, krb5_flags flags)
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_clear_flags
(krb5_storage *sp, krb5_flags flags)
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_storage_is_flags
(krb5_storage *sp, krb5_flags flags)
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_byteorder
(krb5_storage *sp, krb5_flags byteorder)
KRB5_LIB_FUNCTION krb5_flags KRB5_LIB_CALL krb5_storage_get_byteorder
(krb5_storage *sp)
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_max_alloc
(krb5_storage *sp, size_t size)
KRB5_LIB_FUNCTION off_t KRB5_LIB_CALL krb5_storage_seek (krb5_storage
*sp, off_t offset, int whence)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_truncate (krb5_storage
*sp, off_t offset)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_fsync (krb5_storage
*sp)
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL krb5_storage_read
(krb5_storage *sp, void *buf, size_t len)
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL krb5_storage_write
(krb5_storage *sp, const void *buf, size_t len)
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_eof_code
(krb5_storage *sp, int code)
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_get_eof_code
(krb5_storage *sp)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_storage_free
(krb5_storage *sp)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_storage_to_data
(krb5_storage *sp, krb5_data *data)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int32
(krb5_storage *sp, int32_t value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int64
(krb5_storage *sp, int64_t value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint32
(krb5_storage *sp, uint32_t value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint64
(krb5_storage *sp, uint64_t value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int64
(krb5_storage *sp, int64_t *value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint64
(krb5_storage *sp, uint64_t *value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int32
(krb5_storage *sp, int32_t *value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint32
(krb5_storage *sp, uint32_t *value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int16
(krb5_storage *sp, int16_t value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint16
(krb5_storage *sp, uint16_t value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int16
(krb5_storage *sp, int16_t *value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint16
(krb5_storage *sp, uint16_t *value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_int8
(krb5_storage *sp, int8_t value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_uint8
(krb5_storage *sp, uint8_t value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int8
(krb5_storage *sp, int8_t *value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint8
(krb5_storage *sp, uint8_t *value)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_data
(krb5_storage *sp, krb5_data data)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_data
(krb5_storage *sp, krb5_data *data)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_string
(krb5_storage *sp, const char *s)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_string
(krb5_storage *sp, char **string)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_stringz
(krb5_storage *sp, const char *s)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_stringz
(krb5_storage *sp, char **string)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_principal
(krb5_storage *sp, krb5_const_principal p)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_principal
(krb5_storage *sp, krb5_principal *princ)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_keyblock
(krb5_storage *sp, krb5_keyblock p)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_keyblock
(krb5_storage *sp, krb5_keyblock *p)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_times
(krb5_storage *sp, krb5_times times)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_times
(krb5_storage *sp, krb5_times *times)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_address
(krb5_storage *sp, krb5_address p)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_address
(krb5_storage *sp, krb5_address *adr)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_addrs
(krb5_storage *sp, krb5_addresses p)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_addrs
(krb5_storage *sp, krb5_addresses *adr)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_authdata
(krb5_storage *sp, krb5_authdata auth)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_authdata
(krb5_storage *sp, krb5_authdata *auth)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_creds
(krb5_storage *sp, krb5_creds *creds)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_creds
(krb5_storage *sp, krb5_creds *creds)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_creds_tag
(krb5_storage *sp, krb5_creds *creds)
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_creds_tag
(krb5_storage *sp, krb5_creds *creds)
KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL krb5_storage_emem (void)
KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL krb5_storage_from_fd (int
fd_in)
KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL krb5_storage_from_mem
(void *buf, size_t len)
KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL krb5_storage_from_data
(krb5_data *data)
KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL
krb5_storage_from_readonly_mem (const void *buf, size_t len)
KRB5_LIB_FUNCTION krb5_storage *KRB5_LIB_CALL krb5_storage_from_socket
(krb5_socket_t sock_in)
π Detailed Description
ngl, this is where it all lives. the detailed description is the big picture, and the function documentation below is the receipts. keep scrolling bestie, we got you. π
π Function Documentation π
π krb5_ret_address
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_address
(krb5_storage * sp, krb5_address * adr)
reads an address block out of the storage. it's giving "gimme that address." π¦
Parameters
spβ the storage buffer to write toadrβ the address block read from storage
Returns
0 on success, a Kerberos 5 error code on failure. periodt. β¨
π krb5_ret_addrs
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_addrs (krb5_storage
* sp, krb5_addresses * adr)
reads an addresses block from the storage. plural. multiple addresses. the whole squad. π«Ά
Parameters
spβ the storage buffer to write toadrβ the addresses block read from storage
Returns
0 on success, a Kerberos 5 error code on failure. π
π krb5_ret_authdata
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_authdata
(krb5_storage * sp, krb5_authdata * auth)
reads the auth data from the storage. iconic. π₯
Parameters
spβ the storage buffer to write toauthβ the auth data block read from storage
Returns
0 on success, a Kerberos 5 error code on failure. π
π krb5_ret_creds
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_creds (krb5_storage
* sp, krb5_creds * creds)
reads a credentials block from the storage. credentials are the main character here, fr fr. π
Parameters
spβ the storage buffer to write tocredsβ the credentials block read from storage
Returns
0 on success, a Kerberos 5 error code on failure. π
π krb5_ret_creds_tag
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_creds_tag
(krb5_storage * sp, krb5_creds * creds)
reads a tagged credentials block from the storage. tagged, as in it came with a little label, and yes that's a serve. πΈ
Parameters
spβ the storage buffer to write tocredsβ the credentials block read from storage
Returns
0 on success, a Kerberos 5 error code on failure. β¨
π krb5_ret_data
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_data (krb5_storage
* sp, krb5_data * data)
parses some data out of the storage. this one reads from the buffer, so pay attention to which direction you're going bestie. π
Parameters
spβ the storage buffer to read fromdataβ the parsed data
Returns
0 on success, a Kerberos 5 error code on failure. π
π krb5_ret_int16
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int16 (krb5_storage
* sp, int16_t * value)
reads an int16 from storage. the byte order is controlled by the settings on the storage β see krb5_storage_set_byteorder(). iykyk. π
Parameters
spβ the storage to write toovalueβ the value read from the buffer
Returns
0 for success, or a Kerberos 5 error code on failure. π¦
π krb5_ret_int32
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int32 (krb5_storage
* sp, int32_t * value)
reads an int32 from storage. same deal β byte order is controlled by the settings on the storage, see krb5_storage_set_byteorder(). π
Parameters
spβ the storage to write toovalueβ the value read from the buffer
Returns
0 for success, or a Kerberos 5 error code on failure. π
π krb5_ret_int64
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int64 (krb5_storage
* sp, int64_t * value)
reads an int64 from storage. yes, still byte order-controlled by the storage settings, see krb5_storage_set_byteorder(). sixty-four whole bits of it. π
Parameters
spβ the storage to write toovalueβ the value read from the buffer
Returns
0 for success, or a Kerberos 5 error code on failure. β
π krb5_ret_int8
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_int8 (krb5_storage
* sp, int8_t * value)
reads an int8 from storage. that's it. tiny. one byte. precious. π
Parameters
spβ the storage to write toovalueβ the value read from the buffer
Returns
0 for success, or a Kerberos 5 error code on failure. π
π krb5_ret_keyblock
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_keyblock
(krb5_storage * sp, krb5_keyblock * p)
reads a keyblock from the storage. β¨ heads up bestie: you free it using krb5_free_keyblock() when you're done with it. don't ghost your memory. π§
Parameters
spβ the storage buffer to write topβ the keyblock read from storage, free usingkrb5_free_keyblock()
Returns
0 on success, a Kerberos 5 error code on failure. π₯
π krb5_ret_principal
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_principal
(krb5_storage * sp, krb5_principal * princ)
parses a principal from the storage. the literal main character of Kerberos, no exaggeration. π
Parameters
spβ the storage buffer to read fromprincβ the parsed principal
Returns
0 on success, a Kerberos 5 error code on failure. π
π krb5_ret_string
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_string
(krb5_storage * sp, char ** string)
parses a string from the storage. a whole string. slay. πΈ
Parameters
spβ the storage buffer to read fromstringβ the parsed string
Returns
0 on success, a Kerberos 5 error code on failure. π«Ά
krb5_ret_stringz()</p> β grab a lil string that knows when to stop β¨
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_stringz
(krb5_storage * sp, char ** string)
Okay so this one parses a zero terminated string out of the storage. Cute, self-contained, knows its own boundaries. π
- Parameters
spβ the storage buffer to read fromstringβ the parsed string
- Returns β
0on success, a Kerberos 5 error code on failure.
krb5_ret_times()</p> β time block go brrr π°οΈ
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_times (krb5_storage
* sp, krb5_times * times)
Reads a whole times block out of the storage. Not one time, a block of times. she's thorough. π
- Parameters
spβ the storage buffer to write totimesβ the times block read from storage
- Returns β
0on success, a Kerberos 5 error code on failure.
krb5_ret_uint16()</p> β smol number, big vibes πΈ
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint16
(krb5_storage * sp, uint16_t * value)
Reads a int16 from storage. The byte order is controlled by the settings on the storage, see krb5_storage_set_byteorder(). Don't fight it, bestie, the storage decides. π«Ά
- Parameters
spβ the storage to write toovalueβ the value read from the buffer
- Returns β
0for success, or a Kerberos 5 error code on failure.
krb5_ret_uint32()</p> β the classic β¨
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint32
(krb5_storage * sp, uint32_t * value)
Reads a uint32 from storage. Byte order? Same deal, it's all up to the settings on the storage, peep krb5_storage_set_byteorder().
- Parameters
spβ the storage to write toovalueβ the value read from the buffer
- Returns β
0for success, or a Kerberos 5 error code on failure.
krb5_ret_uint64()</p> β the big one πͺ
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint64
(krb5_storage * sp, uint64_t * value)
Reads a uint64 from storage. Yup, byte order is controlled by the settings on the storage, see krb5_storage_set_byteorder(). It's giving consistency, we love that for us. π
- Parameters
spβ the storage to write toovalueβ the value read from the buffer
- Returns β
0for success, or a Kerberos 5 error code on failure.
krb5_ret_uint8()</p> β baby byte energy π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_ret_uint8 (krb5_storage
* sp, uint8_t * value)
Reads a uint8 from storage. That's it. That's the whole job. iconic honestly.
- Parameters
spβ the storage to write toovalueβ the value read from the buffer
- Returns β
0for success, or a Kerberos 5 error code on failure.
krb5_storage_clear_flags()</p> β un-set those flags, periodt π
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_clear_flags (krb5_storage
* sp, krb5_flags flags)
Clears the flags on a storage buffer. Yes it returns void, it just does the thing, no receipts needed. π
- Parameters
spβ the storage buffer to clear the flags onflagsβ the flags to clear
krb5_storage_emem()</p> β elastic memory backend, she stretches π§
KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_emem (void)
Creates an elastic (allocating) memory storage backend. Memory is allocated on demand β like, when it needs it, it gets it. No hoarding. π
Free the returnedkrb5_storagewithkrb5_storage_free()or it will simply live with you forever, rent free. π
- Returns β A
krb5_storageon success, orNULLon out of memory error. - See also
krb5_storage_from_mem()krb5_storage_from_readonly_mem()krb5_storage_from_fd()krb5_storage_from_data()krb5_storage_from_socket()
krb5_storage_free()</p> β release her, let her go π¦
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_storage_free
(krb5_storage * sp)
Frees a krb5 storage. Closure! Growth! We love to see it. π
- Parameters
spβ the storage to free.
- Returns β An Kerberos 5 error code.
krb5_storage_from_data()</p> β fixed size memory block, no notes π
KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_data
(krb5_data * data)
Creates a fixed size memory storage block. Fixed size, bestie. She's not growing, she's not shrinking, she's exactly what she is. main character energy.
- Returns β A
krb5_storageon success, orNULLon out of memory error. - See also
krb5_storage_mem()krb5_storage_from_mem()krb5_storage_from_readonly_mem()krb5_storage_from_fd()
krb5_storage_from_fd()</p> β file descriptor, but make it storage ποΈ
KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_fd (int
fd_in)
- Returns β A
krb5_storageon success, orNULLon out of memory error. - See also
krb5_storage_emem()krb5_storage_from_mem()krb5_storage_from_readonly_mem()krb5_storage_from_data()krb5_storage_from_socket()
krb5_storage_from_mem()</p> β memory block, fixed size, iconic β¨
KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_mem (void *
buf, size_t len)
Creates a fixed size memory storage block.
- Returns β A
krb5_storageon success, orNULLon out of memory error. - See also
krb5_storage_mem()krb5_storage_from_readonly_mem()krb5_storage_from_data()krb5_storage_from_fd()krb5_storage_from_socket()
krb5_storage_from_readonly_mem()</p> β look, don't touch π
KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_readonly_mem
(const void * buf, size_t len)
Creates a fixed size memory storage block that is read only. She's behind the velvet rope, bestie. Admire from a distance. π
- Returns β A
krb5_storageon success, orNULLon out of memory error. - See also
krb5_storage_mem()krb5_storage_from_mem()krb5_storage_from_data()krb5_storage_from_fd()
krb5_storage_from_socket()</p> β socket storage, networking era π₯
KRB5_LIB_FUNCTION krb5_storage* KRB5_LIB_CALL krb5_storage_from_socket
(krb5_socket_t sock_in)
- Returns β A
krb5_storageon success, orNULLon out of memory error. - See also
krb5_storage_emem()krb5_storage_from_mem()krb5_storage_from_readonly_mem()krb5_storage_from_data()krb5_storage_from_fd()
krb5_storage_fsync()</p> β push it to the backing store πΎ
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_fsync (krb5_storage * sp)
Syncs the storage buffer to its backing store. And if there's, like, no backing store? This function will return success anyway. She's flexible like that. π«Ά
- Parameters
spβ the storage buffer to sync
- Returns β A Kerberos 5 error code
krb5_storage_get_byteorder()</p> β which way do the bytes go π€
KRB5_LIB_FUNCTION krb5_flags KRB5_LIB_CALL krb5_storage_get_byteorder
(krb5_storage * sp)
Returns the current byteorder for the buffer. For the actual list of byte order constants, go peep krb5_storage_set_byteorder().
krb5_storage_get_eof_code()</p> β what happens at the end of storage π³
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_get_eof_code (krb5_storage
* sp)
Gets the return code that will be used when the end of storage is reached.
- Parameters
spβ the storage
- Returns β storage error code
krb5_storage_is_flags()</p> β flag check, true or false, no in between πΈ
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL krb5_storage_is_flags
(krb5_storage * sp, krb5_flags flags)
Returns true or false depending on if the storage flags is set or not.
NB β testing for the flag 0 always returns true. Every time. No exceptions. Not me finding that out the hard way. π
- Parameters
spβ the storage buffer to check flags onflagsβ The flags to test for
- Returns β true if all the flags are set, false if not.
krb5_storage_read()</p> β read era, we're reading π
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL krb5_storage_read (krb5_storage
* sp, void * buf, size_t len)
Reads to the storage buffer.
- Parameters
spβ the storage buffer to read frombufβ the buffer to store the data inlenβ the length to read
- Returns β The length of data read (can be shorter then
len), or negative on error.
Heads up bestie: shorter-than-len is normal, it's not a bug, it's just how she reads. Don't come for her. π
krb5_storage_seek()</p> β slide to a new offset π
KRB5_LIB_FUNCTION off_t KRB5_LIB_CALL krb5_storage_seek (krb5_storage * sp,
off_t offset, int whence)
Seeks to a new offset. It's giving scroll bar but for storage.
- Parameters
spβ the storage buffer to seek in.offsetβ the offset to seekwhenceβ relateive searching,SEEK_CURfrom the current position,SEEK_ENDfrom the end,SEEK_SETabsolute from the start.
- Returns β The new current offset
krb5_storage_set_byteorder()</p> β pick a lane, bytes π
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_byteorder
(krb5_storage * sp, krb5_flags byteorder)
Sets the new byte order of the storage buffer.
- Parameters
spβ the storage buffer to set the byte order for.byteorderβ the new byte order.
The byte order are: KRB5_STORAGE_BYTEORDER_BE, KRB5_STORAGE_BYTEORDER_LE and KRB5_STORAGE_BYTEORDER_HOST. Pick your fighter. π
krb5_storage_set_eof_code()</p> β set the vibe for "we're done here" π¦
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_eof_code (krb5_storage
* sp, int code)
Sets the return code that will be used when the end of storage is reached.
- Parameters
spβ the storagecodeβ the error code to return on end of storage
krb5_storage_set_flags()</p> β add flags by or-ing them in β¨
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_flags (krb5_storage *
sp, krb5_flags flags)
Adds the flags on a storage buffer by or-ing in the flags to the buffer.
- Parameters
spβ the storage buffer to set the flags onflagsβ the flags to set
krb5_storage_set_max_alloc()</p> β set the limit, queen π
KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_storage_set_max_alloc
(krb5_storage * sp, size_t size)
Sets the max alloc value.
- Parameters
spβ the storage buffer set the max allow forsizeβ maximum size to allocate, use0to remove limit
0 = no limit. She's unhinged and free. π
krb5_storage_to_data()</p> β copy the content out, free it after π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_storage_to_data
(krb5_storage * sp, krb5_data * data)
Copies the contnent of storage.
- Parameters
spβ the storage to copy to a datadataβ the copied data, free withkrb5_data_free()
- Returns β
0for success, or a Kerberos 5 error code on failure.
Bestie pleasekrb5_data_free()thatdatawhen you're done. It's not optional, it's a lifestyle. π«Ά
krb5_storage_truncate()</p> β chop it down to size π
KRB5_LIB_FUNCTION int KRB5_LIB_CALL krb5_storage_truncate (krb5_storage *
sp, off_t offset)
Truncates the storage buffer in sp to offset. Everything past that? Gone. poof. π
- Parameters
spβ the storage buffer to truncate.offsetβ the offset to truncate too.
- Returns β An Kerberos 5 error code.
krb5_storage_write()</p> β writing era, we're putting it in π
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL krb5_storage_write
(krb5_storage * sp, const void * buf, size_t len)
Writes to the storage buffer.
- Parameters
spβ the storage buffer to write tobufβ the buffer to write to the storage bufferlenβ the length to write
- Returns β The length of data written (can be shorter then
len), or negative on error.
Same deal as read: shorter than len is allowed and normal. It's not a personality flaw. π¦
krb5_store_address()</p> β drop an address block in there π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_address
(krb5_storage * sp, krb5_address p)
Writes a address block to storage.
- Parameters
spβ the storage buffer to write topβ the address block to write.
- Returns β
0on success, a Kerberos 5 error code on failure.
krb5_store_addrs()</p> β now a whole bunch of addresses ποΈ
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_addrs
(krb5_storage * sp, krb5_addresses p)
Writes a addresses block to storage. Plural. She's bringing friends. β¨
- Parameters
spβ the storage buffer to write topβ the addresses block to write.
- Returns β
0on success, a Kerberos 5 error code on failure.
krb5_store_authdata()</p> β auth data, stored with care π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_authdata
(krb5_storage * sp, krb5_authdata auth)
Writes a auth data block to storage.
- Parameters
spβ the storage buffer to write toauthβ the auth data block to write.
- Returns β
0on success, a Kerberos 5 error code on failure.
krb5_store_creds()</p> β credentials, stored, slay π
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_creds
(krb5_storage * sp, krb5_creds * creds)
Writes a credentials block to storage.
- Parameters
spβ the storage buffer to write tocredsβ the creds block to write.
- Returns β
0on success, a Kerberos 5 error code on failure.
krb5_store_creds_tag()</p> β same creds, but tagged π·οΈ
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_creds_tag
(krb5_storage * sp, krb5_creds * creds)
Writes a tagged credentials block to storage.
- Parameters
spβ the storage buffer to write tocredsβ the creds block to write.
- Returns β
0on success, a Kerberos 5 error code on failure.
krb5_store_data()</p> β data with a length prefix, not padded πΎ
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_store_data
(krb5_storage * sp, krb5_data data)
Stores a data to the storage. The data is stored with an int32 as lenght plus the data (not padded). So like, length first, then the actual goods. No filler, no padding, she's lean. π₯
- Parameters
spβ the storage buffer to write todataβ the buffer to store.
- Returns β
0on success, a Kerberos 5 error code on failure.
πΎ krb5_store_int16 β¨
krb5_error_code KRB5_LIB_CALL krb5_store_int16(krb5_storage * sp, int16_t value)
okay so this one drops an int16 into your storage bestie π and the byte order? that's not its decision, that's whatever you set on the storage, see krb5_storage_set_byteorder() β the storage is the one with opinions here, fr fr.
Parameters
spβ the storage to write toovalueβ the value to store
Returns
0 for success, or a Kerberos 5 error code on failure. periodt.
πΎ krb5_store_int32 β¨
krb5_error_code KRB5_LIB_CALL krb5_store_int32(krb5_storage * sp, int32_t value)
same vibe, bigger number π«Ά stores an int32, and once again the byte order is completely controlled by the settings on the storage β go check krb5_storage_set_byteorder() iykyk.
Parameters
spβ the storage to write toovalueβ the value to store
Returns
0 for success, or a Kerberos 5 error code on failure.
πΎ krb5_store_int64 β¨
krb5_error_code KRB5_LIB_CALL krb5_store_int64(krb5_storage * sp, int64_t value)
the big one π€ an int64 goes in, byte order still governed by the settings on the storage, see krb5_storage_set_byteorder(). she's consistent, she's iconic.
Parameters
spβ the storage to write toovalueβ the value to store
Returns
0 for success, or a Kerberos 5 error code on failure.
πΎ krb5_store_int8 πΈ
krb5_error_code KRB5_LIB_CALL krb5_store_int8(krb5_storage * sp, int8_t value)
tiny little int8, no byte order drama here β it just stores an int8 to storage, that's the whole post π.
Parameters
spβ the storage to write toovalueβ the value to store
Returns
0 for success, or a Kerberos 5 error code on failure.
π krb5_store_keyblock π
krb5_error_code KRB5_LIB_CALL krb5_store_keyblock(krb5_storage * sp, krb5_keyblock p)
storing a whole keyblock to the storage. main character energy honestly π .
Parameters
spβ the storage buffer to write topβ the keyblock to write
Returns
0 on success, a Kerberos 5 error code on failure.
πͺͺ krb5_store_principal π¦
krb5_error_code KRB5_LIB_CALL krb5_store_principal(krb5_storage * sp, krb5_const_principal p)
writes a principal block to storage π yes bestie, the whole principal block.
Parameters
spβ the storage buffer to write topβ the principal block to write.
Returns
0 on success, a Kerberos 5 error code on failure.
π§΅ krb5_store_string π
krb5_error_code KRB5_LIB_CALL krb5_store_string(krb5_storage * sp, const char * s)
stores a string to the buffer β¨ and the layout is very specific so listen up: the data is formated as an len:uint32 plus the string itself, not padded. that's it, that's the format, no extra padding hiding in there, no cap π«Ά.
Parameters
spβ the storage buffer to write tosβ the string to store.
Returns
0 on success, a Kerberos 5 error code on failure.
π« krb5_store_stringz π
krb5_error_code KRB5_LIB_CALL krb5_store_stringz(krb5_storage * sp, const char * s)
stores a zero terminated string to the buffer π the data is stored one character at a time until a NUL is stored. one by one by one, she's thorough like that.
Parameters
spβ the storage buffer to write tosβ the string to store.
Returns
0 on success, a Kerberos 5 error code on failure.
β° krb5_store_times β
krb5_error_code KRB5_LIB_CALL krb5_store_times(krb5_storage * sp, krb5_times times)
writes a times block to storage β time really said "let me be stored" and we said yes.
Parameters
spβ the storage buffer to write totimesβ the times block to write.
Returns
0 on success, a Kerberos 5 error code on failure.
πΎ krb5_store_uint16 β¨
krb5_error_code KRB5_LIB_CALL krb5_store_uint16(krb5_storage * sp, uint16_t value)
an unsigned uint16 into storage, and you already know the drill: byte order is controlled by the settings on the storage, see krb5_storage_set_byteorder() π
.
Parameters
spβ the storage to write toovalueβ the value to store
Returns
0 for success, or a Kerberos 5 error code on failure.
πΎ krb5_store_uint32 β¨
krb5_error_code KRB5_LIB_CALL krb5_store_uint32(krb5_storage * sp, uint32_t value)
stores a uint32, byte order controlled by the storage settings again β krb5_storage_set_byteorder() is literally the girl running the whole show here π.
Parameters
spβ the storage to write toovalueβ the value to store
Returns
0 for success, or a Kerberos 5 error code on failure.
πΎ krb5_store_uint64 β¨
krb5_error_code KRB5_LIB_CALL krb5_store_uint64(krb5_storage * sp, uint64_t value)
uint64 time π€ byte order still comes from the settings on the storage, see krb5_storage_set_byteorder(). big number, big vibes.
Parameters
spβ the storage to write toovalueβ the value to store
Returns
0 for success, or a Kerberos 5 error code on failure.
πΎ krb5_store_uint8 πΈ
krb5_error_code KRB5_LIB_CALL krb5_store_uint8(krb5_storage * sp, uint8_t value)
just a lil uint8 going to storage, no byte order discourse, no complications, a peaceful queen π.
Parameters
spβ the storage to write toovalueβ the value to store
Returns
0 for success, or a Kerberos 5 error code on failure.
π AUTHOR π
Generated automatically by Doxygen for Heimdal Kerberos 5 library from the source code. yes bestie the docs wrote themselves, that's the flex π β¨
and that's the whole page!! this was Version 7.8.0, dated Tue Nov 15 2022, from the Heimdal Kerberos 5 library β mwah, slay, go store something π«Άπ
π¦ where this page comes from
- alpine 3.22: heimdal-doc 7.8.0-r4 Β· BSD-3-Clause
- alpine 3.23: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- alpine 3.24: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- epel 10: heimdal-devel 7.8.0-26.el10_2 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- epel 9: heimdal-devel 7.8.0-5.el9 Β· BSD and MIT
- fedora 43: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 43: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-devel 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms