samba.git
6 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>
6 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>
6 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>
6 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>
6 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>
6 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

6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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

6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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

6 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

6 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>
6 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>
6 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>
6 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>
6 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

6 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>
6 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>
6 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

6 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

6 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

6 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>
6 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>
6 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>