summaryrefslogtreecommitdiff
path: root/src/basic/env-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-04-06 18:58:55 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commit9d1ff89d622fd4d8b3be210996cfa73943d81e03 (patch)
tree102f525976d4d49adff59adba7ca7c0d9e825a14 /src/basic/env-util.c
parent5642683e0db55c457dcd03df1290334a238194e2 (diff)
tree-wide: drop license boilerplate
Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
Diffstat (limited to 'src/basic/env-util.c')
-rw-r--r--src/basic/env-util.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/basic/env-util.c b/src/basic/env-util.c
index dd93023b5..b5de520d4 100644
--- a/src/basic/env-util.c
+++ b/src/basic/env-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2012 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
@@ -84,9 +71,9 @@ bool env_value_is_valid(const char *e) {
if (!utf8_is_valid(e))
return false;
- /* bash allows tabs in environment variables, and so should
- * we */
- if (string_has_cc(e, "\t"))
+ /* bash allows tabs and newlines in environment variables, and so
+ * should we */
+ if (string_has_cc(e, "\t\n"))
return false;
/* POSIX says the overall size of the environment block cannot