diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-07-31 12:52:17 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-08-05 17:48:01 +1200 |
commit | 6ff6778bdc60f1cd4d52cba83bd47d3398fe5a20 (patch) | |
tree | f33d3c90d330cfd7d0ffc65ede294aa78c97c16b | |
parent | b8f09226458dc13cf901f481ede89d8a6bb94ba7 (diff) | |
download | samba-6ff6778bdc60f1cd4d52cba83bd47d3398fe5a20.tar.gz samba-6ff6778bdc60f1cd4d52cba83bd47d3398fe5a20.tar.bz2 samba-6ff6778bdc60f1cd4d52cba83bd47d3398fe5a20.zip |
auth/credentials: add cli_credentials_[set_]callback_data*
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | auth/credentials/credentials.c | 11 | ||||
-rw-r--r-- | auth/credentials/credentials.h | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/auth/credentials/credentials.c b/auth/credentials/credentials.c index 7a4b081c61..e6a471064f 100644 --- a/auth/credentials/credentials.c +++ b/auth/credentials/credentials.c @@ -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 diff --git a/auth/credentials/credentials.h b/auth/credentials/credentials.h index dbc014fd08..0f498ad2d0 100644 --- a/auth/credentials/credentials.h +++ b/auth/credentials/credentials.h @@ -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 */ |