Hey Jaromil, > isn't the script called with execve or similar, so one can just choose any shell?
Yes. Specifically: "execle( "/bin/sh", "sh", "-c", cmd, (char*)0, env );", where cmd is the contents of the command= directive, and env is the list of vdev-exported environment variables (all prefixed with "VDEV_"). NB: Vdev delegates setting up the shell environment beyond this to the admin to ensure that a well-known PATH gets set, and to ensure that nothing sensitive leaks over from vdev's environment to the script. -Jude On Sun, Feb 22, 2015 at 9:16 PM, Jaromil <jaro...@dyne.org> wrote: > > hi Jude, > > On Sun, 22 Feb 2015, Jude Nelson wrote: > > > Hey everyone, > > In keeping with the request to give more frequent status updates on > > development, here's where things stand now with vdev. > > many thanks! > > one quick q (sry if I don't answer it myself looking at the code...) > > > (1) Create a vdev "action" file that tells vdev to run a script > whenever > > it adds or removes a character device: > > > > $ cat example/actions/char.act > > [vdev-action] > > event=any > > type=char > > command=exec $VDEV_HELPERS/char.sh > > (The line on the "command=" directive gets fed directly into /bin/sh; > > $VDEV_HELPERS is the path to the directory holding shell scripts and > > programs to set up devices, akin to /lib/udev). > > what do you mean by "fed directly into /bin/sh" ? > > isn't the script called with execve or similar, so one can just choose > any shell? > > thanks > ciao > > >
_______________________________________________ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng