Amend HBASE-15200 ZooKeeper znode ACL checks should only compare the shortname
Fixes for newly introduced FindBugs warnings
This commit is contained in:
parent
f4d9597e1e
commit
b80325fb1b
|
@ -293,7 +293,7 @@ public class ZooKeeperWatcher implements Watcher, Abortable, Closeable {
|
|||
if (Ids.ANYONE_ID_UNSAFE.equals(id)) {
|
||||
if (perms != Perms.READ) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(String.format("permissions for '%s' are not correct: have %0x, want %0x",
|
||||
LOG.debug(String.format("permissions for '%s' are not correct: have 0x%x, want 0x%x",
|
||||
id, perms, Perms.READ));
|
||||
}
|
||||
return false;
|
||||
|
@ -301,7 +301,7 @@ public class ZooKeeperWatcher implements Watcher, Abortable, Closeable {
|
|||
} else if (superUsers != null && isSuperUserId(superUsers, id)) {
|
||||
if (perms != Perms.ALL) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(String.format("permissions for '%s' are not correct: have %0x, want %0x",
|
||||
LOG.debug(String.format("permissions for '%s' are not correct: have 0x%x, want 0x%x",
|
||||
id, perms, Perms.ALL));
|
||||
}
|
||||
return false;
|
||||
|
@ -316,8 +316,8 @@ public class ZooKeeperWatcher implements Watcher, Abortable, Closeable {
|
|||
if (name.equals(hbaseUser)) {
|
||||
if (perms != Perms.ALL) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(String.format("permissions for '%s' are not correct: have %0x, want %0x",
|
||||
id.toString(), perms, Perms.ALL));
|
||||
LOG.debug(String.format("permissions for '%s' are not correct: have 0x%x, want 0x%x",
|
||||
id, perms, Perms.ALL));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ public class ZooKeeperWatcher implements Watcher, Abortable, Closeable {
|
|||
} else {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug(String.format(
|
||||
"superuser '%s' does not have correct permissions: have %0x, want %0x",
|
||||
"superuser '%s' does not have correct permissions: have 0x%x, want 0x%x",
|
||||
acl.getId().getId(), acl.getPerms(), Perms.ALL));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue