GNU rush version 2.3 is available for download. This is a bug-fixing release.
GNU rush version 2.2 is available for download.
New in this version:
New predicates, designed after options to the "test" system command, check for file types. modes and ownership. For example
rule
match -d /var/lock/sd
will match if /var/lock/sd exists on diks and is a directory
This fixes handling of transform expressions like "s/X/@/2".
Version 2.0 is available for download from GNU and Puszcza archives.
This release features a complete rewrite of the configuration support. It introduces a new configuration file syntax that offers a large set of control structures and transformation instructions for handling arbitrary requests. Please see the documentation for details.
Backward compatibility with prior releases is retained and old configuration syntax is still supported. This ensures that existing installations will remain operational without any changes. Nevertheless, system administrators are encouraged to switch to the new syntax as soon as possible.
Version 1.9 is available for download from GNU and Puszcza archives. It should soon become available in the mirrors too.
New in this version:
Arguments to tranformations, chroot and chdir statements can contain references to parenthesized groups in the recent regular expression match. Such references are replaced with the strings that matched the corresponding groups. Syntactically, a backreference expansion is a percent sign followed by one-digit number of the subexpression (1-based, %0 refers to entire matched line). For example
rule X
command ^cd (.+) && (.+)
chdir %1
set %2
The configuration file can define new variables or redefine the built-in ones using the setvar statement:
setvar[VAR] PATTERN
Here, VAR is the variable name, and PATTERN is its new value. The PATTERN is subject to variable and backreference expansion.
User-defined variables can be unset using the "unsetvar" statement:
unsetvar[VAR]
Unsetting a built-in variable, previously redefined using the setvar statement causes the user-supplied definition to be forgotten and the built-in one restored.
The following shell-like notations are supported:
${VAR:-WORD} Use Default Values
${VAR:=WORD} Assign Default Values
${VAR:?WORD} Display Error if Null or Unset
${VAR:+WORD} Use Alternate Value
The script rush-po.awk that was used in prior versions has been withdrawn.
GNU Rush version 1.8 is available for download from Main GNU and GNU.ORG.UA archives.
New in this version:
Select the most suitable time representation for the duration field, depending on the requested width.
If chroot is requested, re-read the password database after chrooting.
Set supplementary groups when switching to user privileges.
Interactive rules are marked with the keyword "interactive". Only such rules are considered when rush is invoked without the -c option. Support for the old (global) interactive keyword is discontinued.
The env statement can contain references to unmodified environment variables. E.g. this is now valid:
env PATH=/sbin:$PATH
GNU Rush version 1.6 is available for download from ftp://ftp.gnu.org/gnu/rush and ftp://download.gnu.org.ua/pub/release/rush.
Following is a list of user-visible changes:
The syntax of the transform statement has been extended to
allow for specifying transformation argument string:
transform STRING REGEX
or
transform[N] STRING REGEX
STRING may contain meta-variables, which are expanded before
performing the transformation. The following meta-variables are
defined:
${user} User name
${group} Name of the user's principal group
${uid} UID
${gid} GID
${home} User's home directory
${gecos} User's GECOS field
${program} Program name
${command} Full command line
$0 to $9 The value of the Nth command line argument
${N} Same as above, useful if N > 9 or N < 0 (see "Negative argument indexes", below).
Thus, for example:
transform[0] s,.*/,/bin/,
is equivalent to:
transform[0] $0 s,.*/,/bin/,
This statement sets a command line argument using a map file.
map[N] FILE DELIM KEY K V [DEFAULT]
Each line in a map file FILE contains fields, separated by delimiter DELIM. The map statement looks for the record whose Kth field has the value of KEY. If such a record is found, its Vth field becomes a new value of the Nth command line argument. Othervise, if DEFAULT is given, it is used as a new value. Otherwise, the argument retains its old value.
KEY may contain meta-variables described above (see "Patterns in
transform statement").
The set statement replaces entire command line with the new value:
rule foo
set /bin/scp -t /upload
In indexed form, it replaces the given argument:
set[0] /bin/scp
The argument to `set' may contain meta-variables (see "Patterns in transform statement").
This statement deletes the given argument, or range of arguments, from the command line. It has two forms:
1. Delete the Nth argument:
delete[N]
2. Delete all arguments between indexes N and M, inclusive:
delete N M
To modify the program name (as opposed to argv[0]), use ^ pseudo-index, e.g.:
set[^] /bin/scp
By default (unless [^] form is used) argv[0] is used as the program name.
Negative argument indexes refer to arguments numbered from the end of the command line. E.g.:
transform[-1] is the same as transform[$]
transform[-2] will transform the last but one argument
This statement provides a replacement command line for interactive use of rush. By default, such use is prohibited. However, using the interactive statement you can allow some users a limited interactive access. For example:
interactive shell-command
rule login
command shell-command
group rshell
map[^] /usr/local/etc/rush.shell : ${user} 1 2 none
transform[0] ${program} s,^.*/,-r,
Predefined error messages can be used in `exit' statements.
E.g., the statement:
exit @nologin-message
will retrieve the text of the `nologin-message' and send it to the remote party before exiting.
If the message text must begin with a `@' sign, duplicate it:
exit @@special error message
GNU Rush version 1.5 is available for download from ftp://ftp.gnu.org/gnu/rush and ftp://download.gnu.org.ua/pub/release/rush.