}
/* The following call can change the cwd. */
- status = get_referred_path(ctx, r->in.path, jn,
- &consumedcnt, &self_ref);
+ status = get_referred_path(ctx, r->in.path, smbd_server_conn, jn,
+ &consumedcnt, &self_ref);
if(!NT_STATUS_IS_OK(status)) {
return ntstatus_to_werror(status);
}
bool found = False;
TALLOC_CTX *ctx = talloc_tos();
char *altpath = NULL;
+ NTSTATUS status;
if (p->session_info->unix_token->uid != sec_initial_uid()) {
DEBUG(10,("_dfs_remove: uid != 0. Access denied.\n"));
r->in.dfs_entry_path, r->in.servername, r->in.sharename));
}
- if(!NT_STATUS_IS_OK(get_referred_path(ctx, r->in.dfs_entry_path, jn,
- &consumedcnt, &self_ref))) {
+ status = get_referred_path(ctx, r->in.dfs_entry_path, smbd_server_conn,
+ jn, &consumedcnt, &self_ref);
+ if(!NT_STATUS_IS_OK(status)) {
return WERR_DFS_NO_SUCH_VOL;
}
bool self_ref = False;
TALLOC_CTX *ctx = talloc_tos();
bool ret;
+ NTSTATUS status;
jn = talloc_zero(ctx, struct junction_map);
if (!jn) {
}
/* The following call can change the cwd. */
- if(!NT_STATUS_IS_OK(get_referred_path(ctx, r->in.dfs_entry_path,
- jn, &consumedcnt, &self_ref)) ||
+ status = get_referred_path(ctx, r->in.dfs_entry_path, smbd_server_conn,
+ jn, &consumedcnt, &self_ref);
+ if(!NT_STATUS_IS_OK(status) ||
consumedcnt < strlen(r->in.dfs_entry_path)) {
return WERR_DFS_NO_SUCH_VOL;
}
NTSTATUS get_referred_path(TALLOC_CTX *ctx,
const char *dfs_path,
+ struct smbd_server_connection *sconn,
struct junction_map *jucn,
int *consumedcntp,
bool *self_referralp)
*self_referralp = False;
- status = parse_dfs_path(NULL, dfs_path, False,
- !smbd_server_conn->using_smb2, pdp, &dummy);
+ status = parse_dfs_path(NULL, dfs_path, False, !sconn->using_smb2,
+ pdp, &dummy);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
return NT_STATUS_OK;
}
- status = create_conn_struct(ctx, smbd_server_conn, &conn, snum,
+ status = create_conn_struct(ctx, sconn, &conn, snum,
lp_pathname(snum), NULL, &oldpath);
if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(pdp);
}
/* The following call can change cwd. */
- *pstatus = get_referred_path(ctx, pathnamep, junction,
- &consumedcnt, &self_referral);
+ *pstatus = get_referred_path(ctx, pathnamep, smbd_server_conn,
+ junction, &consumedcnt, &self_referral);
if (!NT_STATUS_IS_OK(*pstatus)) {
vfs_ChDir(orig_conn,orig_conn->connectpath);
talloc_destroy(ctx);