metze/samba/wip.git
10 years agos3: Fix some blank line endings
Volker Lendecke [Wed, 26 Sep 2012 23:53:48 +0000 (16:53 -0700)]
s3: Fix some blank line endings

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Sep 27 07:57:03 CEST 2012 on sn-devel-104
(cherry picked from commit aad669b53eca99f86c2e630bf3f2e9f594fed9c1)

10 years agosmbd: Simplify dropbox special case in unix_convert
Volker Lendecke [Mon, 19 Aug 2013 10:26:00 +0000 (10:26 +0000)]
smbd: Simplify dropbox special case in unix_convert

EACCESS needs special treatment: If we want to create a fresh file,
return OBJECT_PATH_NOT_FOUND, so that the client will continue creating
the file. If the client wants us to open a potentially existing file,
we need to correctly return ACCESS_DENIED.

This patch makes this behaviour hopefully a bit clearer than the code
before did.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Aug 26 12:14:26 CEST 2013 on sn-devel-104

The last 2 patches address bug #10114 - Dropbox (write-only-directory) case
isn't handled correctly in pathname lookup.

10 years agosmbd: Fix a profile problem
Volker Lendecke [Tue, 9 Jul 2013 18:02:39 +0000 (11:02 -0700)]
smbd: Fix a profile problem

When trying to read a profile, under certain circumstances Windows tries
to read with its machine account first. The profile previously written
was stored with an ACL that only allows access for the user and not
the machine. Windows should get an NT_STATUS_ACCESS_DENIED when using
the machine account, making it retry with the user account (which would
then succeed).

Samba under these circumstances erroneously gives
NT_STATUS_OBJECT_PATH_NOT_FOUND, which makes Windows give up and not
retry. The reasons is the "dropbox" patch in unix_convert, turning EACCESS
on the last path component to OBJECT_PATH_NOT_FOUND. This patch makes
the dropbox behaviour only kick in when we are creating a file. I think
this is an abstraction violation. unix_convert() should not have to know
about the create_disposition, but given that we have pathname resolution
separated from the core open code right now this is the best we can do.

Signed-off-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoFix bug #10063 - source3/lib/util.c:1493 leaking memory w/ pam_winbind.so / winbind
Jeremy Allison [Fri, 2 Aug 2013 22:03:39 +0000 (15:03 -0700)]
Fix bug #10063 - source3/lib/util.c:1493 leaking memory w/ pam_winbind.so / winbind

Don't use talloc_tos() in something that can be linked to in pam_winbindd.so

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Sat Aug 24 02:28:28 CEST 2013 on sn-devel-104
(cherry picked from commit 9423d5afb71e272298f4858d82f436e19ee2b07f)

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Tue Aug 27 11:39:07 CEST 2013 on sn-devel-104

10 years agos3-winbindd: fix fallback to ncacn_np in cm_connect_lsat().
Günther Deschner [Mon, 12 Aug 2013 15:23:12 +0000 (17:23 +0200)]
s3-winbindd: fix fallback to ncacn_np in cm_connect_lsat().

Fallback to lsa named-pipe connection when tcp connection has failed twice (it
could be a trusted domain connection where we cannot setup a secure channel).

Guenther

BUG: https://bugzilla.samba.org/show_bug.cgi?id=9615
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9899

Signed-off-by: Günther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Tested-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug 13 20:55:33 CEST 2013 on sn-devel-104

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Tue Aug 20 12:58:03 CEST 2013 on sn-devel-104

10 years agowaf: replace dependency to libintl with samba_intl
Christian Ambach [Thu, 1 Aug 2013 21:00:21 +0000 (23:00 +0200)]
waf: replace dependency to libintl with samba_intl

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Mon Aug 12 00:46:34 CEST 2013 on sn-devel-104
(cherry picked from commit 20b64eae75b8809d67b8c2824616996bb4722612)

The last 5 patches address bug #9911 - Build Samba 4.0.x on AIX with IBM XL
C/C++.

10 years agowaf: consolidate libintl related checks
Christian Ambach [Thu, 1 Aug 2013 20:28:05 +0000 (22:28 +0200)]
waf: consolidate libintl related checks

consolidate the dealing with functions from libintl and the
handling of checking if libiconv is required or not
to a common place in lib/replace

also add a new samba_intl subsystem that has dependencies
on the appropriate set of libraries (libintl, libintl+libiconv or none)
that can be used as a general dependency by code that depends
on the internationalization libraries

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 07b3a048724a6b41282e1f673aea5ce2c1202a5e)

10 years agowaf: add --without-gettext option
Christian Ambach [Tue, 25 Jun 2013 16:37:35 +0000 (18:37 +0200)]
waf: add --without-gettext option

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit a742e87b39bed97ac59f5ec8bff9bf3cedf8b68a)

10 years agowaf: fix build on AIX7
Christian Ambach [Thu, 20 Jun 2013 16:26:04 +0000 (18:26 +0200)]
waf: fix build on AIX7

the same works for AIX 5,6,7 so leave away the version specifics (as autoconf build did)

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit ce8fbdf76ee2792d011d9da4d0116f04d9656886)

10 years agos3:lib/system fix build on AIX 7
Christian Ambach [Thu, 20 Jun 2013 16:27:13 +0000 (18:27 +0200)]
s3:lib/system fix build on AIX 7

AIX uses struct stat64 with struct timespec64, so direct assignment does
not work any more.

Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Signed-off-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Aug  2 09:47:43 CEST 2013 on sn-devel-104
(cherry picked from commit ba40d0d9d320e500621a6a8107a2ef0a34aeb6ba)

10 years agosmbd: Fix async echo handler forking (Bug 10086)
Volker Lendecke [Wed, 14 Aug 2013 10:46:46 +0000 (10:46 +0000)]
smbd: Fix async echo handler forking (Bug 10086)

If SMB3 is chosen via an SMB1 negprot, we forked the echo handler because
set_Protocol is called later, after the full protocol negotiation is done.

Signed-off-by: Volker Lendecke <vl@samba.org>
10 years agoFix bug #10097 - MacOSX 10.9 will not follow path-based DFS referrals handed out...
Richard Sharpe [Sun, 18 Aug 2013 14:34:31 +0000 (07:34 -0700)]
Fix bug #10097 - MacOSX 10.9 will not follow path-based DFS referrals handed out by Samba.

Windows overloads the EA Length field in the DIRECTORY INFO leves of FIND FIRST/FIND NEXT.

This field indicates either the REPARSE_TAG if the file/folder has a reparse proint or
the EA Length if it has EAs, and is the fundamental reason you cannot have both on a
file or folder.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agodocs: Fix variable list in man vfs_crossrename.
Karolin Seeger [Tue, 13 Aug 2013 09:04:50 +0000 (11:04 +0200)]
docs: Fix variable list in man vfs_crossrename.

The varlist entries need a paragraph, otherwise the list is broken and the list
entries end with ".RE".

Fix bug #10076 - varlist in man vfs_crossrename broken.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 20 04:19:42 CEST 2013 on sn-devel-104
(cherry picked from commit 1808316b1245290fd4a4aa87a801410899e4c1e3)

10 years agoVERSION: Bump version number up to 4.0.10...
Karolin Seeger [Thu, 15 Aug 2013 08:19:46 +0000 (10:19 +0200)]
VERSION: Bump version number up to 4.0.10...

and re-enable git snapshots.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoVERSION: Disable git snapshots for the 4.0.9 release. samba-upstream/tags/samba-4.0.9
Karolin Seeger [Thu, 15 Aug 2013 08:18:21 +0000 (10:18 +0200)]
VERSION: Disable git snapshots for the 4.0.9 release.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoWHATSNEW: Prepare release notes for Samba 4.0.9.
Karolin Seeger [Thu, 15 Aug 2013 08:17:11 +0000 (10:17 +0200)]
WHATSNEW: Prepare release notes for Samba 4.0.9.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agos3-libads: Print a message if no realm has been specified.
Andreas Schneider [Mon, 5 Aug 2013 07:25:11 +0000 (09:25 +0200)]
s3-libads: Print a message if no realm has been specified.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Aug  5 12:24:44 CEST 2013 on sn-devel-104

(cherry picked from commit 6659f0164c6b8d7ad522bcd6c2c6748c3d9bca81)

The last 2 patches address bug #10073 - net ads join - segmentation fault in
create_local_private_krb5_conf_for_domain.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Tue Aug 13 12:16:48 CEST 2013 on sn-devel-104

10 years agos3-libads: Fail create_local_private_krb5_conf_for_domain() if parameters missing.
Günther Deschner [Fri, 17 May 2013 13:14:35 +0000 (15:14 +0200)]
s3-libads: Fail create_local_private_krb5_conf_for_domain() if parameters missing.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 6dc7c63efa95d0c04b542667d9b6a6621c8139bf)

10 years agoEnsure gpfs kernel leases are wrapped in a become_root()/unbecome_root() pair.
Ralph Wuerthner [Wed, 31 Jul 2013 23:33:48 +0000 (16:33 -0700)]
Ensure gpfs kernel leases are wrapped in a become_root()/unbecome_root() pair.

Ensures correct lease owner for signal delivery.

Signed-off-by: Ralph Wuerthner <ralphw@de.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug  1 03:57:11 CEST 2013 on sn-devel-104

The last 2 patches address bug #10064 - Linux kernel oplock breaks can miss
signals.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Wed Aug  7 13:15:02 CEST 2013 on sn-devel-104

10 years agoWrap setting leases in become_root()/unbecome_root() to ensure correct delivery of...
Jeremy Allison [Wed, 31 Jul 2013 23:32:20 +0000 (16:32 -0700)]
Wrap setting leases in become_root()/unbecome_root() to ensure correct delivery of signals.

Remove workaround for Linux kernel bug https://bugzilla.kernel.org/show_bug.cgi?id=43336
as we don't need to set capabilities when we're already root.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
10 years agoAdd torture tests to raw.eas to check sending Windows invalid names in the middle...
Jeremy Allison [Tue, 9 Jul 2013 23:37:48 +0000 (16:37 -0700)]
Add torture tests to raw.eas to check sending Windows invalid names in the middle of an EA list.

Add torture tests to probe the set of invalid
Windows EA names.

Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jul 19 11:50:25 CEST 2013 on sn-devel-104

10 years agoReply with correct trans2 message on a setpathinfo with a bad EA name.
Jeremy Allison [Tue, 16 Jul 2013 16:14:12 +0000 (09:14 -0700)]
Reply with correct trans2 message on a setpathinfo with a bad EA name.

Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoEnsure we do pathname processing before SD and EA processing in NTTRANS_CREATE.
Jeremy Allison [Tue, 16 Jul 2013 18:05:10 +0000 (11:05 -0700)]
Ensure we do pathname processing before SD and EA processing in NTTRANS_CREATE.

Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoEnsure we can't create a file using NTTRANS with an invalid EA list.
Jeremy Allison [Tue, 9 Jul 2013 22:54:39 +0000 (15:54 -0700)]
Ensure we can't create a file using NTTRANS with an invalid EA list.

Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoEnsure we can't create a file using TRANS2_OPEN with an invalid EA list.
Jeremy Allison [Tue, 9 Jul 2013 22:59:53 +0000 (15:59 -0700)]
Ensure we can't create a file using TRANS2_OPEN with an invalid EA list.

Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoAdd error map of STATUS_INVALID_EA_NAME -> ERRDOS, ERRbadfile
Jeremy Allison [Wed, 10 Jul 2013 19:18:36 +0000 (12:18 -0700)]
Add error map of STATUS_INVALID_EA_NAME -> ERRDOS, ERRbadfile

(from Windows2012 tests).

Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoAdd the ability to send an NTSTATUS result back with a trans2 reply so we can return...
Jeremy Allison [Wed, 10 Jul 2013 19:38:41 +0000 (12:38 -0700)]
Add the ability to send an NTSTATUS result back with a trans2 reply so we can return a parameter block with an error code.

This is needed when returning a STATUS_INVALID_NAME result (tested
from Windows 2012).

Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoEnsure we can't create a file using SMB2_CREATE with an invalid EA list.
Jeremy Allison [Tue, 9 Jul 2013 23:02:50 +0000 (16:02 -0700)]
Ensure we can't create a file using SMB2_CREATE with an invalid EA list.

Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoEnsure we never return an EA name to a Windows client it can't handle.
Jeremy Allison [Tue, 9 Jul 2013 23:21:18 +0000 (16:21 -0700)]
Ensure we never return an EA name to a Windows client it can't handle.

Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoEnsure set_ea cannot set invalid Windows EA names.
Jeremy Allison [Tue, 9 Jul 2013 22:52:47 +0000 (15:52 -0700)]
Ensure set_ea cannot set invalid Windows EA names.

Bug 9992 - Windows error 0x800700FE when copying files with xattr names containing ":"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoAdd ea_list_has_invalid_name() function.
Jeremy Allison [Tue, 9 Jul 2013 22:50:47 +0000 (15:50 -0700)]
Add ea_list_has_invalid_name() function.

Invalid character list probed from Windows Server 2012.

Bug 9992: Windows error 0x800700FE when copying files with xattr names containing ":"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoFix bug 9678 - Windows 8 Roaming profiles fail
Gregor Beck [Thu, 1 Aug 2013 12:16:24 +0000 (14:16 +0200)]
Fix bug 9678 - Windows 8 Roaming profiles fail

Windows 8 tries to set 'ATTRIBUTE_SECURITY_INFORMATION' on some
dirs. Ignoring it makes roaming profiles work again.
Just like w2k3 gracefully ignore all the other bits.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Aug  5 22:00:52 CEST 2013 on sn-devel-104

10 years agosecurity.idl: add new security_secinfo bits
Gregor Beck [Wed, 31 Jul 2013 13:28:51 +0000 (15:28 +0200)]
security.idl: add new security_secinfo bits

[MS-DTYP].pdf 2.4.7

Signed-off-by: Gregor Beck <gbeck@sernet.de>
10 years agoVERSION: Bump version number up to 4.0.9.
Karolin Seeger [Mon, 5 Aug 2013 10:41:23 +0000 (12:41 +0200)]
VERSION: Bump version number up to 4.0.9.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoMerge tag 'samba-4.0.8' into v4-0-test
Karolin Seeger [Mon, 5 Aug 2013 10:40:37 +0000 (12:40 +0200)]
Merge tag 'samba-4.0.8' into v4-0-test

samba: tag release samba-4.0.8

10 years agos4-lib/socket: Allocate a the larger sockaddr_un and not just a sockaddr_in in unixdo...
Stefan Metzmacher [Tue, 23 Jul 2013 22:19:26 +0000 (10:19 +1200)]
s4-lib/socket: Allocate a the larger sockaddr_un and not just a sockaddr_in in unixdom_get_my_addr()

This caused crashes in _tsocket_address_bsd_from_sockaddr() when we
read past the end of the allocation.

(similar to commit e9ae36e9683372b86f1efbd29904722a33fea083)

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jul 24 14:37:43 CEST 2013 on sn-devel-104
(cherry picked from commit 077dfd0a89a854c21b91b0f871d034fd9fe82a9a)

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Aug  5 11:54:46 CEST 2013 on sn-devel-104

10 years agoWHATSNEW: Add release notes for Samba 4.0.8. samba-upstream/tags/samba-4.0.8
Karolin Seeger [Thu, 1 Aug 2013 18:41:57 +0000 (20:41 +0200)]
WHATSNEW: Add release notes for Samba 4.0.8.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoFix bug #10010 - Missing integer wrap protection in EA list reading can cause server...
Jeremy Allison [Thu, 11 Jul 2013 16:36:01 +0000 (09:36 -0700)]
Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS.

Fix client-side parsing also. Found by David Disseldorp <ddiss@suse.de>
CVE-2013-4124

Signed-off-by: Jeremy Allison <jra@samba.org>
10 years agoFix bug #10010 - Missing integer wrap protection in EA list reading can cause server...
Jeremy Allison [Thu, 11 Jul 2013 00:10:17 +0000 (17:10 -0700)]
Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS.

Ensure we never wrap whilst adding client provided input.

Signed-off-by: Jeremy Allison <jra@samba.org>
10 years agoVERSION: Bump version number up to 4.0.8.
Karolin Seeger [Thu, 1 Aug 2013 18:44:03 +0000 (20:44 +0200)]
VERSION: Bump version number up to 4.0.8.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agos4-lib/socket: Allocate a the larger sockaddr_un and not just a sockaddr_in in unixdo...
Andrew Bartlett [Tue, 23 Jul 2013 22:19:26 +0000 (10:19 +1200)]
s4-lib/socket: Allocate a the larger sockaddr_un and not just a sockaddr_in in unixdom_get_peer_addr()

This caused crashes in _tsocket_address_bsd_from_sockaddr() when we
read past the end of the allocation.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit e9ae36e9683372b86f1efbd29904722a33fea083)

10 years agos4:server: avoid calling into nss_winbind from within 'samba'
Stefan Metzmacher [Wed, 10 Jul 2013 12:48:18 +0000 (14:48 +0200)]
s4:server: avoid calling into nss_winbind from within 'samba'

The most important part is that the 'winbind_server' doesn't
recurse into itself. This could happen if the krb5 libraries
call getlogin().

As we may run in single process mode, we need to set
_NO_WINBINDD=1 everywhere, the only exception is the forked
'smbd'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
The last 5 patches address bug #9820 - crash of winbind after "ls -l
/usr/local/samba/var/locks/sysvol".

10 years agos4:rpc_server: make sure we don't terminate a connection with pending requests (bug...
Stefan Metzmacher [Tue, 9 Jul 2013 14:38:59 +0000 (16:38 +0200)]
s4:rpc_server: make sure we don't terminate a connection with pending requests (bug #9820)

Sadly we may have nested event loops, which won't work correctly with
broken connections, that's why we have to do this...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jul 10 08:47:38 CEST 2013 on sn-devel-104
(cherry picked from commit e6a58d370403e818bc2cfb8389751b78adcc14fd)

10 years agos4-winbindd: Do not terminate a connection that is still pending (bug #9820)
Andrew Bartlett [Thu, 27 Jun 2013 01:28:03 +0000 (11:28 +1000)]
s4-winbindd: Do not terminate a connection that is still pending (bug #9820)

Instead, wait until the call attempts to reply, and let it terminate then

(often this happens in the attempt to then write to the broken pipe).

Andrew Bartlett

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 2505d48e4fbcd8a805a88ad0b05fb1a16a588197)

10 years agoservice_stream: Log if the connection termination is deferred or not (bug #9820)
Andrew Bartlett [Thu, 27 Jun 2013 01:27:03 +0000 (11:27 +1000)]
service_stream: Log if the connection termination is deferred or not (bug #9820)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit df929d6feb857668ad9da277213e9fae1480ff63)

10 years agos4-winbind: Add special case for BUILTIN domain
Andrew Bartlett [Sat, 15 Jun 2013 13:01:44 +0000 (23:01 +1000)]
s4-winbind: Add special case for BUILTIN domain

This should mean that lookups for the BUILTIN domain cause less trouble
then they have in the past, because they will no longer go via the
trusted domain handler.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun 20 15:30:00 CEST 2013 on sn-devel-104
(cherry picked from commit 88c72fceb1c86752c52651bdea5b116806dd92c5)

10 years agopam_winbind: update documentation for "DIR" krb5ccname pragma.
Günther Deschner [Thu, 18 Jul 2013 17:09:14 +0000 (19:09 +0200)]
pam_winbind: update documentation for "DIR" krb5ccname pragma.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jul 24 02:43:10 CEST 2013 on sn-devel-104

(cherry picked from commit 9adfe82a1785aa6a7baefb435072a0a81dfb13cb)

The last 3 patches address bug #10043 - Allow to change the default location for
Kerberos credential caches.

10 years agos3-winbindd: support the DIR pragma for raw kerberos user pam authentication.
Günther Deschner [Thu, 18 Jul 2013 17:05:51 +0000 (19:05 +0200)]
s3-winbindd: support the DIR pragma for raw kerberos user pam authentication.

It is currently only available in MIT. In addition, allow to define custom
filepaths for FILE, WRFILE and DIR pragmas and substitute one occurence of the
%u pattern.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 7ad3a367d52b1f123c318946d654e95639202130)

10 years agowbinfo: allow to define a custom krb5ccname for kerberized pam auth.
Günther Deschner [Thu, 18 Jul 2013 17:04:29 +0000 (19:04 +0200)]
wbinfo: allow to define a custom krb5ccname for kerberized pam auth.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 73e6feff9b3f30e70d84fe256aff239fafdfdb95)

10 years agos3-netlogon: enumerate UPN suffixes from PASSDB when available
Alexander Bokovoy [Wed, 3 Apr 2013 13:52:45 +0000 (16:52 +0300)]
s3-netlogon: enumerate UPN suffixes from PASSDB when available

Optionally append list of UPN suffixes if PDB module returns non-empty one.

Refactor fill_forest_trust_array() in source3 to allow reuse of the code between
_netr_DsRGetForestTrustInformation() and _netr_GetForestTrustInformation()

Implement a special case of _netr_DsRGetForestTrustInformation in smbd
when trusted_domain_name is NULL (covered by test_DsrEnumerateDomainTrusts()
in rpc.netlogon torture tests, see comment in source4/torture/rpc/netlogon.c).

Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Apr  9 22:19:34 CEST 2013 on sn-devel-104

The last 4 patches address bug #9779 - add UPN enumeration to passdb internal
API.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Thu Jul 18 21:53:53 CEST 2013 on sn-devel-104

10 years agoPASSDB: add support to set and enumerate UPN suffixes associated with our forest
Alexander Bokovoy [Wed, 3 Apr 2013 13:37:00 +0000 (16:37 +0300)]
PASSDB: add support to set and enumerate UPN suffixes associated with our forest

Samba PDC may manage a forest containing DNS domains in addition to the primary one.
Information about them is advertised via netr_DsRGetForestTrustInformation when
trusted_domain_name is NULL, according to MS-NRPC and MS-LSAD, and
via netr_GetForestTrustInformation.

This changeset only expands PASSDB API; how suffixes are maintained is left
to specific PDB modules. Set function is added so that suffixes could be
managed through 'net' and other Samba utilities, if possible.

One possible implementation is available for ipasam module in FreeIPA:
http://git.fedorahosted.org/cgit/freeipa.git/commit/?id=cc56723151c9ebf58d891e85617319d861af14a4

Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-waf: filter out ldapsam internal init functions
Alexander Bokovoy [Wed, 3 Apr 2013 13:01:34 +0000 (16:01 +0300)]
s3-waf: filter out ldapsam internal init functions

pdb_ldapsam_init* functions (init and init_common) are used in
pdb_ipa.c and pdb_nds.c which are always linked together with
pdb_ldap.c where pdb_ldapsam_init* functions reside.

Tested with both ldapsam integrated (into libpdb) and as
a separate module.

Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agowafsamba: fix samba_abi for default catch-all case
Alexander Bokovoy [Wed, 3 Apr 2013 12:52:06 +0000 (15:52 +0300)]
wafsamba: fix samba_abi for default catch-all case

Only filter out the symbol when positive match was not found and there is
negative match.

ABI signature file generator worked incorrectly for cases when mixture of
positive and negative matches were provided. This resulted in generating empty
signature file for libpdb since there was no catch-all positive match anymore.

Commit 9ba44cc610426fb558b49aa9680b5bdf55c29082 removed explicit '*' positive
match and corresponding vscript generator adds '*' by default if global match
list is empty, so this commit introduces feature parity into signature
generator.

Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3-winbind: Do not delete an existing valid credential cache.
Andreas Schneider [Thu, 11 Jul 2013 11:44:53 +0000 (13:44 +0200)]
s3-winbind: Do not delete an existing valid credential cache.

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

Thanks to David Woodhouse <dwmw2@infradead.org>.

Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jul 15 12:48:46 CEST 2013 on sn-devel-104

(cherry picked from commit 0529b59fbe3f96509893fc4e93a75d6928b5a532)

10 years agolib/param: sync debug related options with source3/param
Stefan Metzmacher [Thu, 4 Jul 2013 16:11:02 +0000 (18:11 +0200)]
lib/param: sync debug related options with source3/param

The most important change is "debug hires timestamp = Yes"
and "syslog = 1".

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Jul  9 17:15:15 CEST 2013 on sn-devel-104
(cherry picked from commit cd36a3e902813c065e14059d325f7628b06595aa)

The last 5 patches address bug #10015 - Fix/Improve debug options.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Jul 15 22:56:13 CEST 2013 on sn-devel-104

10 years agolib/ldb-samba: only debug LDB_DEBUG_TRACE at level 10
Stefan Metzmacher [Tue, 9 Jul 2013 11:56:35 +0000 (13:56 +0200)]
lib/ldb-samba: only debug LDB_DEBUG_TRACE at level 10

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
(cherry picked from commit 5f93822ede7ec3dc79a8057174342b2c6bb94a3b)

10 years agolib/ldb-samba: make use of DBGC_LDB
Stefan Metzmacher [Tue, 9 Jul 2013 11:56:08 +0000 (13:56 +0200)]
lib/ldb-samba: make use of DBGC_LDB

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
(cherry picked from commit 8e0752f4d6feea35304377222d3dd487355e4120)

10 years agolib/util: add 'ldb' debug class
Stefan Metzmacher [Tue, 9 Jul 2013 11:55:44 +0000 (13:55 +0200)]
lib/util: add 'ldb' debug class

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
(cherry picked from commit baecc863de0ceb64187c6eb3545bf28706bd84fc)

10 years agodebug: Add debugclass for DNS server
Kai Blin [Mon, 14 Jan 2013 00:13:47 +0000 (01:13 +0100)]
debug: Add debugclass for DNS server

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 4b010997486b059b90be1f69783a451f400d7df7)

10 years agodsdb-ridalloc: Fix RID pools - RID numbers increase too quickly
Andrew Bartlett [Sat, 22 Jun 2013 09:30:50 +0000 (19:30 +1000)]
dsdb-ridalloc: Fix RID pools - RID numbers increase too quickly

A patch by Cove Schneider <cove_s@yahoo.com> who reports:

I noticed that the RID numbers seem to increase incrementally, then
will suddenly jump by 124501. Unless I'm misunderstanding, shouldn't
RID pool allocations just be 500 at a time?

e.g.  Adding accounts one after another on a single test instance here's how they're incrementing (from 4.0.6):
1596
1597
1598
1599
126100
126101
126102
...
126599

251100
...

251599

376100
...

The problem is that this complicates using sssd's AD integration, as
that it doesn't expect the RIDs to increase in a single domain so
quickly.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jul  4 20:13:05 CEST 2013 on sn-devel-104
(cherry picked from commit 2763cad409430c183f7f1f6f57bc6b38ae616ed9)

Fix bug #10014 - Excessive RID allocation.

10 years agosmbd: Fix a 100% loop at shutdown time
Volker Lendecke [Thu, 11 Jul 2013 14:22:26 +0000 (16:22 +0200)]
smbd: Fix a 100% loop at shutdown time

In the destructor of fsp->aio_requests[0] we put another request into
fsp->aio_requests[0]. Don't overwrite that with TALLOC_FREE.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul 11 20:56:42 CEST 2013 on sn-devel-104
(cherry picked from commit 940395d38bcc348eb5f1be7ba03cd554d9d3bc93)

Fix bug #10013 - 940395d from master needs porting to 4.0 and 4.1.

10 years agos3-smbstatus: display [u|g]id of -1 as "-1" in connection list
Björn Baumbach [Tue, 9 Jul 2013 10:32:34 +0000 (12:32 +0200)]
s3-smbstatus: display [u|g]id of -1 as "-1" in connection list

In order to avoid displayed uid or gid of "4294967295" instead of "-1", we
need to fetch the special case -1.
The id can be -1 if we are reading e.g. incomplete session information.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jul 10 01:18:30 CEST 2013 on sn-devel-104
(cherry picked from commit 577cef82c776759c9f3cad7d33057ac865c40769)

The last 3 patches address bug #10003 - s3-lib:segmentation fault while
reading incomplete session info.

10 years agos3-lib: hide incomplete smbXsrv_tcon_global records
Stefan Metzmacher [Mon, 8 Jul 2013 14:31:13 +0000 (16:31 +0200)]
s3-lib: hide incomplete smbXsrv_tcon_global records

Part of fix for bug #10003

Pair-programmed-with: Björn Baumbach <bb@sernet.de>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit c52e61f7ba215da28cbb7b8e328aea110ad79b11)

10 years agos3-lib: fix segf while reading incomplete session info (bug #10003)
Björn Baumbach [Fri, 5 Jul 2013 11:19:59 +0000 (13:19 +0200)]
s3-lib: fix segf while reading incomplete session info (bug #10003)

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 53aa069b97070c73b782e2868b9b9686abe353cc)

10 years agovfs_streams_xattr: Do not attempt to write empty attribute twice
Christof Schmitt [Wed, 12 Jun 2013 21:55:15 +0000 (14:55 -0700)]
vfs_streams_xattr: Do not attempt to write empty attribute twice

The create disposition FILE_OVERWRITE_IF is mapped to the flags
O_CREAT|O_TRUNC. In vfs_streams_xattr, this triggers two calls to
SMB_VFS_SETXATTR. The second can fail if O_EXCL is also set, resulting
in an unnecessary error.

Merge the identical code to handle O_CREAT and O_TRUNC to avoid setting
an empty attribute twice. Also add the flags parameter to the debug
message.

Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 4cd7e1d283f060e794023d5b0a48a7ec97d33820)

The last two patches address bug #9970 - Backport vfs_streams_xattr fixes to 4.0
and 4.1.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Wed Jul  3 12:22:43 CEST 2013 on sn-devel-104

10 years agoInitialize the file descriptor in the files_struct before trying to close it. Otherwi...
Christof Schmitt [Wed, 12 Jun 2013 21:49:53 +0000 (14:49 -0700)]
Initialize the file descriptor in the files_struct before trying to close it. Otherwise, if one of the SETXATTR calls had failed, the close() call will return EBADF.

Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jun 13 01:43:18 CEST 2013 on sn-devel-104
(cherry picked from commit 5c488cfb79873287e769622fd5da43b7a735e29c)

10 years agos3:smbd:smb2: fix setting of scavenge timeout when reconnecting durable handles
Michael Adam [Thu, 18 Apr 2013 11:11:03 +0000 (13:11 +0200)]
s3:smbd:smb2: fix setting of scavenge timeout when reconnecting durable handles

The bug fixed with this commit led to reconnected durable handles
having a disconnect timeout of 0 msec. This fix re-establishes the
original timeout for the reconnected handle.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit beb9a27180e5570337381d03fac55bbe6d1637e0)

The last 18 patches address bug #9930 - smbd did not cleanup disonnected durable
handles.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Tue Jul  2 12:45:17 CEST 2013 on sn-devel-104

10 years agos3:smbd: call scavenger_schedule_disconnected() from close normal file for durable...
Gregor Beck [Wed, 20 Mar 2013 09:01:43 +0000 (10:01 +0100)]
s3:smbd: call scavenger_schedule_disconnected() from close normal file for durable handles

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit c2ef5182e32fafeb3e279d9fc3a2a409e4aa0543)

10 years agos3:smbd: add a scavenger process for disconnected durable handles
Gregor Beck [Thu, 7 Feb 2013 14:26:37 +0000 (15:26 +0100)]
s3:smbd: add a scavenger process for disconnected durable handles

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 1ed22ba4b7998c1fc29476e931bd463f2bc1ba7e)

Conflicts:

source3/Makefile.in

10 years agos3:locking: add function share_mode_cleanup_disconnected()
Gregor Beck [Wed, 13 Mar 2013 10:35:37 +0000 (11:35 +0100)]
s3:locking: add function share_mode_cleanup_disconnected()

For a given file, clean share mode entries for a given persistent file id.

Pair-Programmed-With: Michael Adam <obnox@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit f608bedfca4118b7e3606802df40e266bcc099d8)

10 years agos3:locking: improve debug output of parse_share_modes()
Gregor Beck [Wed, 20 Mar 2013 09:22:06 +0000 (10:22 +0100)]
s3:locking: improve debug output of parse_share_modes()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 0ac0b35dad796d10cf04ab77a53a926420cc0589)

10 years agos3:locking: no need to make a file_id passed by value a constant
Gregor Beck [Tue, 12 Mar 2013 14:10:51 +0000 (15:10 +0100)]
s3:locking: no need to make a file_id passed by value a constant

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 3d3e7e837a339dfc1aaf4d7fc52f95f3f6a80173)

Conflicts:

source3/locking/share_mode_lock.c

10 years agos3:locking:brlock: add function brl_cleanup_disconnected()
Gregor Beck [Wed, 13 Mar 2013 13:47:18 +0000 (14:47 +0100)]
s3:locking:brlock: add function brl_cleanup_disconnected()

For a given file, clean up brl entries belonging to a given persistent file id.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit ee81a6e7d0263d263f7d4e7bd5bd9c4156cae8cf)

10 years agos3:locking:brlock: explain the lockdb_clean semantic better in brl_reconnect_disconne...
Michael Adam [Fri, 12 Apr 2013 09:13:57 +0000 (11:13 +0200)]
s3:locking:brlock: explain the lockdb_clean semantic better in brl_reconnect_disconnected()

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 6ee1555df2e69aead00ee231c990020cc4bf04bc)

10 years agos3:locking:brlock: let validate_lock_entries keep entries for disconnected servers...
Gregor Beck [Tue, 5 Mar 2013 13:49:28 +0000 (14:49 +0100)]
s3:locking:brlock: let validate_lock_entries keep entries for disconnected servers in traverses

We should not remove locks of disconnected opens just like that.
When getting the byte range lock record for a newly connected file
handle, we still do the clean up, because in that situation,
disconnected entries are not valid any more.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit f08bda22dc7a5038fab77ad7dd090a6f72d94c7f)

10 years agos3:locking:brlock: improve the comment for the brl self cleaning code
Michael Adam [Fri, 12 Apr 2013 09:05:29 +0000 (11:05 +0200)]
s3:locking:brlock: improve the comment for the brl self cleaning code

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit fe0bf0b6d67a49a30969f922ee65f0af88a952a1)

10 years agos3:locking:brlock: use serverids_exist to validate_lock_entries
Gregor Beck [Tue, 5 Mar 2013 13:02:10 +0000 (14:02 +0100)]
s3:locking:brlock: use serverids_exist to validate_lock_entries

...instead of checking each server-id separately which can
be expensive in a cluster.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 02cc5a5c6a6b6b2b796abe573a671853d945b22f)

10 years agos3:smbXsrv_open: add function smbXsrv_open_cleanup()
Gregor Beck [Tue, 12 Mar 2013 13:36:32 +0000 (14:36 +0100)]
s3:smbXsrv_open: add function smbXsrv_open_cleanup()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 941e84dcfe985559e5e75318e7b5dd9d50fcc47b)

10 years agos3:smbXsrv_open: factor out smbXsrv_open_global_parse_record
Gregor Beck [Tue, 12 Mar 2013 12:43:30 +0000 (13:43 +0100)]
s3:smbXsrv_open: factor out smbXsrv_open_global_parse_record

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 9d47dc8958f7fcab77460495bd1ae940122dddd8)

10 years agos3:smbXsrv_open: add smbXsrv_open_global_traverse()
Gregor Beck [Wed, 12 Dec 2012 15:06:50 +0000 (16:06 +0100)]
s3:smbXsrv_open: add smbXsrv_open_global_traverse()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit d23f19ab00314d773edb07a45e754365db378668)

10 years agolib: Add prctl_set_comment to utils.
Andreas Schneider [Tue, 5 Mar 2013 14:54:44 +0000 (15:54 +0100)]
lib: Add prctl_set_comment to utils.

Reviewed-by: David Disseldorp <ddiss@samba.org>
(cherry picked from commit f9fb3faaef4c15b7c4c3748b0e93fa3061b573c3)

Conflicts:

lib/util/wscript_build

10 years agos3:smbd:smb2: fix segfault (access after free) in durable disconnect code
Michael Adam [Mon, 18 Feb 2013 22:21:24 +0000 (23:21 +0100)]
s3:smbd:smb2: fix segfault (access after free) in durable disconnect code

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Feb 19 11:12:01 CET 2013 on sn-devel-104
(cherry picked from commit bdb80aeb11d5458e281483a5cdc57f5481979cc9)

10 years agos3:smbd: add debugging to close code (regarding disconnect of a durable)
Michael Adam [Tue, 12 Feb 2013 16:44:51 +0000 (17:44 +0100)]
s3:smbd: add debugging to close code (regarding disconnect of a durable)

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): Mon Feb 18 17:42:45 CET 2013 on sn-devel-104
(cherry picked from commit cfebce3c56474ac914474b57ed94f93418b0564b)

10 years agos3:smbd: use smbXsrv_open_close() instead of smbXsrv_open_update()
Stefan Metzmacher [Wed, 13 Feb 2013 13:26:43 +0000 (08:26 -0500)]
s3:smbd: use smbXsrv_open_close() instead of smbXsrv_open_update()

This makes sure we store the correct disconnect_time for disconnected
durable handles.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit f0e6a9be00e441e50f0087c543e1b7c9012d126f)

10 years agoVERSION: Bump version number up to 4.0.8...
Karolin Seeger [Fri, 28 Jun 2013 08:54:57 +0000 (10:54 +0200)]
VERSION: Bump version number up to 4.0.8...

and re-enable git snapshots.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoVERSION: Disable git snapshots for the 4.0.7 release. samba-upstream/tags/samba-4.0.7
Karolin Seeger [Fri, 28 Jun 2013 08:47:42 +0000 (10:47 +0200)]
VERSION: Disable git snapshots for the 4.0.7 release.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoWHATSNEW: Add release notes for Samba 4.0.7.
Karolin Seeger [Thu, 27 Jun 2013 08:18:24 +0000 (10:18 +0200)]
WHATSNEW: Add release notes for Samba 4.0.7.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Fri Jun 28 10:30:31 CEST 2013 on sn-devel-104

10 years agotorture: Add tests for LDAP substring search with no strings provided
Andrew Bartlett [Sat, 22 Jun 2013 06:55:08 +0000 (16:55 +1000)]
torture: Add tests for LDAP substring search with no strings provided

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): Mon Jun 24 23:55:07 CEST 2013 on sn-devel-104
(cherry picked from commit 7bf8fc7ca2321c25b9194a0a13df6a8b4e783c9e)

The last 5 patches address bug #9967 - Fix crash bug from search of mail=.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Tue Jun 25 13:35:05 CEST 2013 on sn-devel-104

10 years agolibcli/ldap: Cope with substring match with no chunks in ldap_push_filter
Andrew Bartlett [Sat, 22 Jun 2013 07:01:42 +0000 (17:01 +1000)]
libcli/ldap: Cope with substring match with no chunks in ldap_push_filter

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 70cb7fd214041e8ffacc98de4dbde3ecd77bba85)

10 years agoldb: bump version to allow a depencency on the substring crash fix
Andrew Bartlett [Mon, 24 Jun 2013 05:28:39 +0000 (15:28 +1000)]
ldb: bump version to allow a depencency on the substring crash fix

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 4ca963926938917bf32af4eead61ded2a8275139)

10 years agoldb: Cope with substring match with no chunks in ldb_filter_from_tree
Andrew Bartlett [Sat, 22 Jun 2013 07:01:02 +0000 (17:01 +1000)]
ldb: Cope with substring match with no chunks in ldb_filter_from_tree

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 1a279f74b72018f0742fc407e0574c9dbd7b7883)

10 years agoldb: Ensure not to segfault on a filter such as (mail=)
Andrew Bartlett [Sat, 15 Jun 2013 06:00:42 +0000 (16:00 +1000)]
ldb: Ensure not to segfault on a filter such as (mail=)

As reported by Robin McCorkell <xenopathic@gmail.com> triggered by
Mozilla Thunderbird as an LDAP client.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Jun 22 09:33:14 CEST 2013 on sn-devel-104
(cherry picked from commit 0ee8650d778736a130e914df9e14734ef18e0fb5)

10 years agoheimdal_build: Add missing dep on samba4kgetcred
Andrew Bartlett [Sun, 16 Jun 2013 04:02:57 +0000 (14:02 +1000)]
heimdal_build: Add missing dep on samba4kgetcred

This started to fail on current Debian Sid with system Heimdal after a binutils update.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jun 25 02:30:59 CEST 2013 on sn-devel-104
(cherry picked from commit 48ae86f74c5ed2ae2612d61e232bfcf93d44c7f8)

Fix bug #9968 - fix build with system Heimdal of samba4kgetcred.

10 years agodocs: Avoid mentioning a possibly misleading option.
Michael Wood [Sat, 1 Jun 2013 08:35:56 +0000 (10:35 +0200)]
docs: Avoid mentioning a possibly misleading option.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 5528551ea39686194837a8083c85b71dedbe6f0e)

Fix bug #9964 - For v4-0-test: docs: Avoid mentioning a possibly misleading
option.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Fri Jun 21 11:41:46 CEST 2013 on sn-devel-104

10 years agotevent: Fix Coverity ID 989236 Operands don't affect result
Volker Lendecke [Thu, 13 Jun 2013 18:35:32 +0000 (20:35 +0200)]
tevent: Fix Coverity ID 989236 Operands don't affect result

"unsigned" could be less than uint64_t, so idx==UINT64_MAX is always false.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit dd0e38b5feb51c8aa44e76bb6c84202bf8373005)

Fix bug #9953 - tevent_poll on 32-bit machines broken.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Tue Jun 18 13:00:57 CEST 2013 on sn-devel-104

10 years agoBug 8997: change libreplace GPL source to LGPL
David Disseldorp [Mon, 3 Jun 2013 11:00:31 +0000 (13:00 +0200)]
Bug 8997: change libreplace GPL source to LGPL

libreplace currently includes socket.c and getifaddrs.c both of which
are GPL licensed.
Although not required, talloc and tdb build alongside this source,
leading to some ambiguity regarding their LGPL licences.

The following copyright holders have agreed to the GPL->LGPL change:
lib/replace/getifaddrs.c
   Copyright (C) Andrew Tridgell 1998
   Copyright (C) Jeremy Allison 2007
   Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007

lib/replace/test/getifaddrs.c
lib/replace/socket.c
 * Copyright (C) Michael Adam <obnox@samba.org> 2008

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 8a6743e4edcdff1c7860d150720483f19f3b33bb)

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Fri Jun 14 10:53:57 CEST 2013 on sn-devel-104

10 years agos4-dfs_server: check for netbios aliases in ad_get_referrals (bug #9947)
Björn Baumbach [Wed, 5 Jun 2013 13:01:14 +0000 (15:01 +0200)]
s4-dfs_server: check for netbios aliases in ad_get_referrals (bug #9947)

Without this patch ad_get_referrals checks for netbios, dns names
and ip, but not for netbios aliases set by netbios aliases option,
whether the requested name is our dns name.

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Björn Baumbach <bb@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jun 11 01:12:08 CEST 2013 on sn-devel-104
(cherry picked from commit 424a990e34278fae4888b00affb530ed1fbcb354)

10 years agodns: Support larger queries when asking forwarder
Kai Blin [Sat, 25 May 2013 11:21:33 +0000 (13:21 +0200)]
dns: Support larger queries when asking forwarder

This should fix bug #9632

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit df43027bd8c127a44304f7130bf61adfcdf73eed)

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Tue Jun 11 12:05:09 CEST 2013 on sn-devel-104

10 years agoidl: Add support for parsing OPT records
Kai Blin [Sat, 25 May 2013 11:21:32 +0000 (13:21 +0200)]
idl: Add support for parsing OPT records

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 5bcebb54da8eed535e5f7034ed1f7a95456f19b1)

10 years agoWhen message-type is drvupgrade, MSG_DEBUG should be replaced with MSG_PRINTER_DRVUPG...
Peng Haitao [Wed, 22 May 2013 21:03:13 +0000 (14:03 -0700)]
When message-type is drvupgrade, MSG_DEBUG should be replaced with MSG_PRINTER_DRVUPGRADE.

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Fix bug #9941 - Fix a bug of drvupgrade of smbcontrol.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Jun 10 23:09:33 CEST 2013 on sn-devel-104