summaryrefslogtreecommitdiffstats
path: root/source/smbd/negprot.c
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup size_t return values in callers of convert_string_allocateTim Prouty2008-05-201-2/+3
| | | | | This patch is the second iteration of an inside-out conversion to cleanup functions in charcnv.c returning size_t == -1 to indicate failure.
* Now conn is part of smb_request, we don't need it asJeremy Allison2008-01-041-1/+1
| | | | | | an extra parameter. This cleans up quite a few places we were passing it around without needing it. Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-4/+4
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* r24809: Consolidate the use of temporary talloc contexts.Volker Lendecke2007-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the two functions talloc_stackframe() and talloc_tos(). * When a new talloc stackframe is allocated with talloc_stackframe(), then * the TALLOC_CTX returned with talloc_tos() is reset to that new * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse * happens: The previous talloc_tos() is restored. * * This API is designed to be robust in the sense that if someone forgets to * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and * resets the talloc_tos(). The original motivation for this patch was to get rid of the sid_string_static & friends buffers. Explicitly passing talloc context everywhere clutters code too much for my taste, so an implicit talloc_tos() is introduced here. Many of these static buffers are replaced by a single static pointer. The intended use would thus be that low-level functions can rather freely push stuff to talloc_tos, the upper layers clean up by freeing the stackframe. The more of these stackframes are used and correctly freed the more exact the memory cleanup happens. This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and lp_talloc_ctx (did I forget any?) So, never do a tmp_ctx = talloc_init("foo"); anymore, instead, use tmp_ctx = talloc_stackframe() :-) Volker
* r24659: Some formatting changes helping to minimize the 3_2_0 diffVolker Lendecke2007-10-101-5/+4
|
* r24309: if no protocol matches, just return choise 0xffffStefan Metzmacher2007-10-101-0/+2
| | | | | | as we've done before revision 24002 metze
* r24308: this needs a better fix that compiles...Stefan Metzmacher2007-10-101-1/+0
| | | | metze
* r24307: fill in choise with value -1 on errorStefan Metzmacher2007-10-101-0/+1
| | | | | | as we've done before revision 24002 metze
* r24135: Convert call_trans2open to the new APIVolker Lendecke2007-10-101-0/+1
| | | | | | | | | This itself won't help much, because send_trans2_replies_new still allocates the big buffers, but stay tuned :-) Also add/update my copyright on stuff I recently touched. Volker
* r24009: Revert to the 3.0.25 logic for parsing the client's protocols. hpisgr8Volker Lendecke2007-10-101-13/+5
| | | | | | with gcc still gives timeouts which worry me. Volker
* r24006: Some more paranoia in reply_negprotVolker Lendecke2007-10-101-2/+12
| | | | | | Some hosts see the smb_bufrem(req->inbuf, p) as an unsigned int. And as the p += strlen(p) + 2 went one beyond the buffer, this was a very large positive. Also take the chance to add one more consistency check.
* r24002: Convert reply_negprot to the new APIVolker Lendecke2007-10-101-90/+114
|
* r24001: Separate out the parsing of the client's requested protocolsVolker Lendecke2007-10-101-29/+66
| | | | This way the range checking only needs to be done once
* r23784: use the GPLv3 boilerplate as recommended by the FSF and the license textAndrew Tridgell2007-10-101-2/+1
|
* r23779: Change from v2 or later to v3 or later.Jeremy Allison2007-10-101-1/+1
| | | | Jeremy.
* r23510: Tidy calls to smb_panic by removing trailing newlines. Print theJames Peach2007-10-101-1/+1
| | | | failed expression in SMB_ASSERT.
* r23168: Move the lp_max_connections() into service.c.Volker Lendecke2007-10-101-1/+2
|
* r23167: Remove an unused parameterVolker Lendecke2007-10-101-1/+1
|
* r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; andVolker Lendecke2007-10-101-1/+1
| | | | replace all data_blob(NULL, 0) calls.
* r22391: Looks bigger than it is. Make "inbuf" availableJeremy Allison2007-10-101-7/+7
| | | | | | | to all callers of smb_setlen (via set_message() calls). This will allow the server to reflect back the correct encryption context. Jeremy.
* r21969: Start working on the gss-side of the server negotiation.Jeremy Allison2007-10-101-0/+4
| | | | Jeremy.
* r21858: Fix typo.Günther Deschner2007-10-101-1/+1
| | | | Guenther
* r21857: Stop pretending to be Vista in the %a macro towards Samba clients.Günther Deschner2007-10-101-1/+3
| | | | Guenther
* r21250: Partial fix for BUG 4093: Make %a expand to "Vista"Gerald Carter2007-10-101-8/+37
| | | | | | | | | | based on the flags2 values in the negprot request. This also includes some code for testing the dialect strings for "SMB 2.001" but this is unreliable as Vista only sends that in the 1st negprot and caches the fact that we don't support it. Restartnig the WOrkstation service on the client clears the cache.
* r20368: Fix valgrind report of uninitialized memoryJeremy Allison2007-10-101-1/+12
| | | | | | being returned (false positive). Up debug level on "open_directory" message. Jeremy.
* r20237: Replace exit_server with exit_server_cleanly where appropriate. AllJames Peach2007-10-101-3/+4
| | | | | send_smb failures should be clean exits. All times when we exit as a matter of policy should also be clean exits.
* r18773: Change negprot_spnego to return a blobVolker Lendecke2007-10-101-10/+12
|
* r18772: Now that we don't have a one-byte keylength in the extended security ↵Volker Lendecke2007-10-101-4/+0
| | | | | | | | | | | case anymore, we don't have to truncate the length to 255 anymore. The test I did for this: I sent 50 times the NTLMSSP oid. With truncating Vista said Access Denied, without truncating it liked the response. Volker
* r18771: Sequel to r18761: If we always set the keylen to 0 there's no point ↵Volker Lendecke2007-10-101-6/+3
| | | | | | | | in passing a pointer down to negprot_spnego(). Volker
* r18761: Even if only offering NTLMSSP Windows (tested with Vista & XP) sends ↵Volker Lendecke2007-10-101-5/+2
| | | | | | | | | | | | 0 as the key length in the case of extended security. It does make sense because with SPNEGO our beloved ASN1 structure gives us the length. Next test I did to verify this: I modified the server to put in random garbage, and W2kwks, XP, Vista and W2k3srv still talked to us. Volker
* r18760: Fix typos, remove unneeded codeVolker Lendecke2007-10-101-10/+2
|
* r16397: Fix Klocwork #11767 and drasticly simplify theJeremy Allison2007-10-101-0/+1
| | | | | | | | logic in smbd/process.c. All interested (Volker, Jerry, James etc). PLEASE REVIEW THIS CHANGE. The logic should be identical but *much* easier to follow and change (and shouldn't confuse Klockwork :-). Jeremy.
* r13647: Fix for standalone Samba servers and XP clients. RevertsJeremy Allison2007-10-101-4/+15
| | | | | | part of the PocketPC bugfix. I'm trying to get someone who has a pocketpc to test this. Jeremy.
* r11511: A classic "friday night check-in" :-). This moves muchJeremy Allison2007-10-101-6/+7
| | | | | | | | | | | | | | | | of the Samba4 timezone handling code back into Samba3. Gets rid of "kludge-gmt" and removes the effectiveness of the parameter "time offset" (I can add this back in very easily if needed) - it's no longer being looked at. I'm hoping this will fix the problems people have been having with DST transitions. I'll start comprehensive testing tomorrow, but for now all modifications are done. Splits time get/set functions into srv_XXX and cli_XXX as they need to look at different timezone offsets. Get rid of much of the "efficiency" cruft that was added to Samba back in the day when the C library timezone handling functions were slow. Jeremy.
* r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4Jeremy Allison2007-10-101-2/+2
| | | | | x86_64 box. Jeremy.
* r10974: Get closer to trying to fix #1825 (PcoketPC spnego bug). Ensure weJeremy Allison2007-10-101-4/+11
| | | | | set keylen to zero if no spnego. Jeremy.
* r10947: Fix bugs #3133 and #1828 - SPNEGO not working with PocketPC 2003.Jeremy Allison2007-10-101-9/+10
| | | | | | | Our sessionsetup code now handles raw NTLMSSP connects, so we can go back to doing what W2K3 does here which is to send no OID's in the negprot reply when not in a security=ads mode. Jeremy.
* r7398: commiting abartlet's patch for kerberos authentication when using a ↵Gerald Carter2007-10-101-5/+8
| | | | keytab and security != ads
* r6225: get rid of warnings from my compiler about nested externsHerb Lewis2007-10-101-1/+1
|
* r6069: Fix for bug #2541. Ensure we recognise LANMAN2.1 as OS/2 and select ↵Jeremy Allison2007-10-101-0/+1
| | | | | | | LANMAN2 protocol, ensure the EA size is always correctly set on a query for a file with no EA's. Jeremy.
* r4018: * move claim_connection from the netbios session requestGerald Carter2007-10-101-0/+6
| | | | | | | | | reply code to the negprot reply code to cope with client connections on port 445. Fixes the spurious "register_message_flags: tdb fetch failed" errors. * don't run the backgroup LPQ daemon when we are running in interactive mode.
* r3946: Fix for bugid #2085 reported by Jason Mader <jason@ncac.gwu.edu>. Use ↵Jeremy Allison2007-10-101-1/+1
| | | | | | | consistent enum type for Protocol extern. Jeremy.
* r1939: Ensure with my new change we set extended security in flags2 inJeremy Allison2007-10-101-0/+3
| | | | | the negprot reply. Jeremy.
* r1936: Fix bug noticed by Steve - ensure extended security bit is on onlyJeremy Allison2007-10-101-0/+1
| | | | | | if we negotiated extended security. Do not merge for 3.0.6. Works with W2K but needs further testing. Jeremy.
* r1154: Change default setting for case sensitivity to "auto". If set to autoJeremy Allison2007-10-101-3/+16
| | | | | | | | | | | | then is the client supports it (current clients supported are Samba and CIFSVFS - detected by the negprot strings "Samba", "POSIX 2" and a bare "NT LM 0.12" string) then the setting of the per packet flag smb_flag FLAG_CASELESS_PATHNAMES is taken into account per packet. This allows the linux CIFS client to use Samba in a case sensitive manner. Additional command in smbclient "case_sensitive", toggles the flag in subsequent packets. Docs to follow. Jeremy.
* As I raised (without objection) on the mailing list a while back, thisAndrew Bartlett2004-03-271-5/+1
| | | | | | | | | | | | | patch removes the 'unicode' smb.conf option. Clients are as always free not to negotiate unicode, but Samba will always accept unicode in smbd. Setting 'unicode = no' caused me more client BSODs than any other option I have seen, and I really want to protect some of our more silly users, who will, no matter what, select and change every option... Andrew Bartlett
* Modified fix for bugid #784. Based on a patch from moriyama@miraclelinux.com ↵Jeremy Allison2004-03-131-3/+7
| | | | | | | | | | (MORIYAMA Masayuki). Don't use nstrings to hold workgroup and netbios names. The problem with them is that MB netbios and workgroup names in unix charset (particularly utf8) may be up to 3x bigger than the name when represented in dos charset (ie. cp932). So go back to using fstrings for these but translate into nstrings (ie. 16 byte length values) for transport on the wire. Jeremy.
* Signing so far... the client code fails on a SMBtrans2 secondary transactionJeremy Allison2003-07-181-5/+13
| | | | | | | I think (my changes haven't affected this I believe). Initial support on the server side for smbclient. Still doesn't work for w2k clients I think... Work in progress..... (don't change). Jeremy.
* Putting the framework for server signing in place. Ensure we don't useJeremy Allison2003-07-171-0/+12
| | | | | sendfile when signing (I need to add this for readbraw/writebraw too...). Jeremy.
* Removed strupper/strlower macros that automatically map to ↵Jeremy Allison2003-07-031-1/+1
| | | | | | | strupper_m/strlower_m. I really want people to think about when they're using multibyte strings. Jeremy.