X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=scripts%2Fexec-program-wait;h=ea303bcae5efc4c7070998d1662ca3d316788c89;hb=HEAD;hp=1d388ac311e044fe1a4f833eff56c8e9562d91d9;hpb=c4a96197246b50bb140b484680049bb01921a899;p=freeradius.git diff --git a/scripts/exec-program-wait b/scripts/exec-program-wait index 1d388ac..ea303bc 100755 --- a/scripts/exec-program-wait +++ b/scripts/exec-program-wait @@ -1,20 +1,33 @@ #!/bin/sh # -# $Id$ -# -# Sample script to run when a 'user' file entry is similar to: -# -#bob Password == "bob" -# Exec-Program-Wait = "/path/to/program/exec-program-wait" -# -# For 'acct_users': -# -#DEFAULT Acct-Status-Type == Start -# Exec-Program = "/path/to/exec/acct/start" -# -#DEFAULT Acct-Status-Type == Stop -# Exec-Program = "/path/to/exec/acct/stop" -# +# $Id$ +# +# Sample script to add Attribute/Value pairs in the reply sent to +# the NAS. +# +# Before version 2.0 of FreeRADIUS, the script could be run from the +# deprecated attributes 'Exec-Program' and 'Exec-Program-Wait'. +# However, these attributes are no longer supported and you have to +# use the module 'rlm_exec' instead. +# +# An entry for the module 'rlm_exec' must be added to the file +# 'radiusd.conf' with the path of the script. +# +#modules { +# exec { +# program = "/path/to/program/exec-program-wait" +# wait = yes +# input_pairs = request +# output_pairs = reply +# } +# ... +#} +# +#authorize { +# ... +# exec +# ... +#} # # Each of the attributes in the request will be available in an # environment variable. The name of the variable depends on the @@ -27,6 +40,22 @@ # to the script. Then look in the file for a complete list of # variables. # +# The return value of the program run determines the result +# of the exec instance call as follows: +# (See doc/configurable_failover for details) +# < 0 : fail the module failed +# = 0 : okthe module succeeded +# = 1 : reject the module rejected the user +# = 2 : fail the module failed +# = 3 : okthe module succeeded +# = 4 : handled the module has done everything to handle the request +# = 5 : invalid the user's configuration entry was invalid +# = 6 : userlock the user was locked out +# = 7 : notfound the user was not found +# = 8 : noop the module did nothing +# = 9 : updated the module updated information in the request +# > 9 : fail the module failed +# echo "Reply-Message += \"Hello, %u\"," echo "Reply-Message += \"PATH=$PATH\"," echo Framed-IP-Address = 255.255.255.255