Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-04-28 10:20:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-28 10:20:47 +0400
commit11305bd688fa7306d9d2c9eac2525df35ed31196 (patch)
treec792a28d9cb23b350955c9071d79abe71a4aaa8d /source/blender/blenkernel/intern/blender.c
parent7a2d6482e3971d669427697a8cd9fe0b1563bb83 (diff)
CMake build option for security report: CVE-2009-3850
Nothing is changed by default but some linux distributions want to have executing python be opt-in. This keeps the same functionality but disables auto-run from factory settings and in background mode unless its enabled as a command line argument. This CMake option is marked as advanced and wont show in the regular options list so its less likely to be enabled by people that like to turn everything ON without reading descriptions :)
Diffstat (limited to 'source/blender/blenkernel/intern/blender.c')
-rw-r--r--source/blender/blenkernel/intern/blender.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index d1a181046a6..ce6a95430e3 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -140,8 +140,12 @@ void initglobals(void)
G.charstart = 0x0000;
G.charmin = 0x0000;
G.charmax = 0xffff;
-
+
+#ifndef WITH_PYTHON_SECURITY /* default */
G.f |= G_SCRIPT_AUTOEXEC;
+#else
+ G.f &= ~G_SCRIPT_AUTOEXEC;
+#endif
}
/***/