nfs-ganesha 1.4
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "HashData.h"
#include "HashTable.h"
#include "log.h"
#include "config_parsing.h"
#include "nfs_core.h"
#include "rpcal.h"
#include <gssapi/gssapi.h>
#include <gssapi/gssapi_generic.h>
Go to the source code of this file.
Classes | |
struct | svc_rpc_gss_data_stored |
Defines | |
#define | GSS_CNAMELEN 1024 |
#define | GSS_CKSUM_LEN 1024 |
Functions | |
uint32_t | gss_ctx_hash_func (hash_parameter_t *p_hparam, hash_buffer_t *buffclef) |
uint64_t | gss_ctx_rbt_hash_func (hash_parameter_t *p_hparam, hash_buffer_t *buffclef) |
int | compare_gss_ctx (hash_buffer_t *buff1, hash_buffer_t *buff2) |
int | display_gss_ctx (hash_buffer_t *pbuff, char *str) |
int | display_gss_svc_data (hash_buffer_t *pbuff, char *str) |
int | Gss_ctx_Hash_Set (gss_union_ctx_id_desc *pgss_ctx, struct svc_rpc_gss_data *gd) |
int | Gss_ctx_Hash_Get (gss_union_ctx_id_desc *pgss_ctx, struct svc_rpc_gss_data *gd, bool_t **established, u_int **seqlast, uint32_t **seqmask) |
int | Gss_ctx_Hash_Del (gss_union_ctx_id_desc *pgss_ctx) |
int | Gss_ctx_Hash_Init (nfs_krb5_parameter_t param) |
void | Gss_ctx_Hash_Print (void) |
Variables | |
hash_table_t * | ht_gss_ctx |
#define GSS_CKSUM_LEN 1024 |
Definition at line 29 of file AuthGss_HashTable.c.
#define GSS_CNAMELEN 1024 |
Definition at line 28 of file AuthGss_HashTable.c.
int compare_gss_ctx | ( | hash_buffer_t * | buff1, |
hash_buffer_t * | buff2 | ||
) |
compare_gss_ctx: compares the gss_ctx stored in the key buffers.
compare the gss_ctx stored in the key buffers. This function is to be used as 'compare_key' field in the hashtable storing the gss context.
buff1 | [IN] first key |
buff2 | [IN] second key |
Definition at line 271 of file AuthGss_HashTable.c.
int display_gss_ctx | ( | hash_buffer_t * | pbuff, |
char * | str | ||
) |
display_gss_ctx: displays the gss_ctx stored in the buffer.
displays the gss_ctx stored in the buffer. This function is to be used as 'key_to_str' field in the hashtable storing the gss context.
buff1 | [IN] buffer to display |
buff2 | [OUT] output string |
Definition at line 294 of file AuthGss_HashTable.c.
int display_gss_svc_data | ( | hash_buffer_t * | pbuff, |
char * | str | ||
) |
display_gss_svc_data: displays the gss_svc_data stored in the buffer.
displays the gss_svc__data stored in the buffer. This function is to be used as 'value_to_str' field in the hashtable storing the gss context.
buff1 | [IN] buffer to display |
buff2 | [OUT] output string |
Definition at line 317 of file AuthGss_HashTable.c.
int Gss_ctx_Hash_Del | ( | gss_union_ctx_id_desc * | pgss_ctx | ) |
Gss_ctx_Hash_Del
This routine removes a state from the Gss ctx hashtable.
Definition at line 455 of file AuthGss_HashTable.c.
uint32_t gss_ctx_hash_func | ( | hash_parameter_t * | p_hparam, |
hash_buffer_t * | buffclef | ||
) |
gss_ctx_hash_func: computes the hash value for the entry in GSS Ctx cache.
Computes the hash value for the entry in GSS Ctx cache. In fact, it just use addresse as value (identity function) modulo the size of the hash. This function is called internal in the HasTable_* function
hparam | [IN] hash table parameter. |
buffcleff | [IN] pointer to the hash key buffer |
Definition at line 198 of file AuthGss_HashTable.c.
int Gss_ctx_Hash_Get | ( | gss_union_ctx_id_desc * | pgss_ctx, |
struct svc_rpc_gss_data * | gd, | ||
bool_t ** | established, | ||
u_int ** | seqlast, | ||
uint32_t ** | seqmask | ||
) |
Gss_ctx_Hash_Get
This routine gets a Gss Ctx from the hashtable and returns a pointers to a the established, seqlast, and seqmask variables of the context.
Definition at line 404 of file AuthGss_HashTable.c.
int Gss_ctx_Hash_Init | ( | nfs_krb5_parameter_t | param | ) |
Gss_ctx_Hash_Init: Init the hashtable for GSS Ctx
Perform all the required initialization for hashtable Gss ctx cache
Definition at line 483 of file AuthGss_HashTable.c.
void Gss_ctx_Hash_Print | ( | void | ) |
Gss_ctx_Hash_Print: Displays the content of the hash table (for debugging)
Displays the content of the hash table (for debugging).
Definition at line 503 of file AuthGss_HashTable.c.
int Gss_ctx_Hash_Set | ( | gss_union_ctx_id_desc * | pgss_ctx, |
struct svc_rpc_gss_data * | gd | ||
) |
Gss_ctx_Hash_Set
This routine sets a Gss Ctx into the Gss Context's hashtable.
Definition at line 339 of file AuthGss_HashTable.c.
uint64_t gss_ctx_rbt_hash_func | ( | hash_parameter_t * | p_hparam, |
hash_buffer_t * | buffclef | ||
) |
gss_ctx_rbt_hash_func: computes the rbt value for the entry in GSS Ctx cache.
Computes the rbt value for the entry in GSS Ctx cache. In fact, it just use the address value itself (which is an unsigned integer) as the rbt value. This function is called internal in the HasTable_* function
hparam | [IN] hash table parameter. |
buffcleff[in] | pointer to the hash key buffer |
Definition at line 236 of file AuthGss_HashTable.c.
Definition at line 181 of file AuthGss_HashTable.c.