Python executable path empty through rlm_python and rlm_python3
Hi! Running sys.executable in a Python script run through either rlm_python or rlm_python3 returns null - from what I can tell Python normally gets this information from argv[0](usually passed by the OS) and/or some environment variables. I've confirmed this works fine when the python script is run on it's own (not through FreeRADIUS). Is this a bug or is there a way to configure this? I need it to be set for a library we use. Thanks! -Allie
On Jan 7, 2022, at 6:10 PM, Allie Hammond via Freeradius-Users <freeradius-users@lists.freeradius.org> wrote:
Running sys.executable in a Python script run through either rlm_python or rlm_python3 returns null - from what I can tell Python normally gets this information from argv[0](usually passed by the OS) and/or some environment variables.
Because there's no python executable as such. Instead, Python is being run as a library inside of FreeRADIUS.
I've confirmed this works fine when the python script is run on it's own (not through FreeRADIUS).
Is this a bug or is there a way to configure this? I need it to be set for a library we use.
You can set "python_path" in the module configuration. Or, just hard-code the library path into the python script. Alan DeKok.
Share the radiusd -XXX output with the Python stacktrace.
On 7 Jan 2022, at 20:10, Allie Hammond via Freeradius-Users <freeradius-users@lists.freeradius.org> wrote:
Hi!
Running sys.executable in a Python script run through either rlm_python or rlm_python3 returns null - from what I can tell Python normally gets this information from argv[0](usually passed by the OS) and/or some environment variables.
I've confirmed this works fine when the python script is run on it's own (not through FreeRADIUS).
Is this a bug or is there a way to configure this? I need it to be set for a library we use.
Thanks! -Allie - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Jorge Pereira jpereira@networkradius.com
participants (3)
-
Alan DeKok -
Allie Hammond -
Jorge Pereira