1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

40 Commits

Author SHA1 Message Date
Jeremy Allison
2443f7ffa2 Correct fix (removed the earlier band-aid) for what I thought was a signing
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.
(This used to be commit 2093a3130d4087d0659b497eebd580e7a66e5aa3)
2003-08-02 00:29:45 +00:00
Jeremy Allison
9c49c46948 Fix bug we discovered in W2K client signing on secondary trans2 packets.
Use W2K parameters. tpot please re-test smbclient with your problem
directory.
Jeremy.
(This used to be commit 677d3a3c4ca0b67148e5e56fa876773a067679bd)
2003-07-30 19:00:52 +00:00
Jeremy Allison
5ab2b1e921 Eliminate valgrind error when client gets bad sig on list. Some reformatting.
Jeremy.
(This used to be commit b8f6b836468b3a0ae75977dc65cae8400f74734c)
2003-07-30 18:57:37 +00:00
Andrew Bartlett
d5ee9b2f48 Jeremy merged across my string parinoia fixes, but forgot to enable them! :-)
This patch catches up on the rest of the work - as much string checking
as is possible is done at compile time, and the rest at runtime.

Lots of code converted to pstrcpy() etc, and other code reworked to correctly
call sizeof().

Andrew Bartlett
(This used to be commit c5b604e2ee67d74241ae2fa07ae904647d35a2be)
2003-03-18 11:22:52 +00:00
Jeremy Allison
dbe2858b86 Change size parameters from signed to unsigned to fix up warnings.
Jeremy.
(This used to be commit 33b11d5eb53bdeb9d279d221fd5c01579253e1c7)
2003-03-13 00:51:05 +00:00
Gerald Carter
99cdb46208 *lots of small merges form HEAD
*sync up configure.in
*don't build torture tools in make all
*make sure to remove torture tools as part of make clean
(This used to be commit 0fb724b3216eeeb97e61ff12755ca3a31bcad6ef)
2003-01-15 18:57:41 +00:00
Gerald Carter
4242eda183 merging some rpcclient and net functionality from HEAD
(This used to be commit 7a4c87484237308cb3ad0d671687da7e0f6e733b)
2003-01-15 17:22:48 +00:00
Jeremy Allison
3fc4d88d99 Fix client reporting of 64 bit files.
Jeremy.
(This used to be commit 8dcbfa4e770d74d4ce6faaf1a0597d07d0a5cc81)
2002-12-10 23:44:33 +00:00
Herb Lewis
e217ba0a70 use the new IVAL_TO_SMB_OFF_T for file_info size member
dir now shows correct size on large files
(This used to be commit 172dccf55e972d4cc40b7e34ce433d49e738fba0)
2002-12-03 20:02:18 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
2002-09-25 15:19:00 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce)
2002-07-15 10:35:28 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa)
2002-01-30 06:08:46 +00:00
Jeremy Allison
d6823366b8 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
(This used to be commit 01ff6ce4963e1daff019f2b936cef218e1c93f67)
2002-01-11 19:10:25 +00:00
Simo Sorce
bcbd75f7ad move to SAFE_FREE()
(This used to be commit 48fc6a6cd52e01b287030fbbf0aa08a6814c5e11)
2001-09-17 03:33:37 +00:00
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 55d5828e608671f070a9e96938be0d16d50aeb26)
2001-09-05 11:32:59 +00:00
Andrew Tridgell
a350db7c7c fixed shortname length in trans2 list
(This used to be commit ae669720d8f434a23397deaea3371998ab6f1f54)
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 5a3fd3317e0fedd72450660f031b5ba42a11b875)
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 3eba9606f71f90bfd9820af26f8676277ed22390)
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 a7863f0f033b31838a53960e9f616d9a82081ecf)
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 fa8e55b8b465114ce209344965c1ca0333b84db9)
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 6dbdb0d813f3c7ab20b38baa1223b0b479aadec9)
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 dc99b9ddf847c210c72921ba1dedcdc34fd32aab)
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 debb471267960e56005a741817ebd227ecfc512a)
2001-07-04 07:15:53 +00:00
Andrew Tridgell
871a429404 added STR_ASCII support to clistr_pull()
(This used to be commit 797293811ef0a79eecc460c471135c89090f8c06)
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 34a0821e087810381996f5ff6cf3b4d7b9bb53a0)
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 95c9e4e0ba8f37f565aaf136f41eb76489441ff7)
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 e7ccb9be6da9b1426eb136b4a0a1171232471768)
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 a5407366b77f2bec2c21e1f36dd007813d33f75e)
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 735f29319b8d81df203c8ddbcea5349b11f2195d)
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 4d59c08c5e6f54c0d6ced7650750cb987e77b6c9)
2001-02-21 03:40:20 +00:00
Andrew Tridgell
f76015333a yipee! client unicode now works well with nt
(This used to be commit 5b2ef8a1b914265c6072c968d2dad7d26c2aeffc)
2001-02-20 23:52:27 +00:00
Andrew Tridgell
c7c3db2f16 converted cli_list()
(This used to be commit bdce09b77807c80281c1e169b7c4813c9238fbe3)
2001-02-20 12:22:30 +00:00
Andrew Tridgell
c565c98723 pipe opening now works with unicode
(This used to be commit ba3ce3404e1cd2e9da3ba1708f6fc8a12c085ef2)
2001-02-20 10:11:40 +00:00
Richard Sharpe
dca808cbc4 Needed a callback arg on cli_list ...
(This used to be commit d45e667a74fc2fcbf69c4819d480269c03dbfae4)
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 1ed146467e764e6a81d8f78cd58fb5765ebf5d21)
2000-05-10 22:47:09 +00:00
Andrew Tridgell
2fb2ae187d fixed parsing of broken NT short name
(This used to be commit 9e4b3529455840f11940136dd55c641d89b46961)
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 64f91a7a98fe9aaf176e665677e751e4e03d4c3d)
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 8a5c8cfa0ede1d119bf9013e321a497beefd4dda)
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 cc9e007cdfdd300189f89e2a55e4234e47fa842d)
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 10c5470835b43116ed48b3137c3b9cc867a20989)
2000-04-25 14:04:06 +00:00