1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-20 14:03:59 +03:00

16 Commits

Author SHA1 Message Date
Jeremy Allison
5b04b5f1df Correctly increment offset in cli_smbwrite.
Jeremy.
-
Jeremy Allison
24ef6258a1 Test against W2K that we're doing large read/writes correctly (we are).
At least with 14 word writes.
Jeremy.
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Jeremy Allison
01ff6ce496 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
-
Andrew Tridgell
55d5828e60 use cli_is_error() instead of looking in smb_rcls, otherwise NT status
codes don't work correctly
-
Andrew Tridgell
1b778bc7d2 started converting NTSTATUS to be a structure on systems with gcc in order to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs -
Jeremy Allison
fe85a19b4b Re-added readbraw call to test with smbtorture. This code not yet
tested...
Jeremy.
-
Tim Potter
6dbdb0d813 A rewrite of the error handling in the libsmb client code. I've separated
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.
-
Andrew Tridgell
ba79d2a030 cli_read() was reading too many bytes. -
Jeremy Allison
2999eab5ab Use a logical cli_read(), removed the cli_read_one() hack.
Jeremy.
-
Tim Potter
9e074bc2bf Merged cli_read_one() function for reading DCE/RPC reply fragments. -
Andrew Tridgell
bbfbe03cc6 added some comments to make the cli read code clearer -
Andrew Tridgell
674ee2f1d1 next_token() was supposed to be a reentrant replacement for strtok(),
but the code suffered from bitrot and is not now reentrant. That means
we can get bizarre behaviour
i've fixed this by making next_token() reentrant and creating a
next_token_nr() that is a small non-reentrant wrapper for those lumps
of code (mostly smbclient) that have come to rely on the non-reentrant
behaviour
-
Jeremy Allison
6d65556ae8 Set correct reply word in large writeX (greater than 64k) replies.
Also added smbtorture test for this.
Jeremy.
-
Jeremy Allison
c55bcec817 Tidyup removing many of the 0xC0000000 | NT_STATUS_XXX stuff (only need NT_STATUS_XXX).
Removed IS_BITS_xxx macros as they were just reproducing "C" syntax in a more
obscure way.
Jeremy.
-
Andrew Tridgell
10c5470835 split clientgen.c into several parts
the next step is splitting out the auth code, to make adding lukes
NTLMSSP support easier
-