busybox: prevent globbing, word splitting
authorJan-Tarek Butt <tarek@ring0.de>
Fri, 14 Oct 2016 18:32:22 +0000 (20:32 +0200)
committerJohn Crispin <john@phrozen.org>
Sat, 15 Oct 2016 09:36:51 +0000 (11:36 +0200)
Double quote to prevent globbing and word splitting.

Signed-off-by: Jan-Tarek Butt <tarek@ring0.de>
package/utils/busybox/files/cron

index 19ecc431735eb62025cca57061735ad9e4ac388f..a201374276d301f4f5c355d509f25903a57f3c19 100755 (executable)
@@ -14,7 +14,7 @@ validate_cron_section() {
 start_service () {
        [ -z "$(ls /etc/crontabs/)" ] && return 1
 
-       loglevel=$(uci_get "system.@system[0].cronloglevel")
+       loglevel="$(uci_get "system.@system[0].cronloglevel")"
 
        [ -z "${loglevel}" ] || {
                /sbin/validate_data uinteger "${loglevel}" 2>/dev/null
@@ -28,7 +28,7 @@ start_service () {
        ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
 
        procd_open_instance
-       procd_set_param command "$PROG" -f -c /etc/crontabs -l ${loglevel:-5}
+       procd_set_param command "$PROG" -f -c /etc/crontabs -l "${loglevel:-5}"
        procd_close_instance
 }