Skip to content

Commit

Permalink
Merge pull request #19089 from kenrowland/HPCC-32602
Browse files Browse the repository at this point in the history
HPCC-32602 Improve foreign Dali scope denial log message

Reviewed-by: Jake Smith <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Sep 13, 2024
2 parents 071d615 + 357cd46 commit c218386
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion dali/dfu/dfurun.cpp
Original file line number Diff line number Diff line change
@@ -670,7 +670,16 @@ class CDFUengine: public CInterface, implements IDFUengine
authorized = HASREADPERMISSION(perm);
}
if (!authorized)
throw makeStringExceptionV(DFSERR_LookupAccessDenied,"Lookup permission denied for foreign file: %s",logicalName.str());
{
StringBuffer context;
StringBuffer username;
if (user)
user->getUserName(username);
else
username.append("Null user");
context.appendf("user: '%s', assigned access %s (%d)", username.str(), getSecAccessFlagName(perm), perm);
throw makeStringExceptionV(DFSERR_LookupAccessDenied, "Lookup permission denied for foreign file: %s, %s", logicalName.str(), context.str());
}
}
}

0 comments on commit c218386

Please sign in to comment.