On Sun, 27 Jan 2013 at 19:39:21 +0100, Andreas Bierfert wrote: > On Sun, 27 Jan 2013 18:18:20 +0000 > "Carlos R. Mafra" <[email protected]> wrote: > > > On Sun, 27 Jan 2013 at 18:24:08 +0100, Andreas Bierfert wrote: > > > > > > This way using an external menu file generated via 'wmmenugen > file' > > > will actually do the same as running wmmenugen as command for the > > > generated > > > menu (which currently just gives an empty menu for me). > > > > Can you please be a bit more verbose about this? How does your > > WMRootMenu look like when you use the first option ('wmmenugen > file') > > and how are you using the second option? > > > > I mean, if you can copy & paste the relevant parts of your WMRootMenu > > in these two cases that would make things easier to understand. > > Sure, > > the relevant parts are: > > ( > "Generated Submenu", > OPEN_MENU, > "|| find /usr/share/applications -type f -name '*desktop' | xargs > wmmenugen -parser:xdg" > ), > ("External Submenu", OPEN_MENU, "~/wmmenugen-file"), > > where wmmenugen-file is generated via > > find /usr/share/applications -type f -name '*desktop' | xargs wmmenugen > -parser:xdg > ~/wmmenugen-file > > Currently opening "External Submenu" shows a valid submenu, "Generated > Submenu" > does not, as the parsing codepath ist different. > > By adding WMReadPropListFromPipe to WINGs and simply calling getPropList as is > done in WMReadPropListFromFile the same codepath is used for submenu > generation > of both menus. This actually makes "Generated Submenu" work as expected and > more importantly making it work the same way as "External Submenu" does... > > Hope this makes it clearer.
Ok, thanks a lot for clarifying it. Having this symmetry on how to include the generated menu makes sense for me. But how safe is this if one tries to abuse it? Say generate a huge file to get a buffer overflow etc. I'm also worried about generating a "menu" with 'rm -rf $HOME' or something like that. I usually don't think about ways to destroy things, but since WMRootMenu is easy to edit someone might be inspired to attack wmaker users this way. -- To unsubscribe, send mail to [email protected].
