Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/candidate-9.0.x' into candidate-…
Browse files Browse the repository at this point in the history
…9.2.x

Signed-off-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday committed Oct 13, 2023
2 parents 0edd086 + 07b9704 commit 8a3284e
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 10 deletions.
11 changes: 10 additions & 1 deletion dali/base/dautils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,16 @@ bool CDfsLogicalFileName::getExternalPath(StringBuffer &dir, StringBuffer &tail,
*e = makeStringExceptionV(-1, "plane:: does not support planes with more than one device '%s'", planeName.str());
return false;
}
dir.append(plane->queryPrefix());
const char * prefix = plane->queryPrefix();
//If the prefix is a PathSepChar, it should not be appended to the dir here because
//a PathSepChar will be appended to the dir inside the expandExternalPath() if the s
//is started with the "::".
//Also a trailing pathsepchar in the prefix should be removed.
if (!isRootDirectory(prefix))
{
dir.append(prefix);
removeTrailingPathSepChar(dir);
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/platform-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN groupadd -g 10001 hpcc
RUN useradd -s /bin/bash -r -m -N -c "hpcc runtime User" -u 10000 -g hpcc hpcc
RUN passwd -l hpcc

RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.18/bin/linux/amd64/kubectl && chmod +x ./kubectl && mv ./kubectl /usr/local/bin
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.27.6/bin/linux/amd64/kubectl && chmod +x ./kubectl && mv ./kubectl /usr/local/bin

WORKDIR /hpcc-dev
RUN mkdir build
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/vcpkg/platform-core-ubuntu-22.04.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ RUN apt-get install -y \
gdb \
nano

RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.18/bin/linux/amd64/kubectl && \
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.27.6/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin

Expand Down
1 change: 1 addition & 0 deletions esp/services/ws_fileio/ws_fileioservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ bool CWsFileIOEx::onReadFileData(IEspContext &context, IEspReadFileDataRequest &
return true;
}

//Despite the "DestRelativePath" saying it's relative for legacy reason, it also supports absolute paths.
const char* destRelativePath = req.getDestRelativePath();
if (!destRelativePath || (destRelativePath[0] == 0))
{
Expand Down
16 changes: 10 additions & 6 deletions esp/smc/SMCLib/TpCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,6 @@ extern TPWRAPPER_API IPropertyTree* getDropZoneAndValidateHostAndPath(const char

static SecAccessFlags getDropZoneScopePermissions(IEspContext& context, const IPropertyTree* dropZone, const char* dropZonePath)
{
if (isEmptyString(dropZonePath))
throw makeStringException(ECLWATCH_INVALID_CLUSTER_NAME, "getDropZoneScopePermissions(): DropZone path must be specified.");

//If the dropZonePath is an absolute path, change it to a relative path.
if (isAbsolutePath(dropZonePath))
{
Expand All @@ -203,9 +200,6 @@ static SecAccessFlags getDropZoneScopePermissions(IEspContext& context, const IP

static SecAccessFlags getDZPathScopePermissions(IEspContext& context, const char* dropZoneName, const char* dropZonePath, const char* dropZoneHost)
{
if (isEmptyString(dropZonePath))
throw makeStringException(ECLWATCH_INVALID_CLUSTER_NAME, "getDZPathScopePermissions(): DropZone path must be specified.");

Owned<IPropertyTree> dropZone;
if (isEmptyString(dropZoneName))
{
Expand Down Expand Up @@ -348,6 +342,16 @@ extern TPWRAPPER_API void validateDropZoneAccess(IEspContext& context, const cha
if (!isHostInPlane(dropZone, hostReq, true))
throw makeStringExceptionV(ECLWATCH_INVALID_INPUT, "Host %s is not valid DropZone plane %s", hostReq, targetDZNameOrHost);
}

//If the dropZonePath is an absolute path, change it to a relative path.
if (isAbsolutePath(fileNameWithRelPath))
{
const char* relativePath = getRelativePath(fileNameWithRelPath, dropZone->queryProp("@prefix"));
if (nullptr == relativePath)
throw makeStringExceptionV(ECLWATCH_INVALID_INPUT, "Invalid DropZone path %s.", fileNameWithRelPath);
fileNameWithRelPath = relativePath;
}

const char *dropZoneName = dropZone->queryProp("@name");
SecAccessFlags permission = getDZFileScopePermissions(context, dropZoneName, fileNameWithRelPath, hostReq);
if ((permission < permissionReq) && getGlobalConfigSP()->getPropBool("expert/@failOverToLegacyPhysicalPerms", !isContainerized()))
Expand Down
2 changes: 1 addition & 1 deletion roxie/ccd/ccdfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress
throw MakeStringException(ROXIE_FILE_ERROR, "Local file %s does not match DFS information", localLocation);
else
{
if (doTrace(TraceFlags::Always, TraceFlags::Detailed))
if (doTrace(TraceFlags::Always, TraceFlags::Standard))
{
#ifndef _CONTAINERIZED
DBGLOG("Failed to open file at any of the following %d local locations:", localLocations.length());
Expand Down

0 comments on commit 8a3284e

Please sign in to comment.