}
state->cli = cli;
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
if (cli->backup_intent) {
create_options |= FILE_OPEN_FOR_BACKUP_INTENT;
}
state->cli = cli;
state->fnum = fnum;
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
status = map_fnum_to_smb2_handle(cli, fnum, &state->ph);
if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
state->cli = cli;
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
/*
* setinfo on the handle with info_type SMB2_SETINFO_FILE (1),
* level 13 (SMB_FILE_DISPOSITION_INFORMATION - 1000).
state->dname = dname;
state->in_cblobs = in_cblobs;
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
subreq = cli_smb2_create_fnum_send(
state,
state->ev,
state->fname = fname;
state->in_cblobs = in_cblobs;
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
subreq = cli_smb2_create_fnum_send(
state, /* mem_ctx */
state->ev, /* tevent_context */
state->cli = cli;
state->status = NT_STATUS_OK;
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
ok = windows_parent_dirname(state, pathname, &parent, &state->mask);
if (!ok) {
tevent_req_oom(req);
return NT_STATUS_INVALID_PARAMETER;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- return NT_STATUS_INVALID_PARAMETER;
- }
-
/* SMB2 is pickier about pathnames. Ensure it doesn't
end in a '\' */
if (namelen > 0 && name[namelen-1] == '\\') {
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
status = get_fnum_from_path(cli,
name,
FILE_READ_ATTRIBUTES,
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
status = get_fnum_from_path(cli,
name,
FILE_READ_ATTRIBUTES,
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
status = get_fnum_from_path(cli,
name,
FILE_READ_ATTRIBUTES,
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
status = get_fnum_from_path(cli,
name,
FILE_READ_ATTRIBUTES,
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
status = get_fnum_from_path(cli,
name,
FILE_WRITE_ATTRIBUTES,
return NT_STATUS_INVALID_PARAMETER;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- return NT_STATUS_INVALID_PARAMETER;
- }
-
/* setinfo on the handle with info_type SMB2_SETINFO_FILE (1),
level 4 (SMB_FILE_BASIC_INFORMATION - 1000). */
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
/* First open the top level directory. */
status = cli_smb2_create_fnum(cli,
path,
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
/* First open the top level directory. */
status =
cli_smb2_create_fnum(cli, "", 0, /* create_flags */
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
/* First open the top level directory. */
status =
cli_smb2_create_fnum(cli, "", 0, /* create_flags */
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
/* First open the top level directory. */
status =
cli_smb2_create_fnum(cli, "", 0, /* create_flags */
.fname = fname,
};
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
status = smb2_create_blob_add(state,
&state->in_cblobs,
SMB2_CREATE_TAG_MXAC,
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
/* Marshall the SMB2 EA data. */
if (ea_len > 0xFFFF) {
status = NT_STATUS_INVALID_PARAMETER;
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
status = get_fnum_from_path(cli,
name,
FILE_WRITE_EA,
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
status = get_fnum_from_path(cli,
name,
FILE_READ_EA,
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
sid_len = ndr_size_dom_sid(&pqt->sid, 0);
query.return_single = 1;
goto cleanup;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto cleanup;
- }
-
info.restart_scan = first ? 1 : 0;
err = ndr_push_struct_blob(
goto cleanup;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto cleanup;
- }
-
status = cli_smb2_query_info_fnum(
cli,
quota_fnum,
goto cleanup;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto cleanup;
- }
-
status = build_user_quota_buffer(qtl, 0, talloc_tos(), &inbuf, NULL);
if (!NT_STATUS_IS_OK(status)) {
goto cleanup;
goto cleanup;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto cleanup;
- }
-
status = build_fs_quota_buffer(talloc_tos(), pqt, &inbuf, 0);
if (!NT_STATUS_IS_OK(status)) {
goto cleanup;
return NULL;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
state->cli = cli;
state->fnum = fnum;
goto fail;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- status = NT_STATUS_INVALID_PARAMETER;
- goto fail;
- }
-
SBVAL(buf, 0, newsize);
/* setinfo on the handle with info_type SMB2_SETINFO_FILE (1),
return NULL;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
status = map_fnum_to_smb2_handle(cli, fnum, &ph);
if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
return NULL;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
state->cli = cli;
state->fnum = fnum;
return NULL;
}
- if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) {
- tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER);
- return tevent_req_post(req, ev);
- }
-
state->cli = cli;
state->fnum = fnum;