[tac_plus] regex for pipe in command syntax

Asif Iqbal vadud3 at gmail.com
Thu Feb 19 19:34:25 UTC 2015


Hi All,

How do I allow ``show logging | include foo'' but not ``show logging'' ?
Some security requirement that we are trying to achieve where
you are allowed to search for specific string ``foo'', but not allowed to
see all the logs.

This is what I tried and did not work

        cmd = show {
                deny "^logging$"
                permit "^logging|include foo"   # line 3409
                deny .*
        }

And I am getting

Thu Feb 19 14:25:44 2015 [3506]: show logging <cr> permitted by line 3409

I ran
router#show logging<enter>

If I try ``permit "^logging\s+|include foo'' I get the following error

 Thu Feb 19 14:22:43 2015 [3434]: Error expecting '}' but found '+|' on
line 3409

Any suggestion is appreciated.




-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/tac_plus/attachments/20150219/d92d91d9/attachment.html>


More information about the tac_plus mailing list