mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
libwbclient: allow only one initial_blob/challenge_blob in wbcCredentialCache()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10692 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
e7c683ba69
commit
6704799dec
@ -1207,6 +1207,25 @@ wbcErr wbcCredentialCache(struct wbcCredentialCacheParams *params,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
for (i=0; i<params->num_blobs; i++) {
|
||||
if (strcasecmp(params->blobs[i].name, "initial_blob") == 0) {
|
||||
if (initial_blob != NULL) {
|
||||
status = WBC_ERR_INVALID_PARAM;
|
||||
goto fail;
|
||||
}
|
||||
initial_blob = ¶ms->blobs[i];
|
||||
continue;
|
||||
}
|
||||
if (strcasecmp(params->blobs[i].name, "challenge_blob") == 0) {
|
||||
if (challenge_blob != NULL) {
|
||||
status = WBC_ERR_INVALID_PARAM;
|
||||
goto fail;
|
||||
}
|
||||
challenge_blob = ¶ms->blobs[i];
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (params->domain_name != NULL) {
|
||||
status = wbcRequestResponse(WINBINDD_INFO, NULL, &response);
|
||||
if (!WBC_ERROR_IS_OK(status)) {
|
||||
@ -1224,15 +1243,6 @@ wbcErr wbcCredentialCache(struct wbcCredentialCacheParams *params,
|
||||
}
|
||||
request.data.ccache_ntlm_auth.uid = getuid();
|
||||
|
||||
for (i=0; i<params->num_blobs; i++) {
|
||||
if (strcasecmp(params->blobs[i].name, "initial_blob") == 0) {
|
||||
initial_blob = ¶ms->blobs[i];
|
||||
}
|
||||
if (strcasecmp(params->blobs[i].name, "challenge_blob") == 0) {
|
||||
challenge_blob = ¶ms->blobs[i];
|
||||
}
|
||||
}
|
||||
|
||||
request.data.ccache_ntlm_auth.initial_blob_len = 0;
|
||||
request.data.ccache_ntlm_auth.challenge_blob_len = 0;
|
||||
request.extra_len = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user