Unused so far, but soon we'll call this routine with a basedir that's
somewhere below the share root.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
struct symlink_reparse_struct *lnk = NULL;
NTSTATUS status;
char *target = NULL;
+ char *base_name = NULL;
char *safe_target = NULL;
size_t symlink_redirects = 0;
int ret;
return map_nt_error_from_unix(ret);
}
+ if (basedir != conn->cwd_fsp) {
+ base_name = basedir->fsp_name->base_name;
+ }
+
status = safe_symlink_target_path(mem_ctx,
conn->connectpath,
- NULL,
+ base_name,
target,
lnk->unparsed_path_length,
&safe_target);
return status;
}
name_in = safe_target;
+ basedir = conn->cwd_fsp;
symlink_redirects += 1;