mirror of
https://github.com/openappsec/openappsec.git
synced 2025-11-16 09:21:54 +03:00
Jul 5th update
This commit is contained in:
@@ -70,6 +70,14 @@ checkHasSDWan(const string &command_output)
|
||||
return genError("Current host does not have SDWAN capability");
|
||||
}
|
||||
|
||||
Maybe<string>
|
||||
checkCanUpdateSDWanData(const string &command_output)
|
||||
{
|
||||
if (command_output == "true" || command_output == "false") return command_output;
|
||||
|
||||
return string("true");
|
||||
}
|
||||
|
||||
Maybe<string>
|
||||
getMgmtObjType(const string &command_output)
|
||||
{
|
||||
@@ -157,6 +165,14 @@ getGWVersion(shared_ptr<istream> file_stream)
|
||||
return getMgmtObjAttr(file_stream, "svn_version_name ");
|
||||
}
|
||||
|
||||
Maybe<string>
|
||||
checkIfSdwanRunning(const string &command_output)
|
||||
{
|
||||
if (command_output == "true" || command_output == "false") return command_output;
|
||||
|
||||
return genError("Could not determine if sd-wan is running or not");
|
||||
}
|
||||
|
||||
Maybe<string>
|
||||
getSmbObjectName(const string &command_output)
|
||||
{
|
||||
|
||||
@@ -31,6 +31,11 @@
|
||||
#if defined(gaia) || defined(smb)
|
||||
SHELL_CMD_HANDLER("cpProductIntegrationMgmtObjectType", "cpprod_util CPPROD_IsMgmtMachine", getMgmtObjType)
|
||||
SHELL_CMD_HANDLER("hasSDWan", "[ -f $FWDIR/bin/sdwan_steering ] && echo '1' || echo '0'", checkHasSDWan)
|
||||
SHELL_CMD_HANDLER("canUpdateSDWanData", "cpsdwan get_data | jq -r .can_update_sdwan_data", checkCanUpdateSDWanData)
|
||||
SHELL_CMD_HANDLER(
|
||||
"isSdwanRunning",
|
||||
"[ -v $(pidof cp-nano-sdwan) ] && echo 'false' || echo 'true'",
|
||||
checkIfSdwanRunning)
|
||||
#endif //gaia || smb
|
||||
|
||||
#if defined(gaia)
|
||||
|
||||
Reference in New Issue
Block a user