diff options
author | Mike Yuan <me@yhndnzj.com> | 2024-08-03 13:18:01 +0200 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2024-08-04 06:51:25 +0200 |
commit | 9db676d6bf05fe9d6019a769c87526d66e3b999a (patch) | |
tree | 6670ff42ae365d163e5f89b2ddd50f3b15910975 /src/core/dbus-execute.c | |
parent | po: Translated using Weblate (Croatian) (diff) | |
download | systemd-9db676d6bf05fe9d6019a769c87526d66e3b999a.tar.xz systemd-9db676d6bf05fe9d6019a769c87526d66e3b999a.zip |
core/dbus-execute: normalize "rename" arg properly
Follow-up for 40dd2a1c24b886d9e635fef8f7b5336700df03c3
Addresses https://github.com/systemd/systemd/pull/33916#discussion_r1702616229
Diffstat (limited to '')
-rw-r--r-- | src/core/dbus-execute.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index c7c43ce7d3..264e2f0af6 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -2225,7 +2225,9 @@ int bus_exec_context_set_transient_property( if (!credential_glob_valid(glob)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Credential name or glob is invalid: %s", glob); - if (!isempty(rename) && !credential_name_valid(rename)) + rename = empty_to_null(rename); + + if (rename && !credential_name_valid(rename)) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Credential name is invalid: %s", rename); empty = false; |