1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

85955 Commits

Author SHA1 Message Date
Volker Lendecke
e1843cd332 torture3: add clipathinfo-bufsize
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-28 23:37:08 +02:00
Volker Lendecke
1cae59ce11 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>
2013-08-28 23:37:08 +02:00
Abhidnya Joshi
91186fcf9d 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
2013-08-28 20:25:55 +02:00
Jeremy Allison
617c647b8e 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
2013-08-28 02:44:16 +02:00
Jeremy Allison
cbfc3efbfd Add simple limited pool tests to test_memlimit().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:20 -07:00
Jeremy Allison
3d0f717d43 Remove talloc_memlimit_update(). No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27 15:44:20 -07:00
Jeremy Allison
8e2a543e08 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>
2013-08-27 15:44:20 -07:00
Jeremy Allison
314508dd73 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>
2013-08-27 15:44:20 -07:00
Jeremy Allison
0fbcfcc824 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>
2013-08-27 15:44:20 -07:00
Jeremy Allison
4386029322 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>
2013-08-27 15:44:19 -07:00
Jeremy Allison
6bc190d6dd 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>
2013-08-27 15:44:19 -07:00
Jeremy Allison
4dfde7d33e 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>
2013-08-27 15:44:19 -07:00
Jeremy Allison
a4ebbe73b4 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>
2013-08-27 15:44:19 -07:00
Jeremy Allison
4159a78ed7 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>
2013-08-27 15:44:19 -07:00
Jeremy Allison
7a6beae68e 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>
2013-08-27 15:44:19 -07:00
Jeremy Allison
fe790f6cbc 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>
2013-08-27 15:44:19 -07:00
Volker Lendecke
323cccd35d 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
2013-08-27 15:08:07 +02:00
Jeremy Allison
d1593a20f3 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
2013-08-26 20:19:46 +02:00
Jeremy Allison
f1ff97fc02 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>
2013-08-26 09:01:22 -07:00
Jeremy Allison
bd0156988b 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>
2013-08-26 09:01:16 -07:00
Volker Lendecke
76142780fb 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
2013-08-26 12:14:26 +02:00
Jeremy Allison
84b8bddd7d 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 f124d6fbcd.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Aug 25 05:44:11 CEST 2013 on sn-devel-104
2013-08-25 05:44:10 +02:00
Jeremy Allison
8e299634d9 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 ce776551ab.
2013-08-24 18:44:20 -07:00
Jeremy Allison
9cbd4fcd1e 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 cf86adc441.
2013-08-24 18:43:29 -07:00
Jeremy Allison
cf86adc441 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
2013-08-25 01:02:40 +02:00
Jeremy Allison
ce776551ab 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>
2013-08-24 14:04:47 -07:00
Jeremy Allison
f124d6fbcd Fix the erroneous masking of chmod requests via the UNIX extensions.
Signed-off-by: Jeremy Allison <jra@samba.org>
2013-08-24 14:04:47 -07:00
Jeremy Allison
9423d5afb7 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
2013-08-24 02:28:28 +02:00
Volker Lendecke
3ddb77f7d8 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
2013-08-23 20:53:12 +02:00
Volker Lendecke
e1edffc807 torture: Split the buffercheck into a separate test
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-23 09:48:51 -07:00
Volker Lendecke
8f96d48971 torture: Change smb2.getinfo into a suite
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-23 09:48:48 -07:00
Volker Lendecke
ad8a1e2a6e 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>
2013-08-23 09:48:44 -07:00
Volker Lendecke
1927676412 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>
2013-08-23 09:48:40 -07:00
Volker Lendecke
971b39bb10 torture: Remove an unused variable
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-23 09:48:37 -07:00
Volker Lendecke
83d1495e58 smbd: Fix a debug message
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-23 09:48:21 -07:00
Günther Deschner
573b455de9 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
2013-08-22 20:48:44 +02:00
Günther Deschner
a0b245c782 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>
2013-08-22 18:50:47 +02:00
Michael Adam
db1d0349c4 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
2013-08-21 21:49:44 +02:00
Karolin Seeger
cc82c161bf ntdbtool.8.xml: Bump version up to 4.1.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21 10:31:19 -07:00
Karolin Seeger
178023ad72 ntdbrestore.8.xml: Bump version up to 4.1.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21 10:31:19 -07:00
Karolin Seeger
20d22f0b9a ntdbdump.8.xml: Bump version up to 4.1.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21 10:31:19 -07:00
Karolin Seeger
9bef5aadac ntdbbackup.8.xml: Bump version up to 4.1.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21 10:31:19 -07:00
Karolin Seeger
8d021b34b4 ntdb.3.xml: Bump version up to 4.1.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-21 10:31:19 -07:00
Michael Adam
122609affb 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>
2013-08-21 10:31:19 -07:00
Jeremy Allison
8d0392f9f7 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
2013-08-21 19:24:05 +02:00
Jeremy Allison
f7dc59b3ad 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>
2013-08-21 17:28:57 +02:00
Jeremy Allison
4044e2beb7 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>
2013-08-21 17:28:56 +02:00
Jeremy Allison
90566fd0de 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>
2013-08-21 17:28:56 +02:00
Jeremy Allison
659f5fecd6 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>
2013-08-21 17:28:56 +02:00
Jeremy Allison
252a6b6d8a 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>
2013-08-21 17:28:56 +02:00