allanjude / zxfer

A continuation of development on zxfer, a popular script for managing ZFS snapshot replication
BSD 2-Clause "Simplified" License
123 stars 40 forks source link

Ensure quotes around ZFS option argument values survive eval #51

Closed forquare closed 11 months ago

forquare commented 5 years ago

I found that when using zxfer(8) to transfer iocage(8) datasets I was getting a "too many arguments". Running with /bin/sh -x I was able to see that the values of zfs create options were not being quoted, and values with spaces were being interpreted as a value plus additional arguments to zfs(8).

Although I see #25 added the code to include quoting values, it looks like eval was removing them. By adding additional escapes, eval does not remove them and so the values are correctly quoted.

forquare commented 11 months ago

Closing as I no longer use this.