summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/impldde.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl/impldde.cxx')
-rw-r--r--sfx2/source/appl/impldde.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 3bb38bad8b9c..8a93a7eaebb3 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -45,6 +45,8 @@
#include <svl/svdde.hxx>
#include <sot/formats.hxx>
+#include <unotools/securityoptions.hxx>
+
#define DDELINK_ERROR_APP 1
#define DDELINK_ERROR_DATA 2
@@ -243,13 +245,15 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink )
}
#if defined(WNT)
- bool bForbidden = bInWinExec;
- // TODO: also check the security level
- static const char* aBadServers[] = { "cmd" };
+ // check the suitability of starting the DDE server
+ const SvtSecurityOptions aSecOpts;
+ bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE);
+ bForbidden |= (bInWinExec != false);
+ static const char* aBadServers[] = { "cmd", "rundll32" };
for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i)
bForbidden |= sServer.equalsAscii(aBadServers[i]);
- // try to start the DDE server if it is not there
+ // try to start the DDE server if it is not there already
if( !bForbidden )
{
OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US));