You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mike Schilli <m...@perlmeister.com> on 2009/02/24 01:16:44 UTC
SVN Hook doesn't know client's IP Address?
Hey there,
if a client uses svn over ssh, is there a way for a hook script on the
server to figure out what the client's IP address is? This is for
logging purposes. Seems like the SSH_CLIENT env variable gets stripped
before the hooks are called -- is there to pass it on?
-- Mike
Mike Schilli
m@perlmeister.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1218077
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN Hook doesn't know client's IP Address?
Posted by Mike Schilli <m...@perlmeister.com>.
On Tue, 24 Feb 2009, David Weintraub wrote:
> The user who is running the hook script is available. Why do you need
> the IP address?
It's only for logging purposes, I want to have a track record of who's
doing commits under which username logged in from which IP.
Having the IP along with the username in my logs helps tracking down
cases where people share svn login credentials or to determine if
a check-in is slow because a user is located at the end of a slow
Internet connection on a different continent.
-- Mike
Mike Schilli
m@perlmeister.com
> Since you're using ssh, the whole conversation between you and the
> user is encrypted, and you've already identified the user via name.
> Are you trying to prevent commits if the user is located is not at
> a particular IP address?
>
> On Tue, Feb 24, 2009 at 11:28 AM, Mike Schilli <m...@perlmeister.com> wrote:
>> On Tue, 24 Feb 2009, Andy Levy wrote:
>>
>>> Hook scripts are executed in an empty or near-empty environment for
>>> security purposes.
>>
>> I figured so much, but is there another way for a hook to log the
>> client's IP address? For example, is there a way to configure the server
>> to make an exception and pass SSH_CLIENT on to the hook?
>>
>> -- Mike
>>
>> Mike Schilli
>> m@perlmeister.com
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1221390
>>
>> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
>>
>
>
>
> --
> --
> David Weintraub
> qazwart@gmail.com
>
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1222090
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN Hook doesn't know client's IP Address?
Posted by David Weintraub <qa...@gmail.com>.
The user who is running the hook script is available. Why do you need
the IP address?
Since you're using ssh, the whole conversation between you and the
user is encrypted, and you've already identified the user via name.
Are you trying to prevent commits if the user is located is not at a
particular IP address?
On Tue, Feb 24, 2009 at 11:28 AM, Mike Schilli <m...@perlmeister.com> wrote:
> On Tue, 24 Feb 2009, Andy Levy wrote:
>
>> Hook scripts are executed in an empty or near-empty environment for
>> security purposes.
>
> I figured so much, but is there another way for a hook to log the
> client's IP address? For example, is there a way to configure the server
> to make an exception and pass SSH_CLIENT on to the hook?
>
> -- Mike
>
> Mike Schilli
> m@perlmeister.com
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1221390
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
>
--
--
David Weintraub
qazwart@gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1221832
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN Hook doesn't know client's IP Address?
Posted by Mike Schilli <m...@perlmeister.com>.
On Tue, 24 Feb 2009, Andy Levy wrote:
> Hook scripts are executed in an empty or near-empty environment for
> security purposes.
I figured so much, but is there another way for a hook to log the
client's IP address? For example, is there a way to configure the server
to make an exception and pass SSH_CLIENT on to the hook?
-- Mike
Mike Schilli
m@perlmeister.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1221390
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: SVN Hook doesn't know client's IP Address?
Posted by Andy Levy <an...@gmail.com>.
On Mon, Feb 23, 2009 at 20:16, Mike Schilli <m...@perlmeister.com> wrote:
> Hey there,
>
> if a client uses svn over ssh, is there a way for a hook script on the
> server to figure out what the client's IP address is? This is for
> logging purposes. Seems like the SSH_CLIENT env variable gets stripped
> before the hooks are called -- is there to pass it on?
Hook scripts are executed in an empty or near-empty environment for
security purposes.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1220776
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].