HBASE-6963 unable to run hbck on a secure cluster
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1396810 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
264db4cb7d
commit
0c113c7ddb
|
@ -1311,7 +1311,7 @@ public abstract class FSUtils {
|
||||||
*/
|
*/
|
||||||
public static void checkAccess(UserGroupInformation ugi, FileStatus file,
|
public static void checkAccess(UserGroupInformation ugi, FileStatus file,
|
||||||
FsAction action) throws AccessControlException {
|
FsAction action) throws AccessControlException {
|
||||||
if (ugi.getUserName().equals(file.getOwner())) {
|
if (ugi.getShortUserName().equals(file.getOwner())) {
|
||||||
if (file.getPermission().getUserAction().implies(action)) {
|
if (file.getPermission().getUserAction().implies(action)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1323,7 +1323,7 @@ public abstract class FSUtils {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
throw new AccessControlException("Permission denied:" + " action=" + action
|
throw new AccessControlException("Permission denied:" + " action=" + action
|
||||||
+ " path=" + file.getPath() + " user=" + ugi.getUserName());
|
+ " path=" + file.getPath() + " user=" + ugi.getShortUserName());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean contains(String[] groups, String user) {
|
private static boolean contains(String[] groups, String user) {
|
||||||
|
|
Loading…
Reference in New Issue