summaryrefslogtreecommitdiffstats
path: root/source3/libsmb/clifile.c
Commit message (Collapse)AuthorAgeFilesLines
* libsmb: Make cli_ntcreate cancellableVolker Lendecke2014-06-211-0/+13
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: Make cli_ntcreate1 cancellableVolker Lendecke2014-06-211-0/+13
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: Enable oplocks for smb2 cli_ntcreateVolker Lendecke2014-06-211-0/+5
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: Align cli_ntcreate with other sync wrappersVolker Lendecke2014-06-211-8/+3
| | | | | | | ... saves 5 lines :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: remove smb2 switch from cli_ntcreateVolker Lendecke2014-06-211-13/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: Replace async cli_ntcreate by cli_createVolker Lendecke2014-06-211-49/+49
| | | | | | | | | | | Done by rename cli_ntcreate_send/recv to cli_ntcreate1_send/recv and cli_create_send/recv to cli_ntcreate_send/recv Possibly cli_create might be the better name, but I am sooo used to cli_ntcreate() that I don't really want to rename this ;-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmb: Add cli_create_send/recvVolker Lendecke2014-06-211-0/+84
| | | | | | | Async wrapper around smb1 and smb2 create Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: libsmb: Change cli_disk_size() to use the ↵Jeremy Allison2014-06-071-0/+45
| | | | | | | | | | | | | trans2/SMB_FS_FULL_SIZE_INFORMATION call in preference to the old SMB1 call. Fallback to the old CORE protocol SMBdskattr if trans2/SMB_FS_FULL_SIZE_INFORMATION is not supported. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Jun 7 05:41:44 CEST 2014 on sn-devel-104
* s3: libsmb: Make cli_smb2_dskattr() a 64-bit interface.Jeremy Allison2014-06-071-7/+3
| | | | | | | | Remove the fallback call from cli_dskattr() (now it's not called from external client code). Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: libsmb : Move users of cli_dskattr to a 64-bit interface cli_disk_free().Jeremy Allison2014-06-071-0/+26
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: libsmbclient: Work around bugs in SLES cifsd and Apple smbx SMB1 servers.Jeremy Allison2014-05-091-1/+21
| | | | | | | | | | | | | | | | | | | | | | | SLES's cifsd and Apple's smbx do not correctly handle FILE_NON_DIRECTORY_FILE which prevents recursive copies in gvfs from working correctly [1] since GVFS tries to open the directory, expecting ENOTDIR, but it suceeds and appears as a zero byte file. This fix adds code to the cli_open() open code that checks if CreateOptions was requested with FILE_NON_DIRECTORY_FILE set, and if the attributes returned include FILE_ATTRIBUTE_DIRECTORY we synchronously close the file handle just opened, and return NT_STATUS_FILE_IS_A_DIRECTORY to the caller. Depends on the previous API update to cli_ntcreate() to add returned attributes. Fixes bug #10587 - Opening directories on SLES's cifsd and Apple's smbx succeeds. https://bugzilla.samba.org/show_bug.cgi?id=10587 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: client : correctly fill in the struct smb_create_returns from ↵Jeremy Allison2014-05-091-5/+27
| | | | | | | | | | | | | cli_ntcreate(), cli_ntcreate_recv(), cli_nttrans_create() and cli_nttrans_create_recv(). This completes the update of the create API to return all the data returned by the server on open. We can now use this data to detect buggy servers without an extra round trip. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3: client : Add extra return parameter to all client open calls.Jeremy Allison2014-05-091-8/+21
| | | | | | | | | | | | | | | Add a return parameter of struct smb_create_returns *cr to cli_ntcreate() cli_ntcreate_recv() cli_nttrans_create() cli_nttrans_create_recv() Always pass in NULL for now. This fixes the create API to always fully return the data the server has given back to us on the open file to the caller. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_get_ea_list_path() inside cli_get_ea_list_path().Jeremy Allison2013-08-151-1/+11
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_set_ea_fnum() inside cli_set_ea_fnum().Jeremy Allison2013-08-151-0/+8
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_set_ea_path() inside cli_set_ea_path().Jeremy Allison2013-08-151-1/+11
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Fix cli_set_ea_path() to use frame instead of talloc_tos().Jeremy Allison2013-08-151-3/+7
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_dskattr() inside cli_dskattr().Jeremy Allison2013-08-151-1/+7
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_getatr() inside cli_getatr().Jeremy Allison2013-08-151-1/+11
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_setatr() inside cli_setatr().Jeremy Allison2013-08-151-1/+10
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_setattrE() inside cli_setattrE().Jeremy Allison2013-08-151-1/+11
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_getattrE() inside cli_getattrE().Jeremy Allison2013-08-151-1/+13
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_close_fnum() inside cli_close().Jeremy Allison2013-08-151-1/+7
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_create_fnum() inside cli_ntcreate().Jeremy Allison2013-08-151-1/+16
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_rmdir() inside cli_rmdir().Jeremy Allison2013-08-151-1/+7
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_mkdir() inside cli_mkdir().Jeremy Allison2013-08-151-1/+7
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_unlink() inside cli_unlink().Jeremy Allison2013-08-151-1/+7
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: Plumb cli_smb2_rename() inside cli_rename().Jeremy Allison2013-08-151-1/+9
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* libsmbclient: Streamline cli_openx a bitVolker Lendecke2013-04-111-3/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* libsmbclient: Use tevent_req_poll_ntstatus in cli_openxVolker Lendecke2013-04-111-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:libsmb: s/struct event_context/struct tevent_contextStefan Metzmacher2013-02-191-82/+82
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:libsmb: make use of samba_tevent_context_init()Stefan Metzmacher2013-02-191-41/+41
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:libsmb correctly set isFsctl for snapshot listChristian Ambach2012-08-301-1/+1
| | | | | | | | | FSCTL_GET_SHADOW_COPY_DATA is a FSCTL, so set the isFsctl marker otherwise smbclient allinfo will not report snapshots any more with the changes made for Bug #8311 Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Thu Aug 30 18:57:24 CEST 2012 on sn-devel-104
* s3:libsmb: fix the talloc parent of clistr_pull_talloc() in cli_notify_done()Stefan Metzmacher2012-06-051-1/+1
| | | | metze
* s3:libsmb: remove unused 'inbuf' variableStefan Metzmacher2012-06-051-12/+6
| | | | metze
* s3:libsmb: get rid of cli_smb_req_*,cli_smb_wct_ofs,cli_smb_chain_sendLuk Claes2012-06-031-2/+2
| | | | | | | | Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Sun Jun 3 23:37:02 CEST 2012 on sn-devel-104
* s3:libsmb: get rid of cli_ucs2Luk Claes2012-05-281-23/+23
| | | | | | | | Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Mon May 28 16:58:03 CEST 2012 on sn-devel-104
* s3:libsmb: get rid of cli_has_async_callsLuk Claes2012-05-281-41/+42
| | | | | Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: get rid of cli_state_server_time_zoneLuk Claes2012-05-281-6/+6
| | | | | Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: get rid of cli_state_capabilitiesLuk Claes2012-05-281-2/+2
| | | | | Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett2012-04-061-8/+8
| | | | | | | | | Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
* s3: Notifies should never time outVolker Lendecke2012-04-021-0/+8
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Apr 2 12:31:17 CEST 2012 on sn-devel-104
* s3: Add sync cli_notifyVolker Lendecke2012-03-221-0/+35
|
* s3-libsmb: Fix parsing a notify responseVolker Lendecke2012-03-221-1/+1
|
* s3: rename "len"->"next", according to wiresharkVolker Lendecke2012-03-221-3/+3
|
* Move to talloc from malloc.Jeremy Allison2012-03-011-3/+7
|
* Fix mixup between talloc/malloc.Jeremy Allison2012-03-011-1/+1
|
* Revert fac5c654e2fe17c2c11d150b16088e8a51f6be20Jeremy Allison2011-12-041-68/+19
| | | | | | | | | | s3: Add a fallback for missing open&x support in OS/X Lion This is now done inside the synchronous cli_open() wrapper function. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Sun Dec 4 08:19:31 CET 2011 on sn-devel-104
* Add cli_open() back as a synchronous wrapper function the callsJeremy Allison2011-12-031-0/+115
| | | | NtCreateX followed by openX() if NtCreateX is unsupported.
* Rename cli_open -> cli_openx. Prelude to replacing generic cli_open()Jeremy Allison2011-12-031-19/+19
| | | | with a call that uses NTCreateX in preference to OpenAndX.