summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* build: use configure var for libarchive depenencyDavid Disseldorp2014-02-192-3/+4
| | | | | | | | Avoid CONFIG_SET('HAVE_LIBARCHIVE') checks in wscript_build, by using a simple archive_lib variable. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@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>
* s3: fix --with-libarchive bug, remove useless DEFINE()Aurélien Aptel2014-02-191-12/+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 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-194-15/+110
| | | | | | | | | | | * 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>
* s3/selftest/tests.py: add test_smbclient_tarmode.pl to test suiteAurélien Aptel2014-02-191-0/+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>
* 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.h: delete fileAurélien Aptel2014-02-191-40/+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>
* 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>
* clitar.c: add line in DBG macroAuré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 nosystem, nohidden and include filter.Aurélien Aptel2014-02-191-58/+169
| | | | | | 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-192-17/+198
| | | | | | 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: don't create file when processing dirAurélien Aptel2014-02-191-20/+36
| | | | | | 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 full extractionAurélien Aptel2014-02-191-2/+119
| | | | | | 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_unix_path() now replace / with \Aurélien Aptel2014-02-191-3/+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>
* clitar.c: factor path_list handling in a function, remove tar_fdAurélien Aptel2014-02-191-12/+17
| | | | | | 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: update TAR_DEFAULT_BLOCK_SIZE commentAuré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.c: start processing tar files in extraction modeAurélien Aptel2014-02-191-3/+67
| | | | | | | | | | - move default block size to a define - add doc comments - basic processing in tar_extract 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>
* s3/wscript, s3/wscript_build: add libarchive dependency.Aurélien Aptel2014-02-192-0/+5
| | | | | | | | | - add header and lib checks. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> [ddiss@samba.org: rebase against makefile cleanup] Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>