chiark / gitweb /
util: don't consider tabs special in string_has_cc() anymore
[elogind.git] / src / shared / env-util.c
index b2e45531ab7ec0131e102075bc9b09397dfe0fb1..20b208f63c6a8bb0b0bf0647e0b2f5a76efd8d1f 100644 (file)
@@ -78,7 +78,9 @@ bool env_value_is_valid(const char *e) {
         if (!utf8_is_valid(e))
                 return false;
 
         if (!utf8_is_valid(e))
                 return false;
 
-        if (string_has_cc(e))
+        /* bash allows tabs in environment variables, and so should
+         * we */
+        if (string_has_cc(e, "\t"))
                 return false;
 
         /* POSIX says the overall size of the environment block cannot
                 return false;
 
         /* POSIX says the overall size of the environment block cannot