Syntax
int authenticate_pam_toclient ( string user [, string service] )
Description
The authenticate_pam_toclient function authenticates a user by means of the PAM (Pluggable Authentication Method) APIs on the policy server.
For more information on how to configure PAM, consult the documentation for your platform.
The service parameter identifies the name of the PAM service to use to authenticate the user. This can be any valid service name configured in the PAM system configuration. It defaults to the PAM service "login".
This function returns 0 to indicate failure and 1 to indicate success.
Example
if (user=="paul" && basename(command)=="useradd") { if (!authenticate_pam_toclient(user, "sshd")) { reject; } runuser="root"; accept; }