summaryrefslogtreecommitdiffstats
path: root/source3/client/client.c
Commit message (Collapse)AuthorAgeFilesLines
* s3: smbclient: Allinfo leaves the file handle open.Jeremy Allison2015-02-101-0/+1
| | | | | | | | | | https://bugzilla.samba.org/show_bug.cgi?id=11094 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Feb 10 23:28:46 CET 2015 on sn-devel-104
* s3-smbclient: Return success if we listed the shares.Andreas Schneider2014-11-241-1/+1
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10960 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib: Align unix_timespec_to_nt_time with nt_time_to_unix_timespecVolker Lendecke2014-06-301-8/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: libsmb : Move users of cli_dskattr to a 64-bit interface cli_disk_free().Jeremy Allison2014-06-071-4/+6
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
* s3: client : Add extra return parameter to all client open calls.Jeremy Allison2014-05-091-5/+5
| | | | | | | | | | | | | | | 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:client: only limit the buffer by the given length 'n'Stefan Metzmacher2014-03-051-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* clitar: get tar context handle via helper functionDavid Disseldorp2014-02-191-6/+6
| | | | | | | | | Add and use tar_get_ctx() to get the tarmode context handle in client.c, rather than declaring an extern. Also, add checks for NULL context pointer arguments. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* client: fix tar_parse_args() compiler warningDavid Disseldorp2014-02-191-1/+2
| | | | | | tar_parse_args() requires a const argument array pointer. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: when returning int, always use 0 for successAurélien Aptel2014-02-191-1/+1
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: implement basic tar creationAurélien Aptel2014-02-191-7/+8
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* client.c: fix negation in tar_to_process testAurélien Aptel2014-02-191-1/+1
| | | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> [ddiss@samba.org: rebase against lp_cli_maxprotocol() changes] Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* client.c, clitar.c: rename process_tar to tar_process, prepare codeAurélien Aptel2014-02-191-1/+2
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c, client.c: add flag to know if there's a tar operation to do.Aurélien Aptel2014-02-191-5/+5
| | | | | | | | | - remove tar_type global. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> [ddiss@samba.org: rebase against lp_cli_maxprotocol() changes] Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* client.c: remove unused extern declarationAurélien Aptel2014-02-191-6/+0
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* implement argument parsing, split client_proto.hAurélien Aptel2014-02-191-1/+4
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* client.c: remove trailing whitespaceAurélien Aptel2014-02-191-7/+7
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* param: rename lp function and variable from "cli_maxprotocol" to ↵Garming Sam2014-02-071-1/+1
| | | | | | | | "client_max_protocol" Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* client: use cli_qpathinfo3 for allinfoGregor Beck2013-10-301-2/+2
| | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* client: remove a write only variableGregor Beck2013-10-301-2/+1
| | | | | | Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: libsmb - 10150 - Not all OEM servers support the ALTNAME info level.Jeremy Allison2013-09-181-3/+4
| | | | | | | | Sigh. Some OEM servers return NT_STATUS_NOT_IMPLEMENTED not NT_STATUS_NOT_SUPPORTED. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s3: libsmb : Bug 10150 - Not all OEM servers support the ALTNAME info level.Jeremy Allison2013-09-171-1/+9
| | | | | | | | | | | Just ignore and print error message and an altname of "" if the server returns NT_STATUS_NOT_SUPPORTED. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Sep 17 23:40:08 CEST 2013 on sn-devel-104
* client: add missing newlines to error messages for invalid iosize parameter.Michael Adam2013-08-211-2/+2
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Aug 21 21:49:45 CEST 2013 on sn-devel-104
* Add new "timeout" command and -t option to smbclient to set the ↵Jeremy Allison2013-08-211-0/+35
| | | | | | | | | | | | | per-operation timeout. This is needed as once SMB3 encryption is selected the server response time can be very slow when requesting large numbers (256) of large encrypted packets (1MB) from a Windows 2012 virtual machine. This allows clients to tune their allowable wait time. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* Remove restrictions on setting iosize inside smbclient for SMB2 connections.Jeremy Allison2013-08-211-17/+23
| | | | | | | | | Also remove the SMB1 restriction to minimum iosize of 16384 (0x4000): Now values >= 0 and <= 0xFFFF00 can be set for SMB1, 0 meaning server defined behaviour. 0 is the new default for iosize, both for SMB1 and SMB2. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3:client: fix compiler warningStefan Metzmacher2013-08-151-1/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:client: use the default io sizeStefan Metzmacher2013-08-151-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:client: avoid interpret_protocol()Stefan Metzmacher2013-08-151-2/+4
| | | | | | | | lp_set_cmdline("client max protocol",...) and lp_cli_maxprotocol() are the more generic solution. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().Günther Deschner2013-08-051-1/+1
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3/smbclient: fix incorrect command tab completionsDavid Disseldorp2013-06-241-8/+8
| | | | | | | | | | | | | | smbclient commands can offer tab-completion for local and remote paths. This behaviour is specified for the first two arguments using the compl_args entry in the commands struct. This change fixes a number of incorrectly specified compl_args values. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Jun 24 19:32:54 CEST 2013 on sn-devel-104
* Make sure to set umask() before calling mkstemp().Andreas Schneider2013-03-061-0/+3
| | | | | | | Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Wed Mar 6 01:16:34 CET 2013 on sn-devel-104
* BUG 9633: Recursive mget should continue on EPERM.David Disseldorp2013-02-071-2/+11
| | | | | | | | | | | Regression introduced by 14ff2e8de9bd8d0064762234555260f5eea643fe. When downloading files recursively, smbclient halts if it encounters a folder to which it does not have permission to traverse. Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Feb 7 15:50:36 CET 2013 on sn-devel-104
* Clean up client timeout definitions [rev. 2]Scott Lovenberg2012-12-061-4/+0
| | | | | | | | | | 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
* smbclient: Use new samba_getpass() function.Andreas Schneider2012-12-031-3/+6
| | | | Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* s3fs-client: Burn commandline password of client utils.Andreas Schneider2012-11-081-0/+2
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Nov 8 21:24:21 CET 2012 on sn-devel-104
* client: Fix talloc_stackframe() free order assertion in developer modeAndrew Bartlett2012-09-251-0/+1
| | | | Reported-by: Ricky Nance <ricky.nance@weaubleau.k12.mo.us>
* s3:client use more access bits for snapshot displayChristian Ambach2012-09-101-1/+2
| | | | | otherwise Windows server will reject the request for shadow copy enumeration with access denied
* Correctly check for errors in strlower_m() returns.Jeremy Allison2012-08-091-2/+7
|
* s3-param: Make lp_name_resolve_order() return a listAndrew Bartlett2012-07-191-1/+1
| | | | | | | | | This allows this parameter, one of the few with differing declarations between the loadparm systems, to be brought into common. Andrew Bartlett Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>
* loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.Rusty Russell2012-07-181-1/+1
| | | | | | | | | | They use talloc_tos() internally: hoist that up to the callers, some of whom don't want to us talloc_tos(). A simple patch, but hits a lot of files. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* source3/client/client.c: fix stackframe leak.Rusty Russell2012-07-181-13/+7
| | | | | | | do_message_op() doesn't free its stackframe in various paths. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
* s3:libsmb: get rid of cli_state_protocolLuk Claes2012-05-281-1/+1
| | | | | Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:libsmb: get rid of cli_state_remote_nameLuk Claes2012-05-281-1/+2
| | | | | Signed-off-by: Luk Claes <luk@debian.org> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3: Fix smbclient notify against WindowsVolker Lendecke2012-04-161-1/+1
| | | | | | | We need READ_DATA Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Apr 16 21:27:54 CEST 2012 on sn-devel-104
* build: Remove SMB_OFF_T, replace with off_tAndrew Bartlett2012-04-061-5/+5
| | | | | | | | | 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
* build: Remove SMB_STRUCT_DIR defineAndrew Bartlett2012-04-051-1/+1
|
* build: Remove sys_closedir wrapperAndrew Bartlett2012-04-051-3/+3
|
* build: Remove sys_opendir wrapperAndrew Bartlett2012-04-051-1/+1
|
* build: Remove sys_open wrapperAndrew Bartlett2012-04-051-2/+2
|
* build: Remove sys_lseek wrapperAndrew Bartlett2012-04-051-1/+1
|
* lib/util: Remove obsolete sys_getpid() and sys_fork().Jelmer Vernooij2012-03-241-2/+2
| | | | | | | | | The performance of these is minimal (these days) and they can return invalid results when used as part of applications that do not use sys_fork(). Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Mar 24 21:55:41 CET 2012 on sn-devel-104