![]() |
![]() |
![]() |
Schroot Reference Manual | ![]() |
---|
SbuildAuthConvSbuildAuthConv — authentication conversation interface |
SbuildAuthConv; SbuildAuthConvInterface; time_t (*SbuildAuthConvGetWarningTimeoutFunc) (SbuildAuthConv *auth_conv); void (*SbuildAuthConvSetWarningTimeoutFunc) (SbuildAuthConv *auth_conv, time_t timeout); time_t (*SbuildAuthConvGetFatalTimeoutFunc) (SbuildAuthConv *auth_conv); void (*SbuildAuthConvSetFatalTimeoutFunc) (SbuildAuthConv *auth_conv, time_t timeout); gboolean (*SbuildAuthConvConversationFunc) (SbuildAuthConv *auth_conv, guint num_messages, SbuildAuthMessageVector *messages); time_t sbuild_auth_conv_get_warning_timeout (SbuildAuthConv *auth_conv); void sbuild_auth_conv_set_warning_timeout (SbuildAuthConv *auth_conv, time_t timeout); time_t sbuild_auth_conv_get_fatal_timeout (SbuildAuthConv *auth_conv); void sbuild_auth_conv_set_fatal_timeout (SbuildAuthConv *auth_conv, time_t timeout); gboolean sbuild_auth_conv_conversation (SbuildAuthConv *auth_conv, guint num_messages, SbuildAuthMessageVector *messages);
"conversation" gboolean user_function (SbuildAuthConv *sbuildauthconv, guint arg1, SbuildAuthMessageVector *arg2, gpointer user_data);
SbuildAuthConv is an interface which should be implemented by objects which handle interaction with the user during authentication.
This is a wrapper around the struct pam_conv PAM conversation interface, and is used by SbuildAuth when interacting with the user during authentication.
A simple implementation is provided in the form of SbuildAuthConvTty. However, more complex implementations might hook into the GLib main loop, or implement it in a GtkWidget.
The interface allows the setting of optional warning timeout and fatal timeout values, which default to 0 (not enabled). This is an absolute time after which a warning is displayed or the conversation ends with an error.
typedef struct { GTypeInterface parent; SbuildAuthConvGetWarningTimeoutFunc get_warning_timeout; SbuildAuthConvSetWarningTimeoutFunc set_warning_timeout; SbuildAuthConvGetFatalTimeoutFunc get_fatal_timeout; SbuildAuthConvSetFatalTimeoutFunc set_fatal_timeout; SbuildAuthConvConversationFunc conversation; } SbuildAuthConvInterface;
SbuildAuthConv interface.
GTypeInterface parent ; |
parent GInterface |
SbuildAuthConvGetWarningTimeoutFunc get_warning_timeout ; |
get the warning timeout |
SbuildAuthConvSetWarningTimeoutFunc set_warning_timeout ; |
set the warning timeout |
SbuildAuthConvGetFatalTimeoutFunc get_fatal_timeout ; |
get the fatal timeout |
SbuildAuthConvSetFatalTimeoutFunc set_fatal_timeout ; |
set the fatal timeout |
SbuildAuthConvConversationFunc conversation ; |
hold a conversation with the user |
time_t (*SbuildAuthConvGetWarningTimeoutFunc) (SbuildAuthConv *auth_conv);
Get the warning timeout.
auth_conv : |
an SbuildAuthConv. |
Returns : | the warning timeout. |
void (*SbuildAuthConvSetWarningTimeoutFunc) (SbuildAuthConv *auth_conv, time_t timeout);
Set the warning timeout.
auth_conv : |
an SbuildAuthConv. |
timeout : |
the timeout to set. |
time_t (*SbuildAuthConvGetFatalTimeoutFunc) (SbuildAuthConv *auth_conv);
Get the fatal timeout.
auth_conv : |
an SbuildAuthConv. |
Returns : | the fatal timeout. |
void (*SbuildAuthConvSetFatalTimeoutFunc) (SbuildAuthConv *auth_conv, time_t timeout);
Set the fatal timeout.
auth_conv : |
An SbuildAuthConv. |
timeout : |
the timeout to set. |
gboolean (*SbuildAuthConvConversationFunc) (SbuildAuthConv *auth_conv, guint num_messages, SbuildAuthMessageVector *messages);
Hold a conversation with the user.
auth_conv : |
An SbuildAuthConv. |
num_messages : |
the number of messages. |
messages : |
the messages. |
Returns : | TRUE on success, FALSE on failure. |
time_t sbuild_auth_conv_get_warning_timeout (SbuildAuthConv *auth_conv);
Get the warning timeout for auth_conv
.
auth_conv : |
an SbuildAuthConv. |
Returns : | the timeout. |
void sbuild_auth_conv_set_warning_timeout (SbuildAuthConv *auth_conv, time_t timeout);
Set the warning timeout for auth_conv
.
auth_conv : |
an SbuildAuthConv. |
timeout : |
the timeout to set. |
time_t sbuild_auth_conv_get_fatal_timeout (SbuildAuthConv *auth_conv);
Get the fatal timeout for auth_conv
.
auth_conv : |
an SbuildAuthConv. |
Returns : | the timeout. |
void sbuild_auth_conv_set_fatal_timeout (SbuildAuthConv *auth_conv, time_t timeout);
Set the fatal timeout for auth_conv
.
auth_conv : |
an SbuildAuthConv. |
timeout : |
the timeout to set. |
gboolean sbuild_auth_conv_conversation (SbuildAuthConv *auth_conv, guint num_messages, SbuildAuthMessageVector *messages);
Hold a conversation with the user.
Each of the messages detailed in messages
should be displayed to
the user, asking for input where required. The type of message is
indicated in the type field of the SbuildAuthMessage. The
response field of the message vector SbuildAuthMessage should be
filled in if input is required. This will be automatically freed
on success or failure. The user_data field of SbuildAuthMessage
is for the use of SbuildAuthConv implementations, and will be
otherwise ignored.
auth_conv : |
an SbuildAuthConv. |
num_messages : |
the number of messages |
messages : |
the messages to display to the user |
Returns : | TRUE on success, FALSE on failure. |
fatal-timeout
" property"fatal-timeout" gint : Read / Write
The time to wait until aborting.
Allowed values: >= 0
Default value: 0
gboolean user_function (SbuildAuthConv *sbuildauthconv, guint arg1, SbuildAuthMessageVector *arg2, gpointer user_data);
Hold a conversation with the user. Note that for security, only the first registered signal handler will be run, so that the user will not be asked for the same information by multiple handlers.
sbuildauthconv : |
the object which received the signal. |
arg1 : |
the number of messages |
arg2 : |
the message vector containing the messages and responses |
user_data : |
user data set when the signal handler was connected. |
Returns : | TRUE on success, FALSE on failure. |
<< SbuildAuthMessage and SbuildAuthMessageVector | SbuildAuthConvTty >> |