[Pkg-owncloud-commits] [owncloud-client] 11/83: remove auth callback setting in the csync module.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat May 31 11:31:38 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 87381285049d2b2d3bafa2158ee2c1a8423eaeec
Author: Klaas Freitag <freitag at owncloud.com>
Date: Wed May 21 11:08:18 2014 +0200
remove auth callback setting in the csync module.
---
csync/src/csync_owncloud.c | 51 ++--------------------------------------------
csync/src/csync_owncloud.h | 2 --
2 files changed, 2 insertions(+), 51 deletions(-)
diff --git a/csync/src/csync_owncloud.c b/csync/src/csync_owncloud.c
index be0e7b0..c1bfce6 100644
--- a/csync/src/csync_owncloud.c
+++ b/csync/src/csync_owncloud.c
@@ -177,49 +177,6 @@ static int verify_sslcert(void *userdata, int failures,
}
/*
- * Authentication callback. Is set by ne_set_server_auth to be called
- * from the neon lib to authenticate a request.
- */
-static int ne_auth( void *userdata, const char *realm, int attempt,
- char *username, char *password)
-{
- char buf[NE_ABUFSIZ];
-
- (void) userdata;
- (void) realm;
-
- /* DEBUG_WEBDAV( "Authentication required %s", realm ); */
- if( username && password ) {
- DEBUG_WEBDAV( "Authentication required %s", username );
- if( dav_session.user ) {
- /* allow user without password */
- if( strlen( dav_session.user ) < NE_ABUFSIZ ) {
- strcpy( username, dav_session.user );
- }
- if( dav_session.pwd && strlen( dav_session.pwd ) < NE_ABUFSIZ ) {
- strcpy( password, dav_session.pwd );
- }
- } else if( _authcb != NULL ){
- /* call the csync callback */
- DEBUG_WEBDAV("Call the csync callback for %s", realm );
- memset( buf, 0, NE_ABUFSIZ );
- (*_authcb) ("Enter your username: ", buf, NE_ABUFSIZ-1, 1, 0, _userdata );
- if( strlen(buf) < NE_ABUFSIZ ) {
- strcpy( username, buf );
- }
- memset( buf, 0, NE_ABUFSIZ );
- (*_authcb) ("Enter your password: ", buf, NE_ABUFSIZ-1, 0, 0, _userdata );
- if( strlen(buf) < NE_ABUFSIZ) {
- strcpy( password, buf );
- }
- } else {
- DEBUG_WEBDAV("I can not authenticate!");
- }
- }
- return attempt;
-}
-
-/*
* Authentication callback. Is set by ne_set_proxy_auth to be called
* from the neon lib to authenticate against a proxy. The data to authenticate
* against comes from mirall throught vio_module_init function.
@@ -465,6 +422,7 @@ static int dav_connect(const char *base_url) {
char *path = NULL;
char *scheme = NULL;
char *host = NULL;
+ char *user, *pwd;
unsigned int port = 0;
int proxystate = -1;
@@ -472,7 +430,7 @@ static int dav_connect(const char *base_url) {
return 0;
}
- rc = c_parse_uri( base_url, &scheme, &dav_session.user, &dav_session.pwd, &host, &port, &path );
+ rc = c_parse_uri( base_url, &scheme, &user, &pwd, &host, &port, &path );
if( rc < 0 ) {
DEBUG_WEBDAV("Failed to parse uri %s", base_url );
goto out;
@@ -494,8 +452,6 @@ static int dav_connect(const char *base_url) {
goto out;
}
- DEBUG_WEBDAV("* user %s", dav_session.user ? dav_session.user : "");
-
if (port == 0) {
port = ne_uri_defaultport(protocol);
}
@@ -516,7 +472,6 @@ static int dav_connect(const char *base_url) {
snprintf( uaBuf, sizeof(uaBuf), "Mozilla/5.0 (%s) csyncoC/%s",
get_platform(), CSYNC_STRINGIFY( LIBCSYNC_VERSION ));
ne_set_useragent( dav_session.ctx, uaBuf);
- ne_set_server_auth(dav_session.ctx, ne_auth, 0 );
if( useSSL ) {
if (!ne_has_support(NE_FEATURE_SSL)) {
@@ -993,8 +948,6 @@ int owncloud_commit(void) {
// ne_sock_exit();
_connected = 0; /* triggers dav_connect to go through the whole neon setup */
- SAFE_FREE( dav_session.user );
- SAFE_FREE( dav_session.pwd );
SAFE_FREE( dav_session.session_key);
SAFE_FREE( dav_session.error_string );
diff --git a/csync/src/csync_owncloud.h b/csync/src/csync_owncloud.h
index 745e3af..7d062aa 100644
--- a/csync/src/csync_owncloud.h
+++ b/csync/src/csync_owncloud.h
@@ -120,8 +120,6 @@ typedef int (*csync_owncloud_redirect_callback_t)(CSYNC* ctx, const char* uri);
/* Struct with the WebDAV session */
struct dav_session_s {
ne_session *ctx;
- char *user;
- char *pwd;
char *proxy_type;
char *proxy_host;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list