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

Tobias Oetiker oetiker at ee.ethz.ch
Mon Feb 21 23:19:46 MET 2000


Today you sent me mail regarding [rrd-users] rrdcgi - how to access %ENV ??:

*> 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 ...

adding this will be pretty simple ... there is already SETENV ...
so I will add GETENV ... I put this down ont the todo list ..

cheers
tobi
*> 
*> /Jesper
*> 
*> 

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker, Timelord & SysMgr @ EE-Dept ETH-Zurich
 / // _ \/ _ \/ / TEL: +41(0)1-6325286  FAX:...1517  ICQ: 10419518 
/_/ \.__/_.__/_/ oetiker at ee.ethz.ch http://ee-staff.ethz.ch/~oetiker

--
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