kai/samba-autobuild/.git
10 years agocli: do not dump libarchive absence warning on startup
David Disseldorp [Wed, 19 Feb 2014 15:41:35 +0000 (16:41 +0100)]
cli: do not dump libarchive absence warning on startup

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>
10 years agos3-clitar: Fix identation.
Andreas Schneider [Mon, 17 Feb 2014 14:00:43 +0000 (15:00 +0100)]
s3-clitar: Fix identation.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Simplify is_subpath().
Andreas Schneider [Mon, 17 Feb 2014 10:24:33 +0000 (11:24 +0100)]
s3-clitar: Simplify is_subpath().

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of fix_unix_path().
Andreas Schneider [Mon, 17 Feb 2014 10:32:14 +0000 (11:32 +0100)]
s3-clitar: Improve readabilty of fix_unix_path().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of max_token().
Andreas Schneider [Mon, 17 Feb 2014 10:28:13 +0000 (11:28 +0100)]
s3-clitar: Improve readabilty of max_token().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of make_remote_path().
Andreas Schneider [Mon, 17 Feb 2014 10:25:43 +0000 (11:25 +0100)]
s3-clitar: Improve readabilty of make_remote_path().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of tar_path_in_list().
Andreas Schneider [Mon, 17 Feb 2014 10:12:05 +0000 (11:12 +0100)]
s3-clitar: Improve readabilty of tar_path_in_list().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of tar_read_inclusion_file().
Andreas Schneider [Mon, 17 Feb 2014 10:10:11 +0000 (11:10 +0100)]
s3-clitar: Improve readabilty of tar_read_inclusion_file().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of tar_set_newer_than().
Andreas Schneider [Mon, 17 Feb 2014 10:07:16 +0000 (11:07 +0100)]
s3-clitar: Improve readabilty of tar_set_newer_than().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of tar_send_file().
Andreas Schneider [Mon, 17 Feb 2014 10:05:28 +0000 (11:05 +0100)]
s3-clitar: Improve readabilty of tar_send_file().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of tar_extract().
Andreas Schneider [Mon, 17 Feb 2014 10:03:53 +0000 (11:03 +0100)]
s3-clitar: Improve readabilty of tar_extract().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of get_file_callback().
Andreas Schneider [Mon, 17 Feb 2014 09:59:27 +0000 (10:59 +0100)]
s3-clitar: Improve readabilty of get_file_callback().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of tar_create_from_list().
Andreas Schneider [Mon, 17 Feb 2014 09:57:29 +0000 (10:57 +0100)]
s3-clitar: Improve readabilty of tar_create_from_list().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of tar_parse_args().
Andreas Schneider [Mon, 17 Feb 2014 09:55:59 +0000 (10:55 +0100)]
s3-clitar: Improve readabilty of tar_parse_args().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of cmd_setmode().
Andreas Schneider [Mon, 17 Feb 2014 09:50:17 +0000 (10:50 +0100)]
s3-clitar: Improve readabilty of cmd_setmode().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of cmd_tar().
Andreas Schneider [Mon, 17 Feb 2014 09:49:16 +0000 (10:49 +0100)]
s3-clitar: Improve readabilty of cmd_tar().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Improve readabilty of cmd_block().
Andreas Schneider [Mon, 17 Feb 2014 09:47:15 +0000 (10:47 +0100)]
s3-clitar: Improve readabilty of cmd_block().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3-clitar: Use ARRAY_SIZE macro.
Andreas Schneider [Sat, 15 Feb 2014 16:05:18 +0000 (17:05 +0100)]
s3-clitar: Use ARRAY_SIZE macro.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agobuild: use configure var for libarchive depenency
David Disseldorp [Sat, 15 Feb 2014 09:37:28 +0000 (10:37 +0100)]
build: use configure var for libarchive depenency

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>
10 years agoclitar: get tar context handle via helper function
David Disseldorp [Fri, 14 Feb 2014 16:16:14 +0000 (17:16 +0100)]
clitar: get tar context handle via helper function

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>
10 years agos3: fix --with-libarchive bug, remove useless DEFINE()
Aurélien Aptel [Wed, 7 Aug 2013 15:50:15 +0000 (17:50 +0200)]
s3: fix --with-libarchive bug, remove useless DEFINE()

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: fix segfault in cmd_block()
Aurélien Aptel [Wed, 7 Aug 2013 14:49:20 +0000 (16:49 +0200)]
clitar.c: fix segfault in cmd_block()

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3: add --with-libarchive to build configuration
Aurélien Aptel [Wed, 7 Aug 2013 14:34:22 +0000 (16:34 +0200)]
s3: add --with-libarchive to build configuration

* 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>
10 years agos3/selftest/tests.py: add test_smbclient_tarmode.pl to test suite
Aurélien Aptel [Mon, 5 Aug 2013 17:02:47 +0000 (19:02 +0200)]
s3/selftest/tests.py: add test_smbclient_tarmode.pl to test suite

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agomanpages/smbclient: remove trailing whitespace
Aurélien Aptel [Wed, 31 Jul 2013 15:29:10 +0000 (17:29 +0200)]
manpages/smbclient: remove trailing whitespace

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
[ddiss@samba.org: split from tarmode documentation chages]
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agomanpages/smbclient: update tarmode documentation
Aurélien Aptel [Thu, 30 Jan 2014 12:05:31 +0000 (13:05 +0100)]
manpages/smbclient: update tarmode documentation

* document tarmode (nosystem, nohidden)
* deprecate r switch in tar options

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
[ddiss@samba.org: split from whitespace cleanup]
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: check all allocations return value
Aurélien Aptel [Wed, 24 Jul 2013 15:32:17 +0000 (17:32 +0200)]
clitar.c: check all allocations return value

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: create and free talloc context properly
Aurélien Aptel [Wed, 24 Jul 2013 14:48:02 +0000 (16:48 +0200)]
clitar.c: create and free talloc context properly

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar: remove unnecessary public function prototypes
David Disseldorp [Fri, 14 Feb 2014 16:22:50 +0000 (17:22 +0100)]
clitar: remove unnecessary public function prototypes

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>
10 years agoclitar.c: add prototype, rearrange definition for easier reading.
Aurélien Aptel [Tue, 23 Jul 2013 15:39:09 +0000 (17:39 +0200)]
clitar.c: add prototype, rearrange definition for easier reading.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: documentation
Aurélien Aptel [Tue, 23 Jul 2013 14:55:50 +0000 (16:55 +0200)]
clitar.c: documentation

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: honor regex flag, emulate old behaviour (and quirks), add tests
Aurélien Aptel [Fri, 19 Jul 2013 16:35:01 +0000 (18:35 +0200)]
clitar.c: honor regex flag, emulate old behaviour (and quirks), add tests

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>
10 years agoclitar.c: blocksize in block unit, fix error handling in tar_create().
Aurélien Aptel [Thu, 18 Jul 2013 15:06:33 +0000 (17:06 +0200)]
clitar.c: blocksize in block unit, fix error handling in tar_create().

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclient: fix tar_parse_args() compiler warning
David Disseldorp [Fri, 14 Feb 2014 17:08:28 +0000 (18:08 +0100)]
client: fix tar_parse_args() compiler warning

tar_parse_args() requires a const argument array pointer.
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: when returning int, always use 0 for success
Aurélien Aptel [Thu, 18 Jul 2013 14:22:26 +0000 (16:22 +0200)]
clitar.c: when returning int, always use 0 for success

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.h: delete file
Aurélien Aptel [Wed, 17 Jul 2013 16:04:20 +0000 (18:04 +0200)]
clitar.h: delete file

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: default block size was a multiple of TBLOCK
Aurélien Aptel [Wed, 17 Jul 2013 16:01:59 +0000 (18:01 +0200)]
clitar.c: default block size was a multiple of TBLOCK

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: only list <include list> instead of whole share, handle wildcards
Aurélien Aptel [Wed, 17 Jul 2013 14:25:34 +0000 (16:25 +0200)]
clitar.c: only list <include list> instead of whole share, handle wildcards

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: implement interactive command + respective test
Aurélien Aptel [Tue, 16 Jul 2013 17:15:48 +0000 (19:15 +0200)]
clitar.c: implement interactive command + respective test

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>
10 years agoclitar.c: cosmetic changes
Aurélien Aptel [Tue, 16 Jul 2013 14:32:29 +0000 (16:32 +0200)]
clitar.c: cosmetic changes

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: operation INCLUDE_LIST same as INCLUDE
Aurélien Aptel [Tue, 16 Jul 2013 14:22:13 +0000 (16:22 +0200)]
clitar.c: operation INCLUDE_LIST same as INCLUDE

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>
10 years agoclitar.c: fix creation exclusion, don't reverse in exclusion mode
Aurélien Aptel [Tue, 16 Jul 2013 14:16:29 +0000 (16:16 +0200)]
clitar.c: fix creation exclusion, don't reverse in exclusion mode

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: fix include mode bug
Aurélien Aptel [Tue, 16 Jul 2013 13:49:27 +0000 (15:49 +0200)]
clitar.c: fix include mode bug

- 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>
10 years agoclitar.c: implement reset mode
Aurélien Aptel [Tue, 16 Jul 2013 12:47:29 +0000 (14:47 +0200)]
clitar.c: implement reset mode

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar: implement exclusion filter for extraction
Aurélien Aptel [Mon, 15 Jul 2013 16:58:36 +0000 (18:58 +0200)]
clitar: implement exclusion filter for extraction

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: implement dry mode, add total_size and fix write bug
Aurélien Aptel [Thu, 11 Jul 2013 16:17:25 +0000 (18:17 +0200)]
clitar.c: implement dry mode, add total_size and fix write bug

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: add line in DBG macro
Aurélien Aptel [Thu, 11 Jul 2013 16:12:38 +0000 (18:12 +0200)]
clitar.c: add line in DBG macro

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: implement nosystem, nohidden and include filter.
Aurélien Aptel [Thu, 11 Jul 2013 13:56:03 +0000 (15:56 +0200)]
clitar.c: implement nosystem, nohidden and include filter.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: implement basic tar creation
Aurélien Aptel [Wed, 10 Jul 2013 22:57:40 +0000 (00:57 +0200)]
clitar.c: implement basic tar creation

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: don't create file when processing dir
Aurélien Aptel [Wed, 10 Jul 2013 12:12:25 +0000 (14:12 +0200)]
clitar.c: don't create file when processing dir

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: implement basic full extraction
Aurélien Aptel [Wed, 10 Jul 2013 11:16:08 +0000 (13:16 +0200)]
clitar.c: implement basic full extraction

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: fix_unix_path() now replace / with \
Aurélien Aptel [Tue, 9 Jul 2013 21:44:16 +0000 (23:44 +0200)]
clitar.c: fix_unix_path() now replace / with \

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: factor path_list handling in a function, remove tar_fd
Aurélien Aptel [Tue, 9 Jul 2013 21:17:46 +0000 (23:17 +0200)]
clitar.c: factor path_list handling in a function, remove tar_fd

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: update TAR_DEFAULT_BLOCK_SIZE comment
Aurélien Aptel [Tue, 9 Jul 2013 21:07:06 +0000 (23:07 +0200)]
clitar.c: update TAR_DEFAULT_BLOCK_SIZE comment

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: start processing tar files in extraction mode
Aurélien Aptel [Tue, 9 Jul 2013 16:01:47 +0000 (18:01 +0200)]
clitar.c: start processing tar files in extraction mode

- 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>
10 years agoclient.c: fix negation in tar_to_process test
Aurélien Aptel [Tue, 9 Jul 2013 16:01:07 +0000 (18:01 +0200)]
client.c: fix negation in tar_to_process test

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>
10 years agos3/wscript, s3/wscript_build: add libarchive dependency.
Aurélien Aptel [Tue, 9 Jul 2013 15:57:37 +0000 (17:57 +0200)]
s3/wscript, s3/wscript_build: add libarchive dependency.

- 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>
10 years agoclient.c, clitar.c: rename process_tar to tar_process, prepare code
Aurélien Aptel [Tue, 9 Jul 2013 13:24:40 +0000 (15:24 +0200)]
client.c, clitar.c: rename process_tar to tar_process, prepare code

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c, client.c: add flag to know if there's a tar operation to do.
Aurélien Aptel [Tue, 9 Jul 2013 13:10:44 +0000 (15:10 +0200)]
clitar.c, client.c: add flag to know if there's a tar operation to do.

- 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>
10 years agoclitar.c: fix path name when adding them
Aurélien Aptel [Tue, 9 Jul 2013 12:27:55 +0000 (14:27 +0200)]
clitar.c: fix path name when adding them

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar: use lowercase for bool value
Aurélien Aptel [Tue, 9 Jul 2013 11:09:56 +0000 (13:09 +0200)]
clitar: use lowercase for bool value

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: add tar_dump() debug function, fix bugs
Aurélien Aptel [Tue, 9 Jul 2013 09:41:06 +0000 (11:41 +0200)]
clitar.c: add tar_dump() debug function, fix bugs

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclient.c: remove unused extern declaration
Aurélien Aptel [Mon, 8 Jul 2013 16:18:09 +0000 (18:18 +0200)]
client.c: remove unused extern declaration

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoimplement argument parsing, split client_proto.h
Aurélien Aptel [Mon, 8 Jul 2013 16:09:47 +0000 (18:09 +0200)]
implement argument parsing, split client_proto.h

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclient.c: remove trailing whitespace
Aurélien Aptel [Mon, 8 Jul 2013 16:07:19 +0000 (18:07 +0200)]
client.c: remove trailing whitespace

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: start of argument parsing
Aurélien Aptel [Fri, 5 Jul 2013 16:14:50 +0000 (18:14 +0200)]
clitar.c: start of argument parsing

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: add doc, remove _t suffix in enum name
Aurélien Aptel [Fri, 5 Jul 2013 09:33:55 +0000 (11:33 +0200)]
clitar.c: add doc, remove _t suffix in enum name

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: add cmd_setmode(), remove typedef
Aurélien Aptel [Fri, 5 Jul 2013 07:51:43 +0000 (09:51 +0200)]
clitar.c: add cmd_setmode(), remove typedef

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: expand context structure and implement cmd_block()
Aurélien Aptel [Wed, 3 Jul 2013 16:18:25 +0000 (18:18 +0200)]
clitar.c: expand context structure and implement cmd_block()

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoclitar.c: fresh new compilable file.
Aurélien Aptel [Wed, 3 Jul 2013 14:47:05 +0000 (16:47 +0200)]
clitar.c: fresh new compilable file.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoDefine the winbindd socket directory when building wbclient
Garming Sam [Tue, 18 Feb 2014 22:38:51 +0000 (11:38 +1300)]
Define the winbindd socket directory when building wbclient

Change-Id: I2a730e41f45cff0f4836fbc8f993947e3a30aa18
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Feb 19 16:25:42 CET 2014 on sn-devel-104

10 years agoctdb-scripts: Update a misleading comment
Martin Schwenke [Fri, 14 Feb 2014 05:59:08 +0000 (16:59 +1100)]
ctdb-scripts: Update a misleading comment

This comment was true when 50.samba was spaghetti because it tried to
automatically manage both smbd (and nmbd) and winbind.  It isn't true
anymore.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Feb 19 04:07:12 CET 2014 on sn-devel-104

10 years agoctdb-tests: Improvements to tests INSTALL script
Martin Schwenke [Mon, 17 Feb 2014 00:32:15 +0000 (11:32 +1100)]
ctdb-tests: Improvements to tests INSTALL script

* Should stop on 1st error

* Fix up value of CTDB_TESTS_ARE_INSTALLED

* Improve fixing of broken symlinks in INSTALL

  This is all of the links in tests/eventscript/etc-ctdb/ so no need
  to list them.  Just find and fix them.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-recoverd: LCP2 cleanups
Martin Schwenke [Fri, 7 Feb 2014 06:32:12 +0000 (17:32 +1100)]
ctdb-recoverd: LCP2 cleanups

* Remove unnecessary candimbl parameter.

  This parameter can be cheaply calculated in
  lcp2_failback_candidate().  The compiler will probably do an
  excellent job optimising it.  :-)

* Clarify a debug statement

  This is much clearer than doing a complex recalculation of a known
  value.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-recoverd: Optimise check for rebalance candidates in LCP2
Martin Schwenke [Fri, 7 Feb 2014 03:28:54 +0000 (14:28 +1100)]
ctdb-recoverd: Optimise check for rebalance candidates in LCP2

Currently this can be checked many times.  However, there's no point
calling the rebalance/failback code at all if there are no rebalance
candidates.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agoctdb-scripts: Enhancements to hung script debugging
Martin Schwenke [Fri, 7 Feb 2014 06:37:00 +0000 (17:37 +1100)]
ctdb-scripts: Enhancements to hung script debugging

* Add stack dumps for "interesting" processes that sometimes get
  stuck, so try to print stack traces for them if they appear in the
  pstree output.

* Add new configuration variables CTDB_DEBUG_HUNG_SCRIPT_LOGFILE and
  CTDB_DEBUG_HUNG_SCRIPT_STACKPAT.  These are primarily for testing
  but the latter may be useful for live debugging.

* Load CTDB configuration so that above configuration variables can be
  set/changed without restarting ctdbd.

Add a test that tries to ensure that all of this is working.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
10 years agos3-auth: Pass mem_ctx to do_map_to_guest_server_info().
Andreas Schneider [Tue, 18 Feb 2014 12:52:49 +0000 (13:52 +0100)]
s3-auth: Pass mem_ctx to do_map_to_guest_server_info().

Change-Id: If53117023e3ab37c810193edd00a81d247fdde7a
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Feb 19 01:28:14 CET 2014 on sn-devel-104

10 years agos3-auth: Pass mem_ctx to auth_check_ntlm_password().
Andreas Schneider [Tue, 18 Feb 2014 09:19:57 +0000 (10:19 +0100)]
s3-auth: Pass mem_ctx to auth_check_ntlm_password().

Coverity-Id: 1168009
BUG: https://bugzilla.samba.org/show_bug.cgi?id=8598

Signed-off-by: Andreas Schneider <asn@samba.org>
Change-Id: Ie01674561a6a75239a13918d3190c2f21c3efc7a
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agos3-auth: Pass mem_ctx to make_server_info_sam().
Andreas Schneider [Tue, 18 Feb 2014 09:02:57 +0000 (10:02 +0100)]
s3-auth: Pass mem_ctx to make_server_info_sam().

Coverity-Id: 1168009
BUG: https://bugzilla.samba.org/show_bug.cgi?id=8598

Signed-off-by: Andreas Schneider <asn@samba.org>
Change-Id: Ie614b0654c3a7eec1ebb10dbb9763696eec795bd
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: find FILE_OFFSET_BITS via array
Gustavo Zacarias [Fri, 31 Jan 2014 09:53:44 +0000 (06:53 -0300)]
build: find FILE_OFFSET_BITS via array

This makes cross-compiling happy, use a trick similar to autoconf's
AC_CHECK_SIZEOF macro.
Basically we make an array:

static int array[1 - 2 * !(((long int)(sizeof(off_t))) < 8)];

This gives -1 multiplied by the negation of the condition
(sizeof(off_t) < 8) cast to a long int.
So if the condition is true it gives array[(-1 * 0)] (remember the
condition is cast and negated) thus passing a build test with a 0-sized
array.
If it's false it gives array[(-1 * 1)] thus failing with a
negative-sized array.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Feb 18 23:18:32 CET 2014 on sn-devel-104

10 years agos3: printing: Fix problem with server taking too long to respond to a MSG_PRINTER_DRV...
Jeremy Allison [Wed, 12 Feb 2014 18:13:19 +0000 (10:13 -0800)]
s3: printing: Fix problem with server taking too long to respond to a MSG_PRINTER_DRVUPGRADE message.

Receiving a MSG_PRINTER_DRVUPGRADE causes
smbd to iterate over all printers looking
for ones that uses the driver. This is a very
expensive operation requiring a read of all
registry printer parameters.

On a system with a large number of printers,
this causes the clients to timeout (smbd
can take longer than 60 seconds to respond).

This patch fixes the problem by forwarding
the MSG_PRINTER_DRVUPGRADE to the background
lpq queue updater process and allowing it to
take care of the updating of the changeid
in the registry, allowing the smbd connected
to the client to return to processing requests
immediately.

https://bugzilla.samba.org/show_bug.cgi?id=9942

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Feb 18 17:48:30 CET 2014 on sn-devel-104

10 years agotestprogs: Use system binary if we did not build ldbdel.
Andreas Schneider [Tue, 18 Feb 2014 09:37:32 +0000 (10:37 +0100)]
testprogs: Use system binary if we did not build ldbdel.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Feb 18 12:45:41 CET 2014 on sn-devel-104

10 years agoRevert "libwbclient4: Add wbc_sids_to_xids"
Volker Lendecke [Tue, 18 Feb 2014 08:50:44 +0000 (09:50 +0100)]
Revert "libwbclient4: Add wbc_sids_to_xids"

This reverts commit fefc59619b58cb0c38bf7e6ac2ebcc25a5ebbd6c.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "source4: Use wbc_sids_to_xids"
Volker Lendecke [Tue, 18 Feb 2014 08:50:37 +0000 (09:50 +0100)]
Revert "source4: Use wbc_sids_to_xids"

This reverts commit de7122ddc356697777cce95d22b3fab7697b30db.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "libwbclient4: Add wbc_xids_to_sids"
Volker Lendecke [Tue, 18 Feb 2014 08:50:30 +0000 (09:50 +0100)]
Revert "libwbclient4: Add wbc_xids_to_sids"

This reverts commit f275ce4e4367478b488810491c7bcd993c37caf1.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "source4: Use wbc_xids_to_sids"
Volker Lendecke [Tue, 18 Feb 2014 08:50:23 +0000 (09:50 +0100)]
Revert "source4: Use wbc_xids_to_sids"

This reverts commit d0932a1ae089fda0d41be21a9916caeca7c0c233.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "libwbclient4: Remove unused composite-based functions"
Volker Lendecke [Tue, 18 Feb 2014 08:50:16 +0000 (09:50 +0100)]
Revert "libwbclient4: Remove unused composite-based functions"

This reverts commit ba5f02739cb454d2312f73f643f2c119e090ac5e.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "auth4: security_token_to_unix_token only needs a tevent_context"
Volker Lendecke [Tue, 18 Feb 2014 08:50:10 +0000 (09:50 +0100)]
Revert "auth4: security_token_to_unix_token only needs a tevent_context"

This reverts commit 1de725c2926b526200032c4f46132c17533986c7.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "auth4: auth_session_info_fill_unix only needs a tevent_context"
Volker Lendecke [Tue, 18 Feb 2014 08:50:03 +0000 (09:50 +0100)]
Revert "auth4: auth_session_info_fill_unix only needs a tevent_context"

This reverts commit 75d7c4609c1c743f84ca9f2d0666aece9e5200d4.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "auth4: Do not generate just a temporary wbc_context"
Volker Lendecke [Tue, 18 Feb 2014 08:49:56 +0000 (09:49 +0100)]
Revert "auth4: Do not generate just a temporary wbc_context"

This reverts commit 5124a9e1183de990ca3146cd355152094495a779.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "pvfs: Use the tevent_context from the ntvfs_context"
Volker Lendecke [Tue, 18 Feb 2014 08:49:49 +0000 (09:49 +0100)]
Revert "pvfs: Use the tevent_context from the ntvfs_context"

This reverts commit 15700a9f6e5393cecf78052f510e015300c5bd85.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "unixuid: Use the tevent_context from the ntvfs_context"
Volker Lendecke [Tue, 18 Feb 2014 08:49:42 +0000 (09:49 +0100)]
Revert "unixuid: Use the tevent_context from the ntvfs_context"

This reverts commit 25e83a9b3e72cdb84c09ef8ada4784efd110f09a.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "dcesrv_unixinfo: No wbc_context required"
Volker Lendecke [Tue, 18 Feb 2014 08:49:35 +0000 (09:49 +0100)]
Revert "dcesrv_unixinfo: No wbc_context required"

This reverts commit 5a4252789b54b6b270b3083f6e0732ba1fdd774b.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "ntvfs_posix: No wbc_context required"
Volker Lendecke [Tue, 18 Feb 2014 08:49:28 +0000 (09:49 +0100)]
Revert "ntvfs_posix: No wbc_context required"

This reverts commit 55dd08c4e80827ffc4fe423f3e67aec499af06df.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "ntvfs_unixuid: No wbc_context required"
Volker Lendecke [Tue, 18 Feb 2014 08:49:21 +0000 (09:49 +0100)]
Revert "ntvfs_unixuid: No wbc_context required"

This reverts commit f35f88d741f1f896268649238d4ddbda4abb1585.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "auth4: Remove unused wbc_context"
Volker Lendecke [Tue, 18 Feb 2014 08:49:13 +0000 (09:49 +0100)]
Revert "auth4: Remove unused wbc_context"

This reverts commit 6b04558c5e0547a807ac0fcb5eeb1085cfe602ac.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRevert "winbind4: Remove unused winbind_get_idmap irpc operation"
Volker Lendecke [Tue, 18 Feb 2014 09:12:28 +0000 (09:12 +0000)]
Revert "winbind4: Remove unused winbind_get_idmap irpc operation"

This reverts commit 41ff0f4454ef23d0ac3e31560d78a2b966769fea.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos4:pyrpc: let dcerpc_interface_new() use py_dcerpc_interface_init_helper()
Stefan Metzmacher [Sat, 15 Feb 2014 09:19:29 +0000 (10:19 +0100)]
s4:pyrpc: let dcerpc_interface_new() use py_dcerpc_interface_init_helper()

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): Mon Feb 17 21:39:30 CET 2014 on sn-devel-104

10 years agos4:pyrpc: fix talloc hierachy in py_dcerpc_interface_init_helper()
Stefan Metzmacher [Sat, 15 Feb 2014 09:12:04 +0000 (10:12 +0100)]
s4:pyrpc: fix talloc hierachy in py_dcerpc_interface_init_helper()

The tevent_context is cached under the connection,
so we need to make sure it stays arround as long as the connection.

Otherwise it will segfault while dereferencing the tevent_context
on deallocation if a secondary connection is arround.

This completes commit 4cc3388c034fa43c855fba802a30bbd2e78122be,
which only fixed it in dcerpc_interface_new().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agotdb: always open internal databases with incompatible hash.
Michael Adam [Mon, 10 Feb 2014 15:23:48 +0000 (16:23 +0100)]
tdb: always open internal databases with incompatible hash.

This makes them more efficient due to better distribution
of keys across hash chains.

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): Sat Feb 15 08:26:07 CET 2014 on sn-devel-104