Skip to content
Advertisement

Alternate program for ‘less’ linux command/Making ‘less’ Secure

I want to write an interactive program like ‘less’ command for Linux. Reason I can’t use less in my setup because you can execute shell commands within less prompt ‘!cmd’ which can be a major security risk for any production box.

My preferred language is C, however, if anyone can suggest any other similar program that will be great too, owing to the time I have in my hand.

I know one option will be to browse through the less source code, but it looks like that is not very straight forward either in short time.

Advertisement

Answer

Amazing, I got the answer in Man page of less itself. You can disable these stuff using one of the variables.

SECURITY When the environment variable LESSSECURE is set to 1, less runs in a “secure” mode. This means these fea‐ tures are disabled:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement