Karolin Seeger [Mon, 11 May 2015 17:20:33 +0000 (19:20 +0200)]
VERSION: Bump version up to 4.1.19...
and re-enable git snapshots.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Tue, 5 May 2015 19:27:48 +0000 (21:27 +0200)]
WHATSNEW: Add release notes for Samba 4.1.18.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Jeremy Allison [Fri, 1 May 2015 16:56:59 +0000 (09:56 -0700)]
s3: nmbd: Don't set work_changed = True inside update_server_ttl().
This is taken care of inside expire_servers() when it calls
remove_server_from_workgroup().
Ensure the only functions in nmbd_serverlistdb.c that
set subnet->work_changed are:
remove_all_servers()
add_server_to_workgroup()
remove_server_from_workgroup()
Fix inspired by a change from Volker.
https://bugzilla.samba.org/show_bug.cgi?id=11254
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
c3c820a661c092de31d56c16c8cd1ec57999d2f7)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Wed May 6 22:32:36 CEST 2015 on sn-devel-104
Jeremy Allison [Thu, 30 Apr 2015 19:05:17 +0000 (12:05 -0700)]
s3: nmbd: Ensure we only set work_changed = true if we modify the record.
https://bugzilla.samba.org/show_bug.cgi?id=11254
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
db6572ef80e20b0e577b9e9fb5d233f8bdd20713)
Ralph Boehme [Wed, 29 Apr 2015 14:53:04 +0000 (16:53 +0200)]
vfs: kernel_flock and named streams
Streams implementing VFS modules may implement streams in a way that the
fsp will have the basefile open in the fsp fd, so lacking a distinct fd
for the stream, kernel_flock will apply on the basefile which is
wrong. The actual check is deffered to the VFS module implementing the
kernel_flock call.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11243
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
d748652e5b1c1c0238a2b86cdf14d7f6de7ce9b2)
Jeremy Allison [Tue, 28 Apr 2015 21:22:42 +0000 (14:22 -0700)]
s3: smbd: Incorrect file size returned in the response of "FILE_SUPERSEDE Create"
https://bugzilla.samba.org/show_bug.cgi?id=11240
Signed-off-by: Kenny Dinh <kdinh@peaxy.net>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>
(cherry picked from commit
d68383e9638254d1b6805b3d3ea3e5e897908374)
Jeremy Allison [Fri, 24 Apr 2015 20:19:30 +0000 (13:19 -0700)]
s4: rpc: Refactor dcesrv_alter() function into setup and send steps.
Fixes bug:
https://bugzilla.samba.org/show_bug.cgi?id=11236
Based on code from Julien Kerihuel <j.kerihuel@openchange.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 25 02:43:22 CEST 2015 on sn-devel-104
(cherry picked from commit
49030649db3dfec5a9bc03e5dde4255a14499f16)
Julien Kerihuel [Mon, 6 Apr 2015 09:26:58 +0000 (11:26 +0200)]
Add DCERPC flag to call unbind hooks without destroying the connection itself upon termination of a connection with outstanding pending calls.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11226
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr 14 20:39:34 CEST 2015 on sn-devel-104
(cherry picked from commit
fd90d270c7e97a639f42a96b674a674d1b51aa0d)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Tue Apr 28 04:30:13 CEST 2015 on sn-devel-104
Julien Kerihuel [Wed, 25 Mar 2015 04:06:03 +0000 (21:06 -0700)]
s4:rpc_server: Add multiplex state to dcerpc flags and control over multiplex PFC flag in bind_ack and and dcesrv_alter replies
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11225
Signed-off-by: Julien Kerihuel <j.kerihuel@openchange.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
(cherry picked from commit
caaf89e899c2a3926fb9e54d1c86f1a9cd5d7618)
Conflicts:
source4/rpc_server/dcerpc_server.c
source4/rpc_server/dcerpc_server.h
Richard Sharpe [Thu, 23 Apr 2015 19:36:28 +0000 (12:36 -0700)]
Make sure we initialize conn to NULL, because a routine we call may give an error and not touch conn, and then we get an error when trying to TALLOC_FREE it.
https://bugzilla.samba.org/show_bug.cgi?id=11234
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
471744a32d37f187c87f9bfa6f860b69446b9afe)
Ralph Boehme [Fri, 17 Apr 2015 07:12:59 +0000 (09:12 +0200)]
s3:smbd: update comment to correctly reflect MS-SMB2
https://bugzilla.samba.org/show_bug.cgi?id=11224
Signed-off-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr 22 01:04:02 CEST 2015 on sn-devel-104
(cherry picked from commit
64b038da31c7674410ef770f9c40a5402159fb57)
Ralph Boehme [Thu, 16 Apr 2015 20:28:25 +0000 (22:28 +0200)]
s3:smbd: missing tevent_req_nterror
The error code path in case fsp == NULL misses a call
tevent_req_nterror().
https://bugzilla.samba.org/show_bug.cgi?id=11224
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
ad52dcdf5de6f5f2c2ee156d93ebbb343f39e526)
David Disseldorp [Tue, 31 Mar 2015 23:03:13 +0000 (01:03 +0200)]
spoolss: purge the printer name cache on name change
Currently the name cache is only cleared on printer deletion. This means
that if a printer undergoes a name change, the old name remains in the
cache and can be subsequently used incorrecly if another printer takes
the same name as the old.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11210
Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr 14 05:37:50 CEST 2015 on sn-devel-104
(cherry picked from commit
a97507a9a7ba01beead6a621e1210618e93a9f9c)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Tue Apr 21 02:16:00 CEST 2015 on sn-devel-104
Jeremy Allison [Tue, 31 Mar 2015 21:40:23 +0000 (14:40 -0700)]
s3: libsmbclient: After getting attribute server, ensure main srv pointer is still valid.
Bug #11186: Crash seen in libsmbclient due to free of server structure during SMBC_getxattr() call
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11186
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Apr 14 02:58:43 CEST 2015 on sn-devel-104
(cherry picked from commit
2d4db4a65e1e8924470741378fe249f22196eceb)
Jeremy Allison [Tue, 31 Mar 2015 23:20:51 +0000 (16:20 -0700)]
s3: Fix fsctl_validate_neg_info to pass MS compliance suite.
It turns out that all the client and server need to agree on is what
protocol should have been negotiated. If they disagree, they should
disconnect. The contents of the list of protocols used during
negotiate and during FSCTL_VALIDATE_NEGOTIATE_INFO do not need to match.
Back-port of patch
439de096ae0e1c1b8812fa202f5eba7a891d7a0a written
by Ira Cooper <ira@samba.org> and reviewed by Stefan Metzmacher <metze@samba.org>.
Fixes bug #11187 - Mac OS X 10.10.x fails Validate Negotiate Request to 4.1.x
https://bugzilla.samba.org/show_bug.cgi?id=11187
Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Wed Apr 8 23:42:50 CEST 2015 on sn-devel-104
Jeremy Allison [Tue, 31 Mar 2015 23:15:59 +0000 (16:15 -0700)]
s3: Refactor smbd_smb2_request_process_negprot
Breakout smb2_protocol_dialect_match to support future work in
fsctl_validate_neg_info.
Back port of
6221937acac7017dee397d1c9846236d9fd5f613
written by Ira Cooper <ira@samba.org> and signed off
by Stefan Metzmacher <metze@samba.org>
Fixes bug #11187 - Mac OS X 10.10.x fails Validate Negotiate Request to 4.1.x
https://bugzilla.samba.org/show_bug.cgi?id=11187
Signed-off-by: Jeremy Allison <jra@samba.org>
Andreas Schneider [Tue, 31 Mar 2015 16:15:51 +0000 (18:15 +0200)]
s3-passdb: Fix 'force user' with winbind default domain
If we set 'winbind use default domain' and specify 'force user = user'
without a domain name we fail to log in. In this case we need to try a
lookup with the domain name.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11185
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
cd4442c7ac93e165862c9195a7c345472646aa59)
Andreas Schneider [Thu, 26 Mar 2015 09:48:31 +0000 (10:48 +0100)]
s4-process_model: Do not close random fds while forking.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11180
The issue has been found with nss_wrapper debug output running:
samba4.ntvfs.cifs.krb5.base.lock
In the case here, we fork a child and close the fd without resetting
the pipe fd variable. Then the fd was used to open the nss_wrapper
hosts file which got the same fd. We forked again in the process model
called close() on the re-used fd (of the pipe variable) again without
nss_wrapper noticing. Now Samba opened the secrets tdb and got
the same fd as nss_wrapper was using for the hosts file and next
nss_wrapper tried to parse a TDB ...
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
f75182841d4a7d63bd070022270926e324631fa9)
Jeremy Allison [Thu, 26 Mar 2015 17:09:46 +0000 (10:09 -0700)]
s3: libsmbclient: Add missing talloc stackframe.
Bug 11177 - no talloc stackframe at ../source3/libsmb/clifsinfo.c:444, leaking memory
https://bugzilla.samba.org/show_bug.cgi?id=11177
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Mar 26 22:21:30 CET 2015 on sn-devel-104
(cherry picked from commit
32cbbed979b931eeb5127629248a94d7e6f3fcfb)
Stefan Metzmacher [Fri, 13 Mar 2015 13:39:10 +0000 (14:39 +0100)]
s4:auth/gensec_gssapi: let gensec_gssapi_update() return NT_STATUS_LOGON_FAILURE for unknown errors
The 'nt_status' variable is set to NT_STATUS_OK before.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11164
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit
09b3e42e70b35bfa1985e70780a67085644b9914)
Jeremy Allison [Thu, 19 Mar 2015 20:10:33 +0000 (13:10 -0700)]
s3: client - "client use spnego principal = yes" code checks wrong name.
Bug 10888 - smbclient doesn't ignore "not_defined_in_RFC4178@please_ignore"
https://bugzilla.samba.org/show_bug.cgi?id=10888
Code patch from <martin.wilck@ts.fujitsu.com>
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Mar 26 00:56:25 CET 2015 on sn-devel-104
(cherry picked from commit
e8932b92016fc7ece3169635fbe3d98cb0caa36b)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Sat Mar 28 01:22:31 CET 2015 on sn-devel-104
Jeremy Allison [Thu, 19 Mar 2015 20:09:21 +0000 (13:09 -0700)]
docs: Mark 'client use spnego principal' as deprecated and also a bad idea.
Bug 10888 - smbclient doesn't ignore "not_defined_in_RFC4178@please_ignore"
https://bugzilla.samba.org/show_bug.cgi?id=10888
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
(cherry picked from commit
c9299bd6a4e86dbec10ab7741056f331a18c44a0)
Michael Adam [Mon, 19 Jan 2015 12:51:55 +0000 (13:51 +0100)]
s3:winbind:grent: don't stop group enumeration when a group has no gid
simply continue with the next group
Note: this patch introduces some code duplication to make it
easier to create minimal backport patch. Subsequent patches
will provide some refactoring to reduce the duplication.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=8905
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit
24015224da1f363019d9d2da81ce533463a16abb)
Jeremy Allison [Wed, 18 Mar 2015 21:15:16 +0000 (14:15 -0700)]
s3: lib: libsmbclient: If reusing a server struct, check every cli->timout miliseconds if it's still valid before use.
Uses an cli_echo() call to do so.
Based on code from <shargagan@novell.com>
Bug 11079 - libsmbclient not checking the cached connection alive status before re-using it from connection cache
https://bugzilla.samba.org/show_bug.cgi?id=11079
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Mar 20 13:48:26 CET 2015 on sn-devel-104
(cherry picked from commit
4f4151ea050a5f34e42d73a4bf9448c673a35787)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Tue Mar 24 04:50:34 CET 2015 on sn-devel-104
Jeremy Allison [Thu, 19 Mar 2015 17:40:56 +0000 (10:40 -0700)]
s3: libcli: smb1: Ensure we correctly finish a tevent req if the writev fails in the SMB1 case.
We haven't added the req to the pending array yet, as SMB1 requests can
be one-way (no reply needed). So if we error out after the writev, but
before we add to the pending array we must rember to terminate our current
tevent req with a tevent_req_nterror call.
Fixes bug 11173 - SMB1 Server disconnect can cause timeout on client write error.
https://bugzilla.samba.org/show_bug.cgi?id=11173
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Mar 20 05:08:25 CET 2015 on sn-devel-104
(cherry picked from commit
00d92f59257ce8fe1729becd72e13a42dfff0589)
Jeremy Allison [Mon, 9 Mar 2015 21:27:43 +0000 (14:27 -0700)]
s3: lib: ntlmssp: If NTLMSSP_NEGOTIATE_TARGET_INFO isn't set, cope with servers that don't send the 2 unused fields.
Packet traces showing such servers are found in the bug this fixes:
https://bugzilla.samba.org/show_bug.cgi?id=10016
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Mar 19 12:05:56 CET 2015 on sn-devel-104
(cherry picked from commit
ffe33940faa6fb762fd2483f0245448b0434be00)
Jeremy Allison [Mon, 9 Mar 2015 21:21:22 +0000 (14:21 -0700)]
s4: lib: auth: If NTLMSSP_NEGOTIATE_TARGET_INFO isn't set, cope with servers that don't send the 2 unused fields.
Packet traces showing such servers are found in the bug this fixes:
https://bugzilla.samba.org/show_bug.cgi?id=10016
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
5137af570d8a173d7775754ad2e60d6d8efbe3a2)
David Disseldorp [Fri, 16 Jan 2015 15:21:24 +0000 (16:21 +0100)]
docs/idmap_rid: remove deprecated base_rid from example
The base_rid option has been deprecated for some time. Specifying a
value of 1000 (as recommended in the parameter description and example
section) can result in failed mapping of group SIDs, where RIDs do not
start at 1000.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11169
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Jan 19 09:09:22 CET 2015 on sn-devel-104
(cherry picked from commit
8466587c589f01d59294be36ad0b347f5d82a11f)
Stefan Metzmacher [Mon, 9 Mar 2015 08:07:24 +0000 (09:07 +0100)]
talloc: version 2.1.2
Changes:
- Allow destructors to reparent the object
- Allow destructors to remove itself
- Build improvements
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit
7bef5e4f0e5ff4a4187f3d63e51a1725ff32b771)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11144
Memory leak in SMB2 notify handling.
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Mon Mar 16 00:25:52 CET 2015 on sn-devel-104
Stefan Metzmacher [Tue, 27 Jan 2015 12:07:34 +0000 (13:07 +0100)]
talloc: fix _talloc_total_limit_size prototype
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit
3929abfc6b5a3ae8a27da57d4dbee9524e3585e3)
Jeremy Allison [Wed, 4 Mar 2015 01:12:32 +0000 (17:12 -0800)]
lib: talloc: Test suite for the new destructor reparent logic.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Mar 8 20:52:43 CET 2015 on sn-devel-104
(cherry picked from commit
6b0cecee1b864a0589836caf9f5f2892f8cb6926)
Jeremy Allison [Wed, 4 Mar 2015 01:02:47 +0000 (17:02 -0800)]
lib: talloc: Allow destructors to reparent the object they're called on.
If a destructor returns failure (-1) when freeing a child, talloc
must then reparent the child.
Firstly it tries the owner of any reference, next the parent of the
current object calling _talloc_free_children_internal(), and finally
the null context in the last resort.
If a destructor reparented its own object, which can be a very
desirable thing to do (a destructor can make a decision it isn't
time to die yet, and as the parent may be going away it might
want to move itself to longer-term storage) then this new parent
gets overwritten by the existing reparenting logic.
This patch checks when freeing a child if it already reparented
itself, and if it did doesn't then overwrite the new parent.
Makes destructors more flexible.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
(cherry picked from commit
cc4e5481ea060db7f6d8a83619d859b2e002eb90)
Jeremy Allison [Thu, 5 Mar 2015 20:48:47 +0000 (12:48 -0800)]
lib: talloc: Fix bug when calling a destructor.
If the destructor itself calls talloc_set_destructor()
and returns -1, the new destructor set is overwritten
by talloc.
Dectect that and leave the new destructor in place.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
(cherry picked from commit
3289a5d84f73bf044e5767a6c47a3f7bf8357c08)
Michael Adam [Fri, 20 Jun 2014 16:04:44 +0000 (18:04 +0200)]
talloc:build: improve detection of srcdir
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit
cc86b4107acebf56c7bb17f59dd358615aed57b7)
Stefan Metzmacher [Thu, 15 May 2014 12:53:49 +0000 (14:53 +0200)]
talloc: version 2.1.1
Changes:
- documentation updates
- a fix for pytalloc-util.pc
- performance improvements here and there
- fixed compiler warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri May 16 19:51:26 CEST 2014 on sn-devel-104
(cherry picked from commit
b8e5b68de3cff8d16e4be07fdc2e780d2c3c5750)
Stefan Metzmacher [Thu, 27 Feb 2014 08:28:02 +0000 (09:28 +0100)]
talloc/tests: avoid some unused variable warnings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
8fbb81923ddf3449b4ad1fa1a562c9fab8c74103)
Stefan Metzmacher [Wed, 20 Nov 2013 08:58:09 +0000 (09:58 +0100)]
talloc: fix compiler warning
This avoids the following warning when using:
CFLAGS="-O3 -g -fstrict-overflow -Wstrict-overflow=5"
../talloc.c: In Funktion »talloc_is_parent«:
../talloc.c:2658:21: Warnung: assuming signed overflow does not occur when
changing X +- C1 cmp C2 to X cmp C1 +- C2 [-Wstrict-overflow]
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
de822b58476093dc43c27577d2f7074541113cc5)
Stefan Metzmacher [Thu, 5 Dec 2013 07:36:13 +0000 (08:36 +0100)]
talloc: check for TALLOC_GET_TYPE_ABORT_NOOP
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
eb95fc8866dd1710b4cc2f4a4e1dc9867424def2)
Stefan Metzmacher [Wed, 4 Dec 2013 14:35:37 +0000 (15:35 +0100)]
talloc: avoid a function call in TALLOC_FREE() if possible.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
b9fcfc6399eab750880ee0b9806311dd351a8ff6)
Stefan Metzmacher [Wed, 4 Dec 2013 22:22:04 +0000 (23:22 +0100)]
talloc: inline talloc_get_name()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
014eecd0b2aead3a160af0d864feddd53c85b580)
Stefan Metzmacher [Wed, 20 Nov 2013 08:57:58 +0000 (09:57 +0100)]
talloc: inline more static functions
We need the code to be as fast as possible.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
3aa35354724b88acc63f6b4439f7203d10db4e90)
Volker Lendecke [Fri, 10 Jan 2014 09:45:22 +0000 (10:45 +0100)]
talloc: Tune talloc_vasprintf
vsnprintf is significantly more expensive than memcpy. For the
common case where the string we print is less than a kilobyte, avoid
the second vsnprintf.
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 15 12:49:14 CEST 2014 on sn-devel-104
(cherry picked from commit
593c8103af5a5ed6b3c915369fed5b90efb42c25)
Lukas Slebodnik [Fri, 4 Apr 2014 11:29:39 +0000 (13:29 +0200)]
talloc: Update flags in pytalloc-util pkgconfig file
After exapnding, @LIB_RPATH@ will be -Wl,-rpatch,/usr/local/lib if rpath is
used on install. But "-Wl," will be passed to linker and should not be among
CFLAGS. Other pkgconfig files have @LIB_RPATH@ in the right place.
@see commit
735c1cd2da15167748e92ba6de48fdb5169db587
Signed-off-by: Lukas Slebodnik <lslebodn@redhat.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Apr 4 23:50:25 CEST 2014 on sn-devel-104
(cherry picked from commit
e1df75b5a965829db0c1f76673dcc824447b3ae7)
Jelmer Vernooij [Wed, 27 Nov 2013 02:12:02 +0000 (02:12 +0000)]
Add a basic guide on pytalloc.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Thu Nov 28 02:24:45 CET 2013 on sn-devel-104
(cherry picked from commit
91c1053413e1f309b2d5b215a423f37e3883aa91)
Andreas Schneider [Mon, 14 Oct 2013 11:17:12 +0000 (13:17 +0200)]
talloc: Add a warning to talloc_reference() documentation.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Oct 14 23:05:54 CEST 2013 on sn-devel-104
(cherry picked from commit
2343df451a13115eebfd46f9247ec2ae8c3a85c0)
Volker Lendecke [Fri, 6 Sep 2013 22:30:38 +0000 (15:30 -0700)]
talloc: Test the pooled object
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
256d10f5792a37d20cbb45f2af3f8578bd354110)
Volker Lendecke [Fri, 6 Sep 2013 22:15:32 +0000 (15:15 -0700)]
talloc: Add talloc_pooled_object
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
e82320e5197bcdd0330bc829c0963ad09854a36c)
Volker Lendecke [Fri, 6 Sep 2013 21:52:28 +0000 (14:52 -0700)]
talloc: Allow nested pools.
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
20ad6d7aa3dc5e7db4d886202f757ac1f68287d4)
Volker Lendecke [Fri, 6 Sep 2013 21:20:20 +0000 (14:20 -0700)]
talloc: Add a separate pool size
This is necessary to allow talloc pools to be objects on their own. It
is an incompatible change in the sense that talloc_get_size(pool) now
returns 0 instead of the pool size. When the talloc_pooled_object()
call is added, this will start to make sense again.
Maybe we should add a talloc_pool_size call? Or is that overkill?
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
a3d9099d9a96b36df21ee0733adc5210438fe9dc)
Volker Lendecke [Fri, 6 Sep 2013 21:08:43 +0000 (14:08 -0700)]
talloc: Put pool-specific data before the chunk
This is a preparation to make talloc pool real objects themselves.
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
b87c8fd435d1863d6efcec03830ecd85ddfcd7fb)
Volker Lendecke [Fri, 6 Sep 2013 19:18:26 +0000 (12:18 -0700)]
talloc: Introduce __talloc_with_prefix
This will allow to exchange the extra talloc pool header with the
talloc_chunk structure
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
9887f387a10e94f71790c0c3c7dc5f8cde7e4eb2)
Volker Lendecke [Fri, 6 Sep 2013 17:54:43 +0000 (10:54 -0700)]
talloc: Decouple the dual use of chunk->pool
If we want nested pools, we will have pools that are pool members. So
we will have to have a separate "next object" pointer for pools. As
we have struct talloc_pool_chunk now, this additional pointer does not
affect normal talloc objects.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
1334c745e1f2157b66e14f9d8b4f6f7750238717)
Jeremy Allison [Tue, 27 Aug 2013 20:20:43 +0000 (13:20 -0700)]
Fix valgrind errors with memmove and talloc pools.
bin/smbtorture //127.0.0.1 local.talloc now runs with no valgrind errors.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 28 02:44:17 CEST 2013 on sn-devel-104
(cherry picked from commit
617c647b8ef562ace589a11a15eb460e6db71f2a)
Jeremy Allison [Tue, 27 Aug 2013 20:09:03 +0000 (13:09 -0700)]
Add simple limited pool tests to test_memlimit().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit
cbfc3efbfd4a3a6f3b031ce8ef375d37f2c545f3)
Jeremy Allison [Tue, 27 Aug 2013 20:08:33 +0000 (13:08 -0700)]
Remove talloc_memlimit_update(). No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit
3d0f717d437bb24f430fad788b9eb35e8fe8e0e8)
Jeremy Allison [Tue, 27 Aug 2013 20:07:04 +0000 (13:07 -0700)]
Inside _talloc_realloc(), keep track of size changes over malloc/realloc/free.
Replace the last use of talloc_memlimit_update() with talloc_memlimit_grow()/
talloc_memlimit_shrink().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit
8e2a543e088cac36a5b6bbab1a6be961fa00cc4d)
Jeremy Allison [Tue, 27 Aug 2013 20:03:27 +0000 (13:03 -0700)]
Don't call talloc_memlimit_update() inside _talloc_realloc() when we're just manipulating pool members.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit
314508dd73105138d756f4ca3dfb65f1d368a9f7)
Jeremy Allison [Tue, 27 Aug 2013 19:59:04 +0000 (12:59 -0700)]
Fix a conditional check. (size - tc->size > 0) is always true if size and tc->size are unsigned.
Replace with (size > tc->size).
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit
0fbcfcc824e474874c15d7c0b2ea0df408448906)
Jeremy Allison [Tue, 27 Aug 2013 19:57:43 +0000 (12:57 -0700)]
In _talloc_steal_internal(), correctly decrement the memory limit in the source, and increment in the destination.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit
43860293225d14ca2c339277b42f8705322463ab)
Jeremy Allison [Tue, 27 Aug 2013 19:54:38 +0000 (12:54 -0700)]
Inside _talloc_free_internal(), always call talloc_memlimit_update_on_free() before we free the real memory.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit
6bc190d6dd7fd0ab028c39c1463477a863f6943a)
Jeremy Allison [Tue, 27 Aug 2013 19:51:20 +0000 (12:51 -0700)]
Update memory limits when we call free() on a pool.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit
4dfde7d33e7ac6c94833ecc758baff487ab67e4e)
Jeremy Allison [Tue, 27 Aug 2013 19:49:00 +0000 (12:49 -0700)]
Change __talloc() to only call talloc_memlimit_check()/talloc_memlimit_grow() on actual malloc allocation.
Don't check the memlimit if the allocation was successful from a pool. We already
checked the memory limit when we created the pool.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit
a4ebbe73b4b8dcab4d344e693ad9796ec8997f87)
Jeremy Allison [Tue, 27 Aug 2013 19:46:09 +0000 (12:46 -0700)]
Change _talloc_total_mem_internal() to ignore memory allocated from a pool when calculating limit size.
We must only count normal tallocs, or a talloc pool itself.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit
4159a78ed7eda340758e22286f16186987a20f2f)
Jeremy Allison [Tue, 27 Aug 2013 19:43:50 +0000 (12:43 -0700)]
Remove magic TC_HDR_SIZE handling inside talloc_memlimit_check().
Callers already account for TC_HDR_SIZE, do not add it twice.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit
7a6beae68ee3f9a97e9e56f4e24a437839fb3e19)
Jeremy Allison [Tue, 27 Aug 2013 19:36:23 +0000 (12:36 -0700)]
Start to fix talloc memlimits with talloc pools.
Add the functions:
talloc_memlimit_grow(), talloc_memlimit_shrink(),
talloc_memlimit_update_on_free().
as replacements for talloc_memlimit_update().
The interface to talloc_memlimit_update() is very
hard to understand and use. The above functions
are (to me) much clearer.
The goal of these changes is to only update
the memlimits on malloc/free/realloc, not
on every pool allocation. That way we only
count pool creation as allocation from any
imposed limits, not allocation from an already
created pool.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
(cherry picked from commit
fe790f6cbc9b888a8d613cfb515f0d0c76daad47)
Michael Adam [Mon, 9 Mar 2015 14:15:37 +0000 (15:15 +0100)]
s3-winbind: Fix chached user group lookup of trusted domains.
If a user group lookup has aleady been done before with a machine
account we did always return the incomplete information from the cache.
This patch makes sure we return the correct group information from the
netsamlogon cache.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11143
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
f5d0204bfa1eb641fe7697613c1f773b6a7e65de)
Andreas Schneider [Thu, 18 Dec 2014 15:14:36 +0000 (15:14 +0000)]
spoolss: retrieve published printer GUID if not in registry
When a printer is published, the GUID for the published DN is retrieved
from the domain controller and stored in the registry.
When handling a spoolss GetPrinter(level=7) request, the same GUID is
obtained from the registry and returned to the client.
This change sees the spoolss server query the DC for the published
printer GUID if it is not present in the registry when handling a
spoolss GetPrinter(level=7) request.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11018
Pair-Programmed-With: David Disseldorp <ddiss@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit
a4157e7c5d75be7003ad0b72fdfe9856a9e5ba8f)
Andreas Schneider [Thu, 18 Dec 2014 15:13:27 +0000 (15:13 +0000)]
printing: rework nt_printer_guid_store to return errors
Callers can now choose whether or not to ignore errors.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11018
Pair-programmed-with: David Disseldorp <ddiss@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit
6595ced146a53dcef9bbd5d2deb82a44c8ce1a1a)
David Disseldorp [Thu, 18 Dec 2014 17:23:11 +0000 (18:23 +0100)]
printing: add nt_printer_guid_retrieve() helper
This function connects to the domain controller and retrieves the
GUID for the corresponding printer DN.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11018
Pair-programmed-with: Andreas Schneider <asn@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit
38dbd054dc331a441b10fdebbdb4bd0fc51cfc0a)
David Disseldorp [Thu, 18 Dec 2014 17:18:21 +0000 (18:18 +0100)]
printing: split out printer DN and GUID retrieval
This functions are used for printer publishing.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11018
Pair-programmed-with: Andreas Schneider <asn@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit
7cabd89789a50d37fc32735968c493092a37e69f)
Andreas Schneider [Mon, 2 Mar 2015 10:55:01 +0000 (11:55 +0100)]
doc-xml: Add 'sharesec' reference to 'access based share enum'
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11127
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Mar 2 14:33:33 CET 2015 on sn-devel-104
(cherry picked from commit
e2ed224653985afa13e906e2a5f3656a18d622c0)
Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Wed Mar 4 00:20:05 CET 2015 on sn-devel-104
Ira Cooper [Thu, 15 Jan 2015 16:41:50 +0000 (11:41 -0500)]
smbd: Stop using vfs_Chdir after SMB_VFS_DISCONNECT.
This sequencing is causing problems for vfs_ceph, and likely
other vfs modules.
Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan 16 00:13:17 CET 2015 on sn-devel-104
(cherry picked from commit
81464daea71e5fa3067ec7d5f5c69c890c0f7949)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11115
S3: vfs_Chdir() is called after SMB_VFS_DISCONNECT in
source3/smbd/service.c::close_cnum().
Stefan Metzmacher [Thu, 26 Feb 2015 10:27:33 +0000 (11:27 +0100)]
Merge tag 'samba-4.1.17' into v4-1-test
samba: tag release samba-4.1.17
Michael Adam [Thu, 19 Feb 2015 15:59:00 +0000 (16:59 +0100)]
doc:man:vfs_glusterfs: improve the configuration section.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Feb 20 14:29:21 CET 2015 on sn-devel-104
(cherry picked from commit
e6e6f563e6968dcb3ae558a7857f8dff49d2939f)
The last 3 patches address
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11117
vfs_glusterfs manpage corrections
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Wed Feb 25 22:15:39 CET 2015 on sn-devel-104
Michael Adam [Fri, 13 Feb 2015 00:04:11 +0000 (01:04 +0100)]
doc:man:vfs_glusterfs: improve and update description.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit
7852dd9e4c806d4e2b5428cb783b8ce6db8902d0)
Michael Adam [Fri, 13 Feb 2015 00:03:21 +0000 (01:03 +0100)]
doc:man:vfs_glusterfs: remove extra % signs.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit
b9bf3c4d785606573ee3b9cb8e727bb04b3be6fb)
Andrew Bartlett [Mon, 16 Feb 2015 02:59:11 +0000 (15:59 +1300)]
debug: Set close-on-exec for the main log file FD
This does not change the properties of dup2() of the fd as STDERR, however this is closed
before we start smbd or winbindd as child processes.
This is needed otherwise the logfile remains open in the child process, and
logfile rotation can mean this old log remains on disk indefinatly.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11100
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Feb 16 11:42:47 CET 2015 on sn-devel-104
(based on commit
1d95b0afc3547a91f8558873ce58652c271ed9eb)
Karolin Seeger [Mon, 23 Feb 2015 13:38:08 +0000 (14:38 +0100)]
VERSION: Bump version up to 4.1.18.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Sat, 21 Feb 2015 20:04:20 +0000 (21:04 +0100)]
VERSION: Disable git snapshots for the 4.1.17 release.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11077
CVE-2015-0240: talloc free on uninitialized stack pointer in netlogon server
could lead to security vulnerability.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Sat, 21 Feb 2015 20:07:08 +0000 (21:07 +0100)]
WHATSNEW: Add release notes for Samba 4.1.17.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11077
CVE-2015-0240: talloc free on uninitialized stack pointer in netlogon server
could lead to security vulnerability.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Andreas Schneider [Mon, 16 Feb 2015 09:59:23 +0000 (10:59 +0100)]
s3-netlogon: Make sure we do not deference a NULL pointer.
This is an additional patch for CVE-2015-0240.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11077#c32
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Jeremy Allison [Wed, 28 Jan 2015 22:47:31 +0000 (14:47 -0800)]
CVE-2015-0240: s3: netlogon: Ensure we don't call talloc_free on an uninitialized pointer.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11077
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Karolin Seeger [Sat, 21 Feb 2015 20:04:20 +0000 (21:04 +0100)]
VERSION: Disable git snapshots for the 4.1.17 release.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11077
CVE-2015-0240: talloc free on uninitialized stack pointer in netlogon server
could lead to security vulnerability.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Sat, 21 Feb 2015 20:07:08 +0000 (21:07 +0100)]
WHATSNEW: Add release notes for Samba 4.1.17.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11077
CVE-2015-0240: talloc free on uninitialized stack pointer in netlogon server
could lead to security vulnerability.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Andreas Schneider [Mon, 16 Feb 2015 09:59:23 +0000 (10:59 +0100)]
s3-netlogon: Make sure we do not deference a NULL pointer.
This is an additional patch for CVE-2015-0240.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11077#c32
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Jeremy Allison [Wed, 28 Jan 2015 22:47:31 +0000 (14:47 -0800)]
CVE-2015-0240: s3: netlogon: Ensure we don't call talloc_free on an uninitialized pointer.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11077
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Jeremy Allison [Tue, 10 Feb 2015 17:32:11 +0000 (09:32 -0800)]
s3: smbclient: Allinfo leaves the file handle open.
https://bugzilla.samba.org/show_bug.cgi?id=11094
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): Tue Feb 10 23:28:46 CET 2015 on sn-devel-104
(cherry picked from commit
080ec0f7d9735b27138deb5f91a397935f089f02)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Mon Feb 16 23:20:50 CET 2015 on sn-devel-104
David Disseldorp [Tue, 3 Feb 2015 18:26:42 +0000 (19:26 +0100)]
printing/cups: pack requested-attributes with IPP_TAG_KEYWORD
The CUPS IPP_GET_JOBS requested-attributes array indicates which job
attributes the caller would like in the cupsd response.
Until now, Samba has packed these attributes with a IPP_TAG_NAME
format tag. In recent versions of CUPS, this results in the IPP_GET_JOBS
response only including the job-id and job-printer-uri fields, even with
JobPrivateValues=none configured.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10808
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Feb 10 01:38:58 CET 2015 on sn-devel-104
(cherry picked from commit
2f4998113e539ea4ba6fb0a72ba6ac25c9d74bd6)
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Tue Feb 10 23:20:58 CET 2015 on sn-devel-104
Karolin Seeger [Tue, 10 Feb 2015 20:30:36 +0000 (21:30 +0100)]
VERSION: Re-enable git snapshots.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Thu, 15 Jan 2015 11:10:58 +0000 (12:10 +0100)]
VERSION: Bump version up to 4.1.17.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
(cherry picked from commit
c4e46cd4e32ef5bf25f3a21f74bb40dfb1dd3c0d)
Stefan Metzmacher [Thu, 29 Jan 2015 09:12:30 +0000 (10:12 +0100)]
s3:smb2_server: protect against integer wrap with "smb2 max credits = 65535"
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9702
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan 29 14:58:40 CET 2015 on sn-devel-104
(similar to commit
8aed0fc38ae28cce7fd1a443844a865265fc719c)
Autobuild-User(v4-1-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-1-test): Tue Feb 3 00:04:10 CET 2015 on sn-devel-104
Stefan Metzmacher [Wed, 28 Jan 2015 14:22:30 +0000 (15:22 +0100)]
s3:smb2_server: always try to grant the credits the client just consumed
It turns out that the effective credits_requested is always at least 1,
even if the client sends credits_requested == 0.
This means the client is not able to reduce the amount of credits
itself.
Without this fix a client (e.g. Windows7) would reach the case
where it has been granted all credits it asked for.
When copying a large file with a lot of parallel requests,
all these requests have credits_requested == 0.
This means the amount of granted credits where reduced by each
request and only when the granted credits reached 0,
the server granted one credit to allow the client to go on.
The client might require more than one credit ([MS-SMB2] says
Windows clients require at least 4 credits) and freezes
with just 1 credit.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9702
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(similar to commit
1944c857e59922a2ebfc88a6a824a6ed9396f2d5)
Garming Sam [Wed, 3 Dec 2014 22:53:12 +0000 (11:53 +1300)]
dsdb: Add tokenGroupsGlobalAndUniversal, tokenGroups, tokenGroupsNoGCAcceptable
This includes additional tests based directly on the docs, rather than
simply testing our internal implementation in client and server contexts,
that create a user and groups.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11022
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming-Sam <garming@catalyst.net.nz>
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): Mon Dec 22 17:17:02 CET 2014 on sn-devel-104
(similar to commit
e4213512d0a967e87a74a1ae816c903fb38dd8b9)
Change-Id: Ia98bf5a62bb69e15ae6420b34e09a65c1f3e79dd
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Thu Jan 29 23:24:18 CET 2015 on sn-devel-104
Karolin Seeger [Mon, 26 Jan 2015 19:51:50 +0000 (20:51 +0100)]
Revert "dsdb: Add tokenGroupsGlobalAndUniversal, tokenGroups, tokenGroupsNoGCAcceptable"
This reverts commit
333d25739eb5a0d347ff8c57726ea184af4c1ec9.
Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-1-test): Mon Jan 26 23:05:21 CET 2015 on sn-devel-104
Andreas Schneider [Thu, 22 Jan 2015 09:27:59 +0000 (10:27 +0100)]
s3-pam_smbpass: Fix memory leak in pam_sm_authenticate().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11066
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit
0cb9b28acb7008cd30c6de3add9876eb5607a5a6)
Andreas Schneider [Tue, 13 Jan 2015 16:04:26 +0000 (17:04 +0100)]
utils: Fix 'net time' segfault.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11058
This is part two of the bugfix. Make sure we pass the IP we found to
cli_servertime(). Hence we always pass at least one of name or IP.
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
45829800eb3f3a8aeccfe7c1114dcf9df60371d5)
Michael Adam [Fri, 16 Jan 2015 15:18:45 +0000 (16:18 +0100)]
cli_connect_nb_send: don't segfault on host == NULL.
The functions called futher down can cope with host == NULL.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11058
This is part one of the bugfix:
This ensures that it is enough to pass one of host or address to the function.
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
a0a254f74234bed6c9a0c71a5bda8254fa6f633f)
Ira Cooper [Thu, 22 Jan 2015 22:14:31 +0000 (17:14 -0500)]
vfs_glusterfs: Add comments to the pipe(2) code.
The guarantees around read(2) and write(2) and pipes are critical
to understanding this code. Hopefully these comments will help.
Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan 23 20:58:51 CET 2015 on sn-devel-104
(cherry picked from commit
3b2d8bdbb1851961536241d3aaaf6ac936964517)
The last 10 patches address
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11069
Backport remaining performance patches for vfs_glusterfs to 4.2/4.1.
Volker Lendecke [Wed, 21 Jan 2015 19:49:24 +0000 (20:49 +0100)]
vfs: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jan 22 13:14:38 CET 2015 on sn-devel-104
(cherry picked from commit
db63e4887c81c3e458194004353d7ef92c67b393)
Michael Adam [Wed, 21 Jan 2015 21:07:53 +0000 (22:07 +0100)]
vfs:glusterfs: whitespace fix.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jan 22 03:20:17 CET 2015 on sn-devel-104
(cherry picked from commit
cde5d380e192487ae77734afcb3eb3d327aafb98)