HDDS-1611.[Addendum] Evaluate ACL on volume bucket key and prefix to authorize access. Contributed by Ajay Kumar. (#973)

Fixes a build break in ozone.
This commit is contained in:
Anu Engineer 2019-07-10 11:28:18 -07:00
parent eccc9a40de
commit 6872efcabf
1 changed files with 2 additions and 5 deletions

View File

@ -43,10 +43,7 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.PathIsNotEmptyDirectoryException; import org.apache.hadoop.fs.PathIsNotEmptyDirectoryException;
import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.fs.permission.FsPermission;
import org.apache.hadoop.ozone.om.exceptions.OMException; import org.apache.hadoop.ozone.om.exceptions.OMException;
import org.apache.hadoop.ozone.om.helpers.OzoneFileStatus;
import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.token.Token; import org.apache.hadoop.security.token.Token;
import org.apache.hadoop.util.Progressable; import org.apache.hadoop.util.Progressable;
@ -632,8 +629,8 @@ public class BasicOzoneFileSystem extends FileSystem {
String key = pathToKey(qualifiedPath); String key = pathToKey(qualifiedPath);
FileStatus fileStatus = null; FileStatus fileStatus = null;
try { try {
fileStatus = adapter.getFileStatus(key) fileStatus = convertFileStatus(
.makeQualified(uri, qualifiedPath, getUsername(), getUsername()); adapter.getFileStatus(key, uri, qualifiedPath, getUsername()));
} catch (OMException ex) { } catch (OMException ex) {
if (ex.getResult().equals(OMException.ResultCodes.KEY_NOT_FOUND)) { if (ex.getResult().equals(OMException.ResultCodes.KEY_NOT_FOUND)) {
throw new FileNotFoundException("File not found. path:" + f); throw new FileNotFoundException("File not found. path:" + f);