[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] dav_svn_get_repos_path

From: Marcus Rueckert <darix_at_web.de>
Date: 2005-04-02 00:26:08 CEST

hi

hopefully the last version.
i fixed the comments for max.

i fixed the log message. (ok i just copied the text from cmpilato)

and i ran make fsfscheck successfully..
and my the tests from my mod_authn_svn.

[[[
<Location /svn/path>
    DAV svn
    SVNPath /opt/apache2.1/svn/repos1
    SVNAutoversioning on
    # auth
    AuthType Basic
    AuthName "svn path"
    AuthBasicAuthoritative On

    AuthBasicProvider svn
    require valid-user

</Location>

<Location /svn/parentpath>
    DAV svn
    SVNParentPath /opt/apache2.1/svn
    SVNAutoversioning on
    # auth
    AuthType Basic
    AuthName "svn parent path"
    AuthBasicAuthoritative On

    AuthBasicProvider svn
    require valid-user
</Location>

<Location /nopath>
    AuthType Basic
    AuthName "svn parent path"
    AuthBasicAuthoritative On

    AuthBasicProvider svn
    AuthSvnFile "/opt/apache2.1/svn/repos1/conf/htpasswd"
    require valid-user
</Location>
]]]

this code snippet is from a Apache 2.1 module:
[[[
/* Given a username and password, expected to return AUTH_GRANTED
 * if we can validate this user/password combination.
 */
static authn_status check_password(request_rec *r, const char *user,
                                   const char *password)
{
    authn_svn_config_rec *conf = ap_get_module_config(r->per_dir_config,
                                                       &authn_svn_module);
    const char *repos_path;
    dav_error *err;
    err = dav_svn_get_repos_path (r, conf->base_path, &repos_path );
    if (err)
    {
        ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                  "darix is debugging: %s", err->desc);
        return AUTH_DENIED;
    }
    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                  "darix is debugging: %s", repos_path);
    return AUTH_GRANTED;
}
]]]

if any one is interested in the full code i will send it.

the results for the various blocks

curl -u darix http://localhost:8080/nopath
[[[
[Fri Apr 01 21:22:27 2005] [error] [client 127.0.0.1] darix is debugging: The server is misconfigured: either an SVNPath or SVN
ParentPath directive is required to specify the location of this resource's repository.
[Fri Apr 01 21:22:27 2005] [error] [client 127.0.0.1] user darix: authentication failure for "/nopath/": Password Mismatch
]]]

curl -u darix http://localhost:8080/svn/path/
[[[
[Fri Apr 01 21:21:41 2005] [error] [client 127.0.0.1] darix is debugging: /opt/apache2.1/svn/repos1
]]]

curl -u darix http://localhost:8080/svn/parentpath/repos2/
[[[
[Sat Apr 02 00:19:29 2005] [error] [client 127.0.0.1] darix is debugging: /opt/apache2.1/svn/repos2
]]]

hoping the best

darix

-- 
irssi - the client of the smart and beautiful people
              http://www.irssi.de/



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

Received on Sat Apr 2 00:27:25 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.