1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-26 04:23:49 +03:00
Commit Graph

157 Commits

Author SHA1 Message Date
Richard Sharpe
57c860b41b Add some castiness for Don McCall. -
Andrew Bartlett
6bf04c41ed Merge fixes to libsmbclient (fstring/pstring) from HEAD.
Andrew Bartlett
-
Richard Sharpe
fd847aa936 Now that I am running config.developer, I decided to get rif of some warnings:
1. reboot in parse_reg and cli_reg was shadowing a definition on FreeBSD
   4.3 from system includes.

2. Added a bit of const to places.

3. Made sure internal functions were declared where needed.
-
Andrew Bartlett
111b0405cf Merge from HEAD
- make configure check for the location of Heimdal KRB5 on suse systems
	- fix libsmbclient for new global_myname()
-
Jelmer Vernooij
a7a54fc2c8 Include ../include/libsmbclient.h instead of just libsmbclient.h - we don't want to include the globally installed libsmbclient.h - found by jht -
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
Tim Potter
1f007d3ed4 Renamed get_nt_error_msg() to nt_errstr(). -
Tim Potter
a3cea5e9ae getpid() -> sys_getpid() -
Jeremy Allison
330b0df960 bcopy must DIE ! Stop people creeping use of bcopy back into the code
(and yes I know who you are..... :-).
Jeremy.
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Tim Potter
7c2d720593 Removed unused static variable. -
Richard Sharpe
6e2c06a6e6 Fix another memory leak spotted by Tom Jansen. -
Tim Potter
778f5f77a6 Got medieval on another pointless extern. Removed extern struct ipzero
and replaced with two functions:

	void zero_ip(struct in_adder *ip);
	BOOL is_zero_ip(struct in_addr ip);
-
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
-