diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-07-14 12:23:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-07-22 15:53:45 +0200 |
commit | e4631b48e17e63a3859456df639482063a0276fd (patch) | |
tree | e8dcdec9dbfda12093f4266ce495a27b65cfa580 /src/basic/user-util.h | |
parent | Merge pull request #3762 from poettering/sigkill-log (diff) | |
download | systemd-e4631b48e17e63a3859456df639482063a0276fd.tar.xz systemd-e4631b48e17e63a3859456df639482063a0276fd.zip |
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 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); |