chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
nss-myhostname: various modernizations
[elogind.git]
/
src
/
sysusers
/
sysusers.c
diff --git
a/src/sysusers/sysusers.c
b/src/sysusers/sysusers.c
index 40a669725e7fff75b6cd2675498a14a0039ee447..129493a1e7ad5779410064dc277db49c9824550d 100644
(file)
--- a/
src/sysusers/sysusers.c
+++ b/
src/sysusers/sysusers.c
@@
-1107,7
+1107,11
@@
static bool valid_gecos(const char *d) {
if (!utf8_is_valid(d))
return false;
- if (strpbrk(d, ":\n"))
+ if (string_has_cc(d, NULL))
+ return false;
+
+ /* Colons are used as field separators, and hence not OK */
+ if (strchr(d, ':'))
return false;
return true;