1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-21 12:23:50 +03:00
Commit Graph

193 Commits

Author SHA1 Message Date
Jeremy Allison
54c968913d W2K doesn't seem to respond to *#0 names in node status. Ensure name
lookup uses password server parameter when looking for PDCs.
Jeremy.
-
Andrew Bartlett
a34c07377b Fix up the build again...
Andrew Bartlett
-
Richard Sharpe
7ac404c853 Fix up libsmbclient in head.
Apply the patches from Tom Jansen, get rid of fprintfs and change them to
DEBUGs, etc ...
-
Richard Sharpe
ac2562a0fb Fix problems with lp_workgroup() being passed to routines that will modify
it and fix smb://<IP-addr>.
-
Jeremy Allison
070fd5180f Fix for @ in pathname from Kian Win.
Jeremy.
-
Simo Sorce
48fc6a6cd5 move to SAFE_FREE() -
Andrew Tridgell
5bb7e4f0f6 it now all compiles - so try enabling it by default and see what explodes on the build farm -
Andrew Tridgell
1d36250e33 converted another bunch of stuff to NTSTATUS -
Andrew Tridgell
83d9896c1e converted smbd to use NTSTATUS by default
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
-
Tim Potter
9c57e45d44 Fixes for new client error api. -
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
c41fc06376 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn. -
Andrew Tridgell
debb471267 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.
-
Richard Sharpe
8a873b5dfb Fix a stupid typo ... -
Richard Sharpe
832227a72b Fix up the problems with calling smbc_init multiple times. -
Richard Sharpe
0bf2797b18 Change EUCLEAN to EINVAL, as some systems do not have EUCLEAN, and EINVAL
is a better return code anyway (I knew that :-)
-
Richard Sharpe
4fc385ca68 More memory leaks fixed courtesy of Insure ... -
Richard Sharpe
f204901fcc One small Insure fix for a memory leak. More fixes to come perhaps ...
Also fixed an error return for smbc_rmdir so that we can distinguish
between EACCES and ENOTEMPTY
-
Richard Sharpe
26d7d8af29 More SGI type fixes ... -
Richard Sharpe
e628d80d1e Fix the definition and implementation of smbc_lseekdir ... -
Richard Sharpe
317e369c3e Implement smbc_lseekdir, but it will have to change ... because it has the
wrong interface defn.
-
Richard Sharpe
7557f9145c smb.h: add one error code for no such printer job
libsmbclient.c: fix problems with return codes on smbc_unlink_print_job
-
Richard Sharpe
5f1ea70e11 Fix two problems identified by the test suite, one a major one
where I was indexing through a NULL pointer :-(
-
Richard Sharpe
44986f397a Fix some errors uncovered in libsmbclient by the test suite
Fix some problems with unused variables and reaching the end of a
  nonvoid function
-
Andrew Tridgell
4d59c08c5e 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
-
Richard Sharpe
debb723194 Opps, last one did not commit the correct changes ... Here they are.
This now uses a lookup on <DOMAIN><1D> and then does a name status query to
the IP address returned to find the name of the server. Seems to work well
against Samba, Win9X, WinNT and Win2K.
-
Richard Sharpe
620cc34015 Fixes to libsmbclient so it will work when browsing real Windows systems which
only respond to port 138 when dealing with NetBIOS datagrams.

We use the unexpected packed database.
-
Richard Sharpe
3c66114346 Added commented/documented version of libsmbclient.h and fixed up a small
problem in libsmbclient.c where we no longer pass the workgroup.
-
Richard Sharpe
7c50af3b71 Fix problems in libsmbclient with pring job struct plus add implementation
of last two print routines ...
-
Richard Sharpe
c19559a286 Implement two printing related functions and start the remaining two. -
Richard Sharpe
838cfad404 Fix some further small bugs in libsmbclient to make it pass the
Caldera test suite and start to add the printing routines.
-
Richard Sharpe
4ae7812353 Fix some bugs and prepare for some other bug fixes ... -
Richard Sharpe
68614bac5a Fix a problem with smbc_unlink on directories where it was returning EACCES
instead of EPERM and a problem with SMBC_OPEN where it ignored an error
from the underlying cli_open routine and cheerfully returned a bogus FD.
-
Richard Sharpe
5629b097d4 Fixed bugs relating to Win2K and the need for a codepage so that unicode
strings can be handled correctly.
-
Richard Sharpe
66bb40153a Some more bug fixes plus implementations of smbc_mkdir and smbc_rmdir,
both tested ...

More later.
-
Richard Sharpe
7f559c1a73 Many bug fixes to the libsmbclient.c code plus
- an implementation of smbc_readdir
  - extensions to tree.c to show files in a second window
  - changes to auth_fn to provide buffers for username, password, etc
    from caller rather than callee
-
Richard Sharpe
cc5a2db8a0 Add support for logging to wherever smb.conf specifies. -
Richard Sharpe
a13b5ef7bb More bug fixen ... -
Richard Sharpe
991f6907ac More fixes and implementation bits and pieces for libsmbclient -
Richard Sharpe
d6cef8877a Fix some more bugs in libsmbclient.c and add functionality to tree.c -
Richard Sharpe
606c4aecea Fix a minor problem with listing servers in a workgroup and add a
gtk+ test application that tests out some of this stuff ...
-
Richard Sharpe
38ff91c505 The latest changes to libsmbclient ...
It can now do a directory listing for workgroups, servers, and shares, and,
with a bit more effort, it will be able to list directories and files.

I also does not request a username and password for the IPC$ share, but it
should if the first attempt to connect fails.
-
Richard Sharpe
51c0436a50 First pass at the libsmbclient code ...
This code handles the basic stuff and compiles and links under Linux, but
I do not know about any other operating systems. Now onto directory
listing routines, including those that list workgroups, servers, etc.

Nothing is built automatically yet, you have to make client/testsmbc to build
the library and test program. Also, no make install targets are defined for
libsmbclient.so as yet, either.

Would be good if people test on operating systems other than Linux.
-