diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-02-11 03:46:08 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-02-11 03:54:50 +0100 |
commit | 4d1a69043862ed979642f5688097160355d4cc81 (patch) | |
tree | deac099c3b4da6740cedac9af10913981303f78b /src/shared/util.h | |
parent | c62c294fd521e5b65bb52f831773916bbc4cd90a (diff) |
env: considerably beef up environment cleaning logic
Now, actually check if the environment variable names and values used
are valid, before accepting them. With this in place are at some places
more rigid than POSIX, and less rigid at others. For example, this code
allows lower-case environment variables (which POSIX suggests not to
use), but it will not allow non-UTF8 variable values.
All in all this should be a good middle ground of what to allow and what
not to allow as environment variables.
(This also splits out all environment related calls into env-util.[ch])
Diffstat (limited to 'src/shared/util.h')
-rw-r--r-- | src/shared/util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h index 223617c3ff..18494f14f2 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -544,6 +544,7 @@ _malloc_ static inline void *memdup_multiply(const void *p, size_t a, size_t b) bool filename_is_safe(const char *p); bool path_is_safe(const char *p); bool string_is_safe(const char *p); +bool string_has_cc(const char *p); void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size, int (*compar) (const void *, const void *, void *), |