util: add creds-util.[ch] with helpers for dealing with credentials

This commit is contained in:
Lennart Poettering
2021-03-26 12:19:31 +01:00
parent b240c08d09
commit 786d19fd1b
9 changed files with 79 additions and 15 deletions
-6
View File
@@ -1190,9 +1190,3 @@ bool prefixed_path_strv_contains(char **l, const char *path) {
return false;
}
bool credential_name_valid(const char *s) {
/* We want that credential names are both valid in filenames (since that's our primary way to pass
* them around) and as fdnames (which is how we might want to pass them around eventually) */
return filename_is_valid(s) && fdname_is_valid(s);
}