Skip to content

Commit

Permalink
Zowe Suite v2.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zowe-robot committed May 1, 2024
2 parents 73f3ef5 + f3203cf commit a4c134c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 118 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Zowe Common C Changelog

## `2.16.0`
- For correct base64 encoding scheme the buffer size is made to be divisble by 3 (#431).
- Take into account leap seconds in xmem log messages' timestamps (#432, #433)

## `2.15.0`
- Remove obsolete building script build_configmgr.sh (#410). (#423)
- Add flags to avoid linkage-stack queries in the recovery facility (#404, #412)

## `2.13.0`
- Added support for using "zowe.network" and "components.zss.zowe.network" to set TLS version properties. (#411)
- Added utility for general usage returning the name of External Security Manager
Expand Down
112 changes: 0 additions & 112 deletions build/build_configmgr.sh

This file was deleted.

10 changes: 9 additions & 1 deletion c/crossmemory.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,19 +510,27 @@ static void getSTCK(uint64 *stckValue) {
__asm(" STCK 0(%0)" : : "r"(stckValue));
}

int64 getLocalTimeOffset() {
static int64 getLocalTimeOffset(void) {
CVT * __ptr32 cvt = *(void * __ptr32 * __ptr32)0x10;
void * __ptr32 cvtext2 = cvt->cvtext2;
int64 *cvtldto = (int64 * __ptr32)(cvtext2 + 0x38);
return *cvtldto;
}

static int64 getLeapSecondsOffset(void) {
CVT * __ptr32 cvt = *(void * __ptr32 * __ptr32)0x10;
void * __ptr32 cvtext2 = cvt->cvtext2;
int64 *cvtlso = (int64 * __ptr32)(cvtext2 + 0x50);
return *cvtlso;
}

static void getCurrentLogTimestamp(LogTimestamp *timestamp) {

uint64 stck = 0;
getSTCK(&stck);

stck += getLocalTimeOffset();
stck -= getLeapSecondsOffset();

stckToLogTimestamp(stck, timestamp);

Expand Down
12 changes: 7 additions & 5 deletions c/httpserver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3210,10 +3210,10 @@ static int serviceAuthNativeWithSessionToken(HttpService *service, HttpRequest *
request->flags = HTTP_REQUEST_NO_PASSWORD;
authDataFound = TRUE;
} else {
zowelog(NULL, LOG_COMP_HTTPSERVER, ZOWE_LOG_INFO, "No user was found for client certificate. (rc = 0x%x racfRC = 0x%x racfRSN = 0x%x)\n", safReturnCode, racfReturnCode, racfReasonCode);
zowelog(NULL, LOG_COMP_HTTPSERVER, ZOWE_LOG_DEBUG, "No user was found for client certificate. (rc = 0x%x racfRC = 0x%x racfRSN = 0x%x)\n", safReturnCode, racfReturnCode, racfReasonCode);
}
} else {
zowelog(NULL, LOG_COMP_HTTPSERVER, ZOWE_LOG_INFO, "Client certificate was attached to request, but credentials are also attached. Server won't attempt to map the client certificate.\n");
zowelog(NULL, LOG_COMP_HTTPSERVER, ZOWE_LOG_DEBUG, "Client certificate was attached to request, but credentials are also attached. Server won't attempt to map the client certificate.\n");
}
}

Expand Down Expand Up @@ -4637,8 +4637,9 @@ static int streamBinaryForFile2(HttpResponse *response, Socket *socket, UnixFile
if (encoding == ENCODING_CHUNKED) {
stream = makeChunkedOutputStreamInternal(response);
}

int bufferSize = FILE_STREAM_BUFFER_SIZE;

// To make bufferSize divisble by 3 for correct base64 encoding.
int bufferSize = FILE_STREAM_BUFFER_SIZE - (FILE_STREAM_BUFFER_SIZE % 3);
char *buffer = safeMalloc(bufferSize+4, "streamBinaryBuffer");
int encodedLength;

Expand Down Expand Up @@ -4710,7 +4711,8 @@ static int streamTextForFile2(HttpResponse *response, Socket *socket, UnixFile *
stream = makeChunkedOutputStreamInternal(response);
/* fallthrough */
case ENCODING_SIMPLE: {
int bufferSize = FILE_STREAM_BUFFER_SIZE;
// To make bufferSize divisble by 3 for correct base64 encoding.
int bufferSize = FILE_STREAM_BUFFER_SIZE - (FILE_STREAM_BUFFER_SIZE % 3);
char *buffer = safeMalloc(bufferSize+4, "streamTextBuffer");
char *translation = safeMalloc((2*bufferSize)+4, "streamTextConvertBuffer"); /* UTF inflation tolerance */
int encodedLength;
Expand Down

0 comments on commit a4c134c

Please sign in to comment.