mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
s3:netapi: Add libnetapi_set_creds()
This will be used by the 'net' command in future! Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Mar 24 02:07:20 UTC 2021 on sn-devel-184
This commit is contained in:
committed by
Günther Deschner
parent
6968a325d9
commit
c871c22461
@ -315,6 +315,27 @@ NET_API_STATUS libnetapi_set_workgroup(struct libnetapi_ctx *ctx,
|
||||
return NET_API_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the cli_credentials to be used in the netapi context
|
||||
*
|
||||
* @param[in] ctx The netapi context
|
||||
*
|
||||
* @param[in] creds The cli_credentials which should be used by netapi.
|
||||
*
|
||||
* @return 0 on success, an werror code otherwise.
|
||||
*/
|
||||
NET_API_STATUS libnetapi_set_creds(struct libnetapi_ctx *ctx,
|
||||
struct cli_credentials *creds)
|
||||
{
|
||||
if (ctx == NULL || creds == NULL) {
|
||||
return W_ERROR_V(WERR_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
ctx->creds = creds;
|
||||
|
||||
return NET_API_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/****************************************************************
|
||||
****************************************************************/
|
||||
|
||||
|
Reference in New Issue
Block a user