Skip to content

Commit

Permalink
an ifdef to ignore the nasty permissions check
Browse files Browse the repository at this point in the history
Signed-off-by: Fyodor Kovin <[email protected]>
  • Loading branch information
fkovinAtRocket committed Mar 26, 2019
1 parent e44f73b commit 3d98813
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions c/zss.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,17 @@ static int validateConfigPermissionsInner(const char *path) {
return 0;
}

#ifdef ZSS_IGNORE_PERMISSION_PROBLEMS

static int validateFilePermissions(const char *filePath) {
zowelog(NULL, LOG_COMP_ID_MVD_SERVER, ZOWE_LOG_SEVERE,
"Skipping validation of file permissions: disabled during compilation, "
"file %s.\n", filePath);
return 0;
}

#else /* ZSS_IGNORE_PERMISSION_PROBLEMS */

/* Validates that both file AND parent folder meet requirements */
static int validateFilePermissions(const char *filePath) {
if (!filePath) {
Expand Down Expand Up @@ -828,6 +839,8 @@ static int validateFilePermissions(const char *filePath) {
}
}

#endif /* ZSS_IGNORE_PERMISSION_PROBLEMS */

int main(int argc, char **argv){
if (argc == 1) {
printf("Usage: zssServer <path to zssServer.json or zluxServer.json file>\n");
Expand Down

0 comments on commit 3d98813

Please sign in to comment.