core: restrict ImportCredential= globbing
Let's restrict how we apply credential globbing in ImportCredential=, so that we have some flexibility in automatically extending the glob expression with per-instance data eventually without getting into conflict with the globbing parts. In our current uses we only allow globbing at the end of the expression, and this is a new, unreleased feature hence let's be restrictive on this initially. We can still relax this later if we feel the need to after all. Fixes: #28022
This commit is contained in:
@@ -2355,8 +2355,8 @@ int bus_exec_context_set_transient_property(
|
||||
if (r == 0)
|
||||
break;
|
||||
|
||||
if (!filename_is_valid(s))
|
||||
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Credential name is invalid: %s", s);
|
||||
if (!credential_glob_valid(s))
|
||||
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Credential name or glob is invalid: %s", s);
|
||||
|
||||
isempty = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user