summaryrefslogtreecommitdiff
path: root/source3/lib/netapi
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2020-08-19 15:46:11 +0200
committerAndrew Bartlett <abartlet@samba.org>2021-04-28 03:43:34 +0000
commit521f77c6671a0a088dedcdcafd264690c123b0b3 (patch)
tree5f9dccec89fc63d2112d35e078fc9dad573be05f /source3/lib/netapi
parenta00726593c2f3b464e48c22e7a757aa1a06ecff2 (diff)
downloadsamba-521f77c6671a0a088dedcdcafd264690c123b0b3.tar.gz
auth:creds: Add obtained arg to cli_credentials_set_kerberos_state()
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3/lib/netapi')
-rw-r--r--source3/lib/netapi/cm.c4
-rw-r--r--source3/lib/netapi/netapi.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c
index d6b7c868c22..c54f955d617 100644
--- a/source3/lib/netapi/cm.c
+++ b/source3/lib/netapi/cm.c
@@ -105,7 +105,9 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx,
if (username != NULL && username[0] != '\0' &&
password != NULL && password[0] != '\0' &&
krb5_state == CRED_USE_KERBEROS_REQUIRED) {
- cli_credentials_set_kerberos_state(ctx->creds, CRED_USE_KERBEROS_DESIRED);
+ cli_credentials_set_kerberos_state(ctx->creds,
+ CRED_USE_KERBEROS_DESIRED,
+ CRED_SPECIFIED);
}
status = cli_cm_open(ctx, NULL,
diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c
index a56651d100f..56e26c83fa4 100644
--- a/source3/lib/netapi/netapi.c
+++ b/source3/lib/netapi/netapi.c
@@ -342,7 +342,8 @@ NET_API_STATUS libnetapi_set_creds(struct libnetapi_ctx *ctx,
NET_API_STATUS libnetapi_set_use_kerberos(struct libnetapi_ctx *ctx)
{
cli_credentials_set_kerberos_state(ctx->creds,
- CRED_USE_KERBEROS_REQUIRED);
+ CRED_USE_KERBEROS_REQUIRED,
+ CRED_SPECIFIED);
return NET_API_STATUS_SUCCESS;
}