8317332: Prepare security for permissive-

Reviewed-by: djelinski, weijun, valeriep
This commit is contained in:
Julian Waters 2023-11-02 10:53:17 +00:00
parent 53bb7cd415
commit 64f8253b7d
2 changed files with 11 additions and 5 deletions

View File

@ -409,7 +409,8 @@ gss_import_name(OM_uint32 *minor_status,
PP("Host-based service now %ls", value);
}
PP("import_name to %ls", value);
gss_name_struct* name = new gss_name_struct;
gss_name_struct* name;
name = new gss_name_struct;
if (name == NULL) {
goto err;
}
@ -533,15 +534,18 @@ gss_export_name(OM_uint32 *minor_status,
}
PP("Make fullname: %ls -> %ls", name, fullname);
int len;
size_t namelen = wcslen(fullname);
size_t namelen;
namelen = wcslen(fullname);
if (namelen > 255) {
goto err;
}
len = (int)namelen;
// We only deal with not-so-long names.
// 04 01 00 ** 06 ** OID len:int32 name
int mechLen = KRB5_OID.length;
char* buffer = (char*) malloc(10 + mechLen + len);
int mechLen;
mechLen = KRB5_OID.length;
char* buffer;
buffer = (char*) malloc(10 + mechLen + len);
if (buffer == NULL) {
goto err;
}
@ -904,7 +908,8 @@ gss_init_sec_context(OM_uint32 *minor_status,
}
outName[len] = 0;
int flag = flag_gss_to_sspi(req_flags) | ISC_REQ_ALLOCATE_MEMORY;
int flag;
flag = flag_gss_to_sspi(req_flags) | ISC_REQ_ALLOCATE_MEMORY;
outBuffDesc.ulVersion = SECBUFFER_VERSION;
outBuffDesc.cBuffers = 1;

View File

@ -75,6 +75,7 @@ BOOL native_debug = 0;
BOOL PackageConnectLookup(PHANDLE,PULONG);
static
NTSTATUS ConstructTicketRequest(JNIEnv *env,
UNICODE_STRING DomainName,
PKERB_RETRIEVE_TKT_REQUEST *outRequest,