fix unix socket connection denied by ob_tcp_invited_node
This commit is contained in:
2
deps/oblib/src/lib/net/ob_addr.h
vendored
2
deps/oblib/src/lib/net/ob_addr.h
vendored
@ -30,7 +30,7 @@ class ObBatchP;
|
||||
namespace common
|
||||
{
|
||||
class ObString;
|
||||
|
||||
static constexpr char UNIX_SOCKET_CLIENT_IP[] = "unix:";
|
||||
class ObAddr
|
||||
{
|
||||
OB_UNIS_VERSION(1);
|
||||
|
||||
@ -1894,6 +1894,8 @@ int ObMPConnect::verify_ip_white_list(const uint64_t tenant_id) const
|
||||
if (OB_UNLIKELY(client_ip_.empty())) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("client_ip is empty", K(ret));
|
||||
} else if (0 == client_ip_.compare(UNIX_SOCKET_CLIENT_IP)) {
|
||||
LOG_INFO("match unix socket connection", K(tenant_id), K(client_ip_));
|
||||
} else if (OB_FAIL(gctx_.schema_service_->get_tenant_schema_guard(tenant_id, schema_guard))) {
|
||||
LOG_WARN("get_schema_guard failed", K(ret));
|
||||
} else if (OB_FAIL(schema_guard.get_tenant_info(tenant_id, tenant_schema))) {
|
||||
|
||||
@ -275,7 +275,7 @@ int ObVariableSetExecutor::execute(ObExecContext &ctx, ObVariableSetStmt &stmt)
|
||||
if (!addr.ip_to_string(buf, sizeof(buf))) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("format leader ip failed", K(ret), K(addr));
|
||||
} else if (!(0 == client_ip.compare("unix:"))) {
|
||||
} else if (!(0 == client_ip.compare(UNIX_SOCKET_CLIENT_IP))) {
|
||||
ret = OB_NOT_SUPPORTED;
|
||||
LOG_WARN("modify SECURE_FILE_PRIV not by unix socket connection", K(ret), K(client_ip));
|
||||
LOG_USER_ERROR(OB_NOT_SUPPORTED, "modify SECURE_FILE_PRIV not by unix socket connection");
|
||||
|
||||
Reference in New Issue
Block a user