]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
12 years agoVERSION: Disable git snapshots for the 4.0.9 release. 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>
12 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>
12 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

12 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)

12 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

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

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

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

12 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

12 years agoWHATSNEW: Add release notes for Samba 4.0.8. 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>
12 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>
12 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>
12 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>
12 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)

12 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".

12 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)

12 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)

12 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)

12 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)

12 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.

12 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)

12 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)

12 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

12 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>
12 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>
12 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>
12 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)

12 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

12 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)

12 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)

12 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)

12 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)

12 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.

12 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.

12 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.

12 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)

12 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)

12 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

12 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)

12 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

12 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)

12 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

12 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)

12 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)

12 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

12 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)

12 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)

12 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)

12 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)

12 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)

12 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)

12 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)

12 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)

12 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

12 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)

12 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)

12 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)

12 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>
12 years agoVERSION: Disable git snapshots for the 4.0.7 release. 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>
12 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

12 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

12 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)

12 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)

12 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)

12 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)

12 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.

12 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

12 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

12 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

12 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)

12 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

12 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)

12 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

12 years agoCheck for WRITE_ACCESS on the file before overriding an EACCESS.
Jeremy Allison [Thu, 25 Apr 2013 21:06:03 +0000 (14:06 -0700)] 
Check for WRITE_ACCESS on the file before overriding an EACCESS.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Apr 27 15:57:17 CEST 2013 on sn-devel-104
(cherry picked from commit 5185460067229a342ddf3951ecc968017c2ed4df)

The last 4 patches address bug #9794 - opening/editing or copying MS files
causes a core dump with invalid lock order.

12 years agoEnsure we don't try the open_file_fchmod() if we can't write to the file.
Jeremy Allison [Thu, 25 Apr 2013 21:02:24 +0000 (14:02 -0700)] 
Ensure we don't try the open_file_fchmod() if we can't write to the file.

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

12 years agoRemove indentation around code wrapped by unneeded CAN_WRITE.
Jeremy Allison [Thu, 25 Apr 2013 21:00:42 +0000 (14:00 -0700)] 
Remove indentation around code wrapped by unneeded CAN_WRITE.

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

12 years agoAdd early return in file_set_dosmode() on a read only share.
Jeremy Allison [Thu, 25 Apr 2013 20:59:22 +0000 (13:59 -0700)] 
Add early return in file_set_dosmode() on a read only share.

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

12 years agoBUG 9881: Check for system libtevent.
Andreas Schneider [Tue, 14 May 2013 07:59:44 +0000 (09:59 +0200)] 
BUG 9881: Check for system libtevent.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Thu Jun  6 22:42:20 CEST 2013 on sn-devel-104

12 years agos4:winbind: don't leak libnet_context into the main event context (bug #9929)
Stefan Metzmacher [Fri, 31 May 2013 14:04:26 +0000 (16:04 +0200)] 
s4:winbind: don't leak libnet_context into the main event context (bug #9929)

This needs to be a talloc child of struct wbsrv_domain
otherwise the cleanup of a broken connection doesn't work.

The following command can trigger the leak on a domain controller.

root@dc:~/samba# ls -l /var/lib/samba/sysvol/samba.private/
total 16
drwxrwx---+ 5 root 3000000 4096 May 14 14:46 Policies
drwxrwx---+ 2 root 3000000 4096 May 14 11:45 scripts

gid 3000000 belongs to Builtin\Administrators.

The code triggers a ncacn_np: connection to the local smbd
and complains that domain BUILTIN is not available:

[2013/05/29 17:28:03,  2] ../source4/winbind/wb_init_domain.c:376(init_domain_recv_queryinfo)
  Expected domain name BUILTIN, DC dc.samba.private said SAMBA

In that case the connection was not closed, which is fixed by this commit.

Using ncalrpc: for all local SIDs and serving the BUILTIN domain is
a project for another day...

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): Tue Jun  4 11:05:09 CEST 2013 on sn-devel-104
(cherry picked from commit 097a8c723925d3e35606215cb16be28a37b0112e)

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

12 years agoFix bug 9900: is_printer_published GUID retrieval
David Disseldorp [Wed, 22 May 2013 15:58:38 +0000 (17:58 +0200)] 
Fix bug 9900: is_printer_published GUID retrieval

Samba currently always responds to GetPrinter(level = 7) requests with
DSPRINT_UNPUBLISH, regardless of the AD publish status tracked via the
PRINTER_ATTRIBUTE_PUBLISHED flag. This is due to erroneous "objectGUID"
unmarshalling in is_printer_published().

This change splits "objectGUID" retrieval into a separate function, and
adds a pull_reg_sz() call to correctly unmarshall the GUID.

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

12 years agoprinting: explicitly clear PUBLISHED attribute
David Disseldorp [Thu, 23 May 2013 17:32:08 +0000 (19:32 +0200)] 
printing: explicitly clear PUBLISHED attribute

Currently nt_printer_publish(DSPRINT_UNPUBLISH) flips (via xor) the
info2->attributes PRINTER_ATTRIBUTE_PUBLISHED flag, rather than
explicitly clearing it.

12 years agodns: Delete dnsNode objects when they are empty
Kai Blin [Sat, 1 Jun 2013 08:24:11 +0000 (10:24 +0200)] 
dns: Delete dnsNode objects when they are empty

If an update leaves the dnsNode without any entries, the dnsNode object
should be deleted. Thanks to Günter Kukkukk for his excellent debugging
work on this one.

This should fix bug #9559

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 8b24c43b382740106474e26dec59e1419ba77306)

The last 3 patches address bug #9559 - Only initial signed DNS update for a host
works.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Jun  3 14:16:16 CEST 2013 on sn-devel-104

12 years agodns: Fix allocation of txt_record in txt record tests
Kai Blin [Thu, 16 May 2013 10:13:22 +0000 (12:13 +0200)] 
dns: Fix allocation of txt_record in txt record tests

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-By: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu May 16 15:39:15 CEST 2013 on sn-devel-104
(cherry picked from commit 46e98cf20b04f3668e96fb597a414d0b39d5b1ed)

12 years agodns: more debug debug options in the tests
Kai Blin [Sun, 13 Jan 2013 23:56:48 +0000 (00:56 +0100)] 
dns: more debug debug options in the tests

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

12 years agowinbind4: Fix bug 9832 -- talloc use after free
Volker Lendecke [Tue, 7 May 2013 08:17:26 +0000 (10:17 +0200)] 
winbind4: Fix bug 9832 -- talloc use after 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 May 16 13:37:41 CEST 2013 on sn-devel-104
(cherry picked from commit 51533eedd7fa162bf8113f1f551064c01741e40e)

12 years agowaf: build PIEs if supported by the compiler
David Disseldorp [Tue, 28 May 2013 13:00:47 +0000 (15:00 +0200)] 
waf: build PIEs if supported by the compiler

Currently waf performs a mandatory check for compiler PIE support,
unless --without-pie is specified.
This change makes Waf only perform the mandatory check if --with-pie is
specified. If neither --with-pie nor --without-pie are specified, then
PIEs are only built if compiler support is available.

Signed-off-by: David Disseldorp <ddiss@samba.org>
The last 3 patches address bug #9910 - PIE builds not supported.

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Thu May 30 11:37:47 CEST 2013 on sn-devel-104

12 years agowaf: build position independent executables
David Disseldorp [Mon, 27 May 2013 15:57:01 +0000 (17:57 +0200)] 
waf: build position independent executables

This patch re-instates support for building Position Independent
Executables using the '-fPIE' and '-pie' compiler and linker flags
respectively.

PIE builds are enabled by default, and can be explicitly disabled using
the '--without-pie' configure argument.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May 28 02:56:36 CEST 2013 on sn-devel-104