samba.git
14 years agoFix large paged search
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>
(cherry picked from commit cc529f47e10a87ef6688b14ec399edcd2e4e884d)

14 years ago=?utf-8?q?=D1=953:ldap:=20search=20for=20account=20policies=20in=20objectclass=20samb...
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>
(cherry picked from commit 4e66860d89872d2ba808761e0d58ed18e7ed428e)

14 years agos3:ldap: don't search when no values where found (cherry picked from commit 700635220...
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>
(cherry picked from commit 0b7d7e7c3d6a5abe94a0864f1ccaf9d1c00b8b7d)

14 years agoFix bug #7122 - Reading a large browselist fails (server returns invalid values in...
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>
(cherry picked from commit 8ac6085a2c7382e544888e632ff62c30f7e7a884)

14 years agoFix off-by-one error in working out the limit of the NetServerEnum comment.
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>
(cherry picked from commit 026f05839b6dbdeb5be3953930a28f7650c1e1da)

14 years agos3:smbd: use StrCaseCmp() instead of strcasecmp
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)
(cherry picked from commit 8142883b40819b5cb92ea671bb6c89bff68d3680)

14 years agos3:smbd: Fix really ugly bool vs. int bug!!!
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)
(cherry picked from commit 4e419df9154c329b3376ab00d6bb55093fbfe71a)

14 years agos3:libsmb: fix NetServerEnum3 rap calls.
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)
(cherry picked from commit 86eae5b4862735309313e1800be44dab2641b393)

14 years agos3:smbd: implement api_RNetServerEnum3
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)
(cherry picked from commit f37f187070934e1046ce05d298d92ede7e6f7030)

14 years agoutil: added binsearch.h for binary array searches
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>
(cherry picked from commit 2614ed62c8ca281d95151913ed591a86409e0566)

14 years agos3:smbd: add/improve some DEBUG messages in api_RNetServerEnum2()
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)
(cherry picked from commit f8f6beff57fd58b69648633f5b1c15289015f96b)

14 years agos3:smbd: rename api_RNetServerEnum => api_RNetServerEnum2
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)
(cherry picked from commit 0b6d850a553c0a558d579ab5e46f49794a015e34)

14 years agoMissed one check on the memcpy for bug #7063.
Jeremy Allison [Tue, 9 Feb 2010 22:56:12 +0000 (14:56 -0800)]
Missed one check on the memcpy for bug #7063.

Jeremy.
(cherry picked from commit 832fed700589ba0a49381fac71ff99edb5e8f167)

14 years agoSecond part of fix for bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.
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.
(cherry picked from commit 974bc68d7884ab77210a237e4ca8020ee88ae059)

14 years agoFix bug 7104 - "wide links" and "unix extensions" are incompatible.
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.
(cherry picked from commit 9e64c33b7757dd4528a9c8d31d0c0c159a33daf8)

14 years agoFix bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.
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.
(cherry picked from commit 4dd841cf3f71b33a18db70bbbb968a647aaa8efc)

14 years agos3: Fix an uninitialized variable reference
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).
(cherry picked from commit 2db64331ae27c8bf6ce341f6cab8f02e706a3f7a)

14 years agos3: Fix malformed require_membership_of_sid.
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.
(cherry picked from commit 7e965f545b6f4d5f1ad12f4177eb477248c895c8)

14 years agos3: normalize "Changing password for" msg IDs and STRs
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)
(cherry picked from commit 1bbbc152b4222554b2738108f3e267e147411166)

14 years agos3:libsmb: don't reuse the callers stype variable in cli_NetServerEnum()
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).
(cherry picked from commit 49ed8e5ef079edf42bbe5325a46547ecfdff8a7d)

14 years agoAdd cross option to samba_cv_linux_getgrouplist_ok
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.
(cherry picked from commit 050f86f83b8d6642e1b88c37f4ad294f5e206b87)

14 years agos3/smbd: Fix string buffer overflow causing heap corruption
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)
(cherry picked from commit 3916710b9414d679774399e6d0cff61e4b67a2e3)

14 years agos3: Simplify the code a bit: Catch (len==0) early
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.
(cherry picked from commit ecec9fb2d283f17aee8eceb39ab61d8204cff0f3)

14 years agoFix bug 7081 - vfs_expand_msdfs doesn't work correctly (with fix identified)
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)
(cherry picked from commit fd630147319b9a21426ba2a34b726c35c03396b6)

14 years agoFix bug #7072 - Accounts can't be unlocked from ldap.
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.
(cherry picked from commit 3a341c54ba6b8b63419662207f1d42767a00eb16)

14 years agoFix bug #7067 - Linux asynchronous IO (aio) can cause smbd to fail to respond to...
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)
(cherry picked from commit 246eba3b807e5ce50ee838c51823a9eb44f6b690)

14 years agoDo not segfault in pdb_search_destructor if no real search was started
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).
(cherry picked from commit 135b67a627fd1e98b4211fe3ac738ae2fec10145)

14 years agos3-docs: Adapt version in man ldbrename.
Karolin Seeger [Tue, 26 Jan 2010 13:28:12 +0000 (14:28 +0100)]
s3-docs: Adapt version in man ldbrename.

Karolin
(cherry picked from commit 69100db8c331ed15651ae52b88632d047f148ae4)

14 years agos3/docs: Add missing meta data to man ldbrename.
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)
(cherry picked from commit ba665a53b3a86a56b1cf3adeccf6764291dc264b)

14 years agos3: Fix bug 7052: "DFS broken on AIX (maybe others)"
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)
(cherry picked from commit 28b3cf328312a26cd72bbc54f3283bc46b51bc32)

14 years agos3-docs: Fix typos.
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)
(cherry picked from commit 436e13608e489b4bd5c00597efca9c9ca66b8be1)

14 years agos3:pdb_ldap: restore Samba 3.0.x behavior and use the first "uid" value.
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)
(cherry picked from commit 20a405288fb1b33c43b31b170f1acc9c82732208)

14 years agos3:smbldap: add smbldap_talloc_first_attribute()
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)
(cherry picked from commit 6402321d5bbbb28b335787856b16c3d8556e8e0a)

14 years agoWHATSNEW: Start release notes for Samba 3.4.6.
Karolin Seeger [Tue, 19 Jan 2010 10:41:24 +0000 (11:41 +0100)]
WHATSNEW: Start release notes for Samba 3.4.6.

Karolin
(cherry picked from commit bcb4da881426d1e863582aab8c455430f3a224f0)

14 years agoVERSION: Raise version number up to 3.4.6.
Karolin Seeger [Tue, 19 Jan 2010 10:39:23 +0000 (11:39 +0100)]
VERSION: Raise version number up to 3.4.6.

Karolin
(cherry picked from commit febac98cadd14ece58f3df99ce7670d41c046e3d)

14 years agoWHATSNEW: Update changes. samba-3.4.5
Karolin Seeger [Mon, 18 Jan 2010 11:37:16 +0000 (12:37 +0100)]
WHATSNEW: Update changes.

Karolin
(cherry picked from commit fb7af5cfcf4f8c45e4c56f85a82eb93647068c8b)

14 years agos3: Fix a crash in libsmbclient used against the OpenSolaris CIFS server
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).
(cherry picked from commit 734446bb3a8984ec805c73e06e553312b46e4094)

14 years agoFix bug 7045 - Bad (non memory copying) interfaces in smbc_setXXXX calls.
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
(cherry picked from commit 1d9dc38aec417c8ccc9fa34d32015ee57d877ba9)

14 years agoWHATSNEW: Update changes since 3.4.4.
Karolin Seeger [Fri, 15 Jan 2010 14:26:20 +0000 (15:26 +0100)]
WHATSNEW: Update changes since 3.4.4.

Karolin
(cherry picked from commit b8ff43eedef4315595e6b4c4467e8e2d8d19ffc4)

14 years agos3-libsmbclient: Fix crash bug in SMBC_parse_path().
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").
(cherry picked from commit 01009416998219a27268211a3ae26d7b3ab157f8)

14 years agodocs: add -K option to the pdbedit manpage.
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.
(cherry picked from commit 918045b22b1607acf51c40d8c8765862f3400a1d)

14 years agoFix bug #7036 - net rpc getsid fails in hardened windows environments.
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)
(cherry picked from commit 59b46630ac205bdfe409c0c8b60dc5f5ddad5cf1)

14 years agoFix bug #7034 - vfs_cap causes signal 11 (SIGSEGV) (cherry picked from commit ca84795...
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)
(cherry picked from commit 62bed0de7f6dbde183c3002253008941c4b88b3f)

14 years agosmbd: Fix opening the quota magic file
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
(cherry picked from commit 7fd0767c6abdc9f4c456ae0a7d247f3a25ffcbd9)

14 years agoRe-fix bug 5202 - cannot change ACLs on writable file with "dos filemode=yes"
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.
(cherry picked from commit f04a8d1811c1099eb653efda314bc98553fa6d02)

14 years agoSecond part of the fix for bug #7020 - smbd using 2G memory.
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.
(cherry picked from commit 3c092c7acb18620e3769c791a9ea4055605247ee)

14 years agoFix bug #7020 - smbd using 2G memory.
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.
(cherry picked from commit cabe8f0ee859013d49fba011a5a9ac0112d7b001)

14 years agoWHATSNEW: Start release notes for 3.4.5.
Karolin Seeger [Mon, 11 Jan 2010 11:05:54 +0000 (12:05 +0100)]
WHATSNEW: Start release notes for 3.4.5.

Karolin
(cherry picked from commit 6a448ef299b24d3d02bb402c54105affd8e92b85)

14 years agoVERSION: Raise version number up to 3.4.5.
Karolin Seeger [Mon, 11 Jan 2010 11:03:45 +0000 (12:03 +0100)]
VERSION: Raise version number up to 3.4.5.

Karolin
(cherry picked from commit 459d41e5fc651a0820a7a1b571179d81b4546df3)

14 years agoWHATSNEW: Update changes. samba-3.4.4
Karolin Seeger [Mon, 4 Jan 2010 12:59:21 +0000 (13:59 +0100)]
WHATSNEW: Update changes.

Karolin
(cherry picked from commit 945b2d1982d4e47aed2552a29e522b3c03b931f4)

14 years agoPrevent NULL dereference if group has no members
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).
(cherry picked from commit 7ea471ba8db84b4fb2f02672e59a9f2a9932b4fa)

14 years agoWHATSNEW: Update changes.
Karolin Seeger [Wed, 30 Dec 2009 09:01:29 +0000 (10:01 +0100)]
WHATSNEW: Update changes.

Karolin
(cherry picked from commit 958367d09384731ad3330e396869b12770b11231)

14 years agoFix bug 6837 - "Too many open files" when trying to access large number of files
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.
(cherry picked from commit bbdc2c017ca5abb35897ab61717b806133e0af0b)

14 years agoWHATSNEW: Update changes.
Karolin Seeger [Tue, 29 Dec 2009 10:53:15 +0000 (11:53 +0100)]
WHATSNEW: Update changes.

Karolin
(cherry picked from commit 29b923666294cb615059a20ec761ae309238e789)

14 years agoFix bug 7005 - mangle method = hash truncates files with dot '.' character
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.
(cherry picked from commit a5bfbad790870ff66d4b09f99f0835ccb61c10ed)

14 years agoWHATSNEW: Start release notes for Samba 3.4.4.
Karolin Seeger [Wed, 23 Dec 2009 11:02:45 +0000 (12:02 +0100)]
WHATSNEW: Start release notes for Samba 3.4.4.

Karolin
(cherry picked from commit 3439ae9005ee3c6be05f0d173d26d3f11a427b06)

14 years agoFix bug #6939 - mangling method = hash breaks long filenames.
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.
(cherry picked from commit 2f1a66a72a6bd9f3e160b01982171dd66835990e)

14 years agos3: Fix _samr_GetAliasMembership for results with 0 rids
Volker Lendecke [Tue, 15 Dec 2009 13:01:43 +0000 (14:01 +0100)]
s3: Fix _samr_GetAliasMembership for results with 0 rids
(cherry picked from commit 20bcdf85f16216c45ded886217fedc4516cc591c)

Fix bug #6997 (Fix _samr_GetAliasMembership for results with 0 rids).
(cherry picked from commit e4e143e8fccc09b6543c4f765d0824f0472f95e9)

14 years agos3:posix_acls: Fix bug 6841 - "map acl inherit = yes" not working.
Jeremy Allison [Fri, 18 Dec 2009 12:46:13 +0000 (13:46 +0100)]
s3:posix_acls: Fix bug 6841 - "map acl inherit = yes" not working.

The code to read the new V2 SAMBA_PAI entries had
two errors.

Jeremy.
(cherry picked from commit ce060ae48d71e8988282b16f8348ca0b0434cfde)

14 years agoSecond part of fix for 6875 - trans2 FIND_FIRST2 response --> FIND_FIRST2 Data -...
Jeremy Allison [Wed, 16 Dec 2009 02:36:36 +0000 (18:36 -0800)]
Second part of fix for 6875 - trans2 FIND_FIRST2 response --> FIND_FIRST2 Data -> Fille Attributes are returned as 0x220 for LANMAN2.1 dialect

Ensure dos_mode can return FILE_ATTRIBUTE_NORMAL, then filter the returned attributes by protocol level.
This makes us consistant in returning DOS attrs across all replies. Tested on OS/2 by Günter Kukkukk.
Jeremy.
(cherry picked from commit 22332e08ab5b406ca603576b29fcaf0c1f786708)

14 years agospoolss: remove unused spoolss_StringArray2.
Günther Deschner [Thu, 10 Dec 2009 13:23:49 +0000 (14:23 +0100)]
spoolss: remove unused spoolss_StringArray2.

Guenther

The last 13 commits address bug #6883 (Add Printer fails with 0x000006f7 on
Windows 7).
(cherry picked from commit 874a4e34ff6222a4d387815f3ec896a24822f94e)

14 years agos4-smbtorture: fix and extend enum printerkey test.
Günther Deschner [Thu, 10 Dec 2009 13:21:12 +0000 (14:21 +0100)]
s4-smbtorture: fix and extend enum printerkey test.

Guenther
(cherry picked from commit b1097e33ba4828d1dd7bf7409aa3880e6359c96e)

14 years agos4-smbtorture: enhance spoolss_EnumPrinterKey torture test.
Günther Deschner [Wed, 9 Dec 2009 14:31:51 +0000 (15:31 +0100)]
s4-smbtorture: enhance spoolss_EnumPrinterKey torture test.

This demonstrates that s3 still does not have that call implemented correctly.

Guenther
(cherry picked from commit 532376914d0852ab599a6275910ab315935f37d0)

14 years agos3-spoolss: fix enumprinter key client and server.
Günther Deschner [Thu, 10 Dec 2009 13:20:22 +0000 (14:20 +0100)]
s3-spoolss: fix enumprinter key client and server.

Guenther
(cherry picked from commit f20effc437970d826c5bd4f047ff47e23e7a1a73)
(cherry picked from commit ef1c97b8c252feabd02f68493f1d83cab9a852d0)

14 years agos3: re-run make samba3-idl.
Günther Deschner [Fri, 11 Dec 2009 10:02:55 +0000 (11:02 +0100)]
s3: re-run make samba3-idl.

Guenther
(cherry picked from commit c5e9df56b3b588f2c7f6f0876204aaf9b9289ee4)

14 years agospoolss: use spoolss_KeyNames in spoolss_EnumPrinterKey.
Günther Deschner [Thu, 10 Dec 2009 13:19:28 +0000 (14:19 +0100)]
spoolss: use spoolss_KeyNames in spoolss_EnumPrinterKey.

Guenther
(cherry picked from commit 0ecb7f6ab28d7b7c1844554289f5ae8e876b1dcf)
(cherry picked from commit ab71e84ab446eb074a56f7d5d8e7ad69f02ed504)

14 years agospoolss: add spoolss_KeyNames union.
Günther Deschner [Thu, 10 Dec 2009 13:18:46 +0000 (14:18 +0100)]
spoolss: add spoolss_KeyNames union.

Guenther
(cherry picked from commit cf2561473f7bd0bcef5c562c1e901d4ad17e6ee3)
(cherry picked from commit 969623c7963219ae3db3058349c257e00adc237b)

14 years agospoolss: hand-marshall the spoolss_StringArray2 struct for spoolss_EnumPrinterKey.
Günther Deschner [Wed, 2 Dec 2009 20:26:10 +0000 (21:26 +0100)]
spoolss: hand-marshall the spoolss_StringArray2 struct for spoolss_EnumPrinterKey.

This call is just driving me nuts :-)

Guenther
(cherry picked from commit fc4b43089e08578f99b99de8eff1eecebaa4ae01)

14 years agos3-spoolss: handle SEC_FLAG_MAXIMUM_ALLOWED in spoolss_OpenPrinterEx.
Günther Deschner [Thu, 3 Dec 2009 22:23:36 +0000 (23:23 +0100)]
s3-spoolss: handle SEC_FLAG_MAXIMUM_ALLOWED in spoolss_OpenPrinterEx.

In case someone (smbtorture4) requests SEC_FLAG_MAXIMUM_ALLOWED, translate it
to a request of PRINTER_ACCESS_ADMINISTER.

Guenther
(cherry picked from commit 459a968fb4d6f96ea7f310f331d3547e2e466d6a)
(cherry picked from commit 7974ab9337c7de209f1cdafbd09fd2b71ef45f19)

14 years agosamba-spoolss: use spoolss_StringArray2 in spoolss_EnumPrinterKey.
Günther Deschner [Wed, 2 Dec 2009 13:53:39 +0000 (14:53 +0100)]
samba-spoolss: use spoolss_StringArray2 in spoolss_EnumPrinterKey.

This should finally resolve the endian issues we were seeing on sparc and is
much cleaner for spoolss clients and servers.

Guenther
(cherry picked from commit 191167fce3cb07e286c3b1cedf4fb70126e6daf7)

14 years agospoolss: add spoolss_StringArray2.
Günther Deschner [Wed, 2 Dec 2009 13:22:52 +0000 (14:22 +0100)]
spoolss: add spoolss_StringArray2.

The difference to spoolss_StringArray is that in spoolss_StringArray2 the string
array is put into a subcontext of _ndr_size.

Guenther
(cherry picked from commit a6bd5d61685f5582a72d24ac72c6e3753f232f90)

14 years agos4-smbtorture: add tests for spoolss_EnumPrinterKey to RPC-SPOOLSS-PRINTER.
Günther Deschner [Fri, 20 Nov 2009 15:33:29 +0000 (16:33 +0100)]
s4-smbtorture: add tests for spoolss_EnumPrinterKey to RPC-SPOOLSS-PRINTER.

Guenther
(cherry picked from commit f190de033b9b13b5ffaaf98e86a336bc48ce84e4)

14 years agos4-smbtorture: fix spoolss_EnumPrinterKey client in RPC-SPOOLSS-WIN.
Günther Deschner [Mon, 23 Nov 2009 12:35:32 +0000 (13:35 +0100)]
s4-smbtorture: fix spoolss_EnumPrinterKey client in RPC-SPOOLSS-WIN.

Guenther
(cherry picked from commit a990887d02de6c92f7d97631bd3f04c49007df2e)

14 years agos3:packaging: Fix version detection.
Karolin Seeger [Thu, 10 Dec 2009 13:57:08 +0000 (14:57 +0100)]
s3:packaging: Fix version detection.

Adapted from 728b01fc03.
Thanks god I was not root! It would have delted /*!

Karolin
(cherry picked from commit 0604c696a05773a439538d88f1b45aa6637766a7)
(cherry picked from commit fd30552aab88572b2d5944b9b87ee8ca76d29b35)
(cherry picked from commit 24f3fb1395673883e4435ffbf999b2f309c35306)

14 years agos3:packaging: Fix source dir.
Karolin Seeger [Thu, 10 Dec 2009 13:26:58 +0000 (14:26 +0100)]
s3:packaging: Fix source dir.

Karolin
(cherry picked from commit 85e79a2a03e8c1c6275363c39b0fa71283214562)
(cherry picked from commit 1ed3172d10ca96816ec548996953579ec55da660)
(cherry picked from commit f39cde691c0f19d8851b056d5f625967155d35cf)

14 years agos3:packaging: Fix typo in comment.
Karolin Seeger [Thu, 10 Dec 2009 13:08:43 +0000 (14:08 +0100)]
s3:packaging: Fix typo in comment.

Karolin
(cherry picked from commit b5011ba2c897fa177f1e22dde075055b9ffd271d)
(cherry picked from commit 3b812b134d819097df51bb20bdb4fd856f4ad00d)
(cherry picked from commit c504e7f0d464944836d04db3f288ee786431b553)

14 years agos3:pdb_ldap: Fix large paged search.
Volker Lendecke [Mon, 18 May 2009 14:04:04 +0000 (16:04 +0200)]
s3:pdb_ldap: Fix large paged search.

Fix bug #6981 (Paged Search with DirX LDAP server broken).
(cherry picked from commit 0a3b576c0a4298cbe600ad8943e401e3a0639359)

14 years agofix bogus "out of memory" winbind msg
Volker Lendecke [Wed, 13 May 2009 08:12:26 +0000 (10:12 +0200)]
fix bogus "out of memory" winbind msg

Fix bug #6982 (Erroneous out of memory error path in lookup_sid).
(cherry picked from commit a6d9c2161859fff61bdd0539d9428615da3da655)

14 years agos3 aclocal.m4: Fix iconv checks, clean up m4 code
Kai Blin [Fri, 4 Dec 2009 08:47:25 +0000 (09:47 +0100)]
s3 aclocal.m4: Fix iconv checks, clean up m4 code

The check for iconv requiring giconv.h and libgiconv as well as
the check for iconv requiring biconv.h and libbiconv were using the wrong
variable to check for previous successful test results. This caused the checks
to always fall back to libbiconv on systems where that library was available.

In the course of fixing this, I had to clean up the indentation in that piece of
code, and I also rewrote/added some comments.

Many thanks to Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp> for the initial
patch and diagnosis.
(cherry picked from commit f5aff324cb9d965bbc75634596c3c40ffc588183)

Fix bug #4832 (iconv library is not used).
(cherry picked from commit 886a90cccbc5cf757c1037ee167282315055c358)

14 years agos3:docs: Document "directory name cache size".
Karolin Seeger [Mon, 7 Dec 2009 15:28:30 +0000 (16:28 +0100)]
s3:docs: Document "directory name cache size".

Karolin
(cherry picked from commit 5055ba140d03189a3c8181d57ad920e68c6e387c)
(cherry picked from commit a9077c77b7119fb15cbc74d9b160a363932b0bde)
(cherry picked from commit 95d8039cb064d23a9f1f28484b08e00b93c152e2)

14 years agocreate-tarball: Readd RFCs (fixes the merged build).
Karolin Seeger [Mon, 7 Dec 2009 15:06:29 +0000 (16:06 +0100)]
create-tarball: Readd RFCs (fixes the merged build).

See http://lists.samba.org/archive/samba-technical/2009-December/068235.html
for more information.

Karolin
(cherry picked from commit 08b692828ed6a9929dc6098fabc8aa47a0e32f93)
(cherry picked from commit 7470559ce27af469cd57af0fd41b30aaee9a585a)

14 years agos3: Prevent glibc errors: talloc()ed memory should not be SAFE_FREE()ed.
Jim McDonough [Fri, 4 Dec 2009 17:31:53 +0000 (12:31 -0500)]
s3: Prevent glibc errors: talloc()ed memory should not be SAFE_FREE()ed.

Fix bug #6967 (net ads join with OU fails with glibc error on free()).
(cherry picked from commit 779ebd6a6800ceb0d192232b2ec9687115115c73)

14 years agos3:build: remove redundant qnx block size definition
Björn Jacke [Wed, 2 Dec 2009 23:12:53 +0000 (00:12 +0100)]
s3:build: remove redundant qnx block size definition
(cherry picked from commit a2929a638fa6824e38beec7eaa78ac108c522f50)

Part of a fix for bug #6860.
(cherry picked from commit 6b430b4fd88eb033098366f9a6b204c55ca7f79e)

14 years agos3:build: fix shared library build on QNX
Björn Jacke [Wed, 2 Dec 2009 23:02:44 +0000 (00:02 +0100)]
s3:build: fix shared library build on QNX

Fixes #6860. Thanks to Matt Kraai!
(cherry picked from commit 1d013fd03295433698f2b301dbf8324a3db528eb)
(cherry picked from commit 6ba6370c9f8d76a59b6a59f6e083c109eb5fba53)

14 years agos3:auth: Fix typo in debug message.
Karolin Seeger [Mon, 7 Dec 2009 13:38:18 +0000 (14:38 +0100)]
s3:auth: Fix typo in debug message.

Karolin
(cherry picked from commit 71018ebe5303ca6e0f3e3e4b96ae45fb32d3e195)
(cherry picked from commit 626ae39f3952087e05cbcd42a049119860072bc8)
(cherry picked from commit e7e66fd949d970b03bce0812c6b934193ac9ff1c)

14 years agos3-kerberos: do not include authdata headers before including krb5 headers.
Günther Deschner [Fri, 27 Nov 2009 17:30:18 +0000 (18:30 +0100)]
s3-kerberos: do not include authdata headers before including krb5 headers.

Guenther

Part of a fix for bug #6929.
(cherry picked from commit 579ac85a8e8f640790878cef5a35debec999dd0e)

14 years agoFix bug #6898 - Samba duplicates file content on appending. Move posix case semantics...
Jeremy Allison [Tue, 24 Nov 2009 03:19:07 +0000 (19:19 -0800)]
Fix bug #6898 - Samba duplicates file content on appending. Move posix case semantics out from under the VFS. Jeremy.
(cherry picked from commit 24282f2a282ba4ef78108d983d1ef4a6ad4cbf89)

14 years agos3: Fix shadow copy display on Windows 7
Volker Lendecke [Thu, 8 Oct 2009 12:02:39 +0000 (14:02 +0200)]
s3: Fix shadow copy display on Windows 7

Windows 7 is a bit more picky on our NT_STATUS_BUFFER_TOO_SMALL. Announce the
right buffer size, the same amount we later check for.

Fix bug #6850 (Shadow Copy Support for VISTA / Windows 7).
(cherry picked from commit b1243ff12d4f4b948dc7bbd85795f8ee8f7621d9)

14 years agos3-spoolss: simplify _spoolss_EnumPrinterKey a little more.
Günther Deschner [Thu, 26 Nov 2009 18:01:54 +0000 (19:01 +0100)]
s3-spoolss: simplify _spoolss_EnumPrinterKey a little more.

Guenther
(cherry picked from commit e512ccb5b677fa7f285829ec645fc067837c0e11)

Part of a fix for bug #6883 (Add Printer fails with 0x000006f7 on Windows 7).
(cherry picked from commit ab9e7e9ac813f4bbadf1ebf86dfaac2f47e75de2)

14 years agos3-spoolss: fixes for _spoolss_EnumPrinterKey client and server.
Günther Deschner [Tue, 24 Nov 2009 14:22:04 +0000 (15:22 +0100)]
s3-spoolss: fixes for _spoolss_EnumPrinterKey client and server.

Thanks Metze for review!

Guenther
(cherry picked from commit 846aa18648f3b34ab5cbc4dc4ba334bbedeab2f4)
(cherry picked from commit 29c22e159352bcb334dfb7c5846e865967d77cb0)

14 years agos3-spoolss: fix spoolss_EnumPrinterKey client and server code.
Günther Deschner [Fri, 20 Nov 2009 15:34:00 +0000 (16:34 +0100)]
s3-spoolss: fix spoolss_EnumPrinterKey client and server code.

Guenther
(cherry picked from commit d464151f3b47c675664f464b1645ca85de663655)
(cherry picked from commit 5b86641b5003379208d8d55f2d6eac6aac6e1488)

14 years agospoolss: fix spoolss_EnumPrinterKey IDL.
Günther Deschner [Fri, 20 Nov 2009 11:57:13 +0000 (12:57 +0100)]
spoolss: fix spoolss_EnumPrinterKey IDL.

Guenther
(cherry picked from commit 167a9ea770a38ffbe121da522bfdab79aa60413d)

14 years agos3-util: add pull_reg_sz() and pull_reg_multi_sz() convenience functions.
Günther Deschner [Thu, 24 Sep 2009 22:56:17 +0000 (00:56 +0200)]
s3-util: add pull_reg_sz() and pull_reg_multi_sz() convenience functions.

Guenther
(cherry picked from commit f8016cfee922cba97b70f56c752827e4584da6c6)
(cherry picked from commit 560b7a45ff8257b7d9994199218edfa3ea4e8dae)

14 years agos3-util: add push_reg_sz() and push_reg_multi_sz() convenience functions.
Günther Deschner [Wed, 23 Sep 2009 18:42:20 +0000 (20:42 +0200)]
s3-util: add push_reg_sz() and push_reg_multi_sz() convenience functions.

Guenther
(cherry picked from commit fcee9d2c97a673347baf58f749f35785a896e468)
(cherry picked from commit 20b43200885d7e4cef5e26ad249c9a4c6529dca5)

14 years agomisc: mark winreg_Data little-endian except for a REG_DWORD_BIG_ENDIAN.
Günther Deschner [Fri, 27 Nov 2009 10:18:30 +0000 (11:18 +0100)]
misc: mark winreg_Data little-endian except for a REG_DWORD_BIG_ENDIAN.

Guenther
(cherry picked from commit 09d1d639da808b94c25749423675925fbe3b3660)

14 years agowinreg: add winreg_Data union to IDL.
Günther Deschner [Wed, 23 Sep 2009 18:41:44 +0000 (20:41 +0200)]
winreg: add winreg_Data union to IDL.

Guenther
(cherry picked from commit a15f3cb7c72eebecce48db83e045739f771ab4d7)

14 years agos3-kerberos: fix the build on Mac OS X 10.6.2.
Günther Deschner [Fri, 27 Nov 2009 19:08:44 +0000 (20:08 +0100)]
s3-kerberos: fix the build on Mac OS X 10.6.2.

Guenther
(cherry picked from commit 51328a7056918bc75a7c1c442f47cf0271075542)
(cherry picked from commit 200462730f39d7eaee3917801046b120bc807c3f)

14 years agos3-kerberos: add a missing reference to authdata headers.
Günther Deschner [Fri, 27 Nov 2009 17:51:56 +0000 (18:51 +0100)]
s3-kerberos: add a missing reference to authdata headers.

Guenther
(cherry picked from commit da79cbb0800dd647be864e8bbb5fe1132708174b)
(cherry picked from commit a9a3504ede1306ceb86d99bceb5e8bf4d48f40c2)

14 years agos3-kerberos: only use krb5 headers where required.
Günther Deschner [Fri, 27 Nov 2009 14:52:57 +0000 (15:52 +0100)]
s3-kerberos: only use krb5 headers where required.

This seems to be the only way to deal with mixed heimdal/MIT setups during
merged build.

Guenther
(cherry picked from commit 41fb263aacc5dce50d3554598d08cb497ffd929f)

14 years agos3-kerberos: Fix Bug #6929: build with recent heimdal.
Günther Deschner [Fri, 27 Nov 2009 00:06:36 +0000 (01:06 +0100)]
s3-kerberos: Fix Bug #6929: build with recent heimdal.

Heimdal changed the KRB5_DEPRECATED define (which now may not take an identifier
for activation) in new releases (like 1.3.1).

Guenther
(cherry picked from commit 1a8f8382740e352a83133b8c49aaedd4716210cd)
(cherry picked from commit 83ee139ddde91bffc7b5921eb5e6a4364a408d38)