diff options
author | Nalin Dahyabhai <nalin@redhat.com> | 2000-08-03 14:21:32 +0000 |
---|---|---|
committer | Nalin Dahyabhai <nalin@redhat.com> | 2000-08-03 14:21:32 +0000 |
commit | 6e3016030556c37994a9f3ecadd81bfa747b0b72 (patch) | |
tree | d940ba27a1fa4133fe2f84cef1eb2bbe0822bf65 /src/shvar.c | |
parent | 90c9c1bdb710b438fc84aea4bcad180cf9eed12f (diff) | |
download | initscripts-6e3016030556c37994a9f3ecadd81bfa747b0b72.tar initscripts-6e3016030556c37994a9f3ecadd81bfa747b0b72.tar.gz initscripts-6e3016030556c37994a9f3ecadd81bfa747b0b72.tar.bz2 initscripts-6e3016030556c37994a9f3ecadd81bfa747b0b72.tar.xz initscripts-6e3016030556c37994a9f3ecadd81bfa747b0b72.zip |
be more specific about quoting variables
Diffstat (limited to 'src/shvar.c')
-rw-r--r-- | src/shvar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shvar.c b/src/shvar.c index 48f62ce0..765a77e7 100644 --- a/src/shvar.c +++ b/src/shvar.c @@ -133,8 +133,8 @@ unescape(char *s) { /* create a new string with all necessary characters escaped. * caller must free returned string */ -static const char escapees[] = "\"'\\$~`"; /* must be escaped */ -static const char spaces[] = " \t"; /* only require "" */ +static const char escapees[] = "\"'\\$~`"; /* must be escaped */ +static const char spaces[] = " \t|&;()<>"; /* only require "" */ static char * escape(const char *s) { char *new; @@ -280,7 +280,7 @@ svSetValue(shvarFile *s, const char *key, const char *value) if (val1 && newval && !strcmp(val1, newval)) goto bail; if (s->parent) val2 = svGetValue(s->parent, key); - if (!newval) { + if (!newval || !newval[0]) { /* delete value somehow */ if (val2) { /* change/append line to get key= */ |