internal.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NULL_THREAD   0
#define secure_str_free(text)   free(text)

Functions

int init_socket (nuauth_session_t *session, const char *hostname, const char *service, nuclient_error_t *err)
int tls_handshake (nuauth_session_t *session, nuclient_error_t *err)
int init_sasl (nuauth_session_t *session, const char *hostname, nuclient_error_t *err)
int send_os (nuauth_session_t *session, nuclient_error_t *err)
char * secure_str_copy (const char *orig)
void ask_session_end (nuauth_session_t *session)

Variables

char * nu_locale_charset


Define Documentation

#define NULL_THREAD   0

Definition at line 23 of file internal.h.

#define secure_str_free ( text   )     free(text)

Free a string allocated by secure_str_copy().

If USE_GCRYPT_MALLOC_SECURE compilation option in not set, free() is used.

Returns:
Copy of the string, or NULL on error.

Definition at line 52 of file internal.h.

Referenced by nu_exit_clean().


Function Documentation

void ask_session_end ( nuauth_session_t session  ) 

Definition at line 637 of file internal.c.

int init_sasl ( nuauth_session_t session,
const char *  hostname,
nuclient_error_t err 
)

Initialize SASL: create an client, set properties and then call mysasl_negotiate()

Parameters:
session Pointer to client session
hostname Name (FQDN) of the Nuauth server
err Pointer to a nuclient_error_t: which contains the error

Definition at line 539 of file internal.c.

References DEFAULT_KRB5_REALM, err, nuauth_session::krb5_service, mysasl_negotiate(), nu_get_userdatas(), nu_get_usersecret(), nuauth_session::nussl, NUSSL_ERR, nussl_write(), SASL_ERROR, session, SET_ERROR, nuauth_session::username, nuauth_session::username_callback, and nuauth_session::verbose.

Referenced by nu_client_connect().

Here is the call graph for this function:

int init_socket ( nuauth_session_t session,
const char *  hostname,
const char *  service,
nuclient_error_t err 
)

char* secure_str_copy ( const char *  orig  ) 

Make a copy in a string in a secure memory buffer, ie. buffer never moved to swap (hard drive). Use secure_str_free() to free the memory when you don't need the string anymore.

If USE_GCRYPT_MALLOC_SECURE compilation option in not set, strdup() is used.

Returns:
Copy of the string, or NULL on error.

Definition at line 623 of file internal.c.

References SECURE_STRNCPY.

Referenced by nu_client_new(), nu_client_set_password(), and nu_client_set_username().

int send_os ( nuauth_session_t session,
nuclient_error_t err 
)

Create the operating system packet and send it to nuauth. Packet is in format nuv2_authfield.

Parameters:
session Pointer to client session
err Pointer to a nuclient_error_t: which contains the error

Definition at line 353 of file internal.c.

References err, nu_authfield::length, nuauth_session::nussl, NUSSL_ERR, nussl_read(), nussl_write(), nu_authfield::option, OS_FIELD, OS_SRV, secure_snprintf(), nuauth_session::server_mode, session, SET_ERROR, SRV_TYPE, nu_authfield::type, and nuauth_session::verbose.

Referenced by nu_client_connect().

Here is the call graph for this function:

int tls_handshake ( nuauth_session_t session,
nuclient_error_t err 
)


Variable Documentation

char* nu_locale_charset

Definition at line 38 of file internal.c.

Referenced by nu_client_global_init(), nu_client_set_password(), nu_client_set_username(), nu_get_userdatas(), and nu_get_usersecret().


Generated on Sat Nov 22 04:00:38 2008 for NuFW by  doxygen 1.4.7