From 40eb522e5b8e777f8ff6bcb4d204ec3333cb10c9 Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Mon, 27 Jul 2026 15:53:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/src/main.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/core/src/main.cpp b/core/src/main.cpp index 37a904e..6fc0b1b 100644 --- a/core/src/main.cpp +++ b/core/src/main.cpp @@ -279,20 +279,21 @@ try { return; } - else if (typ == "kill") { - int trg = jv.at("kill").as_int64(); - auto flag = pmc_mtd::kill(trg); - std::string msg = flag ? "OK" : "Nope"; - pipe.writePipe(msg); - return; - } + /* 20260727(qing): 在身份验证之前禁止操作 */ + //else if (typ == "kill") { + // int trg = jv.at("kill").as_int64(); + // auto flag = pmc_mtd::kill(trg); + // std::string msg = flag ? "OK" : "Nope"; + // pipe.writePipe(msg); + // return; + //} - else if (typ == "exec"){ - std::string cmd = jv.at("exec").as_string().c_str(); - std::string msg = (pmc_mtd::exec(cmd)) ? "OK" : "ERR"; - pipe.writePipe(msg); - return; - } + //else if (typ == "exec"){ + // std::string cmd = jv.at("exec").as_string().c_str(); + // std::string msg = (pmc_mtd::exec(cmd)) ? "OK" : "ERR"; + // pipe.writePipe(msg); + // return; + //} } /* 捕获异常后,仅仅只是打印出来? */