summaryrefslogtreecommitdiff
path: root/src/basic/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-27 14:57:44 +0100
committerLennart Poettering <lennart@poettering.net>2015-10-27 14:57:44 +0100
commit4fee397531c97d22e41fb3f02452e82d412fe2b5 (patch)
treefd65f7485ce816b2940dfdc106468f948e712cce /src/basic/util.c
parent3f2c0becc3dcb1acb9d2a1816dcfe4e3de8877d4 (diff)
util-lib: move fdname_is_valid() to fd-util.[ch]
Diffstat (limited to 'src/basic/util.c')
-rw-r--r--src/basic/util.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/basic/util.c b/src/basic/util.c
index 7d9dad472b..08bdcd28f2 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -838,30 +838,3 @@ int version(void) {
SYSTEMD_FEATURES);
return 0;
}
-
-bool fdname_is_valid(const char *s) {
- const char *p;
-
- /* Validates a name for $LISTEN_FDNAMES. We basically allow
- * everything ASCII that's not a control character. Also, as
- * special exception the ":" character is not allowed, as we
- * use that as field separator in $LISTEN_FDNAMES.
- *
- * Note that the empty string is explicitly allowed
- * here. However, we limit the length of the names to 255
- * characters. */
-
- if (!s)
- return false;
-
- for (p = s; *p; p++) {
- if (*p < ' ')
- return false;
- if (*p >= 127)
- return false;
- if (*p == ':')
- return false;
- }
-
- return p - s < 256;
-}