Using environment variables in post-auth of freeradius 2.1.x
Hello, I have the situation that the post-auth section of FREERADIUS 2.1.12 should differ in a few lines on the test and prod system. In version 3 I can make use of environment variables: post-auth { ... ... elsif ( "$ENV{HOSTNAME}" == "stest-sr-h00") { # DEV-replies elsif ( "$ENV{HOSTNAME}" == "sprod-sr-h01" || "$ENV{HOSTNAME}" == "sprod-sr-h02") { # PROD-replies fi Is there any chance to smuggle environment variables like $HOSTNAME into freeradius 2.x ? Thanks, Simon
On Aug 3, 2018, at 9:25 AM, Simon Meggle <Simon.Meggle@consol.de> wrote:
I have the situation that the post-auth section of FREERADIUS 2.1.12 should differ in a few lines on the test and prod system. In version 3 I can make use of environment variables:
post-auth { ... ... elsif ( "$ENV{HOSTNAME}" == "stest-sr-h00") { # DEV-replies elsif ( "$ENV{HOSTNAME}" == "sprod-sr-h01" || "$ENV{HOSTNAME}" == "sprod-sr-h02") { # PROD-replies fi
Is there any chance to smuggle environment variables like $HOSTNAME into freeradius 2.x ?
We're not going to add features to v2, sorry. It's enough work trying to maintain v3 and develop v4 at the same time. Alan DeKok.
On Fri, 2018-08-03 at 15:25 +0200, Simon Meggle wrote:
I have the situation that the post-auth section of FREERADIUS 2.1.12
That's ancient. You should upgrade to at least 2.2.10. Preferably v3.
Is there any chance to smuggle environment variables like $HOSTNAME into freeradius 2.x ?
radiusd.conf: $INCLUDE local.conf local.conf: local { hostname = '...' } wherever: if (${local.hostname} == "server1") { ... Then update local.conf to be different on each server. It works in v3. I *think* it's OK in v2 as well, but nobody here really cares about v2 any more, it's obsolete. -- Matthew
participants (3)
-
Alan DeKok -
Matthew Newton -
Simon Meggle