[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Fri Jun 5 06:19:04 MDT 2015


The branch, master has been updated
       via  0721134 docs: Reference ldap ssl options in idmap_rfc2307 manpage
       via  9f57244 s3: libsmbclient: Re-resolving targetcli on every read/write/lseek/ftruncate/close is both incorrect and slow.
       via  941669a ctdb-recovered: Drop unused variable
       via  2e2dba8 ctdb-recoverd/vacuum: Remove vacuum_info structure
       via  92d1486 ctdb-recoverd/vacuum: move fetch loop back into fetch handler.
       via  4103463 ctdb-recoverd/vacuum: slightly reorder the vacuum fetch loop
       via  a1c941b ctdb-recoverd/vacuum: add common exit point to vacuum_fetch_handler
       via  9092617 ctdb-recoverd/vacuum: factor vacuum_fetch_process_one out of vacuum_fetch_loop
       via  84ab6d0 ctdb-recoverd/vacuum: move two variables into scope.
       via  9e5cf6f ctdb-recoverd/vacuum: remove unneeded prototype.
      from  c1c07b4 nsswitch: Extend idmap_rfc2307 testcase for reverse lookup

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 07211343d461275f9f5feddcbf95e36225bd059a
Author: Christof Schmitt <cs at samba.org>
Date:   Thu Jun 4 13:28:55 2015 -0700

    docs: Reference ldap ssl options in idmap_rfc2307 manpage
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Fri Jun  5 14:18:01 CEST 2015 on sn-devel-104

commit 9f57244bbd1ffa203a1f50bb289789628c4a3f66
Author: Jeremy Allison <jra at samba.org>
Date:   Thu May 28 11:07:41 2015 -0700

    s3: libsmbclient: Re-resolving targetcli on every read/write/lseek/ftruncate/close is both incorrect and slow.
    
    Cache targetcli on file open in the SMBCFILE struct.
    
    Bug 11295 - Excessive cli_resolve_path() usage can slow down transmission.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=11295
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 941669ae36ab696b893b1b02b1caa69c867fb6b0
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Jun 5 16:36:08 2015 +1000

    ctdb-recovered: Drop unused variable
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 2e2dba8d138c9a2e3bded22808e3557c8c11dd84
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Fri Jun 5 16:35:48 2015 +1000

    ctdb-recoverd/vacuum: Remove vacuum_info structure
    
    For all the records listed in VACUUM_FETCH, migration requests are sent
    immediately without waiting.  This means there can only be a single
    VACUUM_FETCH processing active at a time.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 92d1486b87d6e06b957ff63f9033eb0d4fd5a164
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 2 22:17:03 2015 +0200

    ctdb-recoverd/vacuum: move fetch loop back into fetch handler.
    
    With the processing of one element factored out,
    it is more natural to have the actual loop inside the
    handler function. This also makes the talloc/free
    bracked around the loop more obvious.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 4103463ad20b23d5c0a4ca0a296fc8f951e473c2
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 2 22:16:17 2015 +0200

    ctdb-recoverd/vacuum: slightly reorder the vacuum fetch loop
    
    Reads more naturally this way, imho.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit a1c941be6fc68cdb27667eeb2fac9c4a2e0f7c3c
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 2 21:57:54 2015 +0200

    ctdb-recoverd/vacuum: add common exit point to vacuum_fetch_handler
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 9092617888f842f335194615f29855405b5ee63e
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 2 21:39:00 2015 +0200

    ctdb-recoverd/vacuum: factor vacuum_fetch_process_one out of vacuum_fetch_loop
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 84ab6d003a9e0b0d5b9f67032d9769eb6b06c127
Author: Michael Adam <obnox at samba.org>
Date:   Tue Jun 2 21:27:16 2015 +0200

    ctdb-recoverd/vacuum: move two variables into scope.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 9e5cf6fd5ccd9ac64287373902b1df628f5b4fd8
Author: Michael Adam <obnox at samba.org>
Date:   Thu May 28 01:06:25 2015 +0200

    ctdb-recoverd/vacuum: remove unneeded prototype.
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

-----------------------------------------------------------------------

Summary of changes:
 ctdb/server/ctdb_recoverd.c           | 195 +++++++++++---------------------
 docs-xml/manpages/idmap_rfc2307.8.xml |   6 +
 source3/include/libsmb_internal.h     |   5 +
 source3/libsmb/libsmb_file.c          | 202 +++-------------------------------
 4 files changed, 91 insertions(+), 317 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index e76a0d0..3a090b0 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -233,7 +233,6 @@ struct ctdb_recoverd {
 	uint32_t node_flags;
 	struct timed_event *send_election_te;
 	struct timed_event *election_timeout;
-	struct vacuum_info *vacuum_info;
 	struct srvid_requests *reallocate_requests;
 	struct ctdb_op_state *takeover_run;
 	struct ctdb_op_state *recovery;
@@ -989,17 +988,6 @@ static int update_vnnmap_on_all_nodes(struct ctdb_context *ctdb, struct ctdb_nod
 }
 
 
-struct vacuum_info {
-	struct vacuum_info *next, *prev;
-	struct ctdb_recoverd *rec;
-	uint32_t srcnode;
-	struct ctdb_db_context *ctdb_db;
-	struct ctdb_marshall_buffer *recs;
-	struct ctdb_rec_data *r;
-};
-
-static void vacuum_fetch_next(struct vacuum_info *v);
-
 /*
   called when a vacuum fetch has completed - just free it and do the next one
  */
@@ -1009,81 +997,66 @@ static void vacuum_fetch_callback(struct ctdb_client_call_state *state)
 }
 
 
-/*
-  process the next element from the vacuum list
-*/
-static void vacuum_fetch_next(struct vacuum_info *v)
+/**
+ * Process one elements of the vacuum fetch list:
+ * Migrate it over to us with the special flag
+ * CTDB_CALL_FLAG_VACUUM_MIGRATION.
+ */
+static bool vacuum_fetch_process_one(struct ctdb_db_context *ctdb_db,
+				     uint32_t pnn,
+				     struct ctdb_rec_data *r)
 {
+	struct ctdb_client_call_state *state;
+	TDB_DATA data;
+	struct ctdb_ltdb_header *hdr;
 	struct ctdb_call call;
-	struct ctdb_rec_data *r;
-
-	while (v->recs->count) {
-		struct ctdb_client_call_state *state;
-		TDB_DATA data;
-		struct ctdb_ltdb_header *hdr;
-
-		ZERO_STRUCT(call);
-		call.call_id = CTDB_NULL_FUNC;
-		call.flags = CTDB_IMMEDIATE_MIGRATION;
-		call.flags |= CTDB_CALL_FLAG_VACUUM_MIGRATION;
 
-		r = v->r;
-		v->r = (struct ctdb_rec_data *)(r->length + (uint8_t *)r);
-		v->recs->count--;
+	ZERO_STRUCT(call);
+	call.call_id = CTDB_NULL_FUNC;
+	call.flags = CTDB_IMMEDIATE_MIGRATION;
+	call.flags |= CTDB_CALL_FLAG_VACUUM_MIGRATION;
 
-		call.key.dptr = &r->data[0];
-		call.key.dsize = r->keylen;
+	call.key.dptr = &r->data[0];
+	call.key.dsize = r->keylen;
 
-		/* ensure we don't block this daemon - just skip a record if we can't get
-		   the chainlock */
-		if (tdb_chainlock_nonblock(v->ctdb_db->ltdb->tdb, call.key) != 0) {
-			continue;
-		}
-
-		data = tdb_fetch(v->ctdb_db->ltdb->tdb, call.key);
-		if (data.dptr == NULL) {
-			tdb_chainunlock(v->ctdb_db->ltdb->tdb, call.key);
-			continue;
-		}
+	/* ensure we don't block this daemon - just skip a record if we can't get
+	   the chainlock */
+	if (tdb_chainlock_nonblock(ctdb_db->ltdb->tdb, call.key) != 0) {
+		return true;
+	}
 
-		if (data.dsize < sizeof(struct ctdb_ltdb_header)) {
-			free(data.dptr);
-			tdb_chainunlock(v->ctdb_db->ltdb->tdb, call.key);
-			continue;
-		}
-		
-		hdr = (struct ctdb_ltdb_header *)data.dptr;
-		if (hdr->dmaster == v->rec->ctdb->pnn) {
-			/* its already local */
-			free(data.dptr);
-			tdb_chainunlock(v->ctdb_db->ltdb->tdb, call.key);
-			continue;
-		}
+	data = tdb_fetch(ctdb_db->ltdb->tdb, call.key);
+	if (data.dptr == NULL) {
+		tdb_chainunlock(ctdb_db->ltdb->tdb, call.key);
+		return true;
+	}
 
+	if (data.dsize < sizeof(struct ctdb_ltdb_header)) {
 		free(data.dptr);
+		tdb_chainunlock(ctdb_db->ltdb->tdb, call.key);
+		return true;
+	}
 
-		state = ctdb_call_send(v->ctdb_db, &call);
-		tdb_chainunlock(v->ctdb_db->ltdb->tdb, call.key);
-		if (state == NULL) {
-			DEBUG(DEBUG_ERR,(__location__ " Failed to setup vacuum fetch call\n"));
-			talloc_free(v);
-			return;
-		}
-		state->async.fn = vacuum_fetch_callback;
-		state->async.private_data = NULL;
+	hdr = (struct ctdb_ltdb_header *)data.dptr;
+	if (hdr->dmaster == pnn) {
+		/* its already local */
+		free(data.dptr);
+		tdb_chainunlock(ctdb_db->ltdb->tdb, call.key);
+		return true;
 	}
 
-	talloc_free(v);
-}
+	free(data.dptr);
 
+	state = ctdb_call_send(ctdb_db, &call);
+	tdb_chainunlock(ctdb_db->ltdb->tdb, call.key);
+	if (state == NULL) {
+		DEBUG(DEBUG_ERR,(__location__ " Failed to setup vacuum fetch call\n"));
+		return false;
+	}
+	state->async.fn = vacuum_fetch_callback;
+	state->async.private_data = NULL;
 
-/*
-  destroy a vacuum info structure
- */
-static int vacuum_info_destructor(struct vacuum_info *v)
-{
-	DLIST_REMOVE(v->rec->vacuum_info, v);
-	return 0;
+	return true;
 }
 
 
@@ -1102,33 +1075,18 @@ static void vacuum_fetch_handler(struct ctdb_context *ctdb, uint64_t srvid,
 	bool persistent = false;
 	struct ctdb_db_context *ctdb_db;
 	struct ctdb_rec_data *r;
-	uint32_t srcnode;
-	struct vacuum_info *v;
 
 	recs = (struct ctdb_marshall_buffer *)data.dptr;
-	r = (struct ctdb_rec_data *)&recs->data[0];
 
 	if (recs->count == 0) {
-		talloc_free(tmp_ctx);
-		return;
-	}
-
-	srcnode = r->reqid;
-
-	for (v=rec->vacuum_info;v;v=v->next) {
-		if (srcnode == v->srcnode && recs->db_id == v->ctdb_db->db_id) {
-			/* we're already working on records from this node */
-			talloc_free(tmp_ctx);
-			return;
-		}
+		goto done;
 	}
 
 	/* work out if the database is persistent */
 	ret = ctdb_ctrl_getdbmap(ctdb, CONTROL_TIMEOUT(), CTDB_CURRENT_NODE, tmp_ctx, &dbmap);
 	if (ret != 0) {
 		DEBUG(DEBUG_ERR, (__location__ " Unable to get dbids from local node\n"));
-		talloc_free(tmp_ctx);
-		return;
+		goto done;
 	}
 
 	for (i=0;i<dbmap->num;i++) {
@@ -1139,49 +1097,36 @@ static void vacuum_fetch_handler(struct ctdb_context *ctdb, uint64_t srvid,
 	}
 	if (i == dbmap->num) {
 		DEBUG(DEBUG_ERR, (__location__ " Unable to find db_id 0x%x on local node\n", recs->db_id));
-		talloc_free(tmp_ctx);
-		return;		
+		goto done;
 	}
 
 	/* find the name of this database */
 	if (ctdb_ctrl_getdbname(ctdb, CONTROL_TIMEOUT(), CTDB_CURRENT_NODE, recs->db_id, tmp_ctx, &name) != 0) {
 		DEBUG(DEBUG_ERR,(__location__ " Failed to get name of db 0x%x\n", recs->db_id));
-		talloc_free(tmp_ctx);
-		return;
+		goto done;
 	}
 
 	/* attach to it */
 	ctdb_db = ctdb_attach(ctdb, CONTROL_TIMEOUT(), name, persistent, 0);
 	if (ctdb_db == NULL) {
 		DEBUG(DEBUG_ERR,(__location__ " Failed to attach to database '%s'\n", name));
-		talloc_free(tmp_ctx);
-		return;
-	}
-
-	v = talloc_zero(rec, struct vacuum_info);
-	if (v == NULL) {
-		DEBUG(DEBUG_CRIT,(__location__ " Out of memory\n"));
-		talloc_free(tmp_ctx);
-		return;
+		goto done;
 	}
 
-	v->rec = rec;
-	v->srcnode = srcnode;
-	v->ctdb_db = ctdb_db;
-	v->recs = talloc_memdup(v, recs, data.dsize);
-	if (v->recs == NULL) {
-		DEBUG(DEBUG_CRIT,(__location__ " Out of memory\n"));
-		talloc_free(v);
-		talloc_free(tmp_ctx);
-		return;		
-	}
-	v->r = 	(struct ctdb_rec_data *)&v->recs->data[0];
+	r = (struct ctdb_rec_data *)&recs->data[0];
+	while (recs->count) {
+		bool ok;
 
-	DLIST_ADD(rec->vacuum_info, v);
+		ok = vacuum_fetch_process_one(ctdb_db, rec->ctdb->pnn, r);
+		if (!ok) {
+			break;
+		}
 
-	talloc_set_destructor(v, vacuum_info_destructor);
+		r = (struct ctdb_rec_data *)(r->length + (uint8_t *)r);
+		recs->count--;
+	}
 
-	vacuum_fetch_next(v);
+done:
 	talloc_free(tmp_ctx);
 }
 
@@ -1192,10 +1137,7 @@ static void vacuum_fetch_handler(struct ctdb_context *ctdb, uint64_t srvid,
 static void detach_database_handler(struct ctdb_context *ctdb, uint64_t srvid,
 				    TDB_DATA data, void *private_data)
 {
-	struct ctdb_recoverd *rec = talloc_get_type(private_data,
-						    struct ctdb_recoverd);
 	uint32_t db_id;
-	struct vacuum_info *v, *vnext;
 	struct ctdb_db_context *ctdb_db;
 
 	if (data.dsize != sizeof(db_id)) {
@@ -1209,17 +1151,6 @@ static void detach_database_handler(struct ctdb_context *ctdb, uint64_t srvid,
 		return;
 	}
 
-	/* Stop any active vacuum fetch */
-	v = rec->vacuum_info;
-	while (v != NULL) {
-		vnext = v->next;
-
-		if (v->ctdb_db->db_id == db_id) {
-			talloc_free(v);
-		}
-		v = vnext;
-	}
-
 	DLIST_REMOVE(ctdb->db_list, ctdb_db);
 
 	DEBUG(DEBUG_NOTICE, ("Detached from database '%s'\n",
diff --git a/docs-xml/manpages/idmap_rfc2307.8.xml b/docs-xml/manpages/idmap_rfc2307.8.xml
index b9d76f5..dc6a103 100644
--- a/docs-xml/manpages/idmap_rfc2307.8.xml
+++ b/docs-xml/manpages/idmap_rfc2307.8.xml
@@ -36,6 +36,12 @@
 	<para>This id mapping approach allows the reuse of existing
 	LDAP authentication servers that store records in the RFC 2307
 	format.</para>
+
+	<para>When connecting to the LDAP server provided by an AD
+	server, the parameter <smbconfoption name="ldap ssl ads"/>
+	determines whether SSL should be used. When using a
+	stand-alone LDAP server, <smbconfoption name="ldap ssl"/>
+	applies.</para>
 </refsynopsisdiv>
 
 <refsect1>
diff --git a/source3/include/libsmb_internal.h b/source3/include/libsmb_internal.h
index fcdb513..cf51f34 100644
--- a/source3/include/libsmb_internal.h
+++ b/source3/include/libsmb_internal.h
@@ -100,6 +100,11 @@ struct smbc_dir_list {
  */
 struct _SMBCFILE {
 	int cli_fd;
+	/*
+	 * cache of cli_state we opened cli_fd on.
+	 * Due to DFS can be a subsidiary connection to srv->cli
+	 */
+	struct cli_state *targetcli;
 	char *fname;
 	off_t offset;
 	struct _SMBCSRV *srv;
diff --git a/source3/libsmb/libsmb_file.c b/source3/libsmb/libsmb_file.c
index fe57035..29a6a0f 100644
--- a/source3/libsmb/libsmb_file.c
+++ b/source3/libsmb/libsmb_file.c
@@ -144,6 +144,14 @@ SMBC_open_ctx(SMBCCTX *context,
 		file->srv     = srv;
 		file->offset  = 0;
 		file->file    = True;
+		/*
+		 * targetcli is either equal to srv->cli or
+		 * is a subsidiary DFS connection. Either way
+		 * file->cli_fd belongs to it so we must cache
+		 * it for read/write/close, not re-resolve each time.
+		 * Re-resolving is both slow and incorrect.
+		 */
+		file->targetcli = targetcli;
 
 		DLIST_ADD(context->internal->files, file);
 
@@ -228,11 +236,6 @@ SMBC_read_ctx(SMBCCTX *context,
               size_t count)
 {
 	size_t ret;
-	char *server = NULL, *share = NULL, *user = NULL, *password = NULL;
-	char *path = NULL;
-	char *targetpath = NULL;
-	struct cli_state *targetcli = NULL;
-	uint16_t port = 0;
 	TALLOC_CTX *frame = talloc_stackframe();
 	NTSTATUS status;
 
@@ -271,39 +274,10 @@ SMBC_read_ctx(SMBCCTX *context,
 		return -1;
 	}
 
-	/*d_printf(">>>read: parsing %s\n", file->fname);*/
-	if (SMBC_parse_path(frame,
-                            context,
-                            file->fname,
-                            NULL,
-                            &server,
-                            &port,
-                            &share,
-                            &path,
-                            &user,
-                            &password,
-                            NULL)) {
-                errno = EINVAL;
-		TALLOC_FREE(frame);
-                return -1;
-        }
-
-	/*d_printf(">>>read: resolving %s\n", path);*/
-	status = cli_resolve_path(frame, "", context->internal->auth_info,
-				  file->srv->cli, path,
-				  &targetcli, &targetpath);
-	if (!NT_STATUS_IS_OK(status)) {
-		d_printf("Could not resolve %s\n", path);
-                errno = ENOENT;
-		TALLOC_FREE(frame);
-		return -1;
-	}
-	/*d_printf(">>>fstat: resolved path as %s\n", targetpath);*/
-
-	status = cli_read(targetcli, file->cli_fd, (char *)buf, offset,
+	status = cli_read(file->targetcli, file->cli_fd, (char *)buf, offset,
 			  count, &ret);
 	if (!NT_STATUS_IS_OK(status)) {
-		errno = SMBC_errno(context, targetcli);
+		errno = SMBC_errno(context, file->targetcli);
 		TALLOC_FREE(frame);
 		return -1;
 	}
@@ -436,11 +410,6 @@ SMBC_write_ctx(SMBCCTX *context,
                size_t count)
 {
         off_t offset;
-	char *server = NULL, *share = NULL, *user = NULL, *password = NULL;
-	char *path = NULL;
-	char *targetpath = NULL;
-	struct cli_state *targetcli = NULL;
-	uint16_t port = 0;
 	TALLOC_CTX *frame = talloc_stackframe();
 	NTSTATUS status;
 
@@ -468,36 +437,7 @@ SMBC_write_ctx(SMBCCTX *context,
 
         offset = file->offset; /* See "offset" comment in SMBC_read_ctx() */
 
-	/*d_printf(">>>write: parsing %s\n", file->fname);*/
-	if (SMBC_parse_path(frame,
-                            context,
-                            file->fname,
-                            NULL,
-                            &server,
-                            &port,
-                            &share,
-                            &path,
-                            &user,
-                            &password,
-                            NULL)) {
-                errno = EINVAL;
-		TALLOC_FREE(frame);
-                return -1;
-        }
-
-	/*d_printf(">>>write: resolving %s\n", path);*/
-	status = cli_resolve_path(frame, "", context->internal->auth_info,
-				  file->srv->cli, path,
-				  &targetcli, &targetpath);
-	if (!NT_STATUS_IS_OK(status)) {
-		d_printf("Could not resolve %s\n", path);
-                errno = ENOENT;
-		TALLOC_FREE(frame);
-		return -1;
-	}
-	/*d_printf(">>>write: resolved path as %s\n", targetpath);*/
-
-	status = cli_writeall(targetcli, file->cli_fd,
+	status = cli_writeall(file->targetcli, file->cli_fd,
 			      0, (const uint8_t *)buf, offset, count, NULL);
 	if (!NT_STATUS_IS_OK(status)) {
 		errno = map_errno_from_nt_status(status);
@@ -519,14 +459,7 @@ int
 SMBC_close_ctx(SMBCCTX *context,
                SMBCFILE *file)
 {
-        SMBCSRV *srv;
-	char *server = NULL, *share = NULL, *user = NULL, *password = NULL;
-	char *path = NULL;
-	char *targetpath = NULL;
-	uint16_t port = 0;
-	struct cli_state *targetcli = NULL;
 	TALLOC_CTX *frame = talloc_stackframe();
-	NTSTATUS status;
 
 	if (!context || !context->internal->initialized) {
 		errno = EINVAL;
@@ -546,41 +479,13 @@ SMBC_close_ctx(SMBCCTX *context,
 		return smbc_getFunctionClosedir(context)(context, file);
 	}
 
-	/*d_printf(">>>close: parsing %s\n", file->fname);*/
-	if (SMBC_parse_path(frame,
-                            context,
-                            file->fname,
-                            NULL,
-                            &server,
-                            &port,
-                            &share,
-                            &path,
-                            &user,
-                            &password,
-                            NULL)) {
-                errno = EINVAL;
-		TALLOC_FREE(frame);
-                return -1;
-        }
-
-	/*d_printf(">>>close: resolving %s\n", path);*/
-	status = cli_resolve_path(frame, "", context->internal->auth_info,
-				  file->srv->cli, path,
-				  &targetcli, &targetpath);
-	if (!NT_STATUS_IS_OK(status)) {
-		d_printf("Could not resolve %s\n", path);
-                errno = ENOENT;
-		TALLOC_FREE(frame);
-		return -1;
-	}
-	/*d_printf(">>>close: resolved path as %s\n", targetpath);*/
-
-	if (!NT_STATUS_IS_OK(cli_close(targetcli, file->cli_fd))) {
+	if (!NT_STATUS_IS_OK(cli_close(file->targetcli, file->cli_fd))) {
+		SMBCSRV *srv;
 		DEBUG(3, ("cli_close failed on %s. purging server.\n",
 			  file->fname));
 		/* Deallocate slot and remove the server
 		 * from the server cache if unused */
-		errno = SMBC_errno(context, targetcli);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list