bdrung / restricted-ssh-commands

Restrict SSH users to a predefined set of commands
MIT License
7 stars 1 forks source link

add support for PCRE #2

Open calestyo opened 8 years ago

calestyo commented 8 years ago

Hi.

it would be nice if support for PCRE regexpes could be added :)

Cheers, Chris.

bdrung commented 8 years ago

Adding PCRE support should be no big deal (just calling perl from the bash script for the comparison). The problem is: How should that be configured? How should the program decide when to use POSIX ERE and when PCRE?

calestyo commented 8 years ago

Isn't the syntax anyway already: /usr/lib/restricted-ssh-commands [config]

? I'd just make that config file a file which sets (e.g. in shell command language parameters) things like "at which paths do I find the patterns file" and "which type of patterns are used therein".

Later this should be easily expandable to things like "how are the patterns separated" (like new line or 0x0 and so on) or perhaps "what file storage type" (e.g. plain text vs. sqlite table, etc.).