GNU Rush – a restricted user shell (split by node):   Section:   Chapter:FastBack: Configuration File   Up: Transformations   FastForward: Default Configuration   Contents: Table of ContentsIndex: Concept Index

4.2.2.1 Set

The ‘set’ transformation allows to replace entire command line, or any of its arguments, with the given value.

Rule Config: set pattern

Command line is replaced with the expansion of pattern (see patterns). E.g.:

set /bin/echo "Command forbidden: ${command}"

As another example, the following rule uses transform to ensure that /usr/bin/cvs binary is used:

rule cvs
  command ^cvs server
  set[0] /usr/bin/cvs

In versions of GNU Rush prior to 1.6, it was common to use the transform action for this purpose.

Rule Config: set[ n] pattern

Replace nth argument with the expansion of pattern. Notice, that square brackets are part of the statement syntax.

See indexing, for a description of n. See patterns, for a description of pattern. E.g.:

set[0] /bin/echo