diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-07-14 12:23:39 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-07-05 08:50:49 +0200 |
commit | 599f015c68718f04ee1946fc263aad8aaa614072 (patch) | |
tree | 9c2770ffc98a12ff95ce6117347622c83663eefe /src/basic/user-util.h | |
parent | 638dd5096b5549b7838c821784041af86b87a1f3 (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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/basic/user-util.h b/src/basic/user-util.h index 5d1d0abe4..1b5b4f454 100644 --- a/src/basic/user-util.h +++ b/src/basic/user-util.h @@ -74,3 +74,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); |