D-Bus 1.14.10
Data Structures | Macros | Typedefs | Enumerations
Authentication implementation details

DBusAuth implementation details. More...

Data Structures

struct  DBusAuthMechanismHandler
 Virtual table representing a particular auth mechanism. More...
 
struct  DBusAuthStateData
 Information about a auth state. More...
 
struct  DBusAuth
 Internal members of DBusAuth. More...
 
struct  DBusAuthClient
 "Subclass" of DBusAuth for client side More...
 
struct  DBusAuthServer
 "Subclass" of DBusAuth for server side. More...
 
struct  DBusAuthCommandName
 Mapping from command name to enum. More...
 

Macros

#define DBUS_AUTH_IS_SERVER(auth)   ((auth)->side == auth_side_server)
 
#define DBUS_AUTH_IS_CLIENT(auth)   ((auth)->side == auth_side_client)
 
#define DBUS_AUTH_CLIENT(auth)   ((DBusAuthClient*)(auth))
 
#define DBUS_AUTH_SERVER(auth)   ((DBusAuthServer*)(auth))
 
#define DBUS_AUTH_NAME(auth)   ((auth)->side)
 The name of the auth ("client" or "server") More...
 
#define N_CHALLENGE_BYTES   (128/8)
 http://www.ietf.org/rfc/rfc2831.txt suggests at least 64 bits of entropy, we use 128. More...
 

Typedefs

typedef dbus_bool_t(* DBusInitialResponseFunction) (DBusAuth *auth, DBusString *response)
 This function appends an initial client response to the given string. More...
 
typedef dbus_bool_t(* DBusAuthDataFunction) (DBusAuth *auth, const DBusString *data)
 This function processes a block of data received from the peer. More...
 
typedef dbus_bool_t(* DBusAuthEncodeFunction) (DBusAuth *auth, const DBusString *data, DBusString *encoded)
 This function encodes a block of data from the peer. More...
 
typedef dbus_bool_t(* DBusAuthDecodeFunction) (DBusAuth *auth, const DBusString *data, DBusString *decoded)
 This function decodes a block of data from the peer. More...
 
typedef void(* DBusAuthShutdownFunction) (DBusAuth *auth)
 This function is called when the mechanism is abandoned. More...
 
typedef dbus_bool_t(* DBusAuthStateFunction) (DBusAuth *auth, DBusAuthCommand command, const DBusString *args)
 Auth state function, determines the reaction to incoming events for a particular state. More...
 

Enumerations

enum  DBusAuthCommand {
  DBUS_AUTH_COMMAND_AUTH , DBUS_AUTH_COMMAND_CANCEL , DBUS_AUTH_COMMAND_DATA , DBUS_AUTH_COMMAND_BEGIN ,
  DBUS_AUTH_COMMAND_REJECTED , DBUS_AUTH_COMMAND_OK , DBUS_AUTH_COMMAND_ERROR , DBUS_AUTH_COMMAND_UNKNOWN ,
  DBUS_AUTH_COMMAND_NEGOTIATE_UNIX_FD , DBUS_AUTH_COMMAND_AGREE_UNIX_FD
}
 Enumeration for the known authentication commands. More...
 

Detailed Description

DBusAuth implementation details.

Private details of authentication code.

Macro Definition Documentation

◆ DBUS_AUTH_CLIENT

#define DBUS_AUTH_CLIENT (   auth)    ((DBusAuthClient*)(auth))
Parameters
auththe auth conversation
Returns
auth cast to DBusAuthClient

Definition at line 326 of file dbus-auth.c.

◆ DBUS_AUTH_IS_CLIENT

#define DBUS_AUTH_IS_CLIENT (   auth)    ((auth)->side == auth_side_client)
Parameters
auththe auth conversation
Returns
TRUE if the conversation is the client side

Definition at line 321 of file dbus-auth.c.

◆ DBUS_AUTH_IS_SERVER

#define DBUS_AUTH_IS_SERVER (   auth)    ((auth)->side == auth_side_server)
Parameters
auththe auth conversation
Returns
TRUE if the conversation is the server side

Definition at line 316 of file dbus-auth.c.

◆ DBUS_AUTH_NAME

#define DBUS_AUTH_NAME (   auth)    ((auth)->side)

The name of the auth ("client" or "server")

Parameters
auththe auth conversation
Returns
a string

Definition at line 338 of file dbus-auth.c.

◆ DBUS_AUTH_SERVER

#define DBUS_AUTH_SERVER (   auth)    ((DBusAuthServer*)(auth))
Parameters
auththe auth conversation
Returns
auth cast to DBusAuthServer

Definition at line 331 of file dbus-auth.c.

◆ N_CHALLENGE_BYTES

#define N_CHALLENGE_BYTES   (128/8)

http://www.ietf.org/rfc/rfc2831.txt suggests at least 64 bits of entropy, we use 128.

This is the number of bytes in the random challenge.

Definition at line 519 of file dbus-auth.c.

Typedef Documentation

◆ DBusAuthDataFunction

typedef dbus_bool_t(* DBusAuthDataFunction) (DBusAuth *auth, const DBusString *data)

This function processes a block of data received from the peer.

i.e. handles a DATA command.

Definition at line 77 of file dbus-auth.c.

◆ DBusAuthDecodeFunction

typedef dbus_bool_t(* DBusAuthDecodeFunction) (DBusAuth *auth, const DBusString *data, DBusString *decoded)

This function decodes a block of data from the peer.

Definition at line 90 of file dbus-auth.c.

◆ DBusAuthEncodeFunction

typedef dbus_bool_t(* DBusAuthEncodeFunction) (DBusAuth *auth, const DBusString *data, DBusString *encoded)

This function encodes a block of data from the peer.

Definition at line 83 of file dbus-auth.c.

◆ DBusAuthShutdownFunction

typedef void(* DBusAuthShutdownFunction) (DBusAuth *auth)

This function is called when the mechanism is abandoned.

Definition at line 97 of file dbus-auth.c.

◆ DBusAuthStateFunction

typedef dbus_bool_t(* DBusAuthStateFunction) (DBusAuth *auth, DBusAuthCommand command, const DBusString *args)

Auth state function, determines the reaction to incoming events for a particular state.

Returns whether we had enough memory to complete the operation.

Definition at line 137 of file dbus-auth.c.

◆ DBusInitialResponseFunction

typedef dbus_bool_t(* DBusInitialResponseFunction) (DBusAuth *auth, DBusString *response)

This function appends an initial client response to the given string.

Definition at line 70 of file dbus-auth.c.

Enumeration Type Documentation

◆ DBusAuthCommand

Enumeration for the known authentication commands.

Definition at line 119 of file dbus-auth.c.