summaryrefslogtreecommitdiff
path: root/source3/client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2017-11-29 13:10:25 -0800
committerVolker Lendecke <vl@samba.org>2017-11-30 15:30:23 +0100
commit8448dcaa8da78bcb84fca6a000c75e256bce1e77 (patch)
treeaef27afa59c1160894787eca5ec770cd32d7546c /source3/client
parentd7a5cd589b7b16d625dbc64dac21a1384519e32b (diff)
downloadsamba-8448dcaa8da78bcb84fca6a000c75e256bce1e77.tar.gz
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@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/client')
-rw-r--r--source3/client/client.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source3/client/client.c b/source3/client/client.c
index 754907d2e09..ad10a5381dd 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -3523,7 +3523,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;
@@ -3532,11 +3532,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(),
@@ -3553,19 +3553,20 @@ static int cmd_symlink(void)
popt_get_cmdline_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;
}