tree-wide: use JSON_ALLOW_EXTENSIONS when disptching at various places

If we want to allow method replies to be extended without this breaking
compat, then we should set this flag. Do so at various method call
replies hence.

Also do it when parsing user/group records, which are expressly
documented to be extensible, as well as the hibernate JSON record.
This commit is contained in:
Lennart Poettering
2024-01-05 12:43:06 +01:00
parent a617fd9047
commit f0e4244b2f
6 changed files with 8 additions and 8 deletions
+3 -3
View File
@@ -199,7 +199,7 @@ static int userdb_on_query_reply(
assert_se(!iterator->found_user);
r = json_dispatch(parameters, dispatch_table, 0, &user_data);
r = json_dispatch(parameters, dispatch_table, JSON_ALLOW_EXTENSIONS, &user_data);
if (r < 0)
goto finish;
@@ -256,7 +256,7 @@ static int userdb_on_query_reply(
assert_se(!iterator->found_group);
r = json_dispatch(parameters, dispatch_table, 0, &group_data);
r = json_dispatch(parameters, dispatch_table, JSON_ALLOW_EXTENSIONS, &group_data);
if (r < 0)
goto finish;
@@ -309,7 +309,7 @@ static int userdb_on_query_reply(
assert(!iterator->found_user_name);
assert(!iterator->found_group_name);
r = json_dispatch(parameters, dispatch_table, 0, &membership_data);
r = json_dispatch(parameters, dispatch_table, JSON_ALLOW_EXTENSIONS, &membership_data);
if (r < 0)
goto finish;