From 864f6553dab9651d2451d09a8eaf98d40af99f49 Mon Sep 17 00:00:00 2001 From: smjiao Date: Tue, 7 Nov 2023 18:38:11 +0800 Subject: [PATCH] add pam.d directory file analytic function (cherry picked from commit dd2fca3e3cd87d0b21dd43d8f82de6d13302f11e) --- ...m.d-directory-file-analytic-function.patch | 477 ++++++++++++++++++ aops-hermes.spec | 6 +- 2 files changed, 482 insertions(+), 1 deletion(-) create mode 100644 0014-add-pam.d-directory-file-analytic-function.patch diff --git a/0014-add-pam.d-directory-file-analytic-function.patch b/0014-add-pam.d-directory-file-analytic-function.patch new file mode 100644 index 0000000..66964ae --- /dev/null +++ b/0014-add-pam.d-directory-file-analytic-function.patch @@ -0,0 +1,477 @@ +From 6a26eeb0692833c657d92206dc06533a73200011 Mon Sep 17 00:00:00 2001 +From: smjiao +Date: Tue, 7 Nov 2023 17:24:13 +0800 +Subject: [PATCH] add pam.d directory file analytic function + +--- + src/api/management.js | 12 +- + src/vendor/ant-design-pro/utils/request.js | 2 +- + .../TranscationDomainConfigurations.vue | 54 +++--- + .../components/AddConfigurationDrawer.vue | 171 ++++++++++++++---- + 4 files changed, 176 insertions(+), 63 deletions(-) + +diff --git a/src/api/management.js b/src/api/management.js +index 09f9b4a..15f9ea1 100644 +--- a/src/api/management.js ++++ b/src/api/management.js +@@ -5,7 +5,8 @@ const api = { + getManagementConf: '/management/getManagementConf', // 读取业务域配置信息 + queryManageConfChange: '/management/queryManageConfChange', // 读取业务域配置日志信息 + deleteManagementConf: '/management/deleteManagementConf', // 删除业务域配置 +- querySupportedConfs: '/confs/querySupportedConfs' // 查询可供选择的配置文件列表 ++ querySupportedConfs: '/confs/querySupportedConfs', // 查询可供选择的配置文件列表 ++ uploadManagementConf: '/management/uploadManagementConf' // 从本地导入文件 新增/更新配置 + }; + + export default api; +@@ -59,3 +60,12 @@ export function querySupportedConfs(parameter) { + } + }); + } ++ ++export function uploadManagementConf(file) { ++ return request({ ++ url: api.uploadManagementConf, ++ method: 'post', ++ data: file, ++ headers: { 'Content-Type': 'application/x-www-form-urlencoded' } ++ }); ++} +diff --git a/src/vendor/ant-design-pro/utils/request.js b/src/vendor/ant-design-pro/utils/request.js +index c3307ce..c8015c1 100644 +--- a/src/vendor/ant-design-pro/utils/request.js ++++ b/src/vendor/ant-design-pro/utils/request.js +@@ -83,7 +83,7 @@ request.interceptors.request.use(config => { + const userName = localStorage.getItem('user_name') + userName && localStorage.setItem('user_name', userName); + } +- if (config.url === '/vulnerability/cve/advisory/upload' || config.url === '/vulnerability/cve/unaffected/upload') { ++ if (config.url === '/vulnerability/cve/advisory/upload' || config.url === '/vulnerability/cve/unaffected/upload' || config.url === '/management/uploadManagementConf') { + config.headers['Content-Type'] = 'application/x-www-form-urlencoded' + } else { + config.headers['Content-Type'] = 'application/json' +diff --git a/src/views/configuration/TranscationDomainConfigurations.vue b/src/views/configuration/TranscationDomainConfigurations.vue +index 7882254..d090493 100644 +--- a/src/views/configuration/TranscationDomainConfigurations.vue ++++ b/src/views/configuration/TranscationDomainConfigurations.vue +@@ -12,7 +12,7 @@ +
+ {{ `已选择` + selectedRowKeys.length + `项` }} + + 批量删除 + +@@ -33,9 +33,9 @@ + + + + 配置变更日志 + +- 编辑配置   ++ 编辑配置 + + + + 删除 +@@ -61,10 +61,10 @@ + + + + +@@ -81,10 +81,10 @@ + + + + +@@ -103,8 +103,8 @@ +
+

变更历史:

+ + + + {record.contents} + }, + { + key: 'operation', + title: '操作', + scopedSlots: {customRender: 'action'}, +- width: 240 ++ width: '30%', ++ align: 'center' + } + ]; + }, +diff --git a/src/views/configuration/components/AddConfigurationDrawer.vue b/src/views/configuration/components/AddConfigurationDrawer.vue +index d6880de..a6aee2f 100644 +--- a/src/views/configuration/components/AddConfigurationDrawer.vue ++++ b/src/views/configuration/components/AddConfigurationDrawer.vue +@@ -7,8 +7,8 @@ + + + ++ :visible="isEdit ? visibleControl : visible" :body-style="{paddingBottom: '80px'}" ++ @close="handleCancel"> + + + +@@ -16,13 +16,15 @@ +
+ + ++ @click="removeConfForm(index)" v-if="formList.length > 1" /> + 新增配置{{ index + 1 }} + + + ++ placeholder="请选择配置路径" :disabled="isEdit" show-search @change="value => { ++ pathSelectionChange(key,value) ++ }"> + + {{ item }} + +@@ -30,7 +32,8 @@ + + + +- ++ + + +  配置来源 +@@ -40,26 +43,47 @@ + formSelectionChange(key, value); + } + "> +- 手动输入 ++ ++ 手动输入 ++ + 从主机导入 ++ ++ 从本地导入 ++ + + + + ++ v-decorator="[`confFiles[${key}].contents`, {rules: [{required: true, message: '请输入内容'}]}]" /> + + + ++ v-decorator="[`confFiles[${key}].hostId`, {rules: [{required: true, message: '请选择主机'}]}]"> + + + {{ host.ip }} + + + ++ ++ ++
++
++ ++ ++ 选择文件 ++ ++
++
++
++
++

文件大小不超过1MB

++
++
+
+
+- ++ + 新增配置 + +
+@@ -71,7 +95,7 @@ + + + + +