Commit 5af611f
committed
api,kvm: reject a mount option list that only looks empty
Validation returned early for a blank value, so a list of nothing but whitespace
was accepted although whitespace is rejected everywhere else in the list. The
two sides then disagreed about it: the restore wrapper treats it as no options
at all, while the backup script sees a non empty string and hands it to mount as
an option of its own. An empty value still clears the options, anything else is
now validated.
The array holding the mount command is also declared local, as arrays assigned
in a bash function are otherwise global. mount_point and dest stay as they are,
the callers of mount_operation read them.1 parent 17b20fd commit 5af611f
3 files changed
Lines changed: 23 additions & 2 deletions
File tree
- api/src/main/java/org/apache/cloudstack/api
- scripts/vm/hypervisor/kvm
- server/src/test/java/com/cloud/api/dispatch
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
| 292 | + | |
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
215 | 233 | | |
216 | 234 | | |
217 | 235 | | |
| |||
0 commit comments