summaryrefslogtreecommitdiffstats
path: root/src/creds
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-01-16 11:27:40 +0100
committerLennart Poettering <lennart@poettering.net>2024-01-16 17:14:20 +0100
commita570877c12760def86fcf20b151685b6a736cdda (patch)
treefc0ab6c74fc1aef306deecf1cef464fe999b00d6 /src/creds
parentnetwork/route: find/distinguish routes in the same way that the kernel uses (diff)
downloadsystemd-a570877c12760def86fcf20b151685b6a736cdda.tar.xz
systemd-a570877c12760def86fcf20b151685b6a736cdda.zip
varlink: optionally, mark all incoming message's "parameters" field as sensitive
So far the varlink logic honoured the "sensitive" flag of output messages. Let's add something similar for input messages. Since we don't really know incoming messages, the flag simply controls whether the "parmaeters" field of all incoming messages should be marked as sensitive. Then, turn this on in the credentials logic and in homed, since both deal with credentials.
Diffstat (limited to 'src/creds')
-rw-r--r--src/creds/creds.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/creds/creds.c b/src/creds/creds.c
index c9d1a6e8d9..bbc705c006 100644
--- a/src/creds/creds.c
+++ b/src/creds/creds.c
@@ -996,8 +996,6 @@ static int vl_method_encrypt(Varlink *link, JsonVariant *parameters, VarlinkMeth
assert(link);
- json_variant_sensitive(parameters);
-
r = varlink_dispatch(link, parameters, dispatch_table, &p);
if (r != 0)
return r;
@@ -1079,9 +1077,6 @@ static int vl_method_decrypt(Varlink *link, JsonVariant *parameters, VarlinkMeth
assert(link);
- /* Let's also mark the (theoretically encrypted) input as sensitive, in case the NULL encryption scheme was used. */
- json_variant_sensitive(parameters);
-
r = varlink_dispatch(link, parameters, dispatch_table, &p);
if (r != 0)
return r;
@@ -1144,7 +1139,7 @@ static int run(int argc, char *argv[]) {
/* Invocation as Varlink service */
- r = varlink_server_new(&varlink_server, VARLINK_SERVER_ACCOUNT_UID|VARLINK_SERVER_INHERIT_USERDATA);
+ r = varlink_server_new(&varlink_server, VARLINK_SERVER_ACCOUNT_UID|VARLINK_SERVER_INHERIT_USERDATA|VARLINK_SERVER_INPUT_SENSITIVE);
if (r < 0)
return log_error_errno(r, "Failed to allocate Varlink server: %m");