summaryrefslogtreecommitdiffstats
path: root/source3/client
Commit message (Collapse)AuthorAgeFilesLines
* 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: don't panic, propagate talloc errors upwardsDavid Disseldorp2014-02-211-53/+136
| | | | | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Feb 21 02:49:36 CET 2014 on sn-devel-104
* clitar: propagate make_remote_path() talloc errorsDavid Disseldorp2014-02-211-3/+14
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* clitar: return allocation errors from is_subpath()David Disseldorp2014-02-211-16/+45
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* clitar: add error return to tar_path_in_list()David Disseldorp2014-02-211-12/+23
| | | | | | | | In preparation for propagation of memory allocation errors from is_subpath(). Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* clitar: add error return to tar_extract_skip_path()David Disseldorp2014-02-211-10/+22
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* clitar: add error return to tar_create_skip_path()David Disseldorp2014-02-211-20/+34
| | | | | | | | In preparation for propagation of memory allocation errors from tar_path_in_list() and friends. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* clitar: check for path_base_name() allocation errorsDavid Disseldorp2014-02-211-8/+22
| | | | | | | | Add a separate NTSTATUS return code, as base string may be NULL on successful return. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* cli: do not dump libarchive absence warning on startupDavid Disseldorp2014-02-191-1/+0
| | | | | | | | tar_parse_args() already prints the warning if a tarmode argument is provided. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s3-clitar: Fix identation.Andreas Schneider2014-02-191-1221/+1222
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Simplify is_subpath().Andreas Schneider2014-02-191-23/+36
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of fix_unix_path().Andreas Schneider2014-02-191-10/+13
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of max_token().Andreas Schneider2014-02-191-4/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of make_remote_path().Andreas Schneider2014-02-191-3/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_path_in_list().Andreas Schneider2014-02-191-9/+11
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_read_inclusion_file().Andreas Schneider2014-02-191-2/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_set_newer_than().Andreas Schneider2014-02-191-1/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_send_file().Andreas Schneider2014-02-191-1/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_extract().Andreas Schneider2014-02-191-2/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of get_file_callback().Andreas Schneider2014-02-191-6/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_create_from_list().Andreas Schneider2014-02-191-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of tar_parse_args().Andreas Schneider2014-02-191-6/+10
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of cmd_setmode().Andreas Schneider2014-02-191-2/+4
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of cmd_tar().Andreas Schneider2014-02-191-3/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Improve readabilty of cmd_block().Andreas Schneider2014-02-191-2/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s3-clitar: Use ARRAY_SIZE macro.Andreas Schneider2014-02-191-5/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* clitar: get tar context handle via helper functionDavid Disseldorp2014-02-193-17/+37
| | | | | | | | | 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>
* clitar.c: fix segfault in cmd_block()Aurélien Aptel2014-02-191-0/+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>
* s3: add --with-libarchive to build configurationAurélien Aptel2014-02-191-0/+58
| | | | | | | | | | | * skip tar tests if disabled * print error message when using disabled command * autodetection of libarchive Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> [ddiss@samba.org: rebased against makefile cleanup] Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: check all allocations return valueAurélien Aptel2014-02-191-34/+61
| | | | | | 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: create and free talloc context properlyAurélien Aptel2014-02-191-26/+83
| | | | | | 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: remove unnecessary public function prototypesDavid Disseldorp2014-02-191-14/+0
| | | | | | | | Public functions declared in clitar_proto.h needn't be listed as prototypes in clitar.c. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: add prototype, rearrange definition for easier reading.Aurélien Aptel2014-02-191-899/+951
| | | | | | 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: documentationAurélien Aptel2014-02-191-9/+183
| | | | | | 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: honor regex flag, emulate old behaviour (and quirks), add testsAurélien Aptel2014-02-191-3/+19
| | | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> [ddiss@samba.org: split from test changes already upstream] Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: blocksize in block unit, fix error handling in tar_create().Aurélien Aptel2014-02-191-14/+25
| | | | | | 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: 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-192-39/+46
| | | | | | 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: default block size was a multiple of TBLOCKAuré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: only list <include list> instead of whole share, handle wildcardsAurélien Aptel2014-02-191-21/+98
| | | | | | 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 interactive command + respective testAurélien Aptel2014-02-191-1/+62
| | | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> [ddiss@samba.org: split from test changes already upstream] Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* clitar.c: cosmetic changesAurélien Aptel2014-02-191-20/+24
| | | | | | 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: operation INCLUDE_LIST same as INCLUDEAurélien Aptel2014-02-191-5/+5
| | | | | | | | | use local variable during argument parsing to separate the 2 cases. 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: fix creation exclusion, don't reverse in exclusion modeAurélien Aptel2014-02-191-3/+6
| | | | | | 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: fix include mode bugAurélien Aptel2014-02-191-15/+23
| | | | | | | | | | | - if we include path/a/, path/ was skipped because it's not in path/a/. - solution: add a flag to tar_path_in_list() to also check the opposite ie. if the list is in the path 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 reset modeAurélien Aptel2014-02-191-1/+5
| | | | | | 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: implement exclusion filter for extractionAurélien Aptel2014-02-191-5/+27
| | | | | | 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 dry mode, add total_size and fix write bugAurélien Aptel2014-02-191-23/+61
| | | | | | Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>