-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC-30868 Report dropzone name and scope when scope access denied #18371
Conversation
https://track.hpccsystems.com/browse/HPCC-30868 |
dali/dfu/dfurun.cpp
Outdated
@@ -614,7 +624,7 @@ class CDFUengine: public CInterface, implements IDFUengine | |||
|
|||
SecAccessFlags perm = queryDistributedFileDirectory().getFDescPermissions(fd,user,auditflags); | |||
StringBuffer name; | |||
ensureFilePermissions(getFDescName(fd,name),perm,write); | |||
ensureFilePermissions(true,nullptr,getFDescName(fd,name),perm,write); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is both, bool legacyPhysicalPerms and const char * planeName params necessary?
Can it be assume that if planeName == nullptr, then it is legacy ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if planeName == nullptr, it is legacy. The legacyPhysicalPerms will be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx - one question.
When accessing a dropzone scope and the scope access denied, the dropzone name and scope are added to the error message. Signed-off-by: wangkx <[email protected]>
@jakesmith I made the changes and squashed. Please review. |
throw makeStringExceptionV(DFSERR_CreateAccessDenied, "Create permission denied for file scope: %s on DropZone: %s", dlfn.get(), planeName); | ||
else | ||
throw makeStringExceptionV(DFSERR_LookupAccessDenied, "Lookup permission denied for file scope: %s on DropZone: %s", dlfn.get(), planeName); | ||
} | ||
if (write) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personal: since the above block can never fall through, this is really an else if (coding as such would clarify at a glance).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangkx - 1 trivial comment, but approved.
When accessing a dropzone scope and the scope access denied, the dropzone name and scope are added to the error message.
Type of change:
Checklist:
Smoketest:
Testing: