From: Volker Lendecke Date: Mon, 9 Nov 2020 20:43:19 +0000 (+0100) Subject: libsmb: Remove unused sync cli_smb2_set_security_descriptor() X-Git-Tag: samba-4.14.0rc1~607 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97fca81af098dd99a40a15aa181b4b32ed2e874a;p=thirdparty%2Fsamba.git libsmb: Remove unused sync cli_smb2_set_security_descriptor() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index d6c45aea5fc..6f015123272 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -2799,60 +2799,6 @@ fail: return status; } -/*************************************************************** - Wrapper that allows SMB2 to set a security descriptor. - Synchronous only. -***************************************************************/ - -NTSTATUS cli_smb2_set_security_descriptor(struct cli_state *cli, - uint16_t fnum, - uint32_t sec_info, - const struct security_descriptor *sd) -{ - NTSTATUS status; - DATA_BLOB inbuf = data_blob_null; - TALLOC_CTX *frame = talloc_stackframe(); - - if (smbXcli_conn_has_async_calls(cli->conn)) { - /* - * Can't use sync call while an async call is in flight - */ - status = NT_STATUS_INVALID_PARAMETER; - goto fail; - } - - if (smbXcli_conn_protocol(cli->conn) < PROTOCOL_SMB2_02) { - status = NT_STATUS_INVALID_PARAMETER; - goto fail; - } - - status = marshall_sec_desc(frame, - sd, - &inbuf.data, - &inbuf.length); - - if (!NT_STATUS_IS_OK(status)) { - goto fail; - } - - /* setinfo on the returned handle with info_type SMB2_SETINFO_SEC (3) */ - - status = cli_smb2_set_info_fnum( - cli, - fnum, - 3, /* in_info_type */ - 0, /* in_file_info_class */ - &inbuf, /* in_input_buffer */ - sec_info); /* in_additional_info */ - - fail: - - cli->raw_status = status; - - TALLOC_FREE(frame); - return status; -} - struct cli_smb2_mxac_state { struct tevent_context *ev; struct cli_state *cli; diff --git a/source3/libsmb/cli_smb2_fnum.h b/source3/libsmb/cli_smb2_fnum.h index 4afd773a152..afcbc2d105f 100644 --- a/source3/libsmb/cli_smb2_fnum.h +++ b/source3/libsmb/cli_smb2_fnum.h @@ -204,10 +204,6 @@ NTSTATUS cli_smb2_get_fs_volume_info(struct cli_state *cli, char **_volume_name, uint32_t *pserial_number, time_t *pdate); -NTSTATUS cli_smb2_set_security_descriptor(struct cli_state *cli, - uint16_t fnum, - uint32_t sec_info, - const struct security_descriptor *sd); struct tevent_req *cli_smb2_query_mxac_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct cli_state *cli,