#include "system/time.h"
#include "system/filesys.h"
#include "smbd/smbd.h"
+#include "smbd/globals.h"
#include "ntioctl.h"
#include "smbprofile.h"
#include "../libcli/security/security.h"
}
/* The following call can change cwd. */
- status = get_referred_path(r, pathnamep, handle->conn->sconn,
+ status = get_referred_path(r, pathnamep,
+ !handle->conn->sconn->using_smb2,
junction, &consumedcnt, &self_referral);
if (!NT_STATUS_IS_OK(status)) {
vfs_ChDir(handle->conn, handle->conn->connectpath);
}
/* The following call can change the cwd. */
- status = get_referred_path(ctx, r->in.path, smbd_server_conn, jn,
- &consumedcnt, &self_ref);
+ status = get_referred_path(ctx, r->in.path,
+ true, /*allow_broken_path */
+ jn, &consumedcnt, &self_ref);
if(!NT_STATUS_IS_OK(status)) {
return ntstatus_to_werror(status);
}
r->in.dfs_entry_path, r->in.servername, r->in.sharename));
}
- status = get_referred_path(ctx, r->in.dfs_entry_path, smbd_server_conn,
+ status = get_referred_path(ctx, r->in.dfs_entry_path,
+ true, /*allow_broken_path */
jn, &consumedcnt, &self_ref);
if(!NT_STATUS_IS_OK(status)) {
return WERR_DFS_NO_SUCH_VOL;
}
/* The following call can change the cwd. */
- status = get_referred_path(ctx, r->in.dfs_entry_path, smbd_server_conn,
+ status = get_referred_path(ctx, r->in.dfs_entry_path,
+ true, /*allow_broken_path */
jn, &consumedcnt, &self_ref);
if(!NT_STATUS_IS_OK(status) ||
consumedcnt < strlen(r->in.dfs_entry_path)) {
NTSTATUS get_referred_path(TALLOC_CTX *ctx,
const char *dfs_path,
- struct smbd_server_connection *sconn,
+ bool allow_broken_path,
struct junction_map *jucn,
int *consumedcntp,
bool *self_referralp)
*self_referralp = False;
- status = parse_dfs_path(NULL, dfs_path, False, !sconn->using_smb2,
+ status = parse_dfs_path(NULL, dfs_path, False, allow_broken_path,
pdp, &dummy);
if (!NT_STATUS_IS_OK(status)) {
return status;