samba.git
14 years agos3: "dotareof" only looks at the file type
Volker Lendecke [Fri, 27 Nov 2009 11:47:57 +0000 (12:47 +0100)]
s3: "dotareof" only looks at the file type

14 years agos3: client "newer" does not look at the create timestamp
Volker Lendecke [Fri, 27 Nov 2009 11:44:33 +0000 (12:44 +0100)]
s3: client "newer" does not look at the create timestamp

14 years agos3: Pass the "fake dir create times" parameter to sys_*stat
Volker Lendecke [Fri, 27 Nov 2009 11:42:39 +0000 (12:42 +0100)]
s3: Pass the "fake dir create times" parameter to sys_*stat

Step 0 to restore it as a per-share paramter

14 years agoWHATSNEW: Start 3.5.0pre2 release notes.
Karolin Seeger [Fri, 27 Nov 2009 14:03:15 +0000 (15:03 +0100)]
WHATSNEW: Start 3.5.0pre2 release notes.

Karolin

14 years agoVERSION: Raise version number up to 3.5.0pre2.
Karolin Seeger [Fri, 27 Nov 2009 14:01:52 +0000 (15:01 +0100)]
VERSION: Raise version number up to 3.5.0pre2.

Karolin

14 years agos3-smbd: no drsuapi server stubs yet in s3. Fixes the build, sorry.
Günther Deschner [Thu, 26 Nov 2009 19:26:01 +0000 (20:26 +0100)]
s3-smbd: no drsuapi server stubs yet in s3. Fixes the build, sorry.

Guenther
(cherry picked from commit 89e02ef1f395d9662c20623bb81e40ba25d10bb4)

14 years agos3-rpc: running minimal_includes.pl on rpc_client and rpc_server.
Günther Deschner [Thu, 26 Nov 2009 19:17:07 +0000 (20:17 +0100)]
s3-rpc: running minimal_includes.pl on rpc_client and rpc_server.

Guenther
(cherry picked from commit 5d706a2fd4d5d0489b55d79250c68154600c4102)

14 years agos3-rpc: Avoid including every pipe's client and server stubs everywhere in samba.
Günther Deschner [Thu, 26 Nov 2009 17:21:28 +0000 (18:21 +0100)]
s3-rpc: Avoid including every pipe's client and server stubs everywhere in samba.

Guenther
(cherry picked from commit 3d679a3b5fc208d8521217f6a4b4d9037b609b9b)

14 years agos3-passdb: move some defines out of rpc headers (they really belong to passdb).
Günther Deschner [Thu, 26 Nov 2009 17:15:39 +0000 (18:15 +0100)]
s3-passdb: move some defines out of rpc headers (they really belong to passdb).

Guenther
(cherry picked from commit 86f4536b7a128922b5d5808557e70fa243442361)

14 years agos3-winbind: properly include netlogon.idl in wbint.idl.
Günther Deschner [Thu, 26 Nov 2009 17:58:36 +0000 (18:58 +0100)]
s3-winbind: properly include netlogon.idl in wbint.idl.

Guenther
(cherry picked from commit 4d0fca4472500b92cccff8de5a467fe09eb25455)

14 years agos3-spoolss: pre cosmetics: reorder levels in construct_printer_info levels.
Günther Deschner [Thu, 26 Nov 2009 17:57:24 +0000 (18:57 +0100)]
s3-spoolss: pre cosmetics: reorder levels in construct_printer_info levels.

Guenther
(cherry picked from commit 85b6461174fd43acd7360c79cebe9b73366a8ff9)

14 years agos3-kerberos: next step to resolve Bug #6929: build with recent heimdal.
Günther Deschner [Thu, 26 Nov 2009 09:15:45 +0000 (10:15 +0100)]
s3-kerberos: next step to resolve Bug #6929: build with recent heimdal.

Based on patch from Allan <allan@archlinux.org>.

Also should fix the FreeBSD build on the buildfarm.

Guenther
(cherry picked from commit 5b3a32be97a37c119e837bdee8f049684565458c)

14 years agos4-smbtorture: refactor RPC-SAMR-LARGE-DC test a little more.
Günther Deschner [Thu, 26 Nov 2009 00:25:56 +0000 (01:25 +0100)]
s4-smbtorture: refactor RPC-SAMR-LARGE-DC test a little more.

Guenther
(cherry picked from commit 60419a0eb72c2e07c4b882727b2ccb01b73c52e6)

14 years agos4-smbtorture: add torture_samr_context to carry some RPC-SAMR-X specifics.
Günther Deschner [Wed, 25 Nov 2009 23:32:47 +0000 (00:32 +0100)]
s4-smbtorture: add torture_samr_context to carry some RPC-SAMR-X specifics.

Guenther
(cherry picked from commit d22eb75a13a294cb31a3f253356853eab48b41d5)

14 years agotevent: Fix a comment
Volker Lendecke [Thu, 26 Nov 2009 16:18:00 +0000 (17:18 +0100)]
tevent: Fix a comment

14 years agoVERSION: Update version number.
Karolin Seeger [Thu, 26 Nov 2009 13:41:31 +0000 (14:41 +0100)]
VERSION: Update version number.

Karolin

14 years agoWHATSNEW: Prepare 3.5.0pre1 release notes.
Karolin Seeger [Thu, 26 Nov 2009 13:11:09 +0000 (14:11 +0100)]
WHATSNEW: Prepare 3.5.0pre1 release notes.

Karolin

14 years agolibrpc: rerun "make idl"
Stefan Metzmacher [Wed, 25 Nov 2009 13:42:24 +0000 (14:42 +0100)]
librpc: rerun "make idl"

metze
(cherry picked from commit 49553d066ba346b28286b72f54e5ee8739cbcef2)

14 years agopidl:Samba3/ClientNDR: $size can be 'foo / 2' so we need to add '(' and ')'
Stefan Metzmacher [Wed, 25 Nov 2009 13:31:34 +0000 (14:31 +0100)]
pidl:Samba3/ClientNDR: $size can be 'foo / 2' so we need to add '(' and ')'

foo / 5 * sizeof(bar)' isn't the same as
'(foo / 2) * sizeof(bar)'.

metze
(cherry picked from commit a20e095b1fffb6d690609c924d03cafedbbce8f3)

14 years agopidl:NDR/Parser: $size can be 'foo / 2' so we need to add '(' and ')'
Stefan Metzmacher [Wed, 25 Nov 2009 13:21:32 +0000 (14:21 +0100)]
pidl:NDR/Parser: $size can be 'foo / 2' so we need to add '(' and ')'

foo / 5 * sizeof(bar)' isn't the same as
'(foo / 2) * sizeof(bar)'.

metze
(cherry picked from commit ab1c92950f3cfdc8c52b772ecef23a5477f48f9d)

14 years agocreate-tarball: Make it more comfortable to use the --copy-docs option.
Karolin Seeger [Thu, 26 Nov 2009 10:18:39 +0000 (11:18 +0100)]
create-tarball: Make it more comfortable to use the --copy-docs option.

Now you can directly specify the 'make release' output dir without any
modifications.

Karolin
(cherry picked from commit 77e2d2f1d29b69699f4539abfce7b2f32db843e4)

14 years agoFix warnings with talloc_asprintf.
Jeremy Allison [Wed, 25 Nov 2009 22:47:36 +0000 (14:47 -0800)]
Fix warnings with talloc_asprintf.
Jeremy.
(cherry picked from commit c5b234c9cde079aa45ed93c42b5ed5e66ac969a3)

14 years agoMake us pass RAW-CHKPATH with a case sensitive share.
Jeremy Allison [Wed, 25 Nov 2009 21:17:56 +0000 (13:17 -0800)]
Make us pass RAW-CHKPATH with a case sensitive share.
I know Volker will look at this closely so here's the explaination :-).
Originally on a case-sensitive share we simply did a stat (or lstat)
call and returned success of fail based on the result. However this
failed to take account of incoming paths with a wildcard (which must
always fail, and with different error messages depending on whether
the wildcard is the last component or in the path). Also it failed
to take account of a stat fail with ENOENT due to a missing component
of the path as the last component (which is ok as it could be a new
file)  or if the ENOENT was due to the missing component within
the path (not the last component) - which must return the correct
error. What this means is that with "case sensitive = yes" we do
one more talloc call (to get the parent directory) and one more
stat call (on the parent directory) in the case where the stat
call fails. I think this is an acceptable overhead to enable
case sensitive shares to return the correct error messages for
applications. Volker please examine carefully :-).
Jeremy.
(cherry picked from commit c96d487ae3c65c17b377bb316adac4b5775448f3)

14 years agoAdd RAW-CHKPATH test with case-sensitive share.
Jeremy Allison [Wed, 25 Nov 2009 21:17:38 +0000 (13:17 -0800)]
Add RAW-CHKPATH test with case-sensitive share.
Jeremy.
(cherry picked from commit 108da2adaf77c152fd292bbdf5645923659a7c2c)

14 years agos3-registry: fix REG_MULTI_SZ handling in registry_push_value.
Günther Deschner [Wed, 25 Nov 2009 20:34:55 +0000 (21:34 +0100)]
s3-registry: fix REG_MULTI_SZ handling in registry_push_value.

Catched by smbconftort test on the buildfarm.

Guenther
(cherry picked from commit 95108f1c60aaa0407aa4eb8c9a567e90302253c6)

14 years agos3-kerberos: add check for prerequisite krb5/krb5.h header while checking for krb5...
Günther Deschner [Wed, 25 Nov 2009 20:33:48 +0000 (21:33 +0100)]
s3-kerberos: add check for prerequisite krb5/krb5.h header while checking for krb5/locate_plugin.h.

(Needed for new Heimdal versions).

Guenther
(cherry picked from commit c438b2b3923db66672ec82e795eef543de5fcb8a)

14 years agonsswitch: fix compile of winbind_krb5_locator with recent Heimdal versions.
Günther Deschner [Wed, 25 Nov 2009 14:21:54 +0000 (15:21 +0100)]
nsswitch: fix compile of winbind_krb5_locator with recent Heimdal versions.

Guenther
(cherry picked from commit 51864219cc12ceb66c281355f3e1191d5e32842d)

14 years agocifs.upcall: 2nd part of fix for Bug #6868: support building with Heimdal we well...
Günther Deschner [Wed, 25 Nov 2009 14:06:19 +0000 (15:06 +0100)]
cifs.upcall: 2nd part of fix for Bug #6868: support building with Heimdal we well as with MIT.

Guenther
(cherry picked from commit 660ee2e74523194e5f6b2b6428d76628beb74717)

14 years agos3-spoolss: re-arrange driver info level fillup functions.
Günther Deschner [Mon, 23 Nov 2009 14:31:58 +0000 (15:31 +0100)]
s3-spoolss: re-arrange driver info level fillup functions.

Guenther
(cherry picked from commit e92470d4427bda74537c4ecf79a7e888a1e16963)

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)

14 years agos3-registry: use push_reg_multi_sz() in registry_push_value().
Günther Deschner [Tue, 24 Nov 2009 14:26:32 +0000 (15:26 +0100)]
s3-registry: use push_reg_multi_sz() in registry_push_value().

Guenther
(cherry picked from commit 2707dfb441801e753c74657f20b5ca22a274778f)

14 years agos3-registry: remove reg_pull_multi_sz().
Günther Deschner [Tue, 24 Nov 2009 14:26:08 +0000 (15:26 +0100)]
s3-registry: remove reg_pull_multi_sz().

Guenther
(cherry picked from commit d4e06596d50e008425b9d346c3814a03eea8309a)

14 years agoFix bug 6892 - When a chown operation is issued via Windows Explorer, all ACLS are...
Jeremy Allison [Wed, 25 Nov 2009 18:20:38 +0000 (10:20 -0800)]
Fix bug 6892 - When a chown operation is issued via Windows Explorer, all ACLS are wiped out.
Merges existing DACLs when a ACL set operation comes in with only owner or group values set.
Jeremy.
(cherry picked from commit 7ed6f9f0960885366800b1ca2ce9558414b62d54)

14 years agoFix crash due to uninitialized pointer (not a problem in 3.4.x or below).
Jeremy Allison [Wed, 25 Nov 2009 17:58:45 +0000 (09:58 -0800)]
Fix crash due to uninitialized pointer (not a problem in 3.4.x or below).
Jeremy.
(cherry picked from commit 947c47f2819ff30d3c69bfbeb4b1932467b36cce)

14 years agoRemove call into reduce_name if case sensitive. This allows us to pass
Jeremy Allison [Wed, 25 Nov 2009 00:40:08 +0000 (16:40 -0800)]
Remove call into reduce_name if case sensitive. This allows us to pass
RAW-CHKPATH when case sensitive = yes, but isn't the correct way to do
it. I'm testing a larger patch to smbd/filename.c that should fix this
correctly, and will add a torture test to ensure RAW-CHKPATH is run against
a case sensitive share once this is done.
Jeremy.
(cherry picked from commit 1ad23832cfafd46f83ac406006ff175900b81d00)

14 years agoAllow us to pass RAW-CHKPATH with FILE_FLAG_POSIX_SEMANTICS set or with
Jeremy Allison [Tue, 24 Nov 2009 22:05:56 +0000 (14:05 -0800)]
Allow us to pass RAW-CHKPATH with FILE_FLAG_POSIX_SEMANTICS set or with
wide links = no.
Jeremy.
(cherry picked from commit b2dd546f01425ff17008d3b0b0c36f754e6f3eec)

14 years agoFix make test. Only do POSIX case conversion if FILE_FLAG_POSIX_SEMANTICS set. Doh !
Jeremy Allison [Tue, 24 Nov 2009 21:02:34 +0000 (13:02 -0800)]
Fix make test. Only do POSIX case conversion if FILE_FLAG_POSIX_SEMANTICS set. Doh !
Jeremy.
(cherry picked from commit 187ef6b482273244d3b5b716881ab7b5d328cbc1)

14 years agos3: Always try SamLogonEx
Volker Lendecke [Tue, 24 Nov 2009 15:51:30 +0000 (16:51 +0100)]
s3: Always try SamLogonEx

Required for cluster systems working in a Samba domain. With NT4 this won't
work, but real NT4 DCs should not be around in environments that pay big bucks
for a cluster... And if they are, they can always install a Samba DC trusting
that NT4 domain.

14 years agodocs: Fix Bug 6922: Add Registry patchfile for Win7 domain join.
Günther Deschner [Tue, 24 Nov 2009 10:36:14 +0000 (11:36 +0100)]
docs: Fix Bug 6922: Add Registry patchfile for Win7 domain join.

Patchfile from SATOH Fumiyasu <fumiyas@osstech.co.jp>.

Thanks!

Guenther
(cherry picked from commit 95d0f0aab01fdd751841d57cebe6150cd6fdf80c)

14 years agos3-spoolss: Fix GetPrinter level 101.
Günther Deschner [Mon, 23 Nov 2009 15:54:34 +0000 (16:54 +0100)]
s3-spoolss: Fix GetPrinter level 101.

Guenther
(cherry picked from commit a6142987ac164318f5023eaa91e4e65efada4423)

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

14 years agos3-printing: remove duplicate code while cleaning up driver structs.
Günther Deschner [Mon, 23 Nov 2009 11:57:46 +0000 (12:57 +0100)]
s3-printing: remove duplicate code while cleaning up driver structs.

Guenther
(cherry picked from commit 513d6da404fb37f87e5b658198ecfd9e35985353)

14 years agoRestore NtCreateX case handling with FILE_FLAG_POSIX_SEMANTICS to the way
Jeremy Allison [Tue, 24 Nov 2009 05:06:54 +0000 (21:06 -0800)]
Restore NtCreateX case handling with FILE_FLAG_POSIX_SEMANTICS to the way
it worked in 3.3.x and 3.2.x. UCF_POSIX_PATHNAMES may no longer be needed,
as lp_posix_pathnames() being set isn't the same as case handling from
NtCreateX (lp_posix_pathnames() changes the STAT calls to LSTAT, not
the case semantics).
Jeremy.
(cherry picked from commit a930e3e4e140a133cb2ab59d20bda9e04b93cd7a)

14 years agoRemove unused code.
Jeremy Allison [Tue, 24 Nov 2009 02:00:36 +0000 (18:00 -0800)]
Remove unused code.
Jeremy.
(cherry picked from commit 4b8859840be2aacc90a2779820e08a09c793df3b)

14 years agoProper fix for #6898 - Samba duplicates file content on appending. Pointed out by...
Jeremy Allison [Mon, 23 Nov 2009 23:01:34 +0000 (15:01 -0800)]
Proper fix for #6898 - Samba duplicates file content on appending. Pointed out by Volker.Restores the pathname handling for FILE_FLAG_POSIX_SEMANTICS but still prevents the O_APPEND problems. Jeremy.
(cherry picked from commit f8bd0559ada056722d7d5ae0286753e7c591650b)

14 years agoFix bug #6898 - Samba duplicates file content on appending
Jeremy Allison [Mon, 23 Nov 2009 18:09:47 +0000 (10:09 -0800)]
Fix bug #6898 - Samba duplicates file content on appending
Clients using a Windows open call should not be able to set
FILE_FLAG_POSIX_SEMANTICS in an open.
Jeremy.
(cherry picked from commit 7ebe5b16416a3a09ff8840ab84079fde022a957c)

14 years agos3-winbind: In _wbint_CheckMachineAccount, there is only one child domain ever
Volker Lendecke [Mon, 23 Nov 2009 12:58:23 +0000 (13:58 +0100)]
s3-winbind: In _wbint_CheckMachineAccount, there is only one child domain ever

14 years agos3: Move a variable declaration to its only use
Volker Lendecke [Mon, 23 Nov 2009 10:54:19 +0000 (11:54 +0100)]
s3: Move a variable declaration to its only use

14 years agos3-spoolss: move more defines out of nt_printing.h to spoolss.idl where they belong.
Günther Deschner [Wed, 18 Nov 2009 14:39:52 +0000 (15:39 +0100)]
s3-spoolss: move more defines out of nt_printing.h to spoolss.idl where they belong.

Guenther
(cherry picked from commit 800d6b7820bb949588a799f2835a3d6c07815571)

14 years agos3-printing: remove unused NT_PRINTER_DRIVER_INFO_LEVEL structs.
Günther Deschner [Tue, 17 Nov 2009 11:55:45 +0000 (12:55 +0100)]
s3-printing: remove unused NT_PRINTER_DRIVER_INFO_LEVEL structs.

Guenther
(cherry picked from commit 6364c271c4daff94c641eb9e7030f3c9a7ff1ced)

14 years agos3-printing: use spoolss types and structs while getting and deleting drivers.
Günther Deschner [Tue, 17 Nov 2009 11:54:02 +0000 (12:54 +0100)]
s3-printing: use spoolss types and structs while getting and deleting drivers.

Guenther
(cherry picked from commit ec56895bdec90cc671a0d562749b3caf161dbdf8)

14 years agos3-printing: use spoolss types and structs while adding drivers.
Günther Deschner [Mon, 16 Nov 2009 14:52:31 +0000 (15:52 +0100)]
s3-printing: use spoolss types and structs while adding drivers.

Guenther
(cherry picked from commit 68cc1166d96ac81abce78a7eb60b7b86d0eb4eda)

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

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)

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 366946f29b58a6efa7acbfe2a74b2ddbad4d32a2)

14 years agos3-build: delete more object files for "make clean".
Günther Deschner [Fri, 20 Nov 2009 11:54:19 +0000 (12:54 +0100)]
s3-build: delete more object files for "make clean".

Guenther
(cherry picked from commit eea5a166e766669b6945bb62c9202fb385179cd1)

14 years agos3-build: really fix build of winbind_krb5_locator.
Günther Deschner [Thu, 19 Nov 2009 12:44:33 +0000 (13:44 +0100)]
s3-build: really fix build of winbind_krb5_locator.

Guenther
(cherry picked from commit fc9f199f2619635f73e8ee7f3b5359521d63f325)

14 years agos3-build: make sure to remove libds and client object files on make clean.
Günther Deschner [Thu, 19 Nov 2009 12:39:24 +0000 (13:39 +0100)]
s3-build: make sure to remove libds and client object files on make clean.

Guenther
(cherry picked from commit bf45447aaa35ee3b26fe76af3c73a77d7b10c2ac)

14 years agos3-rpcclient: use the parsed binding string flags for auth choice.
Günther Deschner [Thu, 12 Nov 2009 15:45:33 +0000 (16:45 +0100)]
s3-rpcclient: use the parsed binding string flags for auth choice.

This allows rpcclient to be called like this:

rpcclient ncacn_ip_tcp:w2k8r2[sign,seal] -U administrator%secret -c "dscracknames gd"

Guenther
(cherry picked from commit 3732798008f26052c030e8a8fc9c9404fd6f5669)

14 years agos3: Fix bug 6338 -- net rpc trustdom list always display "none"
Volker Lendecke [Sun, 22 Nov 2009 21:38:45 +0000 (22:38 +0100)]
s3: Fix bug 6338 -- net rpc trustdom list always display "none"

14 years agos3: Tune if-conditions in a very hot codepath
Volker Lendecke [Sun, 15 Nov 2009 21:22:38 +0000 (22:22 +0100)]
s3: Tune if-conditions in a very hot codepath

This looks innocent, but it is visible in a netbench run.  Due to boolean
short-circuiting we don't have to execute the conditions on the right-hand side
of the &&. So putting the less likely condition left gains a bit.

14 years agos3: Remove a pointless memset
Volker Lendecke [Mon, 16 Nov 2009 07:54:55 +0000 (08:54 +0100)]
s3: Remove a pointless memset

We are assigning the complete structure now (we used to assign individual
fields), so this is obsolete.

14 years agos3: Cache brlock.tdb entries for the fast read&write strict locking code path
Volker Lendecke [Mon, 16 Nov 2009 08:40:47 +0000 (09:40 +0100)]
s3: Cache brlock.tdb entries for the fast read&write strict locking code path

For a netbench run this gains around 2% user-space CPU, fetching a 100MB file
takes around 4% less.

14 years agontlm_auth: use data_blob_talloc() to allocate session key
Kai Blin [Wed, 18 Nov 2009 10:26:57 +0000 (11:26 +0100)]
ntlm_auth: use data_blob_talloc() to allocate session key

Thanks to Shibu Piriyath <shibunair80@ymail.com> for spotting the issue.

(cherry picked from commit 43ed7a413dec10adc8cc4ede09132441b5ba2267)

14 years agoFix logic bug where high bits tests was being
Jeremy Allison [Sat, 21 Nov 2009 01:23:20 +0000 (17:23 -0800)]
Fix logic bug where high bits tests was being
done on both Windows and POSIX mkdirs instead of
only on Windows mkdir (as intended). The variable
"file_attributes" had already had FILE_FLAG_POSIX_SEMANTICS
removed above in the function if it had already been set.
Jeremy.
(cherry picked from commit 54ba3f522bd26919183278643b417e9632524be9)

14 years agos3:fix endianness bug in dbwrap_change_int32_atomic() (bug #6901)
Michael Adam [Fri, 20 Nov 2009 23:14:29 +0000 (00:14 +0100)]
s3:fix endianness bug in dbwrap_change_int32_atomic() (bug #6901)

Michael

14 years agos3:fix endianness bug in dbwrap_change_uint32_atomic() (bug #6901)
Michael Adam [Fri, 20 Nov 2009 23:08:38 +0000 (00:08 +0100)]
s3:fix endianness bug in dbwrap_change_uint32_atomic() (bug #6901)

Michael

14 years agos3:idmap_ldap: trim the " chars from the location string in idmap_ldap_db_init
Michael Adam [Fri, 20 Nov 2009 11:44:43 +0000 (12:44 +0100)]
s3:idmap_ldap: trim the " chars from the location string in idmap_ldap_db_init

When idmap backend is specified as
idmap backend = ldap:"ldap://server1 ldap://server2"
then currently "ldap://server1 ldap://server2" was passed to
ldap_initialize including the quotes, leading to an ldap error.

Michael

14 years agos3:idmap_ldap: trim the " chars from the location string in idmap_ldap_alloc_init
Michael Adam [Fri, 20 Nov 2009 11:38:44 +0000 (12:38 +0100)]
s3:idmap_ldap: trim the " chars from the location string in idmap_ldap_alloc_init

When idmap alloc backend is specified as
idmap alloc backend = ldap:"ldap://server1 ldap://server2"
then currently "ldap://server1 ldap://server2" was passed to
ldap_initialize including the quotes, leading to an ldap error.

Michael

14 years agos3:pdb_ldap: fix a comment typo
Michael Adam [Mon, 16 Nov 2009 10:01:53 +0000 (11:01 +0100)]
s3:pdb_ldap: fix a comment typo

Michael

14 years agos3: shortcut uid_to_sid when "ldapsam:trusted = yes"
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

14 years agos3: Avoid races to change the machine password in winbind
Volker Lendecke [Thu, 19 Nov 2009 16:22:27 +0000 (17:22 +0100)]
s3: Avoid races to change the machine password in winbind

The machine password handler has code to deal with every node in the cluster
trying to change the machine password at the same time. However, it is not very
nice to the DC if everyone tries this simultaneously. This adds a random 0-255
second offset to our timed event. When this fires a bit later than strictly
calculated, someone else might have stepped in and have already changed it. The
timed event handler will handle this gracefully, it won't even try to do it
again.

14 years agos3: Protect against flooding the DC with pwchange requests
Volker Lendecke [Thu, 19 Nov 2009 16:20:47 +0000 (17:20 +0100)]
s3: Protect against flooding the DC with pwchange requests

When there is a temporary problem changing passwords we flooded the DC with
pwchange requests. This gives the DC a 60-second break to recover.

14 years agos3: Re-check the timeout in machine_password_change_handler()
Volker Lendecke [Thu, 19 Nov 2009 16:14:40 +0000 (17:14 +0100)]
s3: Re-check the timeout in machine_password_change_handler()

Someone else might have come in between and changed the password since we
created that timed request

14 years agos3: Add some debugs to the winbind machine pwchange machinery
Volker Lendecke [Thu, 19 Nov 2009 16:11:32 +0000 (17:11 +0100)]
s3: Add some debugs to the winbind machine pwchange machinery

14 years agos3: Factor timeval_string out of current_timestring()
Volker Lendecke [Thu, 19 Nov 2009 10:50:13 +0000 (11:50 +0100)]
s3: Factor timeval_string out of current_timestring()

14 years agos3: Do not kill the whole smb session if a machine pwchange failed
Volker Lendecke [Thu, 19 Nov 2009 16:56:46 +0000 (17:56 +0100)]
s3: Do not kill the whole smb session if a machine pwchange failed

14 years agos3:load_interfaces(): use function gfree_interfaces() that we have.
Michael Adam [Wed, 18 Nov 2009 14:19:09 +0000 (15:19 +0100)]
s3:load_interfaces(): use function gfree_interfaces() that we have.

To reduce code duplication.

Michael
(cherry picked from commit aea3a8f50131744f8393d0179cd04a1b97982028)

14 years agos3: Replace some create_synthetic_smb_fname() calls
Volker Lendecke [Sun, 15 Nov 2009 09:46:23 +0000 (10:46 +0100)]
s3: Replace some create_synthetic_smb_fname() calls

In very hot codepaths like the statcache copy_smb_filename and the subsequent
recursive talloc_free is noticable in the CPU load.

14 years agos3: Do not talloc in readdir
Volker Lendecke [Mon, 16 Nov 2009 08:49:23 +0000 (09:49 +0100)]
s3: Do not talloc in readdir

This is a hot codepath (called from the stat cache)

14 years agoWHATSNEW: Remove rpcclient subcommands.
Karolin Seeger [Wed, 18 Nov 2009 13:43:12 +0000 (14:43 +0100)]
WHATSNEW: Remove rpcclient subcommands.

Karolin

14 years agoWHATSNEW: Start with the commit highlights.
Karolin Seeger [Wed, 18 Nov 2009 13:21:31 +0000 (14:21 +0100)]
WHATSNEW: Start with the commit highlights.

Karolin

14 years agoWHATSNEW: Start with the major changes section.
Karolin Seeger [Wed, 18 Nov 2009 12:31:16 +0000 (13:31 +0100)]
WHATSNEW: Start with the major changes section.

Karolin

14 years agos3/docs: Add "max protocol = smb2" to man smb.conf.
Karolin Seeger [Wed, 18 Nov 2009 12:05:24 +0000 (13:05 +0100)]
s3/docs: Add "max protocol = smb2" to man smb.conf.

Karolin
(cherry picked from commit da8aba53d61496d0df2bd32f92030cdee0300f2f)

14 years agoStart removing SMB_STRUCT_STAT variables except for
Jeremy Allison [Wed, 18 Nov 2009 00:06:08 +0000 (16:06 -0800)]
Start removing SMB_STRUCT_STAT variables except for
the directory enumeration code (which needs it).
Jeremy.
(cherry picked from commit 7407b526e3214287a8f42073044e2ebab058198a)

14 years agoRemove "store create time" code, cause create time to be stored
Jeremy Allison [Tue, 17 Nov 2009 22:55:02 +0000 (14:55 -0800)]
Remove "store create time" code, cause create time to be stored
in the "user.DOSATTRIB" EA. From the docs:
In Samba 3.5.0 and above the "user.DOSATTRIB" extended attribute has been extended to store
the create time for a file as well as the DOS attributes. This is done in a backwards compatible
way so files created by Samba 3.5.0 and above can still have the DOS attribute read from this
extended attribute by earlier versions of Samba, but they will not be able to read the create
time stored there. Storing the create time separately from the normal filesystem meta-data
allows Samba to faithfully reproduce NTFS semantics on top of a POSIX filesystem.
Passes make test but will need more testing.
Jeremy.
(cherry picked from commit a770caed0ff66ddc2d63ac83d20f4cd7fcc2caf5)

14 years agoDon't overwrite a dynamic pointer with the address of a stack
Jeremy Allison [Mon, 16 Nov 2009 22:55:21 +0000 (14:55 -0800)]
Don't overwrite a dynamic pointer with the address of a stack
variable.
Jeremy.
(cherry picked from commit a2a8dc515cca833c442cc3bb4cf90682e8ba147d)

14 years agos3: Fix a memleak in sys_popen
Volker Lendecke [Sat, 14 Nov 2009 16:23:08 +0000 (17:23 +0100)]
s3: Fix a memleak in sys_popen

Found with "dfree command" set

14 years agos3:fix a comment typo
Michael Adam [Sat, 14 Nov 2009 00:23:05 +0000 (01:23 +0100)]
s3:fix a comment typo

Michael

14 years agos3:is_trusted_domain: shortcut if domain name == global_sam_name
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

14 years agos3:is_trusted_domain: shortcut if domain name is NULL or empty
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

14 years agos3:passdb: bump interface VERSION 18->19 (removed uid_to_rid)
Michael Adam [Sat, 14 Nov 2009 00:07:34 +0000 (01:07 +0100)]
s3:passdb: bump interface VERSION 18->19 (removed uid_to_rid)

Michael

14 years agos3:passdb: remove the uid_to_rid method - we only need uid_to_sid
Michael Adam [Sat, 14 Nov 2009 00:06:35 +0000 (01:06 +0100)]
s3:passdb: remove the uid_to_rid method - we only need uid_to_sid

Michael

14 years agos3:pdb_default_uid_to_sid: fix some debug statements.
Michael Adam [Fri, 13 Nov 2009 23:34:14 +0000 (00:34 +0100)]
s3:pdb_default_uid_to_sid: fix some debug statements.

Michael

14 years agopam_winbind: fix a printf type mismatch warning
Björn Jacke [Sat, 14 Nov 2009 00:52:49 +0000 (01:52 +0100)]
pam_winbind: fix a printf type mismatch warning

14 years agos3/pam: move variable declaration into belonging ifdef section
Björn Jacke [Fri, 13 Nov 2009 22:32:04 +0000 (23:32 +0100)]
s3/pam: move variable declaration into belonging ifdef section

This fixes a unused variable 'addr' warning on some platforms

14 years agos3: Convert libsmb/cli_message to the async API
Volker Lendecke [Tue, 10 Nov 2009 18:49:41 +0000 (19:49 +0100)]
s3: Convert libsmb/cli_message to the async API
(cherry picked from commit 2b759339601ad853588cb74e986a7a88301aea17)

14 years agoutil: str_list_unique() bugfix
Kamen Mazdrashki [Fri, 13 Nov 2009 01:57:48 +0000 (03:57 +0200)]
util: str_list_unique() bugfix

j is actually the index of the last element in the list
size of the list though is j+1 <- to make room for the
terminating NULL element
(cherry picked from commit 5b75201dbb9f2e6799fd5c3eee8da6230caee96c)

14 years agoutil: str_list_unique_2() test implementation
Kamen Mazdrashki [Fri, 13 Nov 2009 01:56:07 +0000 (03:56 +0200)]
util: str_list_unique_2() test implementation

Difference with previous test for str_list_unique() is
that this test allows number of elements and number
of duplicates to be supplied on command line using
--option="list_unique:count=47"
--option="list_unique:dups=7"
(cherry picked from commit b7839b73b10746c374ca2ed96eb152fa3a03e66a)

14 years agoadd e2fsprogs-devel as build dependency this is needed for AD because it contains...
Christian Ambach [Mon, 6 Jul 2009 12:08:57 +0000 (14:08 +0200)]
add e2fsprogs-devel as build dependency this is needed for AD because it contains libcom/libcom_err files and headers

Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
Signed-off-by: Michael Adam <obnox@samba.org>