[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: bind.c peername?



At 09:10 AM 2002-09-03, Paul Reilly wrote:
>Hi, just to follow up on my query re: passing the client's IP address
>(peername) in to the back-perl bind() subroutine:
>
>I have determined how to pass extra C variables in to perl, via pushing
>them on to the perl stack in ~/servers/slapd/back-perl/bind.c so that is
>tested & working fine.
>
>I think the variable I'm looking for is "peername". Is this correct?
>I can't seem to access this variable within the bind.c code though.
>
>Is there some other *conn struct that I can query for this info?

The Connection structure holds (or holds references to) all the
information about a connection, including c_peer_name.

>Any ideas on the best way to query the client IP address (purely in C)
>from bind.c ?

Well, the best way would be not to query it directly... but
to use the access control to check if session is allowed
access to the attributes (or psuedo attributes) of the entry
associated with the authentication DN.

Kurt