Follow-up Comment #4, bug #15806 (project hurd): I prototyped changing fsysopts and showtrans to add quotation marks and backslashes to the argz vectors when printing them, so that POSIX sh can parse them. I added a function that writes an argz vector to a FILE *, with heuristics so that --option=value becomes --option="value" rather than "--option=value" if possible. It mostly works, but there are two snags:
(1) A malicious translator might return an invalid argz vector (in which the last string does not end with '\0') from file_get_translator or file_get_fs_options. The argz_next function that I used is not documented as tolerating that. Should use memchr instead, or just check the validity of the argz vectors as soon as they come from the RPCs. (2) The upstream version of fsysopts passes the result of argz_stringify to the error function if fsys_set_options fails. It is not straightforward to replace that argz_stringify call with a function that writes to a FILE *. Should either use open_memstream or replace the quoting function with one that writes to a character buffer. The idea of having fsysopts and showtrans quote the strings seems reasonable overall, though. It is probably not useful to add a -0 option like in xargs. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?15806> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/