kai/samba.git
10 years agoclitar: add error return to tar_path_in_list()
David Disseldorp [Thu, 20 Feb 2014 18:47:47 +0000 (19:47 +0100)]
clitar: add error return to tar_path_in_list()

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>
10 years agoclitar: add error return to tar_extract_skip_path()
David Disseldorp [Thu, 20 Feb 2014 18:47:46 +0000 (19:47 +0100)]
clitar: add error return to tar_extract_skip_path()

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoclitar: add error return to tar_create_skip_path()
David Disseldorp [Thu, 20 Feb 2014 18:47:45 +0000 (19:47 +0100)]
clitar: add error return to tar_create_skip_path()

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>
10 years agoclitar: check for path_base_name() allocation errors
David Disseldorp [Thu, 20 Feb 2014 18:47:44 +0000 (19:47 +0100)]
clitar: check for path_base_name() allocation errors

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>
10 years agolib: Fix a typo
Volker Lendecke [Tue, 31 Dec 2013 14:28:04 +0000 (15:28 +0100)]
lib: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 20 22:58:59 CET 2014 on sn-devel-104

10 years agomessaging: Fix a memleak on error in messaging_tdb_init
Volker Lendecke [Sat, 28 Dec 2013 13:18:32 +0000 (14:18 +0100)]
messaging: Fix a memleak on error in messaging_tdb_init

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agolib: Avoid a strlen call in xx_path()
Volker Lendecke [Wed, 1 Jan 2014 10:38:52 +0000 (11:38 +0100)]
lib: Avoid a strlen call in xx_path()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agokrb5_locator: Slightly simplify code
Volker Lendecke [Thu, 13 Feb 2014 13:19:26 +0000 (13:19 +0000)]
krb5_locator: Slightly simplify code

This makes it a bit easier to read for me

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agowinbindd: Avoid using deallocated memory
Santosh Kumar Pradhan [Thu, 20 Feb 2014 10:21:37 +0000 (15:51 +0530)]
winbindd: Avoid using deallocated memory

Failure in ads_search_retry() deallocates the memory occupied
by "ads" which should not be used after.

CID: 242096

Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
10 years agomessaging: Enforce just one messaging context
Volker Lendecke [Tue, 18 Feb 2014 19:51:23 +0000 (20:51 +0100)]
messaging: Enforce just one messaging context

The current messaging implementation is based on a tdb indexed by server_id. If
we have more than one messaging context in a process, messages might not arrive
at the right context and be dropped, depending on which signal handler is
triggered first.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agovfstext: Use just one messaging_context in vfstest
Volker Lendecke [Tue, 18 Feb 2014 19:51:57 +0000 (20:51 +0100)]
vfstext: Use just one messaging_context in vfstest

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agospoolssd: Use only one messaging_context per process
Volker Lendecke [Tue, 18 Feb 2014 19:51:43 +0000 (20:51 +0100)]
spoolssd: Use only one messaging_context per process

After the fork, the code created a fresh messaging_context before doing the
reinit_after_fork. This means to have two initialized messaging contexts in
that process. This patch aligns spoolssd with lsad.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoheimdal_build: only enable libintl functions if everything was found
Christian Ambach [Wed, 19 Feb 2014 21:17:01 +0000 (22:17 +0100)]
heimdal_build: only enable libintl functions if everything was found

do not rely on intl.h being available but also on the functions being usable
This should fix the build on HP-UX

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9911
Signed-off-by: Christian Ambach <ambi@samba.org>
Change-Id: I5dd88d2d5216b778624778455cca99b32d0be58f
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Feb 20 01:28:24 CET 2014 on sn-devel-104

10 years agoparam: add const to a local variable to prevent a warning about lp_fstype
Garming Sam [Thu, 13 Feb 2014 21:38:55 +0000 (10:38 +1300)]
param: add const to a local variable to prevent a warning about lp_fstype

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: Idc9217eb812b018fed933f84c2c4f1818f8f9372
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
10 years agoparam: remove lp_dnsdomain from s3
Garming Sam [Fri, 24 Jan 2014 04:39:41 +0000 (17:39 +1300)]
param: remove lp_dnsdomain from s3

With the use of the shared globals structure, lp_dnsdomain is no longer used in the code and removing it would remove a notable special case

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: I59526c40c58e132a134d67fa7944dfeacd05f4c6
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
10 years agoparam: change s3_param.h from a generated file to a static one
Garming Sam [Fri, 24 Jan 2014 03:45:31 +0000 (16:45 +1300)]
param: change s3_param.h from a generated file to a static one

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: I131e37ec92f7a826caec382023915c5e4b4c52be
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
10 years agoparam: remove generated loadparm ctx table file and include it directly
Garming Sam [Fri, 24 Jan 2014 02:52:15 +0000 (15:52 +1300)]
param: remove generated loadparm ctx table file and include it directly

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: I5f1d42e3ae6495accf7a711938cc28c03ab2cd62
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
10 years agoparam: use loadparm_globals struct instead of lp function pointers in s3_helpers
Garming Sam [Fri, 24 Jan 2014 02:38:59 +0000 (15:38 +1300)]
param: use loadparm_globals struct instead of lp function pointers in s3_helpers

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: I4507cdbf111b7f9dca3ca18ee2bf242ffdfeb4e7
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
10 years agolib/param: rename lp_string to lpcfg_string
Garming Sam [Thu, 13 Feb 2014 21:23:36 +0000 (10:23 +1300)]
lib/param: rename lp_string to lpcfg_string

This avoids the confusion with lp_string in source3.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: Ic6df23b9e5986f7d1fd6253e30ebfdc1a3a45a41
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
10 years agolib/param: handle non-constant strings properly by passing in a memory context
Garming Sam [Thu, 16 Jan 2014 21:30:37 +0000 (10:30 +1300)]
lib/param: handle non-constant strings properly by passing in a memory context

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: Ic6bb1c709defd2b0f35fc7b877da0badca385776
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
10 years agos4: pass down a memory context when performing share_string_option, to allow substitu...
Garming Sam [Thu, 16 Jan 2014 21:16:12 +0000 (10:16 +1300)]
s4: pass down a memory context when performing share_string_option, to allow substitutions

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Change-Id: I24b36db3ac11834c3268b2da929e214c10268b16
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@samba.org>
10 years agobuild: check for libarchive version via pkgconfig
David Disseldorp [Wed, 19 Feb 2014 16:17:45 +0000 (17:17 +0100)]
build: check for libarchive version via pkgconfig

The previous libarchive linker and header file check was not suitible
for older libarchive versions that do not provide the function
archive_read_support_filter_all().

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Feb 19 20:19:07 CET 2014 on sn-devel-104

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>