Günther Deschner [Sat, 13 Feb 2010 03:27:05 +0000 (04:27 +0100)]
spoolss: make two bitmaps public.
Guenther
Stefan Metzmacher [Thu, 18 Feb 2010 14:36:08 +0000 (15:36 +0100)]
spoolss: make all security descriptors and devicemodes 4 byte aligned and add missing subcontexts.
Guenther
(cherry picked from commit
8f52957369bf8ce7591d5d9a1436ccb7e384c612)
Günther Deschner [Mon, 14 Dec 2009 16:22:39 +0000 (17:22 +0100)]
spoolss: set NDR_RELATIVE_REVERSE flag for various unions that have relative pointers.
Guenther
(cherry picked from commit
6d0a39741dacd81e33b25a91fa28cdf983d10d84)
Stefan Metzmacher [Thu, 18 Feb 2010 14:17:42 +0000 (15:17 +0100)]
ndr_spoolss_buf: use LIBNDR_FLAG_NO_NDR_SIZE in NDR_SPOOLSS_SIZE_*
metze
(cherry picked from commit
2059a165ee6f4d231aa4075d8ddea70b8df8944f)
Stefan Metzmacher [Wed, 23 Dec 2009 14:52:39 +0000 (15:52 +0100)]
spoolss: use subcontext in NDR_SPOOLSS_PUSH_ENUM_OUT macro.
metze
(cherry picked from commit
a4c3aeb79306190b09e284a6a28e3b40fbc5823b)
Stefan Metzmacher [Thu, 18 Feb 2010 14:13:20 +0000 (15:13 +0100)]
libndr: fix ndr_size_* calculation with relative reverse buffers
metze
(cherry picked from commit
8310f02414efd3b792857ed20c636c4c114e1ba2)
Stefan Metzmacher [Thu, 18 Feb 2010 12:40:44 +0000 (13:40 +0100)]
libndr: for now align reverse relative pointers to 2 bytes by default.
This is just a hack and we should let the callers use FLAG_ALIGN2
explicit in future.
metze
(cherry picked from commit
4a76d29374769ba4c075b8d5767498848d2e17d6)
Stefan Metzmacher [Wed, 17 Feb 2010 20:24:40 +0000 (21:24 +0100)]
libndr: implement LIBNDR_RELATIVE_REVERSE handling
This is based on Guenther's initial code.
metze
(cherry picked from commit
31c7780c16651b284009874cf3da04587dc36d19)
Günther Deschner [Mon, 14 Dec 2009 14:33:32 +0000 (15:33 +0100)]
libndr: store a subcontext buffer size in ndr_push_subcontext_start.
Guenther
(cherry picked from commit
05347754ee61f06466d6d9b7f390001992f793ce)
Stefan Metzmacher [Wed, 17 Feb 2010 19:27:08 +0000 (20:27 +0100)]
libndr: give an error when ndr_push_relative_ptr2_start()/_end() is used with the RELATIVE_REVERSE flag
metze
(cherry picked from commit
b5f9c44da55abb28222441a7e064a2a25891981f)
Günther Deschner [Tue, 9 Feb 2010 17:27:37 +0000 (18:27 +0100)]
libndr: add LIBNDR_FLAG_NO_RELATIVE_REVERSE so that relative reverse processing can be disabled for single structure elements.
Guenther
(cherry picked from commit
a2c34296fa6ca2ffb69cb69698a9b5f81803e8a8)
Günther Deschner [Mon, 14 Dec 2009 14:09:00 +0000 (15:09 +0100)]
libndr: add LIBNDR_FLAG_RELATIVE_REVERSE flag.
Guenther
(cherry picked from commit
ee13a51b0514ec3ac4ca9c532c2b101a08ec9784)
Günther Deschner [Wed, 16 Dec 2009 21:54:02 +0000 (22:54 +0100)]
libndr: change subcontext buffer allocation to allocate on subcontext_start.
Guenther
(cherry picked from commit
c9fa97b01774d767acfabaf1eec7a6aad1510440)
Stefan Metzmacher [Wed, 17 Feb 2010 19:00:36 +0000 (20:00 +0100)]
librpc/ndr: make ndr_push_relative_ptr2() static
metze
Stefan Metzmacher [Wed, 17 Feb 2010 19:00:04 +0000 (20:00 +0100)]
librpc/ndr_krb5pac: use ndr_push_relative_ptr2_start()/_end()
metze
(cherry picked from commit
e03591111a1b9c2f05c29a7afac4641f23f455f4)
Stefan Metzmacher [Wed, 17 Feb 2010 18:59:19 +0000 (19:59 +0100)]
librpc/ndr_drsblobs: use ndr_push_relative_ptr2_start()/_end()
metze
(cherry picked from commit
b423bd2115e006f9af5d40cf5b651e03739d53a0)
Günther Deschner [Thu, 11 Feb 2010 17:54:31 +0000 (18:54 +0100)]
spoolss: fix relative pointers in ndr_push_spoolss_DriverInfo101.
Guenther
(cherry picked from commit
bfd6edb3e9339d602eb6514ff50c3bb6c671174e)
Günther Deschner [Mon, 14 Dec 2009 13:17:05 +0000 (14:17 +0100)]
s3: re-run make full_idl.
Guenther
Günther Deschner [Mon, 14 Dec 2009 13:09:22 +0000 (14:09 +0100)]
pidl: use ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.
Guenther
(cherry picked from commit
a049d75193b284fe9efb28d303ea46ba407e5a7a)
Günther Deschner [Mon, 14 Dec 2009 13:08:34 +0000 (14:08 +0100)]
libndr: add ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.
Guenther
Jeremy Allison [Thu, 18 Feb 2010 19:22:44 +0000 (11:22 -0800)]
Fix bug #7154 - mangling method = hash can crash storing a name not containing a '.'
Fix use of uninitialized variable. This can lead to crashes if
mangling = hash processes names with no '.'.
Jeremy.
(cherry picked from commit
df13b1303a751962d8f7d5298b39e4a7500fef15)
Jeremy Allison [Thu, 18 Feb 2010 20:21:10 +0000 (12:21 -0800)]
Fix bug #7155 - valgrind Conditional jump or move depends on uninitialised value(s) error when "mangling method = hash"
The charset array allocated in init_chartest() is allocated
by MALLOC, but only some elements of it being set after allocation. Fix is to
memset to zero after allocation.
Jeremy.
(cherry picked from commit
a4e8210ba7d6d471cb9f17754244393b9c1e5930)
Jeremy Allison [Wed, 17 Feb 2010 18:46:42 +0000 (10:46 -0800)]
Fix bug #6557 - Do not work VFS full_audit
Re-arrange the operations order so SMB_VFS_CONNECT is done
first as root (to allow modules to correctly initialize themselves).
Reviewed modules to check if they needed CONNECT invoked as
a user (which we previously did) and it turns out any of them
that cared needed root permissions anyway.
Jeremy.
Karolin Seeger [Wed, 17 Feb 2010 16:39:15 +0000 (17:39 +0100)]
WHATSNEW: Update changes since 3.4.5.
Karolin
Jeff Layton [Tue, 16 Feb 2010 14:16:42 +0000 (09:16 -0500)]
cifs.upcall: allocate a talloc context for smb_krb5_unparse_name
cifs.upcall calls smb_krb5_unparse_name with a NULL talloc context.
Older versions of this function though will conditionally use
SMB_REALLOC instead of TALLOC_REALLOC when a NULL context is passed
in. To make it more consistent, just spawn a talloc context that
we can pass into this function.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=565446
https://bugzilla.samba.org/show_bug.cgi?id=6868
Reported-by: Ludek Finstrle <luf@seznam.cz>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit
a8cc2fa09ed43a167f62711bef363a5ac335dc78)
Fix bug #6868 (make bin/cifs.upcall fails).
Karolin Seeger [Tue, 9 Feb 2010 15:36:39 +0000 (16:36 +0100)]
s3-docs: Add missing para end tag.
Karolin
(cherry picked from commit
b78de63ef3cde53e3aabbe46654aac5a335f16a8)
Günther Deschner [Mon, 15 Feb 2010 10:34:17 +0000 (11:34 +0100)]
spoolss: disable GetPrinterDriver level 101 (as called by XP).
We still dont get the marshalling right, disable and XP will just fall back to
level 6.
Guenther
Fix bug #7136 (spoolss getprinterdriver2 level 101 marshalling bad).
Günther Deschner [Thu, 7 Jan 2010 11:05:18 +0000 (12:05 +0100)]
s3-docs: fix eventlogadm manpage typo.
Guenther
(cherry picked from commit
c1ca00047d26ace240fa5f34b428392b5d61e6c3)
Fix bug #7137 (eventlogadm manpage typo for dump command).
Jeremy Allison [Fri, 12 Feb 2010 00:03:02 +0000 (16:03 -0800)]
Fixes issue with preexec scripts creating a share directory, and problems if a smb.conf reload turns wide links back on after a connection is establised.
Includes git refs :
cd18695fc2e4d09ab75e9eab2f0c43dcc15adf0b
94865e4dbd3d721c9855aada8c55e02be8b3881e
5d92d969dda450cc3564dd2265d2b042d832c542
02a5078f1fe6285e4a0b6ad95a3aea1c5bb3e8cf
a6f402ad87ff0ae14d57d97278d67d0ceaaa1d82
from master.
Jeremy.
Fix bug #7104 ("wide links" and "unix extensions" are incompatible.)
Volker Lendecke [Sat, 13 Feb 2010 15:38:25 +0000 (16:38 +0100)]
s3: Fix typo found by jhell <jhell@DataIX.net>
(cherry picked from commit
271a4c60dbec0d001dc55df58de8e54274137853)
(cherry picked from commit
eb390b8f917f52eb28f46f39a19abdc717051f3d)
Günther Deschner [Wed, 10 Feb 2010 23:44:06 +0000 (00:44 +0100)]
s3-spoolss: implement spoolss_EnumJobs level 3.
Level 3 has been added with NT 4.0 and Windows 7 (at least 64bit version) makes
use of it in order to display queued jobs. Windows 7 will *not* fall back to
level 2 if we just return WERR_UNKNOWN_LEVEL, instead there will be no printjobs
displayed at all.
Guenther
(cherry picked from commit
25001bbd1b0b32073073dab7cf5b78a2b902163f)
(cherry picked from commit
eacb3b7be16884bb6bfcc3b4db97708566d66c40)
Fix bug #7130 (enumjobs level 3 is required by win7).
Stefan Metzmacher [Tue, 9 Feb 2010 11:57:01 +0000 (12:57 +0100)]
s3:passdb: only use gid_to_sid() result if the result is a group of our local sam
Otherwise retry with pdb_gid_to_sid().
metze
(cherry picked from commit
4dc2be2264926fe415e4e40e212f94793c9831d1)
Last seven patches address bug #7116 (pdb_ldap performance fixes).
(cherry picked from commit
8946a47fcebe57f459c59ee2cb163e15901ff996)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Fri, 5 Feb 2010 15:20:21 +0000 (16:20 +0100)]
s3:pdb_ldap: don't search for the users primary group, if we already know it
metze
(cherry picked from commit
6753fb1cf6a834b12b2a9dce3b1a9555390c17be)
(cherry picked from commit
da7cb9feacc7cb84499c73ef463d187a7b2754e8)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Wed, 3 Feb 2010 10:32:41 +0000 (11:32 +0100)]
s3:pdb_ldap: optimize ldapsam_alias_memberships() and cache ldap searches.
ldapsam_alias_memberships() does the same LDAP search twice, triggered
via add_aliases() from create_local_nt_token().
This happens when no domain aliases are used.
metze
(cherry picked from commit
49ace81e19de231825216cbf07c7422687131bb6)
(cherry picked from commit
cb31c1df92b195b3fb80b6e21bfba83b8cd867fd)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Thu, 4 Feb 2010 16:19:57 +0000 (17:19 +0100)]
s3:pdb_ldap: try to build the full unix_pw structure with ldapsam:trusted support
And also store the gid_to_sid mappings in the idmap_cache.
metze
(cherry picked from commit
25038fa85ff69962ca0975f31802218a897aa1ec)
(cherry picked from commit
66a48d2226d245c373b744c7edea60b3daa57f0f)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Thu, 4 Feb 2010 16:16:59 +0000 (17:16 +0100)]
s3:passdb: speed up pdb_get_group_sid()
Use the cached version gid_to_sid() instead
of pdb_gid_to_sid().
And also avoid the expensive lookup_sid() call
for wellkown domain groups.
metze
(cherry picked from commit
e10d0869567436902c8b8cfb50f8c64148d554cb)
(cherry picked from commit
b0c8ff971934ef8aa21abece8693807e0a2ca722)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Sun, 31 Jan 2010 14:18:51 +0000 (15:18 +0100)]
s3: Make pdb_copy_sam_account also copy the group sid
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
b99046fed1bf4a908ed856afb17c3c934c6d305d)
(cherry picked from commit
a1862c23346959cd0aa77653bf488e0686d14376)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Sat, 30 Jan 2010 21:28:19 +0000 (22:28 +0100)]
s3: shortcut gid_to_sid when "ldapsam:trusted = yes"
The normal gid_to_sid behaviour is to call sys_getgrgid()
to get the name for the given gid and then call the
getsamgrnam passdb method for the resulting name.
In the ldapsam:trusted case we can reduce the gid_to_sid
operation to one simple search for the gidNumber attribute
and only get the sambaSID attribute from the correspoinding
LDAP object. This reduces the number of ldap roundtrips
for this operation.
metze
(similar to commit
0fb99386d41241f62312d4bb535976344e5d6492)
Michael Adam [Sat, 14 Nov 2009 00:21:42 +0000 (01:21 +0100)]
s3:is_trusted_domain: shortcut if domain name == global_sam_name
A domain can't have a trust with itself.
This saves some roundtrips to the ldap server for ldapsam.
Michael
(cherry picked from commit
dc3a90cf21813526854c12db126d08ebf32f8ae5)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Sat, 14 Nov 2009 00:12:22 +0000 (01:12 +0100)]
s3:is_trusted_domain: shortcut if domain name is NULL or empty
This saves some roundtrips to LDAP in an ldapsm setup.
Michael
(cherry picked from commit
0aa5a60d3033fddd652eb4ea89abdf97db912df3)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Mon, 16 Nov 2009 10:37:18 +0000 (11:37 +0100)]
s3: shortcut uid_to_sid when "ldapsam:trusted = yes"
The normal uid_to_sid behaviour is to call sys_getpwuid()
to get the name for the given uid and then call the
getsampwnam passdb method for the resulting name.
In the ldapsam:trusted case we can reduce the uid_to_sid
operation to one simple search for the uidNumber attribute
and only get the sambaSID attribute from the correspoinding
LDAP object. This reduces the number of ldap roundtrips
for this operation.
Michael
(cherry picked from commit
37dcc8a400ea41fb0a0559c9922cc41ac28ad045)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Fri, 13 Nov 2009 15:16:50 +0000 (16:16 +0100)]
s3:smbd: also fill the memcache with sid<->id mappings in ldapsam_sid_to_id()
not only the persistent idmap cache.
Michael
(cherry picked from commit
ee2565bd461ccfb916c5290c883e5ced3af72141)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Michael Adam [Fri, 13 Nov 2009 14:51:33 +0000 (15:51 +0100)]
s3:smbd: make idmap cache persistent for "ldapsam:trusted".
This stores the mappings found in the idmap cache (which lives
inside gencache). This cache is already read in sid_to_Xid()
and Xid_to_sid() for ldapsam:trusted, this fills the opposite
direction, massively reducing the number of ldap roundtrips
across smbd restarts.
Michael
(cherry picked from commit
d5537cbbf931f0bca519371bfd084fb0051acd57)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Volker Lendecke [Mon, 18 May 2009 14:04:04 +0000 (16:04 +0200)]
Fix large paged search
Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit
afb06a8af3c4e86ef9960c8beb19a22f5fd0f3c2)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Björn Jacke [Fri, 30 Oct 2009 20:50:41 +0000 (21:50 +0100)]
=?utf-8?q?=D1=953:ldap:=20search=20for=20account=20policies=20in=20objectclass=20sambaDomain,=20not=20*
=20(cherry=20picked=20from=20commit=
20e5f41591504769b5c7beb5a35bb0f95b33d27a8b)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Björn Jacke [Fri, 30 Oct 2009 23:45:09 +0000 (00:45 +0100)]
s3:ldap: don't search when no values where found (cherry picked from commit
70063522065ab3e5a21fb11db0097b808aa11100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Jeremy Allison [Tue, 9 Feb 2010 23:14:38 +0000 (15:14 -0800)]
Fix bug #7122 - Reading a large browselist fails (server returns invalid values in subsequent SMBtrans replies)
There are two problems:
1). The server is off-by-one in the end of buffer space test.
2). The server returns 0 in the totaldata (smb_vwv1) and totalparams (smb_vwv0)
fields in the second and subsequent SMBtrans replies.
This patch fixes both.
Jeremy.
(cherry picked from commit
8ddc977c1421a47bedba8d5494f7ae67692b772a)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Jeremy Allison [Tue, 9 Feb 2010 20:17:08 +0000 (12:17 -0800)]
Fix off-by-one error in working out the limit of the NetServerEnum comment.
Jeremy.
(cherry picked from commit
9ad6f432f3f5844b4b419e7cbaf3c3e70b052d29)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Tue, 9 Feb 2010 17:58:36 +0000 (18:58 +0100)]
s3:smbd: use StrCaseCmp() instead of strcasecmp
metze
(cherry picked from commit
bc8242a08e1bb9489cc8171b1ec02bd2518b1857)
Stefan Metzmacher [Tue, 9 Feb 2010 17:54:41 +0000 (18:54 +0100)]
s3:smbd: Fix really ugly bool vs. int bug!!!
A comparison function for qsort needs to return an 'int'!
Otherwise you'll get random results depending on the compiler
and the architecture...
metze
(cherry picked from commit
1686a5e7e7eb1b411b003cbbde5c0d28741c6d02)
Stefan Metzmacher [Mon, 8 Feb 2010 17:38:03 +0000 (18:38 +0100)]
s3:libsmb: fix NetServerEnum3 rap calls.
metze
(cherry picked from commit
9b5198dd443a00fdad4faa1f9cdabedd81012d93)
Stefan Metzmacher [Mon, 8 Feb 2010 18:07:45 +0000 (19:07 +0100)]
s3:smbd: implement api_RNetServerEnum3
This is needed to support large browse lists.
metze
(cherry picked from commit
30eec0656c926d3d85a438dc28f17649b53318f8)
Andrew Tridgell [Thu, 10 Dec 2009 03:35:24 +0000 (14:35 +1100)]
util: added binsearch.h for binary array searches
This was moved from the schema_query code. It will now be used in more
than one place, so best to make it a library macro. I think there are
quite a few places that could benefit from this.
(cherry picked from commit
71943e8858943718affb6a3c0ded2127f07057f0)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
448b8f35d7a7cff73d35304673302178f593c9d0)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Stefan Metzmacher [Mon, 8 Feb 2010 17:45:18 +0000 (18:45 +0100)]
s3:smbd: add/improve some DEBUG messages in api_RNetServerEnum2()
metze
(cherry picked from commit
495ac4616654c9e62e14031b7439aff21e42ec91)
Stefan Metzmacher [Fri, 5 Feb 2010 15:55:15 +0000 (16:55 +0100)]
s3:smbd: rename api_RNetServerEnum => api_RNetServerEnum2
metze
(cherry picked from commit
dc58672c6588a1715698721153b35ed2d594bc67)
Jeremy Allison [Tue, 9 Feb 2010 22:56:12 +0000 (14:56 -0800)]
Missed one check on the memcpy for bug #7063.
Jeremy.
Jeremy Allison [Tue, 9 Feb 2010 22:48:15 +0000 (14:48 -0800)]
Second part of fix for bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.
Ensure we have no naked memcpy calls. This isn't a crash bug (it's
already checked in the data_blob_talloc_zero() above, but I want to
get into the pattern of having all memcpy's covered by safety checks.
Jeremy.
Jeremy Allison [Sat, 6 Feb 2010 00:22:27 +0000 (16:22 -0800)]
Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow that link anyway.
Correct DEBUG message in check_reduced_name() to add missing "\n"
so it's really clear when a path is being denied as it's outside
the enclosing share path.
Jeremy.
Jeremy Allison [Wed, 3 Feb 2010 00:38:40 +0000 (16:38 -0800)]
Fix bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.
Reported and found by Martin Hochreiter <linuxbox@wavenet.at>.
Ensure we copy the right amount of registry data into the outgoing
buffer.
Jeremy.
Volker Lendecke [Sun, 29 Nov 2009 21:57:19 +0000 (22:57 +0100)]
s3: Fix an uninitialized variable reference
Fix bug #5885 (swat prints a bogus ip-address in smb.conf).
Bo Yang [Sun, 7 Feb 2010 06:45:42 +0000 (14:45 +0800)]
s3: Fix malformed require_membership_of_sid.
Signed-off-by: Bo Yang <boyang@samba.org>
(cherry picked from commit
913a9f4e420c7a4177e6a7874e8ec2703f447918)
Fix bug #7106.
Lars Müller [Fri, 5 Feb 2010 16:38:04 +0000 (17:38 +0100)]
s3: normalize "Changing password for" msg IDs and STRs
An additional space at the end of the "Changing password for" msgid lead
to untranslated pam_winnind messages.
(cherry picked from commit
f9f1db18834648da73b7b1f6d9472523941e8277)
Fix bug #7102 (normalize "Changing password for" msg IDs and STRs).
(cherry picked from commit
f6322442f54d49b8bacec2d8fc7960d0b87d674b)
Stefan Metzmacher [Thu, 4 Feb 2010 13:03:20 +0000 (14:03 +0100)]
s3:libsmb: don't reuse the callers stype variable in cli_NetServerEnum()
When we need to do more than one network operation to get the
browse list we need to use the same 'stype' value each time.
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
c2e4746fa9d68e7601e8e90cc0144d2e65a695b6)
Fix bug #7098 (smbclient -L gives wrong results with a large browse list).
Lars Müller [Thu, 4 Feb 2010 10:19:06 +0000 (11:19 +0100)]
Add cross option to samba_cv_linux_getgrouplist_ok
"cross" as an option got removed accidentl with commit
e5a95132 while
moving in direction of 3.2.
Patch proposed by Richard Sharpe <realrichardsharpe@gmail.com>.
(cherry picked from commit
30ea9932f5ea8a73c84dbab3ae3e997c2ae34e79)
Fix bug #7047.
Steven Danneman [Sat, 30 Jan 2010 21:29:23 +0000 (13:29 -0800)]
s3/smbd: Fix string buffer overflow causing heap corruption
The destname malloc size was not taking into account the 1 extra byte
needed if a string without a leading '/' was passed in and that slash
was added.
This would cause the '\0' byte to be written past the end of the
malloced destname string and corrupt whatever heap memory was there.
This problem would be hit if a share name was given in smb.conf without
a leading '/' and if it was the exact size of the allocated STRDUP memory
which in some implementations of malloc is a power of 2.
(cherry picked from commit
f42971c520360e69c4cdd64bebb02a5f5ba49b94)
Fix bug #7096.
(cherry picked from commit
db5ccb70b6ac51ea263889cc9cdd523673ae8ecd)
Volker Lendecke [Wed, 3 Feb 2010 22:06:25 +0000 (14:06 -0800)]
s3: Simplify the code a bit: Catch (len==0) early
Part of a fix for bug #7081.
Jeremy Allison [Wed, 3 Feb 2010 00:43:41 +0000 (16:43 -0800)]
Fix bug 7081 - vfs_expand_msdfs doesn't work correctly (with fix identified)
Fix inspired by idea from Eric Horst <erich@cac.washington.edu>.
Jeremy.
(cherry picked from commit
de24209f0a745ada4220a1751c4ed88ae6eea575)
Jeremy Allison [Thu, 28 Jan 2010 00:55:47 +0000 (16:55 -0800)]
Fix bug #7072 - Accounts can't be unlocked from ldap.
Fix suggested by Andy Hanton <andyhanton@gmail.com>. The LOGIN_CACHE
struct contains two time_t entries, but was being written to and
read from via tdb_pack/tdb_unpack functions using explicit 32-bit int specifiers.
This would break on machines with a 64-bit time_t. Use correct int
sizes for tdb_pack/tdb_unpack.
We have to fix this properly before 2037 :-).
Contains fixes from master
627fb85092f728065b6d772c41aeb75018154e86
and
69fd8461b8792f4fee1b61db03953044565492c6.
Jeremy.
Jeremy Allison [Wed, 27 Jan 2010 00:51:57 +0000 (16:51 -0800)]
Fix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to respond to a read or write.
Only works on Linux kernels 2.6.26 and above. Grants CAP_KILL capability
to allow Linux threads under different euids to send signals to each other.
Jeremy.
(cherry picked from commit
899bd0005f56dcc1e95c3988d41ab3f628bb15db)
Volker Lendecke [Wed, 27 May 2009 16:40:13 +0000 (18:40 +0200)]
Do not segfault in pdb_search_destructor if no real search was started
(cherry picked from commit
d07464b21fe652e205f5eb2c74d12495bab100ce)
Fix bug #7068 (pdb_search api may crash as non-root user).
Karolin Seeger [Tue, 26 Jan 2010 13:28:12 +0000 (14:28 +0100)]
s3-docs: Adapt version in man ldbrename.
Karolin
Karolin Seeger [Thu, 15 Oct 2009 10:27:24 +0000 (12:27 +0200)]
s3/docs: Add missing meta data to man ldbrename.
Avoid warnings.
Karolin
(cherry picked from commit
6a9e88e08bfa4463ce5bdc57183f6518b524c98c)
(cherry picked from commit
1a25ef232bacb59aa753fbe21fed53a996d2e6b3)
William Jojo [Thu, 21 Jan 2010 13:21:03 +0000 (14:21 +0100)]
s3: Fix bug 7052: "DFS broken on AIX (maybe others)"
(cherry picked from commit
c531d00ab4444db19ff6ba4c60ebdcc8319949c6)
(cherry picked from commit
f21796955e7aa2e84a1c810612f2fdee2bde611c)
Karolin Seeger [Wed, 20 Jan 2010 12:34:50 +0000 (13:34 +0100)]
s3-docs: Fix typos.
Thanks to the Debian samba package maintainers
<pkg-samba-maint@lists.alioth.debian.org> for providing the patch!
Fix bug #7017 (Typos and spelling errors in manpages).
Karolin
(cherry picked from commit
e1e6b19acff6d8ba3b70c3ab474a85de8b6f6a6c)
(cherry picked from commit
eaa10cfec3c389c79ac3c43f7ec1596015a9b8e1)
Stefan Metzmacher [Tue, 5 Jan 2010 12:30:42 +0000 (13:30 +0100)]
s3:pdb_ldap: restore Samba 3.0.x behavior and use the first "uid" value.
See bug #6157 for more details.
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
25806f43ddee7e2653e907eea2c6fcc075960fa1)
(cherry picked from commit
ac224452b94865db346ed68dc517f84d40e6303c)
Stefan Metzmacher [Tue, 5 Jan 2010 12:30:19 +0000 (13:30 +0100)]
s3:smbldap: add smbldap_talloc_first_attribute()
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit
c992127f8a96c37940a6d298c7c6859c47f83d9b)
(cherry picked from commit
915b7552b71904baf6a452bdc1649e76d8286a14)
Karolin Seeger [Tue, 19 Jan 2010 10:41:24 +0000 (11:41 +0100)]
WHATSNEW: Start release notes for Samba 3.4.6.
Karolin
Karolin Seeger [Tue, 19 Jan 2010 10:39:23 +0000 (11:39 +0100)]
VERSION: Raise version number up to 3.4.6.
Karolin
Karolin Seeger [Mon, 18 Jan 2010 11:37:16 +0000 (12:37 +0100)]
WHATSNEW: Update changes.
Karolin
Volker Lendecke [Sat, 16 Jan 2010 12:31:44 +0000 (13:31 +0100)]
s3: Fix a crash in libsmbclient used against the OpenSolaris CIFS server
A user has sent me a sniff where the OpenSolaris CIFS server returns "32" in
totalentries, but the array in ctr only contains 15 entries. Look at the right
delimiter for walking the array.
Fix bug #7046 (libsmbclient crash against OpenSolaris CIFS server).
Jeremy Allison [Sat, 16 Jan 2010 01:49:56 +0000 (17:49 -0800)]
Fix bug 7045 - Bad (non memory copying) interfaces in smbc_setXXXX calls.
In smbc_free_context libsmbclient just called free() on the string options
so it assumes the callers have malloced them before setting them via smbc_set
calls.
Change to correctly malloc/free string options to the library.
Protect against SMB_STRDUP of null.
Contains
2d41b1ab78639abe4ae030ff482573f464564dd7 and
f85b6ee90b88c7f7b2a92c8a5f3e2ebe59c1087b from master.
Jeremy
Karolin Seeger [Fri, 15 Jan 2010 14:26:20 +0000 (15:26 +0100)]
WHATSNEW: Update changes since 3.4.4.
Karolin
Günther Deschner [Thu, 14 Jan 2010 18:34:26 +0000 (19:34 +0100)]
s3-libsmbclient: Fix crash bug in SMBC_parse_path().
Patch from Tim Waugh <twaugh@redhat.com>.
This resolves https://bugzilla.redhat.com/show_bug.cgi?id=552658
LIBSMBCLIENT-OPENDIR torture test checks this as well.
Guenther
(cherry picked from commit
e635b0074c55e0376495abe940355aa7b04f0b70)
Fix bug #7043 (SIGSEGV in "SMBC_parse_path").
Michael Adam [Tue, 12 Jan 2010 07:39:36 +0000 (08:39 +0100)]
docs: add -K option to the pdbedit manpage.
Thanks to Oota Toshiya <t-oota at dh.jp.nec.com> for pointing this out!
Michael
Fix bug #7041.
Jeremy Allison [Thu, 14 Jan 2010 23:39:30 +0000 (15:39 -0800)]
Fix bug #7036 - net rpc getsid fails in hardened windows environments.
Fix suggested by Dave.Daugherty@Centrify.com.
(cherry picked from commit
6653cc43233381a941cdd85550f04b087fe880ff)
SASAJIMA Toshihiro [Wed, 13 Jan 2010 05:43:23 +0000 (21:43 -0800)]
Fix bug #7034 - vfs_cap causes signal 11 (SIGSEGV) (cherry picked from commit
ca847952054f5bbde1d40ad4260589b6fcc9721d)
Stefan Metzmacher [Mon, 21 Dec 2009 15:26:34 +0000 (16:26 +0100)]
smbd: Fix opening the quota magic file
This fixes bug #6642 and bug #6919.
metze
Jeremy Allison [Fri, 8 Jan 2010 18:22:46 +0000 (10:22 -0800)]
Re-fix bug 5202 - cannot change ACLs on writable file with "dos filemode=yes"
This bug re-occurred for 3.3.x and above.
The reason is that to change a NT ACL we now have to open the file requesting
WRITE_DAC and WRITE_OWNER access. The mapping from POSIX "w" to NT permissions
in posix_acls doesn't add these bits when "dos filemode = yes", so even though
the permission or owner change would be allowed by the POSIX ACL code, the
NTCreateX call fails with ACCESS_DENIED now we always check NT permissions
first.
Added in the mapping from "w" to WRITE_DAC and WRITE_OWNER access.
Jeremy.
Jeremy Allison [Wed, 6 Jan 2010 21:29:35 +0000 (13:29 -0800)]
Second part of the fix for bug #7020 - smbd using 2G memory.
There was a second leak in the processing of the out_data.frag
prs_struct. It needs freeing once the current pdu has been returned
asynchronously.
Jeremy.
Jeremy Allison [Tue, 5 Jan 2010 22:38:56 +0000 (14:38 -0800)]
Fix bug #7020 - smbd using 2G memory.
When deferring an async pipe writeX and readX transfer
the outstanding request struct onto the conn struct. This
needs freeing after the packet is finally processed.
Jeremy.
Karolin Seeger [Mon, 11 Jan 2010 11:05:54 +0000 (12:05 +0100)]
WHATSNEW: Start release notes for 3.4.5.
Karolin
Karolin Seeger [Mon, 11 Jan 2010 11:03:45 +0000 (12:03 +0100)]
VERSION: Raise version number up to 3.4.5.
Karolin
Karolin Seeger [Mon, 4 Jan 2010 12:59:21 +0000 (13:59 +0100)]
WHATSNEW: Update changes.
Karolin
Jim McDonough [Wed, 30 Dec 2009 20:04:55 +0000 (15:04 -0500)]
Prevent NULL dereference if group has no members
Fix bug #7014 (domain mode winbind crashes retriveing empty group members).
Karolin Seeger [Wed, 30 Dec 2009 09:01:29 +0000 (10:01 +0100)]
WHATSNEW: Update changes.
Karolin
Jeremy Allison [Fri, 18 Dec 2009 00:59:56 +0000 (16:59 -0800)]
Fix bug 6837 - "Too many open files" when trying to access large number of files
Win7 needs the Windows server open file handle number of 16384 handles.
Jeremy.
Karolin Seeger [Tue, 29 Dec 2009 10:53:15 +0000 (11:53 +0100)]
WHATSNEW: Update changes.
Karolin
Jeremy Allison [Tue, 22 Dec 2009 05:12:33 +0000 (21:12 -0800)]
Fix bug 7005 - mangle method = hash truncates files with dot '.' character
Don't change the contents of a const string via a pointer
alias (or if you do, change it back.....).
Jeremy.
Karolin Seeger [Wed, 23 Dec 2009 11:02:45 +0000 (12:02 +0100)]
WHATSNEW: Start release notes for Samba 3.4.4.
Karolin
Jeremy Allison [Fri, 18 Dec 2009 00:21:46 +0000 (16:21 -0800)]
Fix bug #6939 - mangling method = hash breaks long filenames.
We were returning the wrong sense of the bool. must_mangle()
has to return !NT_STATUS_IS_OK, not NT_STATUS_IS_OK.
Jeremy.