summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
Commit message (Collapse)AuthorAgeFilesLines
* Fix ubsan null pointer passed as argument 2Gary Lockyer2019-05-274-24/+50
| | | | | | | | | | | | Fix ubsan warning null pointer passed as argument 2 when the source pointer is NULL. The calls to memcpy are now guarded by an if (len > 0) Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Gary Lockyer <gary@samba.org> Autobuild-Date(master): Mon May 27 01:29:48 UTC 2019 on sn-devel-184
* s3:libcli: Use GnuTLS MD5 for smb singingAndreas Schneider2019-05-211-24/+69
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4:libcli/raw: add RAW_FILEINFO_NORMALIZED_NAME_INFORMATION supportStefan Metzmacher2019-05-013-12/+16
| | | | | | | | | | This is supported over the wire in SMB 3.1.1 on starting with Windows 10 1803. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13919 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: Make "struct smb2_lock_element" generally usableVolker Lendecke2019-04-011-6/+1
| | | | | | | | This struct will be of interest when we add locking capabilities to libcli/smb/smb2cli* Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/smb2: align struct smb_ioctl.smb2 to [MS-SMB2] namesStefan Metzmacher2019-03-281-7/+8
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13863 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/raw: don't schedule idle handlers on a dead connectionStefan Metzmacher2019-03-281-0/+17
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli: remember return code from maximum accessRalph Boehme2019-02-281-0/+1
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13812 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4:libcli: allow passing an already negotiated connection to ↵Stefan Metzmacher2018-07-241-0/+1
| | | | | | | | | | | smb_composite_connect() It will just do the session setup and tree connect steps. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s4:libcli: add smbcli_transport_raw_init()Stefan Metzmacher2018-07-241-0/+44
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s4:libcli: split out smb_raw_negotiate_fill_transport()Stefan Metzmacher2018-07-241-30/+44
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13308 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* Make sure smbtorture tests can run if someone has set their min protocol ↵Richard Sharpe2017-09-201-0/+4
| | | | | | | | | | above NT1. This code is SMB1 only, and already modifies maxprotocol, so this change is appropriate. Signed-off-by: Richard Sharpe <richard.sharpe@primarydata.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4-libcli: remove some dead prototypesGünther Deschner2017-05-101-1/+0
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli/smb: add max_credits arg to smbXcli_negprot_send()Ralph Boehme2017-03-032-1/+3
| | | | | | | | | | | | | | | This allows source4/torture code to set the option for tests by preparing a struct smbcli_options with max_credits set to some value and pass that to a torture_smb2_connection_ext(). This will be used in subsequent smbtorture test for SMB2 creditting. Behaviour of existing upper layers is unchanged, they simply pass the wanted max credits value to smbXcli_negprot_send() instead of retrofitting it with a call to smb2cli_conn_set_max_credits(). Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/raw: remove unused DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTHStefan Metzmacher2017-02-211-7/+0
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=12262 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* pvfs_open win10 fix, need return SMB2_CREATE_TAG_QFIDouyang.xu2016-08-191-1/+3
| | | | | | | | | | Signed-off-by: kkhaike <kkhaike@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Autobuild-User(master): Uri Simchoni <uri@samba.org> Autobuild-Date(master): Fri Aug 19 09:35:15 CEST 2016 on sn-devel-144
* s4: libcli: Internal SMB1 pid is already stored as and uses 32-bits. Correct ↵Jeremy Allison2016-06-181-1/+1
| | | | | | | getpid() cast. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s4-libcli/raw: Fix compiler errors when building with --address-sanitizerAndrew Bartlett2016-06-161-2/+2
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* CVE-2016-2115: s4:libcli/raw: pass the minprotocol to smb_raw_negotiate*()Stefan Metzmacher2016-04-121-2/+5
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11756 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* CVE-2016-2115: s4:libcli/raw: limit maxprotocol to NT1 in smb_raw_negotiate*()Stefan Metzmacher2016-04-121-0/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11756 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* CVE-2016-2115: s4:libcli/raw: add smbcli_options.min_protocolStefan Metzmacher2016-04-121-0/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11756 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* Make libcli-smb-raw private, for now.Jelmer Vernooij2016-01-131-10/+0
| | | | | | Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-By: Andrew Bartlett <abartlet@samba.org> Reviewed-By: Stefan Metzmacher <metze@samba.org>
* s4:libcli/raw: make sure smbcli_transport_connect_send/recv correctly ↵Stefan Metzmacher2015-06-121-17/+42
| | | | | | | | | | | | | | cleanup on error We need to make sure that we remove any pending writev_send or read_smb_send request before closing the socket fd. As a side effect we always close the socket fd if we don't return success for any any reason. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11316 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4/ntvfs: support FS_SECTOR_SIZE_INFORMATION query-infoDavid Disseldorp2015-03-181-0/+21
| | | | | | | Return the same values as used by s3fs. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4/client: add FS_SECTOR_SIZE_INFORMATION query supportDavid Disseldorp2015-03-182-1/+27
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/raw: make short_name available in bufferRalph Boehme2014-12-042-0/+2
| | | | | | | | | | This will be used in smb2/create AAPL context torture tests, where the server returns an Mac OS X specific data blob in the short name buffer. It's not a string, so the existing string extraction doesn't cut it. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/smb2: add new_epoch to struct smb2_lease_breakStefan Metzmacher2014-11-271-0/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/raw: fix up the max_protocol value for the current transport ↵Stefan Metzmacher2014-11-271-0/+8
| | | | | | | | | | | | | connection This allows the caller to pass PROTOCOL_DEFAULT, which results in PROTOCOL_NT1. As smbcli_transport_init() is about SMB1 only we downgrade to PROTOCOL_NT1 if a higher value (for SMB2 or SMB3) was given. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/raw: use smb_setfsinfo_level in smb_setfsinfoStefan Metzmacher2014-11-251-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli/raw: Make flags2 and offset available to callers of readxChristof Schmitt2014-08-302-0/+4
| | | | | | | This will be used by smbtorture. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* libsmb: Put the "smb2_lease" struct into idlVolker Lendecke2014-06-121-0/+1
| | | | | | | | | | | | This will make it easier in the future to NDR_PRINT a lease and a lease key Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jun 12 03:34:41 CEST 2014 on sn-devel-104
* libcli/smb: move some *TRANSACT_* flags to smb_constants.hStefan Metzmacher2014-01-072-32/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli/smb: move some FILE_* flags to smb_constants.hStefan Metzmacher2014-01-071-16/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* libcli/smb: move Filesystem Attributes defines to smb_constants.hStefan Metzmacher2013-10-171-14/+0
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4:libcli:smb2: add the smb2_capabilities to the smbcli_optionsMichael Adam2013-10-051-0/+1
| | | | | | | | | | | and initialize them in lpcfg_smbcli_options() instead of in smb2_transport_init() as previously. This will allow us to control them from callers later. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:libcli:smb2: add the client_guid to the smbcli_optionsMichael Adam2013-10-051-0/+1
| | | | | | | | | | | | and initialize it in lpcfg_smbcli_options() instead of in smb2_transport_init() as previously. Having the client guid in the smbcli_options will allow us to control them from callers later. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Fix bug #10010 - Missing integer wrap protection in EA list reading can ↵Jeremy Allison2013-08-051-2/+5
| | | | | | | | | | | cause server to loop with DOS. Fix client-side parsing also. Found by David Disseldorp <ddiss@suse.de> Signed-off-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Karolin Seeger <kseeger@samba.org> Autobuild-Date(master): Mon Aug 5 14:39:04 CEST 2013 on sn-devel-104
* build: Build with system md5.h on OpenIndianaAndrew Bartlett2013-06-191-2/+2
| | | | | | | | | | | | | | | | | | | | This changes (again...) our system md5 detection to cope with how OpenIndiana does md5. I'm becoming increasingly convinced this isn't worth our while (we should have just done samba_md5...), but for now this change seems to work on FreeBSD, OpenIndiana and Linux with libbsd. This needs us to rename struct MD5Context -> MD5_CTX, but we provide a config.h define to rename the type bad if MD5_CTX does not exist (it does however exist in the md5.h from libbsd). Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Jun 19 21:32:36 CEST 2013 on sn-devel-104
* libsmb: Move "struct smb2_lease" to commonVolker Lendecke2013-04-301-17/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:libcli/smb2: add support for SMB2 LEASES v2Stefan Metzmacher2013-04-181-1/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4-libcli: Check return value of smbcli_request_setup().Andreas Schneider2013-02-222-0/+6
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s4-libcli: Check return code of smbcli_request_setup().Andreas Schneider2013-02-221-0/+3
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s4:libcli: add a app_instance_id member to the smb2_create input structMichael Adam2012-09-191-1/+3
|
* libcli/smb: move some TCON related defines to smb_constants.hStefan Metzmacher2012-08-011-4/+0
| | | | metze
* s4:libcli/raw: remove unused smbcli_session->user_session_keyStefan Metzmacher2012-08-011-2/+0
| | | | metze
* libcli/smb: pass down smbXcli_tcon to smb1cli_req_create/send() and ↵Stefan Metzmacher2012-07-242-11/+22
| | | | | | | | | smb1cli_trans* metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jul 24 21:22:44 CEST 2012 on sn-devel-104
* s4:libcli/raw: setup a smbXcli_tcon for each smbcli_treeStefan Metzmacher2012-07-243-0/+9
| | | | metze
* s4:libcli/raw: parse extended SMBtconX responsesStefan Metzmacher2012-07-242-0/+6
| | | | metze
* s4:libcli/raw: fix SMBtconX response parsingStefan Metzmacher2012-07-241-2/+2
| | | | metze
* libcli/smb: pass down smbXcli_session to smb1cli_req_create/send() and ↵Stefan Metzmacher2012-07-242-11/+22
| | | | | | | | | smb1cli_trans* metze Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jul 24 00:08:58 CEST 2012 on sn-devel-104
* s4:libcli/raw: setup a smbXcli_session for each smbcli_sessionStefan Metzmacher2012-07-233-1/+16
| | | | metze