[SCM] Samba Shared Repository - branch v4-6-test updated

Karolin Seeger kseeger at samba.org
Wed Dec 13 13:41:02 UTC 2017


The branch, v4-6-test has been updated
       via  822b5da s3: libsmb: Fix reversing of oldname/newname paths when creating a reparse point symlink on Windows from smbclient.
       via  c441234 s3: client: Rename <oldname> to <link_target> in cmd_symlink() and cli_posix_symlink().
       via  3fc3531 pthreadpool: Undo put_job when returning error
       via  b51a271 pthreadpool: Move creating of thread to new function
       via  82f6111 ctdb-daemon: Send STARTUP control after startup event
       via  0d42cfc ctdb-takeover: Send tcp tickles immediately on STARTUP control
       via  7d173bf ctdb-takeover: Refactor code to send tickle lists for all public IPs
      from  730c8f9 vfs_zfsacl: fix compilation error

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-6-test


- Log -----------------------------------------------------------------
commit 822b5da2870c9cca6cc6cc6f4a92001c76e2ad69
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Nov 29 13:16:43 2017 -0800

    s3: libsmb: Fix reversing of oldname/newname paths when creating a reparse point symlink on Windows from smbclient.
    
    This happened as smbd doesn't support reparse points so we couldn't test.
    This was the reverse of the (tested) symlink parameters in the unix extensions
    symlink command.
    
    Rename parameters to link_target instead of oldname so this is clearer.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13172
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit abbc9b9ab793d22bca6a37828f4375ef38c56dd3)
    
    Autobuild-User(v4-6-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-6-test): Wed Dec 13 14:40:01 CET 2017 on sn-devel-144

commit c441234984e17f5cb4a1b259a903faf6185985cb
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Nov 29 13:10:25 2017 -0800

    s3: client: Rename <oldname> to <link_target> in cmd_symlink() and cli_posix_symlink().
    
    Stops us from mixing up the old and new names. Only behavior change
    is correcting the names printed in the error messages.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13172
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 8448dcaa8da78bcb84fca6a000c75e256bce1e77)

commit 3fc35313f09f534e8eed770ab5f583af05c7af4c
Author: Christof Schmitt <cs at samba.org>
Date:   Tue Nov 28 10:59:06 2017 -0700

    pthreadpool: Undo put_job when returning error
    
    When an error is returned to the caller of pthreadpool_add_job, the job
    should not be kept in the internal job array. Otherwise the caller might
    free the data structure and a later worker thread would still reference
    it.
    
    When it is not possible to create a single worker thread, the system
    might be out of resources or hitting a configured limit. In this case
    fall back to calling the job function synchronously instead of raising
    the error to the caller and possibly back to the SMB client.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13170
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 065fb5d94d25d19fc85832bb85aa9e379e8551cc)

commit b51a2712c1fe770a8d98c57e57b57ea83155ca57
Author: Christof Schmitt <cs at samba.org>
Date:   Tue Nov 28 10:49:36 2017 -0700

    pthreadpool: Move creating of thread to new function
    
    No functional change, but this simplifies error handling.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13170
    
    Signed-off-by: Christof Schmitt <cs at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    (cherry picked from commit 949ccc3ea9073a3d38bff28345f644d39177256f)

commit 82f6111ad58b5fdc085d9fd98272040665a3a25f
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Nov 20 15:27:52 2017 +1100

    ctdb-daemon: Send STARTUP control after startup event
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13154
    
    STARTUP control is primarily used to synchronise tcp tickles from running
    nodes to a node which has just started up.  Earlier STARTUP control was
    sent (using BROADCAST_ALL) after setup event.  Once the other nodes in
    the cluster connected to this node, the queued up messages would be sent
    and the tcp tickles would get synchronised.
    
    Recent fix to drop messages to disconnected or not-yet-connected nodes,
    the STARTUP control was never sent to the remote nodes and the tcp
    tickles did not get synchronised.
    
    To fix this problem send the STARTUP control (using BROADCAST_CONNECTED)
    after startup event.  By this time all the running nodes in the cluster
    are connected.
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    
    Autobuild-User(master): Martin Schwenke <martins at samba.org>
    Autobuild-Date(master): Thu Nov 30 15:29:48 CET 2017 on sn-devel-144
    
    (cherry picked from commit d7a5cd589b7b16d625dbc64dac21a1384519e32b)

commit 0d42cfcd51c8c82f433255963d4ec5eb594d710e
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Nov 20 15:37:39 2017 +1100

    ctdb-takeover: Send tcp tickles immediately on STARTUP control
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13154
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    (cherry picked from commit 73e261b48c4abc91e00775ac7437752c9640e5bd)

commit 7d173bfcc555f186c7c1decc989b1fc60c1155bb
Author: Amitay Isaacs <amitay at gmail.com>
Date:   Mon Nov 20 15:17:15 2017 +1100

    ctdb-takeover: Refactor code to send tickle lists for all public IPs
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13154
    
    Signed-off-by: Amitay Isaacs <amitay at gmail.com>
    Reviewed-by: Martin Schwenke <martin at meltin.net>
    (cherry picked from commit 2b253f6b1bc4e765f3fcb614a3b67b14084a625d)

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

Summary of changes:
 ctdb/server/ctdb_daemon.c             |   6 --
 ctdb/server/ctdb_monitor.c            |   6 ++
 ctdb/server/ctdb_takeover.c           |  59 ++++++++++---------
 source3/client/client.c               |  15 ++---
 source3/lib/pthreadpool/pthreadpool.c | 103 +++++++++++++++++++++++-----------
 source3/libsmb/clifile.c              |  15 ++---
 source3/libsmb/clisymlink.c           |  14 ++---
 7 files changed, 132 insertions(+), 86 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 4d6987a..80f205e 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -1085,12 +1085,6 @@ static void ctdb_setup_event_callback(struct ctdb_context *ctdb, int status,
 	}
 	ctdb_run_notification_script(ctdb, "setup");
 
-	/* tell all other nodes we've just started up */
-	ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_ALL,
-				 0, CTDB_CONTROL_STARTUP, 0,
-				 CTDB_CTRL_FLAG_NOREPLY,
-				 tdb_null, NULL, NULL);
-
 	/* Start the recovery daemon */
 	if (ctdb_start_recoverd(ctdb) != 0) {
 		DEBUG(DEBUG_ALERT,("Failed to start recovery daemon\n"));
diff --git a/ctdb/server/ctdb_monitor.c b/ctdb/server/ctdb_monitor.c
index 738acb1..1864887 100644
--- a/ctdb/server/ctdb_monitor.c
+++ b/ctdb/server/ctdb_monitor.c
@@ -243,6 +243,12 @@ static void ctdb_startup_callback(struct ctdb_context *ctdb, int status, void *p
 
 	ctdb->monitor->monitoring_mode = CTDB_MONITORING_ENABLED;
 
+	/* tell all other nodes we've just started up */
+	ctdb_daemon_send_control(ctdb, CTDB_BROADCAST_CONNECTED,
+				 0, CTDB_CONTROL_STARTUP, 0,
+				 CTDB_CTRL_FLAG_NOREPLY,
+				 tdb_null, NULL, NULL);
+
 	tevent_add_timer(ctdb->ev, ctdb->monitor->monitor_context,
 			 timeval_current_ofs(ctdb->monitor->next_interval, 0),
 			 ctdb_check_health, ctdb);
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index 513da63..b7fab09 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -1495,24 +1495,23 @@ int32_t ctdb_control_tcp_remove(struct ctdb_context *ctdb, TDB_DATA indata)
 }
 
 
+static void ctdb_send_set_tcp_tickles_for_all(struct ctdb_context *ctdb,
+					      bool force);
+
 /*
   Called when another daemon starts - causes all tickles for all
   public addresses we are serving to be sent to the new node on the
-  next check.  This actually causes the next scheduled call to
-  tdb_update_tcp_tickles() to update all nodes.  This is simple and
+  next check.  This actually causes the tickles to be sent to the
+  other node immediately.  In case there is an error, the periodic
+  timer will send the updates on timer event.  This is simple and
   doesn't require careful error handling.
  */
 int32_t ctdb_control_startup(struct ctdb_context *ctdb, uint32_t pnn)
 {
-	struct ctdb_vnn *vnn;
-
 	DEBUG(DEBUG_INFO, ("Received startup control from node %lu\n",
 			   (unsigned long) pnn));
 
-	for (vnn = ctdb->vnn; vnn != NULL; vnn = vnn->next) {
-		vnn->tcp_update_needed = true;
-	}
-
+	ctdb_send_set_tcp_tickles_for_all(ctdb, true);
 	return 0;
 }
 
@@ -1995,43 +1994,53 @@ static int ctdb_send_set_tcp_tickles_for_ip(struct ctdb_context *ctdb,
 	return ret;
 }
 
-
-/*
-  perform tickle updates if required
- */
-static void ctdb_update_tcp_tickles(struct tevent_context *ev,
-				    struct tevent_timer *te,
-				    struct timeval t, void *private_data)
+static void ctdb_send_set_tcp_tickles_for_all(struct ctdb_context *ctdb,
+					      bool force)
 {
-	struct ctdb_context *ctdb = talloc_get_type(private_data, struct ctdb_context);
-	int ret;
 	struct ctdb_vnn *vnn;
+	int ret;
 
-	for (vnn=ctdb->vnn;vnn;vnn=vnn->next) {
-		/* we only send out updates for public addresses that 
+	for (vnn = ctdb->vnn; vnn != NULL; vnn = vnn->next) {
+		/* we only send out updates for public addresses that
 		   we have taken over
 		 */
 		if (ctdb->pnn != vnn->pnn) {
 			continue;
 		}
+
 		/* We only send out the updates if we need to */
-		if (!vnn->tcp_update_needed) {
+		if (!force && !vnn->tcp_update_needed) {
 			continue;
 		}
+
 		ret = ctdb_send_set_tcp_tickles_for_ip(ctdb,
 						       &vnn->public_address,
 						       vnn->tcp_array);
 		if (ret != 0) {
-			DEBUG(DEBUG_ERR,("Failed to send the tickle update for public address %s\n",
-				ctdb_addr_to_str(&vnn->public_address)));
+			D_ERR("Failed to send the tickle update for ip %s\n",
+			      ctdb_addr_to_str(&vnn->public_address));
+			vnn->tcp_update_needed = true;
 		} else {
-			DEBUG(DEBUG_INFO,
-			      ("Sent tickle update for public address %s\n",
-			       ctdb_addr_to_str(&vnn->public_address)));
+			D_INFO("Sent tickle update for ip %s\n",
+			       ctdb_addr_to_str(&vnn->public_address));
 			vnn->tcp_update_needed = false;
 		}
 	}
 
+}
+
+/*
+  perform tickle updates if required
+ */
+static void ctdb_update_tcp_tickles(struct tevent_context *ev,
+				    struct tevent_timer *te,
+				    struct timeval t, void *private_data)
+{
+	struct ctdb_context *ctdb = talloc_get_type(
+		private_data, struct ctdb_context);
+
+	ctdb_send_set_tcp_tickles_for_all(ctdb, false);
+
 	tevent_add_timer(ctdb->ev, ctdb->tickle_update_context,
 			 timeval_current_ofs(ctdb->tunable.tickle_update_interval, 0),
 			 ctdb_update_tcp_tickles, ctdb);
diff --git a/source3/client/client.c b/source3/client/client.c
index 0900df1..4fefc99 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3331,7 +3331,7 @@ static int cmd_readlink(void)
 static int cmd_symlink(void)
 {
 	TALLOC_CTX *ctx = talloc_tos();
-	char *oldname = NULL;
+	char *link_target = NULL;
 	char *newname = NULL;
 	char *buf = NULL;
 	char *buf2 = NULL;
@@ -3340,11 +3340,11 @@ static int cmd_symlink(void)
 
 	if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
 	    !next_token_talloc(ctx, &cmd_ptr,&buf2,NULL)) {
-		d_printf("symlink <oldname> <newname>\n");
+		d_printf("symlink <link_target> <newname>\n");
 		return 1;
 	}
 	/* Oldname (link target) must be an untouched blob. */
-	oldname = buf;
+	link_target = buf;
 
 	if (SERVER_HAS_UNIX_CIFS(cli)) {
 		newname = talloc_asprintf(ctx, "%s%s", client_get_cur_dir(),
@@ -3360,19 +3360,20 @@ static int cmd_symlink(void)
 		status = cli_resolve_path(ctx, "", auth_info, cli, newname,
 					  &newcli, &newname);
 		if (!NT_STATUS_IS_OK(status)) {
-			d_printf("link %s: %s\n", oldname, nt_errstr(status));
+			d_printf("link %s: %s\n", newname,
+				nt_errstr(status));
 			return 1;
 		}
-		status = cli_posix_symlink(newcli, oldname, newname);
+		status = cli_posix_symlink(newcli, link_target, newname);
 	} else {
 		status = cli_symlink(
-			cli, oldname, buf2,
+			cli, link_target, buf2,
 			buf2[0] == '\\' ? 0 : SYMLINK_FLAG_RELATIVE);
 	}
 
 	if (!NT_STATUS_IS_OK(status)) {
 		d_printf("%s symlinking files (%s -> %s)\n",
-			 nt_errstr(status), oldname, newname);
+			 nt_errstr(status), newname, link_target);
 		return 1;
 	}
 
diff --git a/source3/lib/pthreadpool/pthreadpool.c b/source3/lib/pthreadpool/pthreadpool.c
index 23885aa..309aba9 100644
--- a/source3/lib/pthreadpool/pthreadpool.c
+++ b/source3/lib/pthreadpool/pthreadpool.c
@@ -429,6 +429,11 @@ static bool pthreadpool_put_job(struct pthreadpool *p,
 	return true;
 }
 
+static void pthreadpool_undo_put_job(struct pthreadpool *p)
+{
+	p->num_jobs -= 1;
+}
+
 static void *pthreadpool_server(void *arg)
 {
 	struct pthreadpool *pool = (struct pthreadpool *)arg;
@@ -521,14 +526,56 @@ static void *pthreadpool_server(void *arg)
 	}
 }
 
-int pthreadpool_add_job(struct pthreadpool *pool, int job_id,
-			void (*fn)(void *private_data), void *private_data)
+static int pthreadpool_create_thread(struct pthreadpool *pool)
 {
 	pthread_attr_t thread_attr;
 	pthread_t thread_id;
 	int res;
 	sigset_t mask, omask;
 
+	/*
+	 * Create a new worker thread. It should not receive any signals.
+	 */
+
+	sigfillset(&mask);
+
+	res = pthread_attr_init(&thread_attr);
+	if (res != 0) {
+		return res;
+	}
+
+	res = pthread_attr_setdetachstate(
+		&thread_attr, PTHREAD_CREATE_DETACHED);
+	if (res != 0) {
+		pthread_attr_destroy(&thread_attr);
+		return res;
+	}
+
+	res = pthread_sigmask(SIG_BLOCK, &mask, &omask);
+	if (res != 0) {
+		pthread_attr_destroy(&thread_attr);
+		return res;
+	}
+
+	res = pthread_create(&thread_id, &thread_attr, pthreadpool_server,
+			     (void *)pool);
+
+	assert(pthread_sigmask(SIG_SETMASK, &omask, NULL) == 0);
+
+	pthread_attr_destroy(&thread_attr);
+
+	if (res == 0) {
+		pool->num_threads += 1;
+	}
+
+	return res;
+}
+
+int pthreadpool_add_job(struct pthreadpool *pool, int job_id,
+			void (*fn)(void *private_data), void *private_data)
+{
+	int res;
+
 	res = pthread_mutex_lock(&pool->mutex);
 	if (res != 0) {
 		return res;
@@ -557,6 +604,9 @@ int pthreadpool_add_job(struct pthreadpool *pool, int job_id,
 		 * We have idle threads, wake one.
 		 */
 		res = pthread_cond_signal(&pool->condvar);
+		if (res != 0) {
+			pthreadpool_undo_put_job(pool);
+		}
 		pthread_mutex_unlock(&pool->mutex);
 		return res;
 	}
@@ -570,43 +620,28 @@ int pthreadpool_add_job(struct pthreadpool *pool, int job_id,
 		return 0;
 	}
 
-	/*
-	 * Create a new worker thread. It should not receive any signals.
-	 */
-
-	sigfillset(&mask);
-
-	res = pthread_attr_init(&thread_attr);
-	if (res != 0) {
-		pthread_mutex_unlock(&pool->mutex);
-		return res;
-	}
-
-	res = pthread_attr_setdetachstate(
-		&thread_attr, PTHREAD_CREATE_DETACHED);
+	res = pthreadpool_create_thread(pool);
 	if (res != 0) {
-		pthread_attr_destroy(&thread_attr);
-		pthread_mutex_unlock(&pool->mutex);
-		return res;
-	}
+		if (pool->num_threads == 0) {
+			/*
+			 * No thread could be created to run job,
+			 * fallback to sync call.
+			 */
+			pthreadpool_undo_put_job(pool);
+			pthread_mutex_unlock(&pool->mutex);
 
-        res = pthread_sigmask(SIG_BLOCK, &mask, &omask);
-	if (res != 0) {
-		pthread_attr_destroy(&thread_attr);
-		pthread_mutex_unlock(&pool->mutex);
-		return res;
-	}
+			fn(private_data);
+			return pool->signal_fn(job_id, fn, private_data,
+					       pool->signal_fn_private_data);
+		}
 
-	res = pthread_create(&thread_id, &thread_attr, pthreadpool_server,
-			     (void *)pool);
-	if (res == 0) {
-		pool->num_threads += 1;
+		/*
+		 * At least one thread is still available, let
+		 * that one run the queued job.
+		 */
+		res = 0;
 	}
 
-        assert(pthread_sigmask(SIG_SETMASK, &omask, NULL) == 0);
-
-	pthread_attr_destroy(&thread_attr);
-
 	pthread_mutex_unlock(&pool->mutex);
 	return res;
 }
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 03dd640..a10701b 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -151,7 +151,7 @@ NTSTATUS cli_setpathinfo(struct cli_state *cli,
 
 /****************************************************************************
  Hard/Symlink a file (UNIX extensions).
- Creates new name (sym)linked to oldname.
+ Creates new name (sym)linked to link_target.
 ****************************************************************************/
 
 struct cli_posix_link_internal_state {
@@ -164,7 +164,7 @@ static struct tevent_req *cli_posix_link_internal_send(TALLOC_CTX *mem_ctx,
 					struct tevent_context *ev,
 					struct cli_state *cli,
 					uint16_t level,
-					const char *oldname,
+					const char *link_target,
 					const char *newname)
 {
 	struct tevent_req *req = NULL, *subreq = NULL;
@@ -182,7 +182,8 @@ static struct tevent_req *cli_posix_link_internal_send(TALLOC_CTX *mem_ctx,
 		return tevent_req_post(req, ev);
 	}
 	state->data = trans2_bytes_push_str(
-		state->data, smbXcli_conn_use_unicode(cli->conn), oldname, strlen(oldname)+1, NULL);
+		state->data, smbXcli_conn_use_unicode(cli->conn),
+		link_target, strlen(link_target)+1, NULL);
 
 	subreq = cli_setpathinfo_send(
 		state, ev, cli, level, newname,
@@ -207,11 +208,11 @@ static void cli_posix_link_internal_done(struct tevent_req *subreq)
 struct tevent_req *cli_posix_symlink_send(TALLOC_CTX *mem_ctx,
 					struct tevent_context *ev,
 					struct cli_state *cli,
-					const char *oldname,
+					const char *link_target,
 					const char *newname)
 {
 	return cli_posix_link_internal_send(
-		mem_ctx, ev, cli, SMB_SET_FILE_UNIX_LINK, oldname, newname);
+		mem_ctx, ev, cli, SMB_SET_FILE_UNIX_LINK, link_target, newname);
 }
 
 NTSTATUS cli_posix_symlink_recv(struct tevent_req *req)
@@ -220,7 +221,7 @@ NTSTATUS cli_posix_symlink_recv(struct tevent_req *req)
 }
 
 NTSTATUS cli_posix_symlink(struct cli_state *cli,
-			const char *oldname,
+			const char *link_target,
 			const char *newname)
 {
 	TALLOC_CTX *frame = talloc_stackframe();
@@ -245,7 +246,7 @@ NTSTATUS cli_posix_symlink(struct cli_state *cli,
 	req = cli_posix_symlink_send(frame,
 				ev,
 				cli,
-				oldname,
+				link_target,
 				newname);
 	if (req == NULL) {
 		status = NT_STATUS_NO_MEMORY;
diff --git a/source3/libsmb/clisymlink.c b/source3/libsmb/clisymlink.c
index 496e3e1..a52f6ff 100644
--- a/source3/libsmb/clisymlink.c
+++ b/source3/libsmb/clisymlink.c
@@ -31,7 +31,7 @@
 struct cli_symlink_state {
 	struct tevent_context *ev;
 	struct cli_state *cli;
-	const char *oldpath;
+	const char *link_target;
 	const char *newpath;
 	uint32_t flags;
 
@@ -49,7 +49,7 @@ static void cli_symlink_close_done(struct tevent_req *subreq);
 struct tevent_req *cli_symlink_send(TALLOC_CTX *mem_ctx,
 				    struct tevent_context *ev,
 				    struct cli_state *cli,
-				    const char *oldpath,
+				    const char *link_target,
 				    const char *newpath,
 				    uint32_t flags)
 {
@@ -62,12 +62,12 @@ struct tevent_req *cli_symlink_send(TALLOC_CTX *mem_ctx,
 	}
 	state->ev = ev;
 	state->cli = cli;
-	state->oldpath = oldpath;
+	state->link_target = link_target;
 	state->newpath = newpath;
 	state->flags = flags;
 
 	subreq = cli_ntcreate_send(
-		state, ev, cli, state->oldpath, 0,
+		state, ev, cli, state->newpath, 0,
 		SYNCHRONIZE_ACCESS|DELETE_ACCESS|
 		FILE_READ_ATTRIBUTES|FILE_WRITE_ATTRIBUTES,
 		FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE, FILE_CREATE,
@@ -102,7 +102,7 @@ static void cli_symlink_create_done(struct tevent_req *subreq)
 	SCVAL(state->setup, 7, 0); /* IsFlags */
 
 	if (!symlink_reparse_buffer_marshall(
-		    state->newpath, NULL, state->flags, state,
+		    state->link_target, NULL, state->flags, state,
 		    &data, &data_len)) {
 		tevent_req_oom(req);
 		return;
@@ -197,7 +197,7 @@ NTSTATUS cli_symlink_recv(struct tevent_req *req)
 	return tevent_req_simple_recv_ntstatus(req);
 }
 
-NTSTATUS cli_symlink(struct cli_state *cli, const char *oldname,
+NTSTATUS cli_symlink(struct cli_state *cli, const char *link_target,
 		     const char *newname, uint32_t flags)
 {
 	TALLOC_CTX *frame = talloc_stackframe();
@@ -213,7 +213,7 @@ NTSTATUS cli_symlink(struct cli_state *cli, const char *oldname,
 	if (ev == NULL) {
 		goto fail;
 	}
-	req = cli_symlink_send(frame, ev, cli, oldname, newname, flags);
+	req = cli_symlink_send(frame, ev, cli, link_target, newname, flags);
 	if (req == NULL) {
 		goto fail;
 	}


-- 
Samba Shared Repository



More information about the samba-cvs mailing list