Re: "char-mapper"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Original Message -----
> Hi Dave,
> 
> Just to throw another wrench into the mix, you might find customized character
> classifications useful.  First, you'd specify an interesting
> category:
> 
>    redirection    "|!>"
> 
> then you generate a table and some macros and then:
> 
>    p1 = BRK_REDIRECTION_CHARS(p2);
>    if (*p1 != NUL) {
>      fp = handle_redirection(p1);
>      *p1 = NUL;
>    }
> 
> To play with it, install gperf and autogen, git-clone the autogen sources,
> go into autogen/add-on/char-mapper and type "make".
> 
> If you use it, I recommend checking the generated source into git/svn.
> The git repo is on both sourceforge and savannah.gnu.org
> 
> Anyway, thanks for the patch, though I think there may still be a problem.
> Anything after the first pipe character can be arbitrary shell.  viz:
>    crash-command ! cat | sed s/// > file
> which is why I recommended the char classifier stuff.
> The BRK macro stops the scan on the first match of a character from
> the REDIRECTION class of characters.

Right - a combined ! and | would also be a problem.  But that's easy
enough to fix.

Thanks again,
  Dave
 

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility


[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux