basic/env-util: drop the validation when deserializing environment

The environment variables we've serialized can quite possibly contain
characters outside the set allowed by env_assignment_is_valid(). In
fact, my environment seems to contain a couple of these:

  * TERMCAP set by screen contains a '\x7f' character
  * BASH_FUNC_module%% variable has a '%' character in name

Strict check of environment variables name and value certainly makes sense for
unit files, but not so much for deserialization of values we already had
in our environment.
This commit is contained in:
Lubomir Rintel
2017-10-11 15:01:32 +02:00
parent 3f6aef0d02
commit ea43bdd1d7
2 changed files with 3 additions and 7 deletions
-5
View File
@@ -809,10 +809,5 @@ int deserialize_environment(char ***environment, const char *line) {
if (r < 0)
return r;
if (!env_assignment_is_valid(uce)) {
free(uce);
return -EINVAL;
}
return strv_env_replace(environment, uce);
}