You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by 松井 幸治 <k...@kekyo.net> on 2007/09/15 11:44:30 UTC

[PATCH] svn protocol over windows named pipe

Hi,

I added the means to access by using the
named pipe of Windows for SubVersion.
The following things can be done by using this.

*The direct access protection can be decided
 from the right of access of the repository file by
 using impersonation mode.
*It becomes a single sign-in by the host under
 the control of ActiveDirectory or Domain Controller.
*Of course, it is possible to start as service :-)

SubVersion URL scheme is "pipe".
For instance, it uses it as follows:

svn list pipe://localhost/
svn list pipe://svntrunk.foo.bar.net:12345/

In the first example, it connects it with the localhost.
The name of named pipe is "SubVersion3690.
"When the port number is specified like the second
example, it becomes "SubVersion12345".

# The user not need learn this thing.
# It only has to know only URL as usual.

The option such as --pipe and --pipe-with-impersonate
was added to svnserve.

The method of displaying the error of Windows API
might have a better procedure.
(svn_win32_get_error_string)

Please correct it if there is a part not suitable for
the method.

----------------------
Kouji Matsui
mailto:k@kekyo.net
# It will be automatically discarded if the attached file of
# executable files or "HTML mail" is transmitted to this mail address.

RE: [PATCH] svn protocol over windows named pipe

Posted by Kouji Matsui <k...@kekyo.net>.
Hi,

> -----Original Message-----
> From: mark benedetto king [mailto:mbk@lowlatency.com]
> Why even have a convention?  Why not have the pipe name explicitly in the URL?
> (i.e., "svnpipe://hostname/pipename").

I also thought about the correction of
making pipename from resourcename.
However, it has not been understood whether
it can be easily done.

# The correction method is being designed...

----------------------
Kouji Matsui
mailto:k@kekyo.net
# 実行形式の添付ファイルかHTMLメールは自動的に廃棄されます
# It will be automatically discarded if the attached file of
# executable files or "HTML mail" is transmitted to this mail address.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] svn protocol over windows named pipe

Posted by Martin Furter <mf...@rola.ch>.

On Mon, 17 Sep 2007, Blair Zajac wrote:

> mark benedetto king wrote:
>> On Sat, Sep 15, 2007 at 11:55:10PM +0400, Ivan Zhakov wrote:
>>> * I prefer something like "svnserve" as pipe name instead of "SubVersion"
>> 
>> Why even have a convention?  Why not have the pipe name explicitly in the 
>> URL?
>> (i.e., "svnpipe://hostname/pipename").
>
> If this is Windows specific, then I suggest a name like winpipe or 
> svnwinpipe.

On *IX it could be implemented using AF_UNIX sockets.
That would be a nice feature too and could be added later when the windows 
version is committed.

Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: [PATCH] svn protocol over windows named pipe

Posted by Kouji Matsui <k...@kekyo.net>.
Hi,

I am still continuing, I want you to teach because
it might not understand.

"svn_ra_svn_conn_t*" is handed over after thread is
generated with svnserve and it communicates.
However, when thread ends, no one seems to close
the socket descriptor included in it.

1:When I implemented named pipe, the function named
  "svn_stream_set_close()" was found.
  However, it was not able to be found by implementing
  socket and file descriptor.
  The "close_fn" member becomes NULL if this function is
  not called, and nothing is done.

2:There is no close function corresponding to
  "svn_ra_svn_create_conn()" and "svn_ra_svn__stream_create()".
  Because it cannot access "stream*" member of the structure
  from the outside, it is not possible to close by calling
  "svn_stream_close()".
  Only, it closes for oneself at "run_mode_listen_once".
  (apr_socket_close(usock); )

Is this a bug that has not been found yet,
or is descriptor closed in another somewhere?

Thanks

----------------------
Kouji Matsui
mailto:k@kekyo.net
# It will be automatically discarded if the attached file of
# executable files or "HTML mail" is transmitted to this mail address.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: [PATCH] svn protocol over windows named pipe

Posted by Kouji Matsui <k...@kekyo.net>.
Hi Blair,

> > May I implement part with C++?
> 
> No, all of the core Subversion code is written only in C.

Oops...
Okay, I will have worked for a while.

> There has been talk about moving to C++, but this would be a Subversion 2.0
> project.

That is so good :)

----------------------
Kouji Matsui
mailto:k@kekyo.net
# It will be automatically discarded if the attached file of
# executable files or "HTML mail" is transmitted to this mail address.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] svn protocol over windows named pipe

Posted by Blair Zajac <bl...@orcaware.com>.
Kouji Matsui wrote:
> Hi all,
> 
>> -----Original Message-----
>> From: Blair Zajac [mailto:blair@orcaware.com]
>> If this is Windows specific, then I suggest a name
>> like winpipe or svnwinpipe.
> 
> It decided to do with "winpipe".
> I think that "svnwinpipe" is strictly good.
> But, it will be felt that the user is too long.
> 
> I want to hear it from svnserve mainteners.

I am one of the svnserve maintainers :)

> May I implement part with C++?

No, all of the core Subversion code is written only in C.

There has been talk about moving to C++, but this would be a Subversion 2.0 project.

Regards,
Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: [PATCH] svn protocol over windows named pipe

Posted by Kouji Matsui <k...@kekyo.net>.
Hi all,

> -----Original Message-----
> From: Blair Zajac [mailto:blair@orcaware.com]
> If this is Windows specific, then I suggest a name
> like winpipe or svnwinpipe.

It decided to do with "winpipe".
I think that "svnwinpipe" is strictly good.
But, it will be felt that the user is too long.

I want to hear it from svnserve mainteners.
May I implement part with C++?

The code implemented with C++ is divided into
another file. It is "winpipe.cpp" in the schedule.
And, "winpipe.h" does include to "main.c" of svnserve
as interchangeable C.

# I am no good at C language ;-)

This is a story limited to the code of svnserve.
There is no problem because it can write
the libraries (libsvn_ra_svn, etc) by C language.

----------------------
Kouji Matsui
mailto:k@kekyo.net
# It will be automatically discarded if the attached file of
# executable files or "HTML mail" is transmitted to this mail address.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] svn protocol over windows named pipe

Posted by Blair Zajac <bl...@orcaware.com>.
mark benedetto king wrote:
> On Sat, Sep 15, 2007 at 11:55:10PM +0400, Ivan Zhakov wrote:
>> * I prefer something like "svnserve" as pipe name instead of "SubVersion"
> 
> Why even have a convention?  Why not have the pipe name explicitly in the URL?
> (i.e., "svnpipe://hostname/pipename").

If this is Windows specific, then I suggest a name like winpipe or svnwinpipe.

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] svn protocol over windows named pipe

Posted by mark benedetto king <mb...@lowlatency.com>.
On Sat, Sep 15, 2007 at 11:55:10PM +0400, Ivan Zhakov wrote:
> * I prefer something like "svnserve" as pipe name instead of "SubVersion"

Why even have a convention?  Why not have the pipe name explicitly in the URL?
(i.e., "svnpipe://hostname/pipename").


--ben

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] svn protocol over windows named pipe

Posted by Ivan Zhakov <ch...@gmail.com>.
On 9/15/07, 松井 幸治 <k...@kekyo.net> wrote:
> Hi,
>
> I added the means to access by using the
> named pipe of Windows for SubVersion.
> The following things can be done by using this.
>
> *The direct access protection can be decided
>  from the right of access of the repository file by
>  using impersonation mode.
> *It becomes a single sign-in by the host under
>  the control of ActiveDirectory or Domain Controller.
> *Of course, it is possible to start as service :-)
>
> SubVersion URL scheme is "pipe".
> For instance, it uses it as follows:
>
> svn list pipe://localhost/
> svn list pipe://svntrunk.foo.bar.net:12345/
>
> In the first example, it connects it with the localhost.
> The name of named pipe is "SubVersion3690.
> "When the port number is specified like the second
> example, it becomes "SubVersion12345".
>
> # The user not need learn this thing.
> # It only has to know only URL as usual.
>
> The option such as --pipe and --pipe-with-impersonate
> was added to svnserve.
>
> The method of displaying the error of Windows API
> might have a better procedure.
> (svn_win32_get_error_string)
>
> Please correct it if there is a part not suitable for
> the method.
>

I'd like to see this feature in Subversion. I've looked through your patch:
* svn_win32_get_error_string() isn't needed, since APR formats system
errors for us.
  Just use error code returned by apr_get_os_error() functions or
convert existing errror
  code using APR_FROM_OS_ERROR() macro.
* I prefer something like "svnserve" as pipe name instead of "SubVersion"
* We use only space characters in Subversion. I've noticed several tab
characters in
  your patch, please remove them.
* I'd like passing clients username to Subversions' authz level instead of
  using impersonation mode.

Also I've noticed that you haven't included any log messages with your
patches, per our patch submission guidelines, found here:
http://subversion.tigris.org/hacking.html#patches  A good log message
helps reviewers understand the purpose of your patch, and increases
the likelihood that it will be applied.  Instructions for writing log
messages can be found here:
http://subversion.tigris.org/hacking.html#log-messages

-- 
Ivan Zhakov

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org