1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

26 Commits

Author SHA1 Message Date
Andrew Tridgell
d53d5beeb2 use cli_is_error() instead of looking in smb_rcls, otherwise NT status
codes don't work correctly
(This used to be commit 55d5828e60)
2001-09-05 11:32:59 +00:00
Andrew Tridgell
a350db7c7c fixed shortname length in trans2 list
(This used to be commit ae669720d8)
2001-08-24 04:53:39 +00:00
Andrew Tridgell
8d9cdf0d74 a fix for directory listing with the dave/thursby client
(This used to be commit 5a3fd3317e)
2001-08-22 02:47:38 +00:00
Andrew Tridgell
11ce0f4d2d a bunch of fixes from the sflight to seattle
in particular:
 - fixed NT status code for a bunch of ops
 - fixed handling of protocol levels in ms_fnmatch
(This used to be commit 3eba9606f7)
2001-08-20 05:15:26 +00:00
Tim Potter
4da562d4dc Fixed crash bug when attempting to list contents of non-existent
directory.
(This used to be commit a7863f0f03)
2001-08-12 23:53:26 +00:00
Simo Sorce
2e783a4707 this is a big global fix for the ptr = Realloc(ptr, size) bug.
many possible mem leaks, and segfaults fixed.

someone should port this fix to 2.2 also.
(This used to be commit fa8e55b8b4)
2001-08-12 17:30:01 +00:00
Tim Potter
2ccfea3de7 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.
(This used to be commit 6dbdb0d813)
2001-08-10 06:00:33 +00:00
Andrew Tridgell
74e9921628 fixed some unicode and LANMAN2 bugs in trans2 find first
(This used to be commit dc99b9ddf8)
2001-07-07 21:23:32 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
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.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Andrew Tridgell
871a429404 added STR_ASCII support to clistr_pull()
(This used to be commit 797293811e)
2001-03-16 03:25:13 +00:00
Andrew Tridgell
9ea70bd003 simpler clistr interface which handles individual packets having
unicode bit set differently to capabilities
(This used to be commit 34a0821e08)
2001-03-14 12:42:43 +00:00
Andrew Tridgell
45c2ee3ff2 to use the same macros in the client and server rename the CLISTR_
macros to STR_
(This used to be commit 95c9e4e0ba)
2001-03-10 11:35:25 +00:00
Andrew Tridgell
0d54de536c made some LANMAN1 wildcard progress
it now handles -M LANMAN1 -f '.x' -m '?x' nicely
(This used to be commit e7ccb9be6d)
2001-02-26 06:53:42 +00:00
Andrew Tridgell
f9405ab8f9 add cli_list_new() for forced new protocol listing
(This used to be commit a5407366b7)
2001-02-26 05:10:44 +00:00
Andrew Tridgell
96e791eb11 use cli_list_old() when negotiating the older protocols
(This used to be commit 735f29319b)
2001-02-25 23:46:28 +00:00
Andrew Tridgell
a8ab984078 the unicode conversion of our client code is complete enough to be
enabled by default

you can disable it by setting the environment variable CLI_FORCE_ASCII
(This used to be commit 4d59c08c5e)
2001-02-21 03:40:20 +00:00
Andrew Tridgell
f76015333a yipee! client unicode now works well with nt
(This used to be commit 5b2ef8a1b9)
2001-02-20 23:52:27 +00:00
Andrew Tridgell
c7c3db2f16 converted cli_list()
(This used to be commit bdce09b778)
2001-02-20 12:22:30 +00:00
Andrew Tridgell
c565c98723 pipe opening now works with unicode
(This used to be commit ba3ce3404e)
2001-02-20 10:11:40 +00:00
Richard Sharpe
dca808cbc4 Needed a callback arg on cli_list ...
(This used to be commit d45e667a74)
2001-01-05 13:11:29 +00:00
Jeremy Allison
612738a9e1 lib/util_unistr.c:
libsmb/clilist.c:
rpc_server/srv_spoolss_nt.c:
smbd/trans2.c: Changed unistr_to_ascii to unistr_to_dos - do codepage conversion.
msdfs/msdfs.c: Removed stub unistr_to_dos.
libsmb/pwd_cache.c: Removed obfuscation functions as they don't do anything and
					don't add any security.
Jeremy.
(This used to be commit 1ed146467e)
2000-05-10 22:47:09 +00:00
Andrew Tridgell
2fb2ae187d fixed parsing of broken NT short name
(This used to be commit 9e4b352945)
2000-04-30 14:58:13 +00:00
Andrew Tridgell
eaabef5098 - get the findclose code right
- handle broken NT response to trans2 findfirst
(This used to be commit 64f91a7a98)
2000-04-30 14:26:59 +00:00
Andrew Tridgell
23c0cb01ca added cli_list_old() to allow for old style directory listing from
masktest
(This used to be commit 8a5c8cfa0e)
2000-04-30 12:34:26 +00:00
Andrew Tridgell
71e7974f3f YIPEE!!!!!
We finally have a perfect emulation of Microsoft wildcard
matching. The routine ms_fnmatch() does wildcard matching with all MS
wildcards (including the unicode wildcards), and masktest against a
NT4 workstation with hundreds of thousands of random exmaples has not
found a single error.

amazingly it is only about 60 lines of code, but it has taken us years
to get it right. I didn't sleep much last night :)
(This used to be commit cc9e007cdf)
2000-04-30 04:45:16 +00:00
Andrew Tridgell
858e63cab3 split clientgen.c into several parts
the next step is splitting out the auth code, to make adding lukes
NTLMSSP support easier
(This used to be commit 10c5470835)
2000-04-25 14:04:06 +00:00