kai/samba.git
7 years agoselftest: Avoid test cross-contamination in samba.tests.posixacl
Andrew Bartlett [Sun, 11 Nov 2012 20:53:40 +0000 (07:53 +1100)]
selftest: Avoid test cross-contamination in samba.tests.posixacl

This creates a new xattr.tdb per unit test, which avoids once and for all
the issue of dev/inode reuse.

For test_setposixacl_dir_getntacl_smbd the file ownership also set specifically.

Andrew Bartlett

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
7 years agoselftest: Add tests for expected behaviour on directories as well as files
Andrew Bartlett [Sun, 11 Nov 2012 10:33:41 +0000 (21:33 +1100)]
selftest: Add tests for expected behaviour on directories as well as files

This is important because it covers the codepath which had the talloc
error fixed by commit 60cf4cb5a630506747431ecbf00d890509baf2f3
(vfs_acl_common: In add_directory_inheritable_components allocate on
psd as parent)

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Nov 11 15:48:10 CET 2012 on sn-devel-104

7 years agopysmbd: Add SMB_ACL_EXECUTE to the mask set by make_simple_acl()
Andrew Bartlett [Sun, 11 Nov 2012 11:07:49 +0000 (22:07 +1100)]
pysmbd: Add SMB_ACL_EXECUTE to the mask set by make_simple_acl()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agoselftest: Make samba.tests.ntacl also use TestCaseInTempDir
Andrew Bartlett [Sun, 11 Nov 2012 03:01:44 +0000 (14:01 +1100)]
selftest: Make samba.tests.ntacl also use TestCaseInTempDir

This follows on from the successful conversion of samba.tests.posixacl.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agosamba-tool: Rework ldap attribute fetch in classicupgrade for missing attributes
Andrew Bartlett [Sun, 11 Nov 2012 00:35:02 +0000 (11:35 +1100)]
samba-tool: Rework ldap attribute fetch in classicupgrade for missing attributes

Is is not required that these additional attributes be filled in, so
catch KeyError in both the nsswitch and ldap backend case.

We rework get_posix_attr_from_ldap_backend() so it raises KeyError
rather than trying to return None, and does not ignore other errors.

Andrew Bartlett

Tested-by: Chirana Gheorghita Eugeniu Theodor <office@adaptcom.ro>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
7 years agos3:smbd: Fix typo in got_duplicate_group check
Arvid Requate [Sat, 10 Nov 2012 09:40:32 +0000 (10:40 +0100)]
s3:smbd: Fix typo in got_duplicate_group check

Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Nov 10 20:25:48 CET 2012 on sn-devel-104

7 years agobuild: add DMAPI configure option and checks
Christian Ambach [Wed, 7 Nov 2012 17:40:07 +0000 (18:40 +0100)]
build: add DMAPI configure option and checks

the waf build was missing the --with-dmapi option
and configure checks that are necessary to build the
source3 parts that need DMAPI (e.g. vfs_tsmsm)

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

Signed-off-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Fri Nov  9 20:57:31 CET 2012 on sn-devel-104

7 years agobuild(waf): support AIX 6.1
Christian Ambach [Sat, 10 Nov 2012 00:58:43 +0000 (18:58 -0600)]
build(waf): support AIX 6.1

on AIX6.1, we need to define _ALL_SOURCE as well, otherwise
system headers with BSD types like u_int cannot be used

7 years agodoc: list arguments for rpcclient FSRVP commands
David Disseldorp [Wed, 7 Nov 2012 12:06:54 +0000 (13:06 +0100)]
doc: list arguments for rpcclient FSRVP commands

Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Nov  9 18:21:39 CET 2012 on sn-devel-104

7 years agodoc: describe samlogon cache caveat for winbindd -n
David Disseldorp [Tue, 6 Nov 2012 11:49:42 +0000 (12:49 +0100)]
doc: describe samlogon cache caveat for winbindd -n

The samlogon cache is never bypassed, even when winbindd is run with the
-n argument.
See https://bugzilla.samba.org/show_bug.cgi?id=9125

Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agoRevert "s3-winbindd: make sure we obey the -n switch also for samlogon cache access."
David Disseldorp [Tue, 6 Nov 2012 11:29:24 +0000 (12:29 +0100)]
Revert "s3-winbindd: make sure we obey the -n switch also for samlogon cache access."

This reverts commit ae6a779bf9f816680e724ede37324b7f5355996b.

Bug 9125 analysis from Volker:

The problem is that there are no network calls possible at all that
would do what the samlogon cache does for us. There is just no way to
retrieve the group membership in a complex trusted environment. If you
have just a single domain with Samba as domain controller it might be
possible, but even within a single domain it is not possible to
correctly retrieve all group memberships using LDAP calls due to ACLs on
directory objects. The call to get that is called NetSamLogon on the
NETLOGON pipe. But this call requires user credentials and might trigger
updating counts on the server. So to correctly implement wbinfo -r after
a user has logged in, you have two alternatives: Save the info3 struct
or the PAC in the netsamlogon cache. If you insist on doing network
calls, you need to cache the user credentials somewhere to re-do the
NetSamLogon call every time the wbinfo -r is requested.

Reviewed-by: Andreas Schneider <asn@samba.org>
7 years agoMakefile: Allow specifying PYTHON environment variable.
Jelmer Vernooij [Tue, 6 Nov 2012 21:29:07 +0000 (22:29 +0100)]
Makefile: Allow specifying PYTHON environment variable.

This is required for Minix, where python is named "python2.X".

Reviewed-by: Simo Sorce <idra@samba.org>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Fri Nov  9 16:39:09 CET 2012 on sn-devel-104

7 years agoconfigure: Support specifying PYTHON environment variable to run waf.
Jelmer Vernooij [Tue, 6 Nov 2012 21:24:07 +0000 (22:24 +0100)]
configure: Support specifying PYTHON environment variable to run waf.

This is necessary to run configure on Minix, where python is named
"python2.X".

Reviewed-by: Simo Sorce <idra@samba.org>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
7 years agotorture: Fix smb2.create.blob test.
Andreas Schneider [Wed, 7 Nov 2012 12:59:48 +0000 (13:59 +0100)]
torture: Fix smb2.create.blob test.

Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Nov  9 14:53:27 CET 2012 on sn-devel-104

7 years agosamba-tool: Fix typo in --help output.
Karolin Seeger [Fri, 9 Nov 2012 08:07:38 +0000 (09:07 +0100)]
samba-tool: Fix typo in --help output.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Nov  9 11:04:50 CET 2012 on sn-devel-104

7 years agos4-drs: Remove unused var
Matthieu Patou [Fri, 5 Oct 2012 09:09:47 +0000 (02:09 -0700)]
s4-drs: Remove unused var

Signed-off-by: Matthieu Patou <mat@matws.net>
7 years agos3fs-client: Burn commandline password of client utils.
Andreas Schneider [Tue, 6 Nov 2012 08:27:43 +0000 (09:27 +0100)]
s3fs-client: Burn commandline password of client utils.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov  8 21:24:21 CET 2012 on sn-devel-104

7 years agos3fs-popt: Add function to burn the commandline password.
Andreas Schneider [Tue, 6 Nov 2012 08:27:42 +0000 (09:27 +0100)]
s3fs-popt: Add function to burn the commandline password.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed by: Jeremy Allison <jra@samba.org>

7 years agoRemove two unused variables
Volker Lendecke [Wed, 7 Nov 2012 14:33:10 +0000 (15:33 +0100)]
Remove two unused variables

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Nov  7 17:18:06 CET 2012 on sn-devel-104

7 years agolib/util: Simplify bitmap.c a bit
Volker Lendecke [Tue, 30 Oct 2012 22:15:09 +0000 (23:15 +0100)]
lib/util: Simplify bitmap.c a bit

This avoids the double-talloc for bitmaps

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agolib/util: Make "struct bitmap" abstract
Volker Lendecke [Tue, 30 Oct 2012 21:43:21 +0000 (22:43 +0100)]
lib/util: Make "struct bitmap" abstract

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agoheimdal_build: Fix finding of system heimdal.
Jelmer Vernooij [Mon, 5 Nov 2012 22:38:23 +0000 (23:38 +0100)]
heimdal_build: Fix finding of system heimdal.

When checking for Heimdal headers, make sure HAVE_CONFIG_H is not
defined, as config.h will not be available.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Tue Nov  6 16:27:03 CET 2012 on sn-devel-104

7 years agoheimdal_build: HEIMDAL_LIBRARY(): Remove unused cflags argument.
Jelmer Vernooij [Mon, 5 Nov 2012 22:33:21 +0000 (23:33 +0100)]
heimdal_build: HEIMDAL_LIBRARY(): Remove unused cflags argument.

7 years agoselftest/skip: add samba.tests.samba_tool.gpo until it's stable
Stefan Metzmacher [Tue, 6 Nov 2012 11:16:37 +0000 (12:16 +0100)]
selftest/skip: add samba.tests.samba_tool.gpo until it's stable

See:

https://git.samba.org/autobuild.flakey/2012-11-06-0314/samba.stdout
https://git.samba.org/autobuild.flakey/2012-11-06-0514/samba.stdout
https://git.samba.org/autobuild.flakey/2012-11-06-0713/samba.stdout

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Nov  6 14:24:08 CET 2012 on sn-devel-104

7 years agoldb_secrets_tdb_sync: Add dependency on gssapi.
Jelmer Vernooij [Tue, 6 Nov 2012 00:25:00 +0000 (01:25 +0100)]
ldb_secrets_tdb_sync: Add dependency on gssapi.

This is required when building with the system heimdal, as
gssapi/gssapi_spnego.h is included.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Nov  6 05:12:28 CET 2012 on sn-devel-104

7 years agodsdb: Rename _res argument to _result.
Jelmer Vernooij [Tue, 6 Nov 2012 00:24:59 +0000 (01:24 +0100)]
dsdb: Rename _res argument to _result.

Newer versions of heimdal include a macro that is unfortunately named
'_res'. This change prevents the clash.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agoprovision: Make dsacl2fsacl() take a security.dom_sid, not str
Andrew Bartlett [Mon, 5 Nov 2012 09:44:14 +0000 (20:44 +1100)]
provision: Make dsacl2fsacl() take a security.dom_sid, not str

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Nov  6 00:12:43 CET 2012 on sn-devel-104

7 years agoprovision: Also walk directories checking ACLs
Andrew Bartlett [Mon, 5 Nov 2012 04:22:02 +0000 (15:22 +1100)]
provision: Also walk directories checking ACLs

The directory walk was missed due to a cut-and-paste error.

Andrew Bartlett

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agowintest: Try harder to recover from apparent failure to dcpromo
Andrew Bartlett [Mon, 5 Nov 2012 08:35:51 +0000 (19:35 +1100)]
wintest: Try harder to recover from apparent failure to dcpromo

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agoselftest: check that samba-tool gpo works for basic operations
Andrew Bartlett [Mon, 5 Nov 2012 01:57:17 +0000 (12:57 +1100)]
selftest: check that samba-tool gpo works for basic operations

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
7 years agodsdb: Simplify DsCrackNameOneFilter a bit
Volker Lendecke [Sat, 3 Nov 2012 08:36:29 +0000 (09:36 +0100)]
dsdb: Simplify DsCrackNameOneFilter a bit

For me "else" branches clutter my flow reading code. If we do a hard
return at the end of an "if" branch, "else" is not required.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agowafsamba.abi: Fix abi_match with both excludes and includes.
Jelmer Vernooij [Mon, 5 Nov 2012 18:36:30 +0000 (19:36 +0100)]
wafsamba.abi: Fix abi_match with both excludes and includes.

This fixes a regression introduced by 9c3e294400234ebdf9b98031bae583524fd0b0ac
which caused internal symbols in libldb to be exposed.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
7 years agowafsamba.samba_abi: Add basic unit tests.
Jelmer Vernooij [Mon, 5 Nov 2012 18:36:29 +0000 (19:36 +0100)]
wafsamba.samba_abi: Add basic unit tests.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
7 years agobuildtools: Remove extra space from global: line
Andrew Bartlett [Mon, 5 Nov 2012 20:48:52 +0000 (07:48 +1100)]
buildtools: Remove extra space from global: line

This makes it easier to put the expected values in a file
as we will not have trailing whitespace that is against git style.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
7 years agowafsamba.samba_abi: Refactor abi_write_vscript to take file argument.
Jelmer Vernooij [Mon, 5 Nov 2012 18:36:28 +0000 (19:36 +0100)]
wafsamba.samba_abi: Refactor abi_write_vscript to take file argument.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
7 years agos3:smbd: pass the current time to make_connection[_smb1]()
Stefan Metzmacher [Thu, 1 Nov 2012 12:53:27 +0000 (13:53 +0100)]
s3:smbd: pass the current time to make_connection[_smb1]()

Otherwise smbstatus reports the wrong time for tree connects.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Mon Nov  5 20:43:23 CET 2012 on sn-devel-104

7 years agos3:utils fix a whitespace error
Christian Ambach [Fri, 2 Nov 2012 07:42:28 +0000 (08:42 +0100)]
s3:utils fix a whitespace error

7 years agos3:vfs_default: optimize vfswrap_asys_finished() and read as much as we can
Stefan Metzmacher [Fri, 2 Nov 2012 11:52:51 +0000 (12:52 +0100)]
s3:vfs_default: optimize vfswrap_asys_finished() and read as much as we can

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Nov  5 19:01:13 CET 2012 on sn-devel-104

7 years agolib/tsocket: optimize syscalls in tstream_readv_pdu_send()
Stefan Metzmacher [Fri, 2 Nov 2012 12:56:53 +0000 (13:56 +0100)]
lib/tsocket: optimize syscalls in tstream_readv_pdu_send()

Once we've got the first part of a pdu we try to optimize
readv calls for the rest of the pdu.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agolib/tsocket: disable the syscall optimization for recvfrom/readv by default
Stefan Metzmacher [Fri, 2 Nov 2012 12:45:49 +0000 (13:45 +0100)]
lib/tsocket: disable the syscall optimization for recvfrom/readv by default

We only do the optimization on recvfrom/readv if the caller asked for it.

This is needed because in most cases we preferr to flush send
buffers before receiving incoming requests.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
7 years agolibads: Always free the talloc_stackframe() on error path
Andrew Bartlett [Sun, 4 Nov 2012 22:46:49 +0000 (09:46 +1100)]
libads: Always free the talloc_stackframe() on error path

Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Nov  5 03:33:32 CET 2012 on sn-devel-104

7 years agoselftest: Add skip for DIR1 test which loops on 64 bit ext4
Andrew Bartlett [Fri, 2 Nov 2012 22:57:40 +0000 (09:57 +1100)]
selftest: Add skip for DIR1 test which loops on 64 bit ext4

Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Nov  5 00:34:56 CET 2012 on sn-devel-104

7 years agos4-dns: Fix format string vulnerability in an error message (bug #9354)
Amitay Isaacs [Sun, 4 Nov 2012 14:09:28 +0000 (01:09 +1100)]
s4-dns: Fix format string vulnerability in an error message (bug #9354)

Also, fixes few comments.

Thanks to Bruno Rohée <bruno@rohee.org> for reporting and patch fix.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-By: Kai Blin <kai@samba.org>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Sun Nov  4 16:58:13 CET 2012 on sn-devel-104

7 years agovfs_acl_common: In add_directory_inheritable_components allocate on psd as parent
Andrew Bartlett [Wed, 31 Oct 2012 22:51:28 +0000 (09:51 +1100)]
vfs_acl_common: In add_directory_inheritable_components allocate on psd as parent

When we add a new DACL to the security descriptor, we need to use the
SD as the memory context, so we can talloc_move() it as a tree to a
new parent.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov  2 22:16:14 CET 2012 on sn-devel-104

7 years agosmb2_server: Fix typo in comment.
Karolin Seeger [Fri, 2 Nov 2012 09:41:01 +0000 (10:41 +0100)]
smb2_server: Fix typo in comment.

Karolin

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Nov  2 15:40:22 CET 2012 on sn-devel-104

7 years agobuild(waf): Fail "configure --with-cluster-support" if ctdb support is not available.
Björn Baumbach [Tue, 30 Oct 2012 15:04:10 +0000 (16:04 +0100)]
build(waf): Fail "configure --with-cluster-support" if ctdb support is not available.

Currently, configure only warns if cluster support is not found.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agos3-torture:test_ctdbconn: fix the build against older ctdb versions
Björn Baumbach [Tue, 30 Oct 2012 15:45:30 +0000 (16:45 +0100)]
s3-torture:test_ctdbconn: fix the build against older ctdb versions

by checking if we have the ctdb_protocol.h and including ctdb_private.h otherwise.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agos3:ctdb library: fix the build against older ctdb versions
Björn Baumbach [Wed, 17 Oct 2012 14:54:33 +0000 (16:54 +0200)]
s3:ctdb library: fix the build against older ctdb versions

by checking if we have the ctdb_protocol.h and including ctdb_private.h otherwise.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agobuild(waf): check if we have ctdb_protocol.h in the cluster checks
Björn Baumbach [Tue, 30 Oct 2012 12:59:41 +0000 (13:59 +0100)]
build(waf): check if we have ctdb_protocol.h in the cluster checks

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agobuild(autoconf): check if we have ctdb_protocol.h in the cluster checks
Björn Baumbach [Tue, 30 Oct 2012 12:26:24 +0000 (13:26 +0100)]
build(autoconf): check if we have ctdb_protocol.h in the cluster checks

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agobuild(autoconf): fix check for ctdb_private.h
Björn Baumbach [Tue, 30 Oct 2012 12:40:48 +0000 (13:40 +0100)]
build(autoconf): fix check for ctdb_private.h

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agobuild(waf): fix the cluster(ctdb) build without system talloc installed
Michael Adam [Tue, 30 Oct 2012 13:43:42 +0000 (14:43 +0100)]
build(waf): fix the cluster(ctdb) build without system talloc installed

This is analogous to the earlier patch for tdb.
It temporarily adds the talloc include path to the
includes search list for the ctdb-header configure checks.

Signed-off-by: Michael Adam <obnox@samba.org>
Tested-by: Björn Baumbach <bb@sernet.de>
7 years agobuild(waf): fix a tab indentation to spaces
Michael Adam [Tue, 30 Oct 2012 13:41:04 +0000 (14:41 +0100)]
build(waf): fix a tab indentation to spaces

Signed-off-by: Michael Adam <obnox@samba.org>
7 years agodocs-xml: fix use of <smbconfoption> tag (fix bug #9345)
Björn Baumbach [Fri, 2 Nov 2012 09:25:27 +0000 (10:25 +0100)]
docs-xml: fix use of <smbconfoption> tag (fix bug #9345)

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Karolin Seeger <ks@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Fri Nov  2 12:37:42 CET 2012 on sn-devel-104

7 years agos3:smbd:smb2: fix a comment typo in the crediting code.
Michael Adam [Thu, 1 Nov 2012 16:55:59 +0000 (17:55 +0100)]
s3:smbd:smb2: fix a comment typo in the crediting code.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Nov  2 10:09:36 CET 2012 on sn-devel-104

7 years agos3:winbindd: use PROTOCOL_LATEST instead of PROTOCOL_SMB2_02 (bug #9175)
Stefan Metzmacher [Mon, 22 Oct 2012 12:35:41 +0000 (14:35 +0200)]
s3:winbindd: use PROTOCOL_LATEST instead of PROTOCOL_SMB2_02 (bug #9175)

We should use the latest supported dialect.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewd-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Nov  1 18:11:27 CET 2012 on sn-devel-104

7 years agos3:winbindd: disconnection after getting NETWORK_SESSION_EXPIRED (bug #9175)
Stefan Metzmacher [Mon, 22 Oct 2012 12:31:20 +0000 (14:31 +0200)]
s3:winbindd: disconnection after getting NETWORK_SESSION_EXPIRED (bug #9175)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agolibcli/smb: add smbXcli_session_set_disconnect_expired() (bug #9175)
Stefan Metzmacher [Mon, 22 Oct 2012 12:18:20 +0000 (14:18 +0200)]
libcli/smb: add smbXcli_session_set_disconnect_expired() (bug #9175)

This should be a short term hack until the upper layers have implemented
re-authentication.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agolib/krb5_wrap: request enc_types in the correct order (bug #9272)
Stefan Metzmacher [Mon, 22 Oct 2012 11:47:48 +0000 (13:47 +0200)]
lib/krb5_wrap: request enc_types in the correct order (bug #9272)

aes256-cts-hmac-sha1-96 and aes128-cts-hmac-sha1-96
should have a higher priority than arcfour-hmac-md5,
otherwise the KDC still gives us arcfour-hmac-md5 session keys.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agos3:winbindd:cache: fix offline logons with cached credentials (bug #9321)
Michael Adam [Thu, 1 Nov 2012 13:41:56 +0000 (14:41 +0100)]
s3:winbindd:cache: fix offline logons with cached credentials (bug #9321)

The removal of consumption of the time field from the centry
as "removal of unused variable" in 21528da9cd12a4f5c3792a482a5d18fe946a6f7a
had the side effect of changing the offset for reading the following
nt password hash, so the read password hash was wrong.

This patch re-installs the consumption of the time,
thereby fixing the bug without changing the disk format of the cache.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agos3-param: Move the options needed for running smbd in the AD DC to loadparm
Andrew Bartlett [Thu, 1 Nov 2012 00:26:16 +0000 (11:26 +1100)]
s3-param: Move the options needed for running smbd in the AD DC to loadparm

This avoids the whole fileserver.conf thing, and simply handles everything in C.

The main challenge is that if s3fs is enabled in a member server
configuration (unlikely) then these options will not be set, and it
overrides any other attempt to set these as globals.  (The previous
approach essentially just changed defaults, because the include =
of smb.conf was after the values were set in fileserver.conf).

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Nov  1 11:47:22 CET 2012 on sn-devel-104

7 years agofile_server: put set create mask and directory mask in fileserver.conf
Andrew Bartlett [Thu, 1 Nov 2012 00:24:00 +0000 (11:24 +1100)]
file_server: put set create mask and directory mask in fileserver.conf

This allows any ACL to be set from the client, without restriction
from the Samba side.

Based on advise from Jermey at https://lists.samba.org/archive/samba-technical/2012-October/088414.html

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
7 years agotest-chgdcpass: test the ldap case for server password change
Andrew Tridgell [Thu, 1 Nov 2012 03:11:02 +0000 (14:11 +1100)]
test-chgdcpass: test the ldap case for server password change

use samba-tool drs options which does both RPC and LDAP connections

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Tridgell <tridge@samba.org>
Autobuild-Date(master): Thu Nov  1 07:21:17 CET 2012 on sn-devel-104

7 years agos4-ldapclient: cope with logon failure retry in LDAP
Andrew Tridgell [Thu, 1 Nov 2012 03:10:14 +0000 (14:10 +1100)]
s4-ldapclient: cope with logon failure retry in LDAP

similar to what was done for rpc and cifs, we now retry once on logon
failure for ldap, allowing for a new ticket to be fetched when a
server password changes while we have a valid ticket for the old
password

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

7 years agos4-librpc: set error code to LOGON_FAILURE on RPC fault with access denied
Andrew Tridgell [Thu, 1 Nov 2012 02:42:52 +0000 (13:42 +1100)]
s4-librpc: set error code to LOGON_FAILURE on RPC fault with access denied

this allows the client code to trigger a retry with a new password
callback for NTLM connections

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

7 years agosamba-tool: "drs options" does not need a samdb connection
Andrew Tridgell [Thu, 1 Nov 2012 02:31:47 +0000 (13:31 +1100)]
samba-tool: "drs options" does not need a samdb connection

this gives us a handy pure RPC client test for use in blackbox testing

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

7 years agos4-librpc: try a 2nd logon for more error cases
Andrew Tridgell [Thu, 1 Nov 2012 02:30:47 +0000 (13:30 +1100)]
s4-librpc: try a 2nd logon for more error cases

not all servers give LOGON_FAILURE on authentication failures, so we
need to do the retry with a new ticket on a wider range of error types

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

7 years agoldb: fixed callers for ldb_pack_data() and ldb_unpack_data()
Andrew Tridgell [Wed, 31 Oct 2012 05:06:03 +0000 (16:06 +1100)]
ldb: fixed callers for ldb_pack_data() and ldb_unpack_data()

with ltdb_pack_data() and ltdb_unpack_data() now moved into common, we
need to increase the minor version and fixup callers of the API

Note that this relies on struct ldb_val being the same shape as
TDB_DATA, in much the same way as we rely on ldb_val and DATA_BLOB
being the same shape.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

7 years agoldb: move ldb_pack.c into common
Andrew Tridgell [Wed, 31 Oct 2012 04:39:09 +0000 (15:39 +1100)]
ldb: move ldb_pack.c into common

this code should not be tied to the ldb_tdb backend, both because it
could be used for any record oriented backend, and because it should
be exposed for use by diagnosis/repair tools such as the recently
added ldbdump tool

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

7 years agotest_chgdpass: use drs bind to test password change on RPC
Andrew Tridgell [Wed, 31 Oct 2012 07:45:25 +0000 (18:45 +1100)]
test_chgdpass: use drs bind to test password change on RPC

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

7 years agos4-librpc: use cli_credentials_failed_kerberos_login to cope with stale tickets
Andrew Tridgell [Wed, 31 Oct 2012 07:44:23 +0000 (18:44 +1100)]
s4-librpc: use cli_credentials_failed_kerberos_login to cope with stale tickets

This allows our RPC client code to cope with a kerberos server
changing password while we have a valid service ticket

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

7 years agotest_chgdpass: added test for kerberos retry
Andrew Tridgell [Wed, 31 Oct 2012 07:00:43 +0000 (18:00 +1100)]
test_chgdpass: added test for kerberos retry

this tests that we correctly retry with a new ccache entry when a
server changes its password while we have a valid ticket

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

7 years agolibcli: use cli_credentials_failed_kerberos_login() to cope with server changes
Andrew Tridgell [Wed, 31 Oct 2012 06:59:54 +0000 (17:59 +1100)]
libcli: use cli_credentials_failed_kerberos_login() to cope with server changes

if a server changes while we have a valid ticket we want to retry
after removing the ccache entry.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

7 years agoauth: added cli_credentials_failed_kerberos_login()
Andrew Tridgell [Wed, 31 Oct 2012 06:58:20 +0000 (17:58 +1100)]
auth: added cli_credentials_failed_kerberos_login()

this is used to support retrying kerberos connections after removing a
ccache entry, to cope with a server being re-built while our client
still has a valid service ticket

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

7 years agoutil: remove accidently committed hunk
Björn Jacke [Wed, 31 Oct 2012 14:31:08 +0000 (15:31 +0100)]
util: remove accidently committed hunk

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Oct 31 19:25:30 CET 2012 on sn-devel-104

7 years agoAdd regression test for bug #9329 - Directory listing with SeBackup can crash smbd.
Jeremy Allison [Mon, 29 Oct 2012 21:49:36 +0000 (14:49 -0700)]
Add regression test for bug #9329 - Directory listing with SeBackup can crash smbd.

Ensure we exercise the SeBackup code path on directory listings.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Oct 31 03:21:38 CET 2012 on sn-devel-104

7 years agoldb: Add ldbdump, based on tdbdump
Andrew Bartlett [Tue, 30 Oct 2012 04:41:27 +0000 (15:41 +1100)]
ldb: Add ldbdump, based on tdbdump

This uses a tdb_traverse or (more usefully) the tdb_rescue API, like tdbdump.

The difference here is that it uses ldb helper functions to further
eliminate faulty records, which avoids creating duplicates in the output.

(The duplicates come from parts of records that are left in blank space
in the db, which tdb_rescue finds, but which are not actually a full
record).

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Oct 30 23:56:11 CET 2012 on sn-devel-104

7 years agoldb: Remove no-longer-existing ltdb_unpack_data_free from ldb_tdb.h
Andrew Bartlett [Mon, 29 Oct 2012 23:22:28 +0000 (10:22 +1100)]
ldb: Remove no-longer-existing ltdb_unpack_data_free from ldb_tdb.h

7 years agoldb: Change ltdb_unpack_data to take an ldb_context
Andrew Bartlett [Mon, 29 Oct 2012 23:21:42 +0000 (10:21 +1100)]
ldb: Change ltdb_unpack_data to take an ldb_context

It always de-references the module to find the ldb anyway.

Andrew Bartlett

7 years agosamba-tool: Add samba-tool processes subcommand
Andrew Bartlett [Mon, 29 Oct 2012 04:36:36 +0000 (15:36 +1100)]
samba-tool: Add samba-tool processes subcommand

This will allow administrators to inspect the process list in a
similar way to what running on a platform with setproctitle might
permit.

--pid= returns the registered server names for a PID (eg kdc, cldap_server)
--name= returns the pids registered with a particular name.

Andrew Bartlett

7 years agopymessaging: Add irpc_servers_byname() and irpc_all_servers()
Andrew Bartlett [Mon, 29 Oct 2012 04:34:41 +0000 (15:34 +1100)]
pymessaging: Add irpc_servers_byname() and irpc_all_servers()

This will allow python scripts to inspect the process list.

Andrew Bartlett

7 years agopymessaging: Use the server_id IDL structure rather than a tuple
Andrew Bartlett [Mon, 29 Oct 2012 04:33:59 +0000 (15:33 +1100)]
pymessaging: Use the server_id IDL structure rather than a tuple

This will make it easier to pass this structure in and out.  The tuple is still
accepted as input.

Andrew Bartlett

7 years agoimessaging: Add irpc_all_servers() to list all available servers
Andrew Bartlett [Mon, 29 Oct 2012 04:32:21 +0000 (15:32 +1100)]
imessaging: Add irpc_all_servers() to list all available servers

This is implemented with a tdb_traverse_read(), and will allow a tool
to disover the name and server_id of all Samba processes, as each
process registers itself to recieve messages.

Andrew Bartlett

7 years agos3fs-utils: Free the popt context in smbcacls and smbquotas.
Andreas Schneider [Mon, 29 Oct 2012 20:12:14 +0000 (21:12 +0100)]
s3fs-utils: Free the popt context in smbcacls and smbquotas.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 30 20:22:46 CET 2012 on sn-devel-104

7 years agos3fs-net: Use talloc for memory allocation.
Andreas Schneider [Mon, 29 Oct 2012 20:12:13 +0000 (21:12 +0100)]
s3fs-net: Use talloc for memory allocation.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed by: Jeremy Allison <jra@samba.org>

7 years agos3:docs document shadow:snapdirseverywhere option of vfs_shadow_copy2
Christian Ambach [Tue, 30 Oct 2012 14:39:02 +0000 (15:39 +0100)]
s3:docs document shadow:snapdirseverywhere option of vfs_shadow_copy2

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Oct 30 18:32:57 CET 2012 on sn-devel-104

7 years agos3:smb2_read: fix SMBD_SMB2_NUM_IOV_PER_REQ check for sendfile() support (bug #9341)
Stefan Metzmacher [Tue, 30 Oct 2012 10:08:19 +0000 (11:08 +0100)]
s3:smb2_read: fix SMBD_SMB2_NUM_IOV_PER_REQ check for sendfile() support (bug #9341)

Reported-by: Sebastien LAVEZE <sebastien.laveze@mindspeed.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Tested-by: Sebastien LAVEZE <sebastien.laveze@mindspeed.com>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Oct 30 16:49:26 CET 2012 on sn-devel-104

7 years agowafbuild: use -Wstack-protector if available
Björn Jacke [Tue, 30 Oct 2012 12:00:58 +0000 (13:00 +0100)]
wafbuild: use -Wstack-protector if available

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Oct 30 15:04:30 CET 2012 on sn-devel-104

7 years agowafbuild: use WERROR_FLAGS in wscript_configure_system_mitkrb5
Björn Jacke [Tue, 30 Oct 2012 11:19:24 +0000 (12:19 +0100)]
wafbuild: use WERROR_FLAGS in wscript_configure_system_mitkrb5

7 years agoccan/wafbuild: use WERROR_CFLAGS instead of -Werror
Björn Jacke [Tue, 30 Oct 2012 11:07:26 +0000 (12:07 +0100)]
ccan/wafbuild: use WERROR_CFLAGS instead of -Werror

7 years agowafbuild: reorder the Werror checks so that the ambigous w2 option is being checked...
Björn Jacke [Tue, 30 Oct 2012 10:48:25 +0000 (11:48 +0100)]
wafbuild: reorder the Werror checks so that the ambigous w2 option is being checked last

7 years agowafbuild: merge the missing IBM compiler Werror flag "-qhalt=w" to waf
Björn Jacke [Tue, 30 Oct 2012 10:37:34 +0000 (11:37 +0100)]
wafbuild: merge the missing IBM compiler Werror flag "-qhalt=w" to waf

7 years agowfabuild: fix the -errwarn compile flag test
Björn Jacke [Tue, 30 Oct 2012 10:32:52 +0000 (11:32 +0100)]
wfabuild: fix the -errwarn compile flag test

as in the autoconf build this must be "-errwarn=%all"

7 years agopackaging: Add NetworkManager dispatcher script for winbind.
Andreas Schneider [Fri, 26 Oct 2012 10:46:21 +0000 (12:46 +0200)]
packaging: Add NetworkManager dispatcher script for winbind.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Oct 30 13:17:02 CET 2012 on sn-devel-104

7 years agos3: Use file_id_string in file_id_string_tos
Volker Lendecke [Mon, 29 Oct 2012 15:41:15 +0000 (16:41 +0100)]
s3: Use file_id_string in file_id_string_tos

Reviewed by Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct 30 00:05:34 CET 2012 on sn-devel-104

7 years agos3: Fix some nonempty line endings
Volker Lendecke [Mon, 29 Oct 2012 15:35:49 +0000 (16:35 +0100)]
s3: Fix some nonempty line endings

Reviewed by Jeremy Allison <jra@samba.org>

7 years agolib/param: fix line length of DEBUG statments touched in previous commit in set_varia...
Michael Adam [Mon, 29 Oct 2012 14:16:04 +0000 (15:16 +0100)]
lib/param: fix line length of DEBUG statments touched in previous commit in set_variable()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Mon Oct 29 21:55:35 CET 2012 on sn-devel-104

7 years agolib/param: fix function name (set_variable) in debug statements
Michael Adam [Mon, 29 Oct 2012 13:52:50 +0000 (14:52 +0100)]
lib/param: fix function name (set_variable) in debug statements

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
7 years agolib/param: fix function name (lpcfg_file_list_changed) in a debug message
Michael Adam [Mon, 29 Oct 2012 12:44:54 +0000 (13:44 +0100)]
lib/param: fix function name (lpcfg_file_list_changed) in a debug message

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
7 years agos3:smbd:durable: remove a TODO comment about write time updates
Michael Adam [Tue, 23 Oct 2012 15:18:47 +0000 (17:18 +0200)]
s3:smbd:durable: remove a TODO comment about write time updates

This has been done.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Oct 29 20:12:18 CET 2012 on sn-devel-104