Add a new configuration flag, "datasets.rules.allow-write" to control
if rules can contain "save" or "state" rules which allow write access
to the file system.
Ticket: #6123
{
SCLogDebug("save %s", save);
+ int allow_save = 1;
+ if (ConfGetBool("datasets.rules.allow-write", &allow_save)) {
+ if (!allow_save) {
+ SCLogError("Rules containing save/state datasets have been disabled");
+ return -1;
+ }
+ }
+
int allow_absolute = 0;
(void)ConfGetBool("datasets.rules.allow-absolute-filenames", &allow_absolute);
if (allow_absolute) {
# # ".." components to reference parent directories in rules that specify
# # their filenames.
# #allow-absolute-filenames: false
+#
+# # Allow datasets in rules write access for "save" and
+# # "state". This is enabled by default, however write access is
+# # limited to the data directory.
+# #allow-write: true
##############################################################################
##