sfrench/samba-autobuild/.git
6 years agoInside _talloc_realloc(), keep track of size changes over malloc/realloc/free.
Jeremy Allison [Tue, 27 Aug 2013 20:07:04 +0000 (13:07 -0700)]
Inside _talloc_realloc(), keep track of size changes over malloc/realloc/free.

Replace the last use of talloc_memlimit_update() with talloc_memlimit_grow()/
talloc_memlimit_shrink().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
6 years agoDon't call talloc_memlimit_update() inside _talloc_realloc() when we're just manipula...
Jeremy Allison [Tue, 27 Aug 2013 20:03:27 +0000 (13:03 -0700)]
Don't call talloc_memlimit_update() inside _talloc_realloc() when we're just manipulating pool members.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
6 years agoFix a conditional check. (size - tc->size > 0) is always true if size and tc->size...
Jeremy Allison [Tue, 27 Aug 2013 19:59:04 +0000 (12:59 -0700)]
Fix a conditional check. (size - tc->size > 0) is always true if size and tc->size are unsigned.

Replace with (size > tc->size).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
6 years agoIn _talloc_steal_internal(), correctly decrement the memory limit in the source,...
Jeremy Allison [Tue, 27 Aug 2013 19:57:43 +0000 (12:57 -0700)]
In _talloc_steal_internal(), correctly decrement the memory limit in the source, and increment in the destination.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
6 years agoInside _talloc_free_internal(), always call talloc_memlimit_update_on_free() before...
Jeremy Allison [Tue, 27 Aug 2013 19:54:38 +0000 (12:54 -0700)]
Inside _talloc_free_internal(), always call talloc_memlimit_update_on_free() before we free the real memory.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
6 years agoUpdate memory limits when we call free() on a pool.
Jeremy Allison [Tue, 27 Aug 2013 19:51:20 +0000 (12:51 -0700)]
Update memory limits when we call free() on a pool.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
6 years agoChange __talloc() to only call talloc_memlimit_check()/talloc_memlimit_grow() on...
Jeremy Allison [Tue, 27 Aug 2013 19:49:00 +0000 (12:49 -0700)]
Change __talloc() to only call talloc_memlimit_check()/talloc_memlimit_grow() on actual malloc allocation.

Don't check the memlimit if the allocation was successful from a pool. We already
checked the memory limit when we created the pool.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
6 years agoChange _talloc_total_mem_internal() to ignore memory allocated from a pool when calcu...
Jeremy Allison [Tue, 27 Aug 2013 19:46:09 +0000 (12:46 -0700)]
Change _talloc_total_mem_internal() to ignore memory allocated from a pool when calculating limit size.

We must only count normal tallocs, or a talloc pool itself.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
6 years agoRemove magic TC_HDR_SIZE handling inside talloc_memlimit_check().
Jeremy Allison [Tue, 27 Aug 2013 19:43:50 +0000 (12:43 -0700)]
Remove magic TC_HDR_SIZE handling inside talloc_memlimit_check().

Callers already account for TC_HDR_SIZE, do not add it twice.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
6 years agoStart to fix talloc memlimits with talloc pools.
Jeremy Allison [Tue, 27 Aug 2013 19:36:23 +0000 (12:36 -0700)]
Start to fix talloc memlimits with talloc pools.

Add the functions:

talloc_memlimit_grow(), talloc_memlimit_shrink(),
talloc_memlimit_update_on_free().

as replacements for talloc_memlimit_update().
The interface to talloc_memlimit_update() is very
hard to understand and use. The above functions
are (to me) much clearer.

The goal of these changes is to only update
the memlimits on malloc/free/realloc, not
on every pool allocation. That way we only
count pool creation as allocation from any
imposed limits, not allocation from an already
created pool.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
6 years agosmbd: Use #defines in smb2_getinfo_send
Volker Lendecke [Mon, 26 Aug 2013 08:36:14 +0000 (08:36 +0000)]
smbd: Use #defines in smb2_getinfo_send

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Aug 27 15:08:08 CEST 2013 on sn-devel-104

6 years agoFix the UNIX extensions CHOWN calls to use FCHOWN if available, else LCHOWN.
Jeremy Allison [Wed, 21 Aug 2013 19:20:48 +0000 (12:20 -0700)]
Fix the UNIX extensions CHOWN calls to use FCHOWN if available, else LCHOWN.

UNIX extensions calls must never deref links.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Aug 26 20:19:46 CEST 2013 on sn-devel-104

6 years agoAllow UNIX extensions client to act on open fsp instead of pathname if available.
Jeremy Allison [Wed, 21 Aug 2013 19:10:05 +0000 (12:10 -0700)]
Allow UNIX extensions client to act on open fsp instead of pathname if available.

Eliminates possible race condition on pathname op.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
6 years agoFix the erroneous masking of chmod requests via the UNIX extensions.
Jeremy Allison [Wed, 21 Aug 2013 19:03:25 +0000 (12:03 -0700)]
Fix the erroneous masking of chmod requests via the UNIX extensions.

Changed from switch statement to if, as "create mask", "force create mode"
are only applied to new files, not existing ones. "directory mask",
"force directory mode" are only applied to new directories, not existing
ones.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
6 years agosmbd: Simplify dropbox special case in unix_convert
Volker Lendecke [Mon, 19 Aug 2013 10:26:00 +0000 (10:26 +0000)]
smbd: Simplify dropbox special case in unix_convert

EACCESS needs special treatment: If we want to create a fresh file,
return OBJECT_PATH_NOT_FOUND, so that the client will continue creating
the file. If the client wants us to open a potentially existing file,
we need to correctly return ACCESS_DENIED.

This patch makes this behaviour hopefully a bit clearer than the code
before did.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Aug 26 12:14:26 CEST 2013 on sn-devel-104

6 years agoRevert "Fix the erroneous masking of chmod requests via the UNIX extensions."
Jeremy Allison [Sun, 25 Aug 2013 01:44:28 +0000 (18:44 -0700)]
Revert "Fix the erroneous masking of chmod requests via the UNIX extensions."

Pushed from the wrong branch - this is the version
without Simo's review changes. Apologies to all
and I'll re-submit in less of a haste after the
weekend.

This reverts commit f124d6fbcd0a03bbd95d69477c144f475546de66.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Aug 25 05:44:11 CEST 2013 on sn-devel-104

6 years agoRevert "Allow UNIX extensions client to act on open fsp instead of pathname if availa...
Jeremy Allison [Sun, 25 Aug 2013 01:44:20 +0000 (18:44 -0700)]
Revert "Allow UNIX extensions client to act on open fsp instead of pathname if available."

Pushed from the wrong branch - this is the version
without Simo's review changes. Apologies to all
and I'll re-submit in less of a haste after the
weekend.

This reverts commit ce776551abb07f18cf302ee7c0c437ee27952099.

6 years agoPushed from the wrong branch - this is the version
Jeremy Allison [Sun, 25 Aug 2013 01:43:29 +0000 (18:43 -0700)]
Pushed from the wrong branch - this is the version
without Simo's review changes. Apologies to all
and I'll re-submit in less of a haste after the
weekend.

Revert "Fix the UNIX extensions CHOWN calls to use FCHOWN if available, else LCHOWN."

This reverts commit cf86adc4419f2636a0b24824ab04ebfcd5bb074d.

6 years agoFix the UNIX extensions CHOWN calls to use FCHOWN if available, else LCHOWN.
Jeremy Allison [Wed, 21 Aug 2013 19:20:48 +0000 (12:20 -0700)]
Fix the UNIX extensions CHOWN calls to use FCHOWN if available, else LCHOWN.

UNIX calls never deref links.

Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Aug 25 01:02:40 CEST 2013 on sn-devel-104

6 years agoAllow UNIX extensions client to act on open fsp instead of pathname if available.
Jeremy Allison [Wed, 21 Aug 2013 19:10:05 +0000 (12:10 -0700)]
Allow UNIX extensions client to act on open fsp instead of pathname if available.

Eliminates possible race condition on pathname op.

Signed-off-by: Jeremy Allison <jra@samba.org>
6 years agoFix the erroneous masking of chmod requests via the UNIX extensions.
Jeremy Allison [Wed, 21 Aug 2013 19:03:25 +0000 (12:03 -0700)]
Fix the erroneous masking of chmod requests via the UNIX extensions.

Signed-off-by: Jeremy Allison <jra@samba.org>
6 years agoFix bug #10063 - source3/lib/util.c:1493 leaking memory w/ pam_winbind.so / winbind
Jeremy Allison [Fri, 2 Aug 2013 22:03:39 +0000 (15:03 -0700)]
Fix bug #10063 - source3/lib/util.c:1493 leaking memory w/ pam_winbind.so / winbind

Don't use talloc_tos() in something that can be linked to in pam_winbindd.so

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Sat Aug 24 02:28:28 CEST 2013 on sn-devel-104

6 years agotorture: Split the fsinfo check into a separate test
Volker Lendecke [Thu, 22 Aug 2013 11:47:21 +0000 (11:47 +0000)]
torture: Split the fsinfo check into a separate test

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 23 20:53:12 CEST 2013 on sn-devel-104

6 years agotorture: Split the buffercheck into a separate test
Volker Lendecke [Thu, 22 Aug 2013 11:23:22 +0000 (11:23 +0000)]
torture: Split the buffercheck into a separate test

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agotorture: Change smb2.getinfo into a suite
Volker Lendecke [Thu, 22 Aug 2013 11:06:59 +0000 (11:06 +0000)]
torture: Change smb2.getinfo into a suite

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolibsmb2: Fix opening the rootdirectory, part 2
Volker Lendecke [Thu, 22 Aug 2013 15:04:03 +0000 (15:04 +0000)]
libsmb2: Fix opening the rootdirectory, part 2

smb2_push_o16s16_blob is wrong for the blob.data==NULL case. It does
not do the same magic that the rest of the routine does with regards to
padding_fix.  padding_fix is wrong in its own respect, with a 0-length
blob we end up with a negative padding fix. It's wrong, but it seems
to work.

Why am I doing this? I want to make smb2.getinfo work against
w2k12. smb2_util_roothandle() always gives NT_STATUS_INVALID_PARAMETER
without this and the preceding fix.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolibsmb2: Fix opening the rootdirectory, part 1
Volker Lendecke [Thu, 22 Aug 2013 15:04:03 +0000 (15:04 +0000)]
libsmb2: Fix opening the rootdirectory, part 1

[MS-SMB2], 2.2.13 says: In the request, the Buffer field MUST be at least one
byte in length. Implement that for the 0-length filename without create blobs.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agotorture: Remove an unused variable
Volker Lendecke [Thu, 22 Aug 2013 11:19:33 +0000 (11:19 +0000)]
torture: Remove an unused variable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbd: Fix a debug message
Volker Lendecke [Thu, 22 Aug 2013 15:19:32 +0000 (15:19 +0000)]
smbd: Fix a debug message

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agopkgconfig: Do not hardcode library version numbers in pc files.
Günther Deschner [Thu, 22 Aug 2013 13:00:32 +0000 (15:00 +0200)]
pkgconfig: Do not hardcode library version numbers in pc files.

We control version numbers via 'vnum' from the wscript_build files for all other
libraries.  In case of libndr we already reported a wrong 0.0.1 version via
pkgconfig while in fact the library is versioned as 0.0.2.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Thu Aug 22 20:48:44 CEST 2013 on sn-devel-104

6 years agos3-pkgconfig: remove leftovers from autoconf build.
Günther Deschner [Thu, 22 Aug 2013 12:59:08 +0000 (14:59 +0200)]
s3-pkgconfig: remove leftovers from autoconf build.

No worries, we still ship appropriate pc files for these libs.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
6 years agoclient: add missing newlines to error messages for invalid iosize parameter.
Michael Adam [Wed, 21 Aug 2013 14:12:30 +0000 (16:12 +0200)]
client: add missing newlines to error messages for invalid iosize parameter.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 21 21:49:45 CEST 2013 on sn-devel-104

6 years agontdbtool.8.xml: Bump version up to 4.1.
Karolin Seeger [Wed, 21 Aug 2013 08:12:45 +0000 (10:12 +0200)]
ntdbtool.8.xml: Bump version up to 4.1.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agontdbrestore.8.xml: Bump version up to 4.1.
Karolin Seeger [Wed, 21 Aug 2013 08:12:10 +0000 (10:12 +0200)]
ntdbrestore.8.xml: Bump version up to 4.1.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agontdbdump.8.xml: Bump version up to 4.1.
Karolin Seeger [Wed, 21 Aug 2013 07:39:45 +0000 (09:39 +0200)]
ntdbdump.8.xml: Bump version up to 4.1.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agontdbbackup.8.xml: Bump version up to 4.1.
Karolin Seeger [Wed, 21 Aug 2013 07:38:33 +0000 (09:38 +0200)]
ntdbbackup.8.xml: Bump version up to 4.1.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agontdb.3.xml: Bump version up to 4.1.
Karolin Seeger [Wed, 21 Aug 2013 07:38:01 +0000 (09:38 +0200)]
ntdb.3.xml: Bump version up to 4.1.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agosmbtree: use the correct count variable from NetShareEnum result.
Michael Adam [Wed, 21 Aug 2013 13:29:44 +0000 (15:29 +0200)]
smbtree: use the correct count variable from NetShareEnum result.

Fixes potential segfault, as for rpcclient from bug #10100

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agoAdd documentation for the new internal command timeout to smbclient.
Jeremy Allison [Fri, 16 Aug 2013 23:57:34 +0000 (16:57 -0700)]
Add documentation for the new internal command timeout to smbclient.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Aug 21 19:24:06 CEST 2013 on sn-devel-104

6 years agoAdd documentation for the new -t <timeout> parameter in smbclient.
Jeremy Allison [Fri, 16 Aug 2013 23:56:22 +0000 (16:56 -0700)]
Add documentation for the new -t <timeout> parameter in smbclient.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agoFix the documentation of --encrypt to explain SMB3 encryption for smbclient.
Jeremy Allison [Fri, 16 Aug 2013 23:53:45 +0000 (16:53 -0700)]
Fix the documentation of --encrypt to explain SMB3 encryption for smbclient.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agoFix the documentation of the iosize command to explain the new zero default for smbcl...
Jeremy Allison [Fri, 16 Aug 2013 23:49:41 +0000 (16:49 -0700)]
Fix the documentation of the iosize command to explain the new zero default for smbclient.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agoFix the documentation for --send-buffersize for the new default value of zero for...
Jeremy Allison [Fri, 16 Aug 2013 23:48:18 +0000 (16:48 -0700)]
Fix the documentation for --send-buffersize for the new default value of zero for smbclient.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agoExpand on the documentation of -m max-protocol for SMB2/3 for smbclient.
Jeremy Allison [Fri, 16 Aug 2013 23:47:13 +0000 (16:47 -0700)]
Expand on the documentation of -m max-protocol for SMB2/3 for smbclient.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agoAdd "-e" encrypt transport command line option documentation for smbcacls.
Jeremy Allison [Fri, 16 Aug 2013 23:45:26 +0000 (16:45 -0700)]
Add "-e" encrypt transport command line option documentation for smbcacls.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agoAdd "max protocol" command line documentation for smbcacls.
Jeremy Allison [Fri, 16 Aug 2013 23:44:14 +0000 (16:44 -0700)]
Add "max protocol" command line documentation for smbcacls.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agoAdd new "timeout" command and -t option to smbclient to set the per-operation timeout.
Jeremy Allison [Fri, 16 Aug 2013 20:49:39 +0000 (13:49 -0700)]
Add new "timeout" command and -t option to smbclient to set the per-operation timeout.

This is needed as once SMB3 encryption is selected the server
response time can be very slow when requesting large numbers
(256) of large encrypted packets (1MB) from a Windows 2012
virtual machine. This allows clients to tune their allowable
wait time.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agoAs SMB3 has transport level encryption, allow smbclient -e to force encryted SMB3...
Jeremy Allison [Fri, 16 Aug 2013 17:44:34 +0000 (10:44 -0700)]
As SMB3 has transport level encryption, allow smbclient -e to force encryted SMB3 transport.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agoRemove restrictions on setting iosize inside smbclient for SMB2 connections.
Jeremy Allison [Fri, 16 Aug 2013 18:45:43 +0000 (11:45 -0700)]
Remove restrictions on setting iosize inside smbclient for SMB2 connections.

Also remove the SMB1 restriction to minimum iosize of 16384 (0x4000):
Now values >= 0 and <= 0xFFFF00 can be set for SMB1, 0 meaning server
defined behaviour. 0 is the new default for iosize, both for SMB1 and SMB2.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agoFix bug #10100 - rpcclient crashes when sending the 'netshareenum 502' command
Jeremy Allison [Tue, 20 Aug 2013 17:55:27 +0000 (10:55 -0700)]
Fix bug #10100 - rpcclient crashes when sending the 'netshareenum 502' command

We are using the wrong variable for the returned count.
Reported by <pisymbol@gmail.com>.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Aug 21 17:30:33 CEST 2013 on sn-devel-104

6 years agosmbd: Simplify new_break_message_smb1
Volker Lendecke [Mon, 19 Aug 2013 12:28:24 +0000 (12:28 +0000)]
smbd: Simplify new_break_message_smb1

There's no point in allocating a fixed length array that we throw away
immediately after use.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Aug 20 14:35:21 CEST 2013 on sn-devel-104

6 years agosmbd: Replace a 0-timeout wakeup_send
Volker Lendecke [Fri, 16 Aug 2013 11:40:38 +0000 (11:40 +0000)]
smbd: Replace a 0-timeout wakeup_send

A tevent_immediate is simpler and is what we want here.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agodocs: Fix variable list in man vfs_crossrename.
Karolin Seeger [Tue, 13 Aug 2013 09:04:50 +0000 (11:04 +0200)]
docs: Fix variable list in man vfs_crossrename.

The varlist entries need a paragraph, otherwise the list is broken and the list
entries end with ".RE".

Fix bug #10076 - varlist in man vfs_crossrename broken.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 20 04:19:42 CEST 2013 on sn-devel-104

6 years agoMan pages for ntdb tools missing
Rusty Russell [Thu, 15 Aug 2013 03:02:06 +0000 (12:32 +0930)]
Man pages for ntdb tools missing

Copied and modified from tdb man pages.  Avoided reproducing API documentation
which is extensively documented in the ntdb.h header already.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10000

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agolibsmb: Fix a bunch of Coverity IDs
Volker Lendecke [Mon, 19 Aug 2013 20:36:02 +0000 (22:36 +0200)]
libsmb: Fix a bunch of Coverity IDs

(fnum != -1) is always true, even if fnum=-1 was initialized. fnum is
a uint16, and the comparison first casts this to 65535, which is always
!= -1.

Also change the initialization to make it clearer what is happening here.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 20 00:52:36 CEST 2013 on sn-devel-104

6 years agoFix bug #10097 - MacOSX 10.9 will not follow path-based DFS referrals handed out...
Richard Sharpe [Sun, 18 Aug 2013 14:34:31 +0000 (07:34 -0700)]
Fix bug #10097 - MacOSX 10.9 will not follow path-based DFS referrals handed out by Samba.

Windows overloads the EA Length field in the DIRECTORY INFO leves of FIND FIRST/FIND NEXT.

This field indicates either the REPARSE_TAG if the file/folder has a reparse proint or
the EA Length if it has EAs, and is the fundamental reason you cannot have both on a
file or folder.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Aug 19 22:21:34 CEST 2013 on sn-devel-104

6 years agorpc_server: Fix CID 1063255 Resource leak
Volker Lendecke [Sun, 18 Aug 2013 20:41:51 +0000 (20:41 +0000)]
rpc_server: Fix CID 1063255 Resource leak

We would leak a socket 0 here

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Aug 19 03:10:51 CEST 2013 on sn-devel-104

6 years agogensec: Fix CID 1063258 Uninitialized scalar variable
Volker Lendecke [Sun, 18 Aug 2013 20:37:26 +0000 (20:37 +0000)]
gensec: Fix CID 1063258 Uninitialized scalar variable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoregistry4: Fix CID 1034911 Dereference before null check
Volker Lendecke [Sun, 18 Aug 2013 19:34:35 +0000 (19:34 +0000)]
registry4: Fix CID 1034911 Dereference before null check

curbegin is always != NULL here (curend + 1) and is dereferenced by
strchr.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosmbd: Fix CID 1063259 Uninitialized scalar variable
Volker Lendecke [Sun, 18 Aug 2013 20:35:32 +0000 (20:35 +0000)]
smbd: Fix CID 1063259 Uninitialized scalar variable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoldb_map: Fix CID 1034791 Dereference null return value
Volker Lendecke [Sun, 18 Aug 2013 19:54:31 +0000 (19:54 +0000)]
ldb_map: Fix CID 1034791 Dereference null return value

Add NULL checks

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agopyldb: Fix CID 1034792 Dereference null return value
Volker Lendecke [Sun, 18 Aug 2013 19:51:49 +0000 (19:51 +0000)]
pyldb: Fix CID 1034792 Dereference null return value

Add a NULL check

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoldb: Fix CID 1034793 Dereference null return value
Volker Lendecke [Sun, 18 Aug 2013 19:49:24 +0000 (19:49 +0000)]
ldb: Fix CID 1034793 Dereference null return value

Add a proper NULL check

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamdb: Fix CID 1034910 Dereference before null check
Volker Lendecke [Sun, 18 Aug 2013 19:37:56 +0000 (19:37 +0000)]
samdb: Fix CID 1034910 Dereference before null check

strncmp("tdb://", sam_name, 6) dereferences sam_name. Check for
NULL before that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamdb: Fix CID 1034910 Dereference before null check
Volker Lendecke [Sun, 18 Aug 2013 19:37:56 +0000 (19:37 +0000)]
samdb: Fix CID 1034910 Dereference before null check

strncmp("tdb://", sam_name, 6) dereferences sam_name. Check for
NULL before that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agosamdb: Fix CID 1034910 Dereference before null check
Volker Lendecke [Sun, 18 Aug 2013 19:37:56 +0000 (19:37 +0000)]
samdb: Fix CID 1034910 Dereference before null check

strncmp("tdb://", secrets_ldb, 6) dereferences secrets_ldb. Check for
NULL before that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoregistry4: Fix CID 1034911 Dereference before null check
Volker Lendecke [Sun, 18 Aug 2013 19:34:35 +0000 (19:34 +0000)]
registry4: Fix CID 1034911 Dereference before null check

curbegin is always != NULL here (curend + 1) and is dereferenced by
strchr.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agolog2pcaphex: Fix nonempty line endings
Volker Lendecke [Sun, 18 Aug 2013 17:19:14 +0000 (17:19 +0000)]
log2pcaphex: Fix nonempty line endings

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
6 years agoldb: Fix a const warning
Volker Lendecke [Fri, 16 Aug 2013 12:56:04 +0000 (12:56 +0000)]
ldb: Fix a const warning

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sun Aug 18 10:26:27 CEST 2013 on sn-devel-104

6 years agovfs_glusterfs: Implement proper mashalling/unmarshalling of ACLs
Anand Avati [Sun, 11 Aug 2013 19:59:29 +0000 (15:59 -0400)]
vfs_glusterfs: Implement proper mashalling/unmarshalling of ACLs

Use the primitives available in Samba byteorder.h for implementing
proper (un)marshalling of ACL xattrs.
- Incorporated Raghavendra Talur's comments on v3

Signed-off-by: Anand Avati <avati@redhat.com>
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Christopher R. Hertel <crh@samba.org>
Tested-by: Jose A. Rivera <jarrpa@redhat.com>
Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Fri Aug 16 20:34:51 CEST 2013 on sn-devel-104

6 years agosmbd: Do not wait unnecessarily
Volker Lendecke [Fri, 16 Aug 2013 13:01:10 +0000 (13:01 +0000)]
smbd: Do not wait unnecessarily

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Aug 16 18:46:36 CEST 2013 on sn-devel-104

6 years agosmbd: Make break_level2_to_none_async static
Volker Lendecke [Fri, 16 Aug 2013 12:47:10 +0000 (12:47 +0000)]
smbd: Make break_level2_to_none_async static

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agotevent: Remove a pointless goto
Volker Lendecke [Fri, 16 Aug 2013 11:32:08 +0000 (11:32 +0000)]
tevent: Remove a pointless goto

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
6 years agoloadparm: Use the new fully featured kcc by default
Matthieu Patou [Fri, 17 May 2013 09:31:31 +0000 (02:31 -0700)]
loadparm: Use the new fully featured kcc by default

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug 16 04:44:01 CEST 2013 on sn-devel-104

6 years agolibctdb: Avoid an explicit memset
Volker Lendecke [Tue, 13 Aug 2013 10:50:15 +0000 (10:50 +0000)]
libctdb: Avoid an explicit memset

Give the compiler a chance to use better code. Saves a few bytes of text.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Aug 16 01:51:55 CEST 2013 on sn-devel-104

6 years agotorture: support Windows 2k8 response for compress_invalid_buf
David Disseldorp [Tue, 13 Aug 2013 16:07:28 +0000 (18:07 +0200)]
torture: support Windows 2k8 response for compress_invalid_buf

Windows Server 2012 returns NT_STATUS_INVALID_USER_BUFFER, Windows
Server 2008r2 returns NT_STATUS_INVALID_PARAMETER. Don't fail the test
if either status is returned.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agotorture: add more [no-]compress-on-open ioctl tests
David Disseldorp [Tue, 13 Aug 2013 16:07:27 +0000 (18:07 +0200)]
torture: add more [no-]compress-on-open ioctl tests

compress_create_with_attr: Specifies the FILE_ATTRIBUTE_COMPRESSED
attribute at create time, then checks the created file.

compress_inherit_disable: Creates under a compressed directory, a file
with the NTCREATEX_OPTIONS_NO_COMPRESSION option. Then checks that the
newly created file doesn't inherit the parent compression state.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agotorture: add file_attribs arg to file create helper
David Disseldorp [Tue, 13 Aug 2013 16:07:26 +0000 (18:07 +0200)]
torture: add file_attribs arg to file create helper

Allows for the testing of file creation with FILE_ATTRIBUTE_COMPRESSED.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agotorture: add compressed file attribute ioctl test
David Disseldorp [Tue, 13 Aug 2013 16:07:25 +0000 (18:07 +0200)]
torture: add compressed file attribute ioctl test

After marking a file for compression via FSCTL_SET_COMPRESSION, the
FILE_ATTRIBUTE_COMPRESSED flag should be present. Test for this.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agotorture: check for filesystem compression capability
David Disseldorp [Tue, 13 Aug 2013 16:07:24 +0000 (18:07 +0200)]
torture: check for filesystem compression capability

Only run the compression tests if the compression capability is returned
by the server in response to an SMB2_QUERY_INFO(FS attribute info)
request.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agotorture: extend FSCTL_[GET/SET]_COMPRESSION tests
David Disseldorp [Tue, 13 Aug 2013 16:07:23 +0000 (18:07 +0200)]
torture: extend FSCTL_[GET/SET]_COMPRESSION tests

Check for inheritance of compression attributes from parent directories.
Also, test error handling for invalid requests.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3:libsmb: call smb2cli_logoff() from cli_ulogoff()
Stefan Metzmacher [Wed, 14 Aug 2013 22:18:47 +0000 (15:18 -0700)]
s3:libsmb: call smb2cli_logoff() from cli_ulogoff()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Aug 15 10:53:21 CEST 2013 on sn-devel-104

6 years agos3:libsmb: make cli_ulogoff_send/recv static
Stefan Metzmacher [Wed, 14 Aug 2013 09:48:40 +0000 (11:48 +0200)]
s3:libsmb: make cli_ulogoff_send/recv static

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3:libsmb: call smb2cli_tdis() from cli_tdis()
Stefan Metzmacher [Wed, 14 Aug 2013 09:44:58 +0000 (11:44 +0200)]
s3:libsmb: call smb2cli_tdis() from cli_tdis()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3:libsmb: only set tcon to invalid in smb2cli_tdis*
Stefan Metzmacher [Wed, 14 Aug 2013 09:44:10 +0000 (11:44 +0200)]
s3:libsmb: only set tcon to invalid in smb2cli_tdis*

This matches the behavior of cli_tdis*.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3:libsmb: make cli_tdis_send/recv static
Stefan Metzmacher [Wed, 14 Aug 2013 09:38:22 +0000 (11:38 +0200)]
s3:libsmb: make cli_tdis_send/recv static

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3:libsmb: add support for SMB2 in cli_writeall()
Stefan Metzmacher [Tue, 13 Aug 2013 16:38:57 +0000 (18:38 +0200)]
s3:libsmb: add support for SMB2 in cli_writeall()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3:libsmb: add SMB2 support to cli_pull*
Stefan Metzmacher [Tue, 13 Aug 2013 16:20:08 +0000 (18:20 +0200)]
s3:libsmb: add SMB2 support to cli_pull*

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3:libsmb: add SMB2 support to cli_push*
Stefan Metzmacher [Tue, 13 Aug 2013 14:33:30 +0000 (16:33 +0200)]
s3:libsmb: add SMB2 support to cli_push*

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
6 years agos3:libsmb: Plumb cli_smb2_set_security_descriptor() inside cli_set_security_descriptor().
Jeremy Allison [Thu, 8 Aug 2013 18:00:49 +0000 (11:00 -0700)]
s3:libsmb: Plumb cli_smb2_set_security_descriptor() inside cli_set_security_descriptor().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:libsmb: Plumb cli_smb2_query_security_descriptor() inside cli_query_security_descr...
Jeremy Allison [Thu, 8 Aug 2013 18:00:08 +0000 (11:00 -0700)]
s3:libsmb: Plumb cli_smb2_query_security_descriptor() inside cli_query_security_descriptor().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:libsmb: Plumb cli_smb2_qpathinfo_alt_name() inside cli_qpathinfo_alt_name().
Jeremy Allison [Wed, 7 Aug 2013 23:50:03 +0000 (16:50 -0700)]
s3:libsmb: Plumb cli_smb2_qpathinfo_alt_name() inside cli_qpathinfo_alt_name().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:libsmb: Plumb cli_smb2_qpathinfo_basic() inside cli_qpathinfo_basic().
Jeremy Allison [Thu, 8 Aug 2013 17:52:02 +0000 (10:52 -0700)]
s3:libsmb: Plumb cli_smb2_qpathinfo_basic() inside cli_qpathinfo_basic().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:libsmb: Plumb cli_smb2_qfileinfo_basic() inside cli_qfileinfo_basic().
Jeremy Allison [Wed, 7 Aug 2013 23:47:21 +0000 (16:47 -0700)]
s3:libsmb: Plumb cli_smb2_qfileinfo_basic() inside cli_qfileinfo_basic().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:libsmb: Plumb cli_smb2_qpathinfo_streams() inside cli_qpathinfo_streams().
Jeremy Allison [Wed, 7 Aug 2013 23:46:05 +0000 (16:46 -0700)]
s3:libsmb: Plumb cli_smb2_qpathinfo_streams() inside cli_qpathinfo_streams().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:libsmb: Plumb cli_smb2_qpathinfo2() inside cli_qpathinfo2().
Jeremy Allison [Wed, 7 Aug 2013 23:45:05 +0000 (16:45 -0700)]
s3:libsmb: Plumb cli_smb2_qpathinfo2() inside cli_qpathinfo2().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:libsmb: Plumb cli_smb2_list() inside cli_list().
Jeremy Allison [Wed, 7 Aug 2013 23:43:33 +0000 (16:43 -0700)]
s3:libsmb: Plumb cli_smb2_list() inside cli_list().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:libsmb: Plumb cli_smb2_get_ea_list_path() inside cli_get_ea_list_path().
Jeremy Allison [Wed, 7 Aug 2013 23:42:02 +0000 (16:42 -0700)]
s3:libsmb: Plumb cli_smb2_get_ea_list_path() inside cli_get_ea_list_path().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:libsmb: Plumb cli_smb2_set_ea_fnum() inside cli_set_ea_fnum().
Jeremy Allison [Wed, 7 Aug 2013 23:32:55 +0000 (16:32 -0700)]
s3:libsmb: Plumb cli_smb2_set_ea_fnum() inside cli_set_ea_fnum().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
6 years agos3:libsmb: Plumb cli_smb2_set_ea_path() inside cli_set_ea_path().
Jeremy Allison [Wed, 7 Aug 2013 23:21:48 +0000 (16:21 -0700)]
s3:libsmb: Plumb cli_smb2_set_ea_path() inside cli_set_ea_path().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>