summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-08-29s3:winbind: fail ads_cached_connection_connect() if realm == NULLMichael Adam1-0/+4
This prevents segfaults when e.g. a previous SMB_STRDUP failed.. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Thu Aug 29 18:54:28 CEST 2013 on sn-devel-104
2013-08-29s3-winbindd: remove unneded include of secrets.h from idmap_ad.cGünther Deschner1-1/+0
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-29s3-winbindd: use get_trust_pw_clear() wrapper for AD connection code.Günther Deschner1-7/+4
This avoids calling secrets functions directly. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-29s3-winbindd: make sure also the idmap code can deal with trusted domains.Günther Deschner1-9/+31
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-29s3-winbindd: use find_domain_from_name() instead of ↵Günther Deschner1-2/+2
find_domain_from_name_no_init(). Otherwise there is a good chance the domain has not been connected and we don't know the realm name yet. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-29s3-winbindd: Fix winbind on DC crash with trusted AD domains.Günther Deschner1-1/+1
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-29s3-winbindd: Fix memory leak in ads_cached_connection().Günther Deschner1-1/+1
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-29s3-winbindd: remove pointless variable assigment, see the strdup below.Günther Deschner1-1/+0
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
2013-08-29provision: Rewrite named.txt to be more usefulAndrew Bartlett1-16/+20
We already chown the dns.keytab file, so remove the suggestion to do that, and instead explain why we can not use chroot (an often-requested feature). Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Björn Jacke <bj@sernet.de> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Thu Aug 29 13:53:25 CEST 2013 on sn-devel-104
2013-08-29docs: Add man samba-regedit.8.Karolin Seeger2-0/+122
Fix bug #10001 - Man page for samba-regedit tool missing. Signed-off-by: Karolin Seeger <kseeger@samba.org> Signed-off-by: Björn Jacke <bj@sernet.de> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Thu Aug 29 03:15:51 CEST 2013 on sn-devel-104
2013-08-29torture: Add buffercheck testsVolker Lendecke2-18/+229
Make sure we get the smb2 infolevel fixed portions right I could not find correct #defines for the infolevels 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> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Aug 29 01:27:11 CEST 2013 on sn-devel-104
2013-08-28smbd: Correctly return INFO_LENGTH_MISMATCH for smb1Volker Lendecke1-0/+4
This is required if the client offered less buffer than the fixed portion of the info level 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>
2013-08-28smbd: Fix error return for STREAM_INFOVolker Lendecke1-0/+4
The stream_info marshalling follows its own rules. This needs unifying eventually... 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>
2013-08-28smbd: Revert a93f9c3Volker Lendecke1-5/+0
This was too broad and has been replaced by finer-grained error checks 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>
2013-08-28smbd: Correctly return BUFFER_OVERFLOW in smb2_getinfoVolker Lendecke1-0/+10
Also, don't overflow the client buffer 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>
2013-08-28smbd: Correctly return INFO_LENGTH_MISMATCH in smb2_getinfoVolker Lendecke1-0/+12
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>
2013-08-28smbd: qfsinfo has fixed/variable buffersVolker Lendecke3-0/+13
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>
2013-08-28smbd: qfilepathinfo has fixed/variable buffersVolker Lendecke3-0/+25
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>
2013-08-28torture3: add clipathinfo-bufsizeVolker Lendecke4-0/+59
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-28dbwrap_ctdb: Treat empty records as non-existingVolker Lendecke2-0/+18
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-28s3: fix missing braces in nfs4_acls.cAbhidnya Joshi1-1/+2
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-28Fix valgrind errors with memmove and talloc pools.Jeremy Allison1-0/+21
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-27Add simple limited pool tests to test_memlimit().Jeremy Allison1-0/+27
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27Remove talloc_memlimit_update(). No longer used.Jeremy Allison1-24/+0
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27Inside _talloc_realloc(), keep track of size changes over malloc/realloc/free.Jeremy Allison1-4/+15
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-27Don't call talloc_memlimit_update() inside _talloc_realloc() when we're just ↵Jeremy Allison1-15/+0
manipulating pool members. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27Fix a conditional check. (size - tc->size > 0) is always true if size and ↵Jeremy Allison1-1/+1
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-27In _talloc_steal_internal(), correctly decrement the memory limit in the ↵Jeremy Allison1-12/+5
source, and increment in the destination. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27Inside _talloc_free_internal(), always call talloc_memlimit_update_on_free() ↵Jeremy Allison1-23/+4
before we free the real memory. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27Update memory limits when we call free() on a pool.Jeremy Allison1-0/+2
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
2013-08-27Change __talloc() to only call ↵Jeremy Allison1-12/+9
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-27Change _talloc_total_mem_internal() to ignore memory allocated from a pool ↵Jeremy Allison1-1/+8
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-27Remove magic TC_HDR_SIZE handling inside talloc_memlimit_check().Jeremy Allison1-1/+1
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-27Start to fix talloc memlimits with talloc pools.Jeremy Allison1-0/+72
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-27smbd: Use #defines in smb2_getinfo_sendVolker Lendecke1-4/+4
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-26Fix the UNIX extensions CHOWN calls to use FCHOWN if available, else LCHOWN.Jeremy Allison1-6/+20
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-26Allow UNIX extensions client to act on open fsp instead of pathname if ↵Jeremy Allison1-1/+8
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-26Fix the erroneous masking of chmod requests via the UNIX extensions.Jeremy Allison1-8/+10
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-26smbd: Simplify dropbox special case in unix_convertVolker Lendecke1-6/+23
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-25Revert "Fix the erroneous masking of chmod requests via the UNIX extensions."Jeremy Allison1-2/+7
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
2013-08-24Revert "Allow UNIX extensions client to act on open fsp instead of pathname ↵Jeremy Allison1-8/+1
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.
2013-08-24Pushed from the wrong branch - this is the versionJeremy Allison1-14/+6
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.
2013-08-25Fix the UNIX extensions CHOWN calls to use FCHOWN if available, else LCHOWN.Jeremy Allison1-6/+14
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-24Allow UNIX extensions client to act on open fsp instead of pathname if ↵Jeremy Allison1-1/+8
available. Eliminates possible race condition on pathname op. Signed-off-by: Jeremy Allison <jra@samba.org>
2013-08-24Fix the erroneous masking of chmod requests via the UNIX extensions.Jeremy Allison1-7/+2
Signed-off-by: Jeremy Allison <jra@samba.org>
2013-08-24Fix bug #10063 - source3/lib/util.c:1493 leaking memory w/ pam_winbind.so / ↵Jeremy Allison1-2/+4
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-23torture: Split the fsinfo check into a separate testVolker Lendecke2-2/+9
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-23torture: Split the buffercheck into a separate testVolker Lendecke1-2/+9
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-23torture: Change smb2.getinfo into a suiteVolker Lendecke3-4/+13
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-23libsmb2: Fix opening the rootdirectory, part 2Volker Lendecke1-1/+1
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>