Volker Lendecke [Tue, 27 Aug 2013 09:36:03 +0000 (09:36 +0000)]
smbd: Correctly return INFO_LENGTH_MISMATCH in smb2_getinfo
We have to return this error if the client offered less than the fixed
portion of the infolevel data requires
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Tue, 27 Aug 2013 09:06:27 +0000 (09:06 +0000)]
smbd: qfsinfo has fixed/variable buffers
The error message will have to change depending whether the buffer is
too small for the fixed or variable buffers
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Tue, 27 Aug 2013 09:06:27 +0000 (09:06 +0000)]
smbd: qfilepathinfo has fixed/variable buffers
The error message will have to change depending whether the buffer is
too small for the fixed or variable buffers
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Fri, 23 Aug 2013 13:57:03 +0000 (13:57 +0000)]
torture3: add clipathinfo-bufsize
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Volker Lendecke [Wed, 28 Aug 2013 11:34:08 +0000 (11:34 +0000)]
dbwrap_ctdb: Treat empty records as non-existing
This is a patch implementing the workaround Christian mentioned in
https://bugzilla.samba.org/show_bug.cgi?id=10008#c5
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10008
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Abhidnya Joshi [Mon, 26 Aug 2013 07:01:49 +0000 (12:31 +0530)]
s3: fix missing braces in nfs4_acls.c
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 28 20:25:56 CEST 2013 on sn-devel-104
Jeremy Allison [Tue, 27 Aug 2013 20:20:43 +0000 (13:20 -0700)]
Fix valgrind errors with memmove and talloc pools.
bin/smbtorture //127.0.0.1 local.talloc now runs with no valgrind errors.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Aug 28 02:44:17 CEST 2013 on sn-devel-104
Jeremy Allison [Tue, 27 Aug 2013 20:09:03 +0000 (13:09 -0700)]
Add simple limited pool tests to test_memlimit().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Jeremy Allison [Tue, 27 Aug 2013 20:08:33 +0000 (13:08 -0700)]
Remove talloc_memlimit_update(). No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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>
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>
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
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
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.
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.
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
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>
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>
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
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
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>
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>
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>
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>
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>
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>
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
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>
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
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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>
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
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>
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
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
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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
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>
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>
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
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
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>