|
@@ -6412,10 +6412,10 @@ public class FSNamesystem implements Namesystem, FSClusterStats,
|
|
|
private void checkUnreadableBySuperuser(FSPermissionChecker pc,
|
|
|
INode inode, int snapshotId)
|
|
|
throws IOException {
|
|
|
- for (XAttr xattr : dir.getXAttrs(inode, snapshotId)) {
|
|
|
- if (XAttrHelper.getPrefixName(xattr).
|
|
|
- equals(SECURITY_XATTR_UNREADABLE_BY_SUPERUSER)) {
|
|
|
- if (pc.isSuperUser()) {
|
|
|
+ if (pc.isSuperUser()) {
|
|
|
+ for (XAttr xattr : dir.getXAttrs(inode, snapshotId)) {
|
|
|
+ if (XAttrHelper.getPrefixName(xattr).
|
|
|
+ equals(SECURITY_XATTR_UNREADABLE_BY_SUPERUSER)) {
|
|
|
throw new AccessControlException("Access is denied for " +
|
|
|
pc.getUser() + " since the superuser is not allowed to " +
|
|
|
"perform this operation.");
|