From c24411e5e51b7ccc682bb7a840bf2a98f7f3be98 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 13 Jun 2008 18:44:15 +0200 Subject: [PATCH] Don't create the remote directory if it doesn't exist. --- src/csync_time.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/csync_time.c b/src/csync_time.c index 909a65e88..ae1d24b7d 100644 --- a/src/csync_time.c +++ b/src/csync_time.c @@ -47,10 +47,12 @@ time_t csync_timediff(CSYNC *ctx) { ctx->replica = ctx->remote.type; dp = csync_vio_opendir(ctx, ctx->remote.uri); if (dp == NULL) { - if (csync_vio_mkdir(ctx, ctx->remote.uri, 0755) < 0) { - CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL, "Unable to create directory on remote uri: %s - %s", luri, strerror(errno)); - return -1; - } + /* + * To prevent problems especially with pam_csync we shouldn't try to create the + * remote directory here. Just fail! + */ + CSYNC_LOG(CSYNC_LOG_PRIORITY_FATAL, "Access dienied to remote uri: %s - %s", ctx->remote.uri, strerror(errno)); + return -1; } csync_vio_closedir(ctx, dp);