summaryrefslogtreecommitdiff
path: root/source3/include/client.h
AgeCommit message (Collapse)AuthorFilesLines
2025-07-07libsmb: add flags to struct file_infoRalph Boehme1-0/+3
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15862 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2024-08-21libsmb: Remove cli_state->rap_errorVolker Lendecke1-1/+0
I could not find any caller which uses rap_error outside of the routine implementing the rap client call itself. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Wed Aug 21 12:49:45 UTC 2024 on atb-devel-224
2024-08-20libsmb: Remove cli_state->raw_statusVolker Lendecke1-1/+0
All callers which looked at this are gone Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Aug 20 10:57:12 UTC 2024 on atb-devel-224
2024-05-22libsmb: Remove file_info->[ug]idVolker Lendecke1-2/+0
These fields were never assigned Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-10-31libsmb: remove mode from struct file_infoRalph Boehme1-1/+0
There's already the "attr" member and this is even used in list_posix_helper() in pylibsmb.c. While at it, remove the cast in list_posix_helper() by using "I" instead of "i" format. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: David Mulder <dmulder@samba.org>
2023-10-26s3/libsmb: reuse smbXcli_conn_have_posix()Ralph Boehme1-1/+0
We already store the negotiated POSIX state in smbXcli_connection and there we only store it if the server actually supports the version we requested. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2023-10-12smbclient: Always ask for SMB311 posix in negprotVolker Lendecke1-0/+2
This does not mean that we're actually using it (yet). We just probe whether the server is willing to do it. Enable the posix cli command for smb311 posix extensions. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2022-11-29libcli: Add client support for SMB2_FILE_POSIX_INFORMATIONDavid Mulder1-0/+7
Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Volker Lendecke <vl@samba.org>
2022-09-02libsmb: Allow to request SMB311 posix in source3/libsmbVolker Lendecke1-0/+1
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
2020-11-04libsmb: Remove cli_state->dfs_mountpointVolker Lendecke1-3/+0
Not used anymore Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Nov 4 20:17:47 UTC 2020 on sn-devel-184
2020-08-19s3:libsmb: Introduce CLI_FULL_CONNECTION_IPCAndreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2020-06-10Revert "s3:libsmb: add a cache for cli_session_creds_prepare_krb5()"Andreas Schneider1-8/+0
This reverts commit b458f8fbb7febf3584fa648128b4e1dc764059f7. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jun 10 10:10:16 UTC 2020 on sn-devel-184
2020-06-09s3:libsmb: add a cache for cli_session_creds_prepare_krb5()Stefan Metzmacher1-0/+8
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2020-06-04s3: libsmb: Change size of finfo->attr to uint32_t.Jeremy Allison1-1/+1
That's what modern servers return. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2020-06-04s3: libsmb: In struct file_info rename mode -> attr.Jeremy Allison1-1/+1
Cleanup. It's never been a UNIX mode, always a DOS attribute field. Make that explicit. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
2020-05-28s3:libsmb: remove finally unused credential flagsStefan Metzmacher1-9/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu May 28 08:04:12 UTC 2020 on sn-devel-184
2020-03-10libsmbclient: Put it back to a known, well-working stateVolker Lendecke1-6/+0
For adapting unix extensions in our client libraries, we need a fresh start with additional APIs. We can't change existing application behaviour. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2020-03-03libsmb: Implement SMB_FIND_FILE_UNIX_INFO2 dir listingVolker Lendecke1-0/+6
This keeps the original SMB_STRUCT_STAT coming from posix as part of struct file_info. It is a slight waste of space, as the timestamps are kept twice, but having a full SMB_STRUCT_STAT with the nlink!=0 validity check makes thinking about which mode/size/etc is the correct one a no-brainer. We can save space later by referencing only one set of time stamps for example. This for the time fixes readdirplus2, but for the wrong reason: We don't yet create files the "proper" way using posix create. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2019-01-18s3:libsmb: Store file allocation size in struct file_info.Jeremy Allison1-0/+1
We get this already, from SMB2_FIND_ID_BOTH_DIRECTORY_INFO so return it. For SMB1 leave this as zero so callers know it hasn't been initialized. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2019-01-18s3:libsmb: parse_finfo_id_both_directory_info capture FileID in ↵Puran Chand1-0/+1
SMB2_FIND_ID_BOTH_DIRECTORY_INFO response This captures the FileID in struct file_info while parsing SMB2_FIND_ID_BOTH_DIRECTORY_INFO response Refered MS doc for spec:- https://msdn.microsoft.com/en-us/library/cc246290.aspx Signed-off-by: Puran Chand <pchand@vmware.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2018-05-05s3: client: Add btime_ts to struct finfo.Jeremy Allison1-0/+1
Fill it in when available, else return it as zero. Based on a patch from Puran Chand <pchand@vmware.com>. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2017-06-22s3:libsmb: add CLI_FULL_CONNECTION_DISABLE_SMB1Stefan Metzmacher1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2017-06-22s3:libsmb: add CLI_FULL_CONNECTION_FORCE_SMB1Stefan Metzmacher1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2017-06-22s3:libsmb: no longer pass remote_realm to cli_state_create()Stefan Metzmacher1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2017-01-27s3:libsmb: use a local got_kerberos_mechanism variable in ↵Stefan Metzmacher1-1/+0
cli_session_creds_prepare_krb5() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2016-06-18s3: libsmb: Widen the internal client smb1.pid to 32-bits as is used on the ↵Jeremy Allison1-1/+1
wire and in libcli/smb/smb1*.c Note: This has *NO* effect on the lock context code, as on the wire for all SMB1 locking requests, the pid used as the lock context is already truncated down to 16-bits - the field is only 16-bits wide. This allows the cli_XXX() calls to correctly set pidlow AND pidhigh in SMB1 requests put on the wire by the libcli/smb/smb1*.c code. Note that currently the smbd server doesn't correctly return pidhigh yet - a fix (and tests) for that will follow. As pidhigh is not checked in any client code (mid is used to differentiate different requests) this has no effect other than a correctness fix. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
2015-05-13Convert all uint32/16/8 to _t in source3/client.Richard Sharpe1-3/+3
Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-17s3:libsmb: remove unused cli_set_username() functionStefan Metzmacher1-3/+0
Change-Id: Ib432b4ff66f966de9e733e01de6de2f486c0c728 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-17s3:libsmb: Remove unused domain copy stored in cli_stateStefan Metzmacher1-1/+0
Change-Id: I7333140906bb3a487205b5760396dcc00a9f49b0 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-17s3:libsmb: Remove unused password copy stored in cli_stateAndrew Bartlett1-1/+0
Change-Id: Ia6b33a25628ae08be8a8c6baeb71ce390315cb45 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-05s3:include: let CLI_BUFFER_SIZE be an alias of SMB_BUFFER_SIZE_MAXStefan Metzmacher1-1/+1
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10422 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-10-17s3:libsmb: remove unused cli_state->case_sensitiveStefan Metzmacher1-2/+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>
2013-10-17s3:libsmb: remove unused cli_state->dfsrootStefan Metzmacher1-1/+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>
2013-08-15s3:libsmb: Add in the core of the libsmb client SMB2 functions.Jeremy Allison1-0/+1
These create a synchronous cli_smb2_XXX() style interface designed to plug directly into the libsmb/cliXXXX.c code. https://bugzilla.samba.org/show_bug.cgi?id=9974 Signed-off-by: Jeremy Allison <jra@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2013-08-10s3:libsmb: remove unused cli_state->is_guestloginStefan Metzmacher1-1/+0
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-12-06Clean up client timeout definitions [rev. 2]Scott Lovenberg1-0/+3
The definitions for default client timeout values have been moved to client.h. When initializing a client struct we use this value instead of the old hardcoded value. The timeout value remains 20 seconds. Signed-off-by: Scott Lovenberg <scott.lovenberg@gmail.com> Reviewed by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Dec 6 03:25:58 CET 2012 on sn-devel-104
2012-08-01s3:libsmb: remove unused cli_state->user_session_keyStefan Metzmacher1-4/+0
metze
2012-07-25s3:libsmb: remove unused cli_state->smb2.pidStefan Metzmacher1-1/+0
metze
2012-07-25s3:libsmb: remove unused tcon specific elements from cli_state->smb2Stefan Metzmacher1-6/+0
metze
2012-07-25s3:libsmb: remove cli_state->smb2.tidStefan Metzmacher1-1/+0
metze
2012-07-24s3:libsmb: setup a smbXcli_tcon for SMB2Stefan Metzmacher1-0/+1
metze
2012-07-24s3:libsmb: use a smbXcli_tcon instead of uint16_t cli_state->smb1.tidStefan Metzmacher1-1/+1
metze
2012-07-23s3:libsmb: use cli_state_{g,s}et_uid instead of smb1.uid directlyLuk Claes1-1/+1
Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-12s3: Add cli_state->pw_nt_hashVolker Lendecke1-0/+1
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-12s3: Add CLI_FULL_CONNECTION_USE_NT_HASHVolker Lendecke1-0/+1
... as an indicator that the password supplied is the NT hash Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-01After a discussion with Volker, sdd a backup_intent state to the client struct.Jeremy Allison1-0/+1
This causes the backup_intent flags to be added to findfirst/findnext and ntcreate/nttrans_create calls. cli_set_backup_intent() sets the flag and returns the old value of its state.
2011-11-24s3:libsmb: implement cli_state based functions on top of ↵Stefan Metzmacher1-60/+2
smbXcli_conn/smbXcli_req metze
2011-11-24s3:smb2cli: make use of smbXcli_session and setup the session key for SMB2 ↵Stefan Metzmacher1-1/+2
signing metze
2011-11-24s3:smb2cli: implement smb2cli_negprot() on top of smbXcli_negprot()Stefan Metzmacher1-12/+0
metze
2011-11-24s3:smb2cli: replace smb2cli_base.c code with the more generic smbXcli_base.c ↵Stefan Metzmacher1-1/+4
code metze