mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
auth/credentials: add cli_credentials_[set_]callback_data*
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
b8f0922645
commit
6ff6778bdc
@ -114,6 +114,17 @@ _PUBLIC_ struct cli_credentials *cli_credentials_init(TALLOC_CTX *mem_ctx)
|
||||
return cred;
|
||||
}
|
||||
|
||||
_PUBLIC_ void cli_credentials_set_callback_data(struct cli_credentials *cred,
|
||||
void *callback_data)
|
||||
{
|
||||
cred->priv_data = callback_data;
|
||||
}
|
||||
|
||||
_PUBLIC_ void *_cli_credentials_callback_data(struct cli_credentials *cred)
|
||||
{
|
||||
return cred->priv_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new anonymous credential
|
||||
* @param mem_ctx TALLOC_CTX parent for credentials structure
|
||||
|
@ -332,6 +332,14 @@ bool cli_credentials_set_realm_callback(struct cli_credentials *cred,
|
||||
bool cli_credentials_set_workstation_callback(struct cli_credentials *cred,
|
||||
const char *(*workstation_cb) (struct cli_credentials *));
|
||||
|
||||
void cli_credentials_set_callback_data(struct cli_credentials *cred,
|
||||
void *callback_data);
|
||||
void *_cli_credentials_callback_data(struct cli_credentials *cred);
|
||||
#define cli_credentials_callback_data(_cred, _type) \
|
||||
talloc_get_type_abort(_cli_credentials_callback_data(_cred), _type)
|
||||
#define cli_credentials_callback_data_void(_cred) \
|
||||
_cli_credentials_callback_data(_cred)
|
||||
|
||||
/**
|
||||
* Return attached NETLOGON credentials
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user