summaryrefslogtreecommitdiffstats
path: root/source/libsmb/clitrans.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix some bogus compiler warningsVolker Lendecke2008-09-101-5/+10
|
* Add async trans/trans2/nttrans calls to libsmbVolker Lendecke2008-09-091-0/+701
| | | | Logic stolen from Samba4, naturally the specific implementation differs a bit.
* Fix signing problem in the client with transs requestsVolker Lendecke2008-05-131-0/+3
| | | | | | | | | | | This is a different fix than Jeremy put into 3-0-test with 040db1ce85 and other branches with different hashes. Jeremy, I think your fix led to bug 5436, so I reverted your fix. This fixes the original problem I found with the transs requests for large rpc queries in a different way. Please check! Thanks, Volker
* Revert "Fix signing bug found by Volker. That one was *subtle*."Volker Lendecke2008-05-131-0/+14
| | | | This reverts commit 816aea6c1a426eb2450061b847729e22bdac33a0.
* Add SMB encryption. Still fixing client decrypt butJeremy Allison2007-12-261-4/+4
| | | | | negotiation works. Jeremy.
* Fix signing bug found by Volker. That one was *subtle*.Jeremy Allison2007-12-041-14/+0
| | | | Jeremy
* Ensure we have 2 bytes of zeros as a pad-buffer at theJeremy Allison2007-11-301-40/+85
| | | | | | end of all returned trans/trans2/nttrans client replies. Not included in a count - for safety purposes. Jeremy.
* RIP BOOL. Convert BOOL -> bool. I found a few interestingJeremy Allison2007-10-181-6/+6
| | | | | | | bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy.
* [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.samba-misc-tags/initial-v3-2-testGerald (Jerry) Carter2007-10-101-4/+4
|
* 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.
* r22732: - Testing of libsmbclient against Vista revealed what is likely a bug inDerrell Lipman2007-10-101-1/+8
| | | | | | | | | | | | | | | Vista. Vista provides a plethora of kludges to simulate older versions of Windows. The kludges are in the form of shortcuts (or more likely symbolic links, but I don't know enough about Vista to determine that definitively) and in most cases, attempts to access them get back an "access denied" error. On one particular folder, however, "<share>/Users/All Users", it returns an unknown (to ethereal and the Samba3 code) NT status code: 0x8000002d. Although this code does not have a high byte of 0xc0 indicating that it is an error, it appears to be an alternate form of "access denied". Without this patch, libsmbclient times out on an attempt to enumerate that folder rather than returning an error to the caller. This patch corrects that problem.
* r22391: Looks bigger than it is. Make "inbuf" availableJeremy Allison2007-10-101-4/+4
| | | | | | | to all callers of smb_setlen (via set_message() calls). This will allow the server to reflect back the correct encryption context. Jeremy.
* r21899: At least we're getting to stage 2 of the blobJeremy Allison2007-10-101-4/+10
| | | | | exchange. Still not working but closer. Jeremy.
* r17333: Some C++ warningsVolker Lendecke2007-10-101-4/+4
|
* r17292: Try and fix bug #3967 - signing problems on transJeremy Allison2007-10-101-40/+61
| | | | | | | calls introduced by signing code simplification. Please test if you've seen signing problems with 3.0.23a. Jeremy.
* r15018: Merge Volker's ipc/trans2/nttrans changes overJeremy Allison2007-10-101-36/+2
| | | | | | | | into 3.0. Also merge the new POSIX lock code - this is not enabled unless -DDEVELOPER is defined. This doesn't yet map onto underlying system POSIX locks. Updates vfs to allow lock queries. Jeremy.
* r13915: Fixed a very interesting class of realloc() bugs found by Coverity.Jeremy Allison2007-10-101-20/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | realloc can return NULL in one of two cases - (1) the realloc failed, (2) realloc succeeded but the new size requested was zero, in which case this is identical to a free() call. The error paths dealing with these two cases should be different, but mostly weren't. Secondly the standard idiom for dealing with realloc when you know the new size is non-zero is the following : tmp = realloc(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } However, there were *many* *many* places in Samba where we were using the old (broken) idiom of : p = realloc(p, size) if (!p) { return error; } which will leak the memory pointed to by p on realloc fail. This commit (hopefully) fixes all these cases by moving to a standard idiom of : p = SMB_REALLOC(p, size) if (!p) { return error; } Where if the realloc returns null due to the realloc failing or size == 0 we *guarentee* that the storage pointed to by p has been freed. This allows me to remove a lot of code that was dealing with the standard (more verbose) method that required a tmp pointer. This is almost always what you want. When a realloc fails you never usually want the old memory, you want to free it and get into your error processing asap. For the 11 remaining cases where we really do need to keep the old pointer I have invented the new macro SMB_REALLOC_KEEP_OLD_ON_ERROR, which can be used as follows : tmp = SMB_REALLOC_KEEP_OLD_ON_ERROR(p, size); if (!tmp) { SAFE_FREE(p); return error; } else { p = tmp; } SMB_REALLOC_KEEP_OLD_ON_ERROR guarentees never to free the pointer p, even on size == 0 or realloc fail. All this is done by a hidden extra argument to Realloc(), BOOL free_old_on_error which is set appropriately by the SMB_REALLOC and SMB_REALLOC_KEEP_OLD_ON_ERROR macros (and their array counterparts). It remains to be seen what this will do to our Coverity bug count :-). Jeremy.
* r10656: BIG merge from trunk. Features not copied overGerald Carter2007-10-101-4/+15
| | | | | | | * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck)
* r8572: Remove crufty #define NO_SYSLOG as it's not used at all anymore.Tim Potter2007-10-101-2/+0
|
* r7415: * big change -- volker's new async winbindd from trunkGerald Carter2007-10-101-2/+2
|
* r5840: Fix findfirst/findnext with protocol level < NT1.Jeremy Allison2007-10-101-2/+3
| | | | Jeremy.
* r4570: Replace cli->nt_pipe_fnum with an array of NT file numbers, one for eachVolker Lendecke2007-10-101-2/+2
| | | | | | | | | | | | supported pipe. Netlogon is still special, as we open that twice, one to do the auth2, the other one with schannel. The client interface is completely unchanged for those who only use a single pie. cli->pipe_idx is used as the index for everything except the "real" client rpc calls, which have been explicitly converted in my last commit. Next step is to get winbind to just use a single smb connection for multiple pipes. Volker
* r4088: Get medieval on our ass about malloc.... :-). Take control of all our ↵Jeremy Allison2007-10-101-4/+4
| | | | | | | | | allocation functions so we can funnel through some well known functions. Should help greatly with malloc checking. HEAD patch to follow. Jeremy.
* Ensure we use the same mid for the secondary trans requests, W2K3Jeremy Allison2003-12-011-0/+6
| | | | | does this. Jeremy.
* Better fix for client signing bug. Ensure we don't malloc/free trans signingJeremy Allison2003-12-011-30/+26
| | | | | state info each packet. Jeremy.
* Fix signing bug with secondary client trans requests. Turns out the lastJeremy Allison2003-11-301-0/+20
| | | | | | | packet is the one that matters for checking the signing replies. Need to check the server code does this correctly too.... Bug #832 reported by Volker. Jeremy.
* We are doing NT error codes now.... If we have an NT error, report thatVolker Lendecke2003-10-201-0/+11
| | | | | | | | | back the same way we handle the DOS error. Although I don't see why BUFFER_TOO_SMALL should not be handled as an error, simply copy the logic. This is only called from smbcacls and smbcquotas. Volker
* More fixes for client and server side signing. Ensure sequence numbersJeremy Allison2003-08-021-17/+61
| | | | | | are updated correctly on returning an error for server trans streams. Ensure we turn off client trans streams on error. Jeremy.
* Correct fix (removed the earlier band-aid) for what I thought was a signingJeremy Allison2003-08-021-0/+18
| | | | | | | | | | | | bug with w2k. Turns out that when we're doing a trans/trans2/nttrans call the MID and send_sequence_number and reply_sequence_number must remain constant. This was something we got very wrong in earlier versions of Samba. I can now get a directory listing from WINNT\SYSTEM32 with the older earlier parameters for clilist.c This still needs to be fixed for the server side of Samba, client appears to be working happily now (I'm doing a signed smbtar download of an entire W2K3 image to test this :-). Jeremy.
* Merge from HEAD:Andrew Bartlett2003-03-171-3/+3
| | | | | | | | signed/unsigned (mostly i counters) a little bit of const. Andrew Bartlett
* Change size parameters from signed to unsigned to fix up warnings.Jeremy Allison2003-03-131-69/+164
| | | | Jeremy.
* Removed version number from file header.Tim Potter2002-01-301-2/+1
| | | | Changed "SMB/Netbios" to "SMB/CIFS" in file header.
* Same fix as went into 2.2 (I'm waiting for jerry to finish some code).Jeremy Allison2002-01-111-4/+4
| | | | Jeremy.
* use cli_is_error() instead of looking in smb_rcls, otherwise NT statusAndrew Tridgell2001-09-051-2/+2
| | | | codes don't work correctly
* started converting NTSTATUS to be a structure on systems with gcc in order ↵Andrew Tridgell2001-08-271-20/+6
| | | | to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs
* converted smbd to use NTSTATUS by defaultAndrew Tridgell2001-08-271-12/+17
| | | | | | | | | | | | | | | | major changes include: - added NSTATUS type - added automatic mapping between dos and nt error codes - changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT() these calls auto-translate to the client error code system - got rid of the cached error code and the writebmpx code We eventually will need to also: - get rid of BOOL, so we don't lose error info - replace all ERROR_DOS() calls with ERROR_NT() calls but that is too much for one night
* a bunch of fixes from the sflight to seattleAndrew Tridgell2001-08-201-7/+10
| | | | | | in particular: - fixed NT status code for a bunch of ops - fixed handling of protocol levels in ms_fnmatch
* Use tparam not tdata when reallocing params to make clearer.Jeremy Allison2001-08-171-12/+15
| | | | Jeremy.
* more useful debug messages and check if the size are non null.Jean-François Micouleau2001-08-171-10/+17
| | | | | | that fix the notification backend channel for spoolss. J.F.
* this is a big global fix for the ptr = Realloc(ptr, size) bug.Simo Sorce2001-08-121-4/+26
| | | | | | many possible mem leaks, and segfaults fixed. someone should port this fix to 2.2 also.
* A rewrite of the error handling in the libsmb client code. I've separatedTim Potter2001-08-101-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | out the error handling into a bunch of separate functions rather than all being handled in one big function. Fetch error codes from the last received packet: void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *num); uint32 cli_nt_error(struct cli_state *); Convert errors to UNIX errno values: int cli_errno_from_dos(uint8 eclass, uint32 num); int cli_errno_from_nt(uint32 status); int cli_errno(struct cli_state *cli); Detect different kinds of errors: BOOL cli_is_dos_error(struct cli_state *cli); BOOL cli_is_nt_error(struct cli_state *cli); BOOL cli_is_error(struct cli_state *cli); This also means we now support CAP_STATUS32 as we can decode and understand NT errors instead of just DOS errors. Yay! Ported a whole bunch of files in libsmb to use this new API instead of the just the DOS error.
* The big character set handling changeover!Andrew Tridgell2001-07-041-1/+1
| | | | | | | This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation.
* simpler clistr interface which handles individual packets havingAndrew Tridgell2001-03-141-6/+2
| | | | unicode bit set differently to capabilities
* to use the same macros in the client and server rename the CLISTR_Andrew Tridgell2001-03-101-2/+2
| | | | macros to STR_
* - neater setting of bccAndrew Tridgell2001-02-201-8/+4
| | | | - converted cli_rename and cli_unlink
* pipe opening now works with unicodeAndrew Tridgell2001-02-201-3/+10
|
* Fixed memory leaks in lsa_XX calls. Fixed memory leaks in smbcacls. MergedJeremy Allison2000-12-151-1/+6
| | | | | | in fixes from appliance-head and 2.2. Fixed multiple connection.tdb open problem. Jeremy.
* - added client support for nttrans callsAndrew Tridgell2000-12-031-0/+200
| | | | - added a cli_ function for querying a security descriptor on a remote file
* split clientgen.c into several partsAndrew Tridgell2000-04-251-0/+233
the next step is splitting out the auth code, to make adding lukes NTLMSSP support easier