diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-01-16 11:27:40 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-01-16 17:14:20 +0100 |
commit | a570877c12760def86fcf20b151685b6a736cdda (patch) | |
tree | fc0ab6c74fc1aef306deecf1cef464fe999b00d6 /src/creds | |
parent | network/route: find/distinguish routes in the same way that the kernel uses (diff) | |
download | systemd-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.c | 7 |
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"); |