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)
Ira Cooper [Tue, 20 Jan 2015 04:08:17 +0000 (23:08 -0500)]
vfs_glusterfs: Replace eventfd with pipes, for AIO use
Pipes clean up the AIO implementation substantially, due to the fact
that they implement a natural ithread safe queue instead of us
creating our own queue.
Signed-off-by: Ira Cooper <ira@samba.org>
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Wed Jan 21 20:40:11 CET 2015 on sn-devel-104
(cherry picked from commit
4c3a3d9e6adc95d0f0e1f6030b2406613d9f9f53)
raghavendra talur [Wed, 10 Dec 2014 15:45:03 +0000 (21:15 +0530)]
vfs/glusterfs: Change xattr key to match gluster key.
Gluster changed the key used to do get_real_filename
in 3.5. This changes Samba's glusterfs vfs-module
to use the same key.
This will render SMB_VFS_GET_REALFILENAME() working
again under 3.5 and will remove support for that functionality
for Gluster 3.4 and older.
Signed-off-by: raghavendra talur <raghavendra.talur@gmail.com>
Reviewed-by: Ira Cooper <ira@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
af9ec9fea5a730023cdee6e236f9585e3a18b0e6)
Poornima G [Thu, 11 Dec 2014 02:05:10 +0000 (07:35 +0530)]
vfs_glusterfs: Implement AIO support
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Dec 17 16:35:37 CET 2014 on sn-devel-104
(cherry picked from commit
051b81aac81c7ccb234da221e9f8272b70b265ce)
Poornima G [Fri, 12 Dec 2014 13:11:49 +0000 (14:11 +0100)]
vfs_glusterfs: Change sys_get_acl_file/fd to return ACLs corresponding to mode bits when there are no ACLs set.
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
26b3544251babdfcdf5ada338a4ed39ff18bc47a)
raghavendra talur [Wed, 10 Dec 2014 07:00:10 +0000 (12:30 +0530)]
vfs_glusterfs: Set connectpath as snapdir-entry-path.
snapview client in gluster would require connectpath
in order add snapdir entry to readdir result.
Signed-off-by: raghavendra talur <raghavendra.talur@gmail.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Dec 10 16:38:27 CET 2014 on sn-devel-104
(cherry picked from commit
a12ae815b01b372cbf8697d32d5d45d7b2d5f93d)
raghavendra talur [Wed, 10 Dec 2014 06:56:34 +0000 (12:26 +0530)]
vfs_glusterfs: Remember the connect path too for reopening.
As Samba allows us to share subdirs, lets re-use preopened
connections to glusterfs only if they are for same volume
AND same connectpath.
Signed-off-by: raghavendra talur <raghavendra.talur@gmail.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
2fb4317352a165d0dd4af78fcf0a576fa246eab2)
Poornima G [Thu, 30 Oct 2014 11:44:51 +0000 (17:14 +0530)]
vfs_glusterfs: In vfs_gluster_sys_acl_get_file/fd, reduce the number of getxattr calls.
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Ira Cooper <ira@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit
a4fa9ca5a7a4c0b770079ab126f8172ff6d6851c)
David Disseldorp [Mon, 19 Jan 2015 12:39:35 +0000 (13:39 +0100)]
libsmb: provide authinfo domain for encrypted session referrals
6c9de0cd056afc0b478c02f1bdb0e06532388037 requires this extra change.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11059
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): Wed Jan 21 04:29:06 CET 2015 on sn-devel-104
(cherry picked from commit
6da86012a2ca521efe0cf1bf05fcd04c3099b190)
David Disseldorp [Fri, 16 Jan 2015 15:21:23 +0000 (16:21 +0100)]
libsmb: provide authinfo domain for DFS referral auth
libsmbclient uses the smbc_init->smbc_get_auth_data_fn() provided
workgroup/domain in initial connections, but then switches to the
default smb.conf workgroup/domain when handling DFS referrals.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11059
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
6c9de0cd056afc0b478c02f1bdb0e06532388037)
[ddiss@samba.org: 4.1 rebase with cli_init_creds() call]
David Disseldorp [Fri, 16 Jan 2015 15:21:22 +0000 (16:21 +0100)]
libsmb: reuse connections derived from DFS referrals
[MS-DFSC] 3.2.1.1 and 3.2.1.2 states that DFS targets with the same site
location or relative cost are placed in random order in a DFS referral
response.
libsmbclient currently resolves DFS referrals on every API call, always
using the first entry in the referral response. With random ordering,
libsmbclient may open a new server connection, rather than reuse an
existing (cached) connection established in a previous DFS referred API
call.
This change sees libsmbclient check the connection cache for any of the
DFS referral response entries before creating a new connection.
This change is based on a patch by Har Gagan Sahai
<SHarGagan@novell.com>.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10123
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
7b7d4f740fe5017107d3100041cc8c7982f0eac7)
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>
Karolin Seeger [Thu, 15 Jan 2015 11:10:22 +0000 (12:10 +0100)]
Merge tag 'samba-4.1.16' into v4-1-test
samba: tag release samba-4.1.16
Volker Lendecke [Sun, 18 Aug 2013 20:35:32 +0000 (20:35 +0000)]
smbd: Fix CID
1063259 Uninitialized scalar variable
Signed-off-by: Volker Lendecke <vl@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11041
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit
cc983c9a6a92f3d127ec6461b15aed3fa90e6d30)
Reviewed-by: David Disseldorp <ddiss@samba.org>
Andreas Schneider [Wed, 7 Jan 2015 16:12:54 +0000 (17:12 +0100)]
s3-libads: Fix a possible segfault in kerberos_fetch_pac().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11037
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
a13e29cc4345d85ab6fe4482119386b87e4e8673)
David Disseldorp [Wed, 17 Dec 2014 15:54:42 +0000 (16:54 +0100)]
spoolss: clear PrinterInfo on GetPrinter error
If an error is returned without zeroing a pre-allocated @info pointer,
then marshalling of the response will fail.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10984
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
a11e97b79645ff0d9e7d20f5318a979194a858fe)
David Disseldorp [Wed, 17 Dec 2014 15:47:50 +0000 (16:47 +0100)]
spoolss: clear info on GetPrinterDriverDirectory error
If an error is returned without zeroing a pre-allocated @info pointer,
then marshalling of the response will fail.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10984
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
c9fccb5018f9a19bb654b9ad79aa716e37a274d6)
David Disseldorp [Wed, 17 Dec 2014 14:54:22 +0000 (15:54 +0100)]
spoolss: clear info on GetPrintProcessorDirectory error
If an error is returned without zeroing a pre-allocated @info pointer,
then marshalling of the response will fail.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10984
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
679c781112ce6b7cffca11c28e58ae5f9a0d717d)
David Disseldorp [Wed, 17 Dec 2014 14:29:52 +0000 (15:29 +0100)]
spoolss: clear FormInfo on GetForm error
In handling a spoolss GetForm request, the handler may return an
immediate error if one of the input parameters is invalid. If this is
done without zeroing the pre-allocated @info pointer, then marshalling
of the response will fail.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10984
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
b113ed6043622cdec68f3a70631b363594f3a8d0)
David Disseldorp [Wed, 17 Dec 2014 14:21:33 +0000 (15:21 +0100)]
spoolss: clear DriverInfo on GetPrinterDriver2 error
In handling a spoolss GetPrinterDriver2 request, the handler may
return an immediate error if one of the input parameters is invalid.
If this is done without zeroing the pre-allocated @info pointer, then
marshalling of the response will fail.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10984
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
fb9ecb044ee986ab3496da6cbad162a224378475)
David Disseldorp [Thu, 4 Dec 2014 19:03:39 +0000 (20:03 +0100)]
spoolss: clear JobInfo on GetJob error
In handling a spoolss GetJob request, the _spoolss_GetJob() handler may
return an immediate error if one of the input parameters is invalid. If
this is done without zeroing the pre-allocated @info pointer, then
api_spoolss_GetJob() will attempt to marshall @info, which in the case
of an @offered value of zero results in a marshalling error:
ndr_push_error(7): Bad subcontext (PUSH) content_size 64 is larger
than size_is(0)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10984
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit
89869e090c56a3f83b451b437f9c3f40a231dd24)
Günther Deschner [Wed, 17 Dec 2014 12:48:53 +0000 (13:48 +0100)]
vfs: Add glusterfs manpage.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10240
Guenther
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Jan 7 20:57:57 CET 2015 on sn-devel-104
Volker Lendecke [Tue, 13 Jan 2015 11:51:13 +0000 (12:51 +0100)]
net: Fix sam addgroupmem
Domain local groups come across as SID_TYPE_ALIAS and are sent to us in the
PAC/Info3 struct. We should allow this in net sam addgroupmem.
Volker
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11051
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jan 13 15:28:16 CET 2015 on sn-devel-104
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)
Andreas Schneider [Mon, 12 Jan 2015 17:12:13 +0000 (18:12 +0100)]
s3-util: Fix authentication with long hostnames.
If the hostname is longer than MAX_NETBIOSNAME_LEN we fail to correctly
check the hostname.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11008
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
da2611adef32107f5a0eec97501c01232ab72efc)
Signed-off-by: Andreas Schneider <asn@samba.org>
Karolin Seeger [Mon, 12 Jan 2015 20:42:02 +0000 (21:42 +0100)]
VERSION: Disable git snapshots for the 4.1.16 release.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Mon, 12 Jan 2015 20:41:32 +0000 (21:41 +0100)]
WHATSNEW: Add release notes for Samba 4.1.16.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Andrew Bartlett [Thu, 4 Dec 2014 04:23:29 +0000 (17:23 +1300)]
CVE-2014-8143:dsdb-samldb: Check for extended access rights before we allow changes to userAccountControl
This requires an additional control to be used in the
LSA server to add domain trust account objects.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10993
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Mon, 8 Dec 2014 01:20:21 +0000 (14:20 +1300)]
CVE-2014-8143:dsdb: Allow use of dsdb_autotransaction_request outside util.c
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10993
Change-Id: If6bc90305a1e9a5a92562a01ba7e44330de91cc1
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Andrew Bartlett [Sun, 7 Dec 2014 23:19:19 +0000 (12:19 +1300)]
CVE-2014-8143:pydsdb: Pull in UF_USE_AES_KEYS flag
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10993
Change-Id: I36ad5ebc5d8a4811c41b59af90a3add4ae5fd857
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>