From 79fee294d70b5406c8dcb656dd703b7a7f3ca089 Mon Sep 17 00:00:00 2001 From: hwhbj Date: Fri, 16 Aug 2024 10:49:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Denable=5Fsecurity=5Fpolicy=3D?= =?UTF-8?q?off=E6=97=B6=E5=88=A0=E9=99=A4=E6=A0=87=E7=AD=BE=EF=BC=8C?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E8=A1=A8=E4=B8=AD=E6=95=B0=E6=8D=AE=E6=9C=AA?= =?UTF-8?q?=E6=8C=89=E9=A2=84=E6=9C=9F=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gausskernel/security/gs_policy/policy_common.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gausskernel/security/gs_policy/policy_common.cpp b/src/gausskernel/security/gs_policy/policy_common.cpp index beb088810..ce7966a64 100644 --- a/src/gausskernel/security/gs_policy/policy_common.cpp +++ b/src/gausskernel/security/gs_policy/policy_common.cpp @@ -80,6 +80,13 @@ bool GsPolicyLabel::operator < (const GsPolicyLabel& arg) const if (res > 0) { return false; } + /* if data value is equal, compare by object oid */ + if (m_data_value_fqdn.m_value_object < arg.m_data_value_fqdn.m_value_object) { + return true; + } + if (m_data_value_fqdn.m_value_object > arg.m_data_value_fqdn.m_value_object) { + return false; + } /* if data value is equal, compare by data type */ return (strcasecmp(m_data_type.c_str(), arg.m_data_type.c_str()) < 0); }