Quoting Scott Moser (smo...@ubuntu.com): > On Wed, 15 May 2013, Serge Hallyn wrote: > > > > > Soon analogous create and destroy hooks will be added as well. > > > > > > I think I'd have preferred storing the command arguments in > > > LXC_CLONE_ARGS instead of directly in argv. Doing so would allow us to > > > remove/add other arguments without breaking all existing hooks. > > > > > > The user could then do "set -- $LXC_CLONE_ARGS" and just use $1... as > > > usual. > > > > > > But I'm not horribly opposed to the proposed implementation and the rest > > > looks good. > > > > Actually, > > > > yeah that would let menot add the argv[] to run_lxc_hooks, and make the > > patch quite a bit shorter. > > > > I'll redo it like that. > > I'd really prefer proper arguments. > In argv you have null terminated strings, a proper array. > > In "LXC_CLONE_ARGS" you have to encode the null terminated string in some > way, forcing the comsumer to unencode it. > Ie, > set -- $LXC_CLONE_ARGS > which is actually insufficient. > In order to avoid shell expansion, the user has to do something like this: > eval set -- "${LXC_CLONE_ARGS}" > > and you'll have to shell escape the content that you put in there.
Ok, then let's wait a day to think about it, and perhaps go with the original patch. Because I can't think of a good way to work around that. (We can't set IFS to '\0' can we...) Thanks everyone. ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel