summaryrefslogtreecommitdiff
path: root/src/basic/user-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-07-14 12:23:39 +0200
committerLennart Poettering <lennart@poettering.net>2016-07-22 15:53:45 +0200
commite4631b48e17e63a3859456df639482063a0276fd (patch)
treee8dcdec9dbfda12093f4266ce495a27b65cfa580 /src/basic/user-util.h
parentbf3dd08a81f7500973d8a4add8c73a0856ae5f7d (diff)
sysusers: move various user credential validity checks to src/basic/
This way we can reuse them for validating User=/Group= settings in unit files (to be added in a later commit). Also, add some tests for them.
Diffstat (limited to 'src/basic/user-util.h')
-rw-r--r--src/basic/user-util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/basic/user-util.h b/src/basic/user-util.h
index 8026eca3f4..36f71fb004 100644
--- a/src/basic/user-util.h
+++ b/src/basic/user-util.h
@@ -68,3 +68,8 @@ int take_etc_passwd_lock(const char *root);
static inline bool userns_supported(void) {
return access("/proc/self/uid_map", F_OK) >= 0;
}
+
+bool valid_user_group_name(const char *u);
+bool valid_user_group_name_or_id(const char *u);
+bool valid_gecos(const char *d);
+bool valid_home(const char *p);