Hi,
Simple auth raises error when creds isn't presented. (see
svn_ra_svn__do_auth()) But SASL auth doesn't raise error
in SASL_INTERACT stage.
[[
Make SASL auth behavior like simple auth's one.
* subversion/libsvn_ra_svn/sasl_auth.c (handle_interact):
Check whether creds is available or not before use creds.
]]
Thanks,
--
kou
Index: subversion/libsvn_ra_svn/sasl_auth.c
===================================================================
--- subversion/libsvn_ra_svn/sasl_auth.c (revision 22837)
+++ subversion/libsvn_ra_svn/sasl_auth.c (working copy)
@@ -274,10 +274,16 @@
switch (prompt->id)
{
case SASL_CB_AUTHNAME:
+ if (!creds)
+ return svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL,
+ _("Can't get user name"));
prompt->result = creds->username;
prompt->len = strlen(creds->username);
break;
case SASL_CB_PASS:
+ if (!creds)
+ return svn_error_create(SVN_ERR_RA_NOT_AUTHORIZED, NULL,
+ _("Can't get password"));
prompt->result = creds->password;
prompt->len = strlen(creds->password);
break;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 30 07:59:47 2006