[rrd-users] rrdcgi - how to access %ENV ??

Jesper Skriver jesper at skriver.dk
Mon Feb 21 20:35:39 MET 2000


Hi,

I'm considering moving from my hacked perl program to rrdcgi, but I need
to restrict certain users to specific interface statistics, so I need 
access to the environment of the cgi program, so I can use the 
REMOTE_USER env string.

My ideas is if user 'jesper' is allowed to see statistics for a
interface, the I'd add a symlink for the corresponding rrd file in a
directory like /data/users/jesper/

And then use a DEF like

DEF:ifInOctets=/data/users/<RRD:ENV REMOTE_USER>/<RRD::CV router>.<RRD::CV ifname>.rrd:ifInOctets:MAX

Where <RRD:ENV REMOTE_USER> would be substituted by jesper ...

I cannot use the CGI variables, as I cannot trust them, but the
REMOTE_USER, I can trust ...

I've been looking a bit at the code, but as I'm not a C programmer, I
think I'm unable to add this functionality to the code, at least without
some help ...

/Jesper

-- 
Jesper Skriver, jesper(at)skriver(dot)dk  -  CCIE #5456
Work:    Network manager @ AS3292 (Tele Danmark DataNetworks)
Private: Geek            @ AS2109 (A much smaller network ;-)

One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users



More information about the rrd-users mailing list