init: env does not undergo expansion
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart |
Triaged
|
Medium
|
Cameron Norman |
Bug Description
Currently jobfiles in the format:
# START JOBFILE
env TEST_VAR=$INC_VAR
exec echo "$TEST_VAR" > /foobard2zemax
# END JOBFILE
result in the following output:
[comet-k5-12:~]$ cat /foobard2zemax
$INC_VAR
Some script newbies may be confused by that usage (but what do you mean TEST_VAR didn't expand to the value of $INC_VAR 8-)???), but it makes perfect sense to have it be done that way as I would be more concerned with harmful, potentially recursive environment variables. Besides, it's just bad coding to do it that way anyhow ;).
However, this exact replacement method could also become a point of security risk as well if obscurely evaluated later on, but having that tool at one's disposal is no worse than a number of available functions in C libcalls / syscalls anyhow ;).
This is just a note for the sake of improving clarity in existing documentation, e.g. <http://
summary: |
- env does not undergo expansion + init: env does not undergo expansion |
Changed in upstart: | |
status: | Triaged → Opinion |
Changed in upstart: | |
status: | Opinion → Triaged |
Yes, this one should be expanded