On Mon, Mar 29, 2010 at 01:17:30PM -0400, Sebastien Roy wrote:
> Understood, and I see that now.  It would indeed make sense to be
> consistent and have -H for this subcommand as well.

Agreed.  Do you agree re: backslash-escaping?

> >I could have filenames with ' ->  ' in them that would render the rename
> >output ambiguous to the human eye.  I could have filenames with
> >'\n<zfs-diff-line>' in the name that would render the output ambiguous
> >to the human eye.
> 
> My intention wasn't to rathole into some absurd discussion over how
> to handle ridiculous filenames.

My intention is to avoid security problems in consumers of zfs diff.  I
assert that zfs diff is mostly useful only in connection with scripting.

I don't think it's reasonable to expect that zfs diff be useful only "by
eye".  It has got to be scriptable because for any sufficiently large
and active dataset the output of zfs diff will generally be too large to
handle "by eye" (sure, you could grep for specific things, but not much
beyond that you're scripting).

(If zfs diff is only useful for scripting then the -H option is actually
unnecessary and zfs diff should always disambiguate pathnames in its
output.)

Nico
-- 

Reply via email to