capsule-util: Move from shared/ to basic/

...so that other code in basic can use it too (basic ⊆ shared).
This commit is contained in:
Michal Koutný
2025-03-07 18:07:51 +01:00
parent 51e60dac12
commit afffd9ee26
4 changed files with 1 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "capsule-util.h"
#include "path-util.h"
#include "user-util.h"
int capsule_name_is_valid(const char *name) {
if (!filename_is_valid(name))
return false;
_cleanup_free_ char *prefixed = strjoin("c-", name);
if (!prefixed)
return -ENOMEM;
return valid_user_group_name(prefixed, /* flags= */ 0);
}
+4
View File
@@ -0,0 +1,4 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
int capsule_name_is_valid(const char *name);
+1
View File
@@ -14,6 +14,7 @@ basic_sources = files(
'bus-label.c',
'cap-list.c',
'capability-util.c',
'capsule-util.c',
'cgroup-util.c',
'chase.c',
'chattr-util.c',