It's not a big problem, but it would be nice to ensure that
the backup database cannot be locally converted.
Fixes: e51879e99b3e ("ovsdb: Make OVSDB backup sever read only")
Signed-off-by: Ilya Maximets <[email protected]>
---
ovsdb/trigger.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/ovsdb/trigger.c b/ovsdb/trigger.c
index 0edcdd89c..2a48ccc64 100644
--- a/ovsdb/trigger.c
+++ b/ovsdb/trigger.c
@@ -278,6 +278,14 @@ ovsdb_trigger_try(struct ovsdb_trigger *t, long long int
now)
return false;
}
+ if (t->read_only) {
+ trigger_convert_error(
+ t, ovsdb_error("not allowed", "conversion is not allowed "
+ "for read-only database %s",
+ t->db->schema->name));
+ return false;
+ }
+
/* Validate parameters. */
const struct json *params = t->request->params;
if (params->type != JSON_ARRAY || params->array.n != 2) {
--
2.43.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev