1
0
mirror of https://github.com/samba-team/samba.git synced 2025-06-17 15:17:09 +03:00

56 Commits

Author SHA1 Message Date
Jeremy Allison
b34da62705 Fix from Guenter Kukkukk <linux@kukkukk.com> to fix listing against
OS/2 servers. OS/2 returns eclass == ERRDOS && ecode == ERRnofiles
for a zero entry directory listing.
Jeremy.
2008-02-28 02:22:13 -08:00
Jeremy Allison
ba9e2be2b5 Remove the explicit TALLOC_CTX * from cli_struct.
Make us very explicit about how long a talloc ctx
should last.
Jeremy.
2007-11-29 13:24:54 -08:00
Volker Lendecke
41e07682dc In libsmbclient, map NT_STATUS_OBJECT_PATH_NOT_FOUND to ENOENT
Thanks to SATOH Fumiyasu!

This fixes bug 4974
2007-11-25 12:54:52 +01:00
Volker Lendecke
c3a66b4ee9 Some pstring removal
Hi!

Feel free to push :-)

Volker

From 7fae6b3709a973bd0a5a13d3f5c880c61d5e35de Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl@sernet.de>
Date: Sun, 11 Nov 2007 15:28:59 +0100
Subject: [PATCH] Remove some static pstrings
2007-11-11 21:34:40 -08:00
Jeremy Allison
d50d14c300 Remove the smb_read_error global variable and replace
it with accessor functions. "One global or pstring a day...." :-).
Jeremy.
2007-11-03 15:12:42 -07:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Gerald (Jerry) Carter
5c6c8e1fe9 [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. 2007-10-10 15:34:30 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Simo Sorce
b35038fa4e r23723: Alexander Larsson pointed me at a missing mapping in clierror.c
When renaming a file across 2 filesystem a samba server returns
NT_STATUS_NOT_SAME_DEVICE but thius is not translated to EXDEV,
and the generic EINVAL is returned instead.
This should fix it, Jeremy or Derrel please check if this is ok.
2007-10-10 12:23:48 -05:00
Derrell Lipman
cc0cd3a12f r22732: - Testing of libsmbclient against Vista revealed what is likely a bug in
Vista.  Vista provides a plethora of kludges to simulate older versions of
  Windows.  The kludges are in the form of shortcuts (or more likely symbolic
  links, but I don't know enough about Vista to determine that definitively)
  and in most cases, attempts to access them get back an "access denied"
  error.  On one particular folder, however, "<share>/Users/All Users", it
  returns an unknown (to ethereal and the Samba3 code) NT status code:
  0x8000002d.  Although this code does not have a high byte of 0xc0 indicating
  that it is an error, it appears to be an alternate form of "access denied".

  Without this patch, libsmbclient times out on an attempt to enumerate that
  folder rather than returning an error to the caller.  This patch corrects
  that problem.
2007-10-10 12:21:52 -05:00
Jeremy Allison
5bfe638f21 r21865: Add in the stubs for SMB transport encryption. Will flesh
these out as I implement. Don't add to SAMBA_3_0_25, this
is experimental code.
NFSv4 you're now officially on notice... :-).
Jeremy.
2007-10-10 12:18:40 -05:00
Jeremy Allison
b81c5c6adc r21576: Patch based on work from Todd Stecher <todd.stecher@isilon.com>
to allow client to fragment large SPNEGO blobs (large krb5
tickets). Tested against W2K3R2. Should fix bug #4400.
Jeremy.
2007-10-10 12:18:14 -05:00
Andrew Tridgell
8438a6a7d4 r18865: fixed some of the most obvious NTSTATUS/WERROR mixups in Samba3. It
still doesn't compile with immediate structures and the
NTSTATUS/WERROR separation, as there are still several places where
the two error types are mixed up. I haven't fixed those as they
require decisions about the rpcclient code that I really don't want to
get into (the error handling there is a mess)

So samba3 compiles now, but only becaise HAVE_IMMEDIATE_STRUCTURES is
not used (look for HAVE_IMMEDIATE_STRUCTURES_XX_DISABLED)
2007-10-10 12:01:06 -05:00
Andrew Tridgell
c8670b33b4 r18858: arrgh! - since HAVE_IMMEDIATE_STRUCTURES were last enabled the code
can no longer handle it (at least with gcc 4.1.2). Disable it until
investigated and fixed properly.
2007-10-10 12:01:06 -05:00
Jeremy Allison
b7fc023e90 r17863: Fix unneeded NULL check on pointer parameters causing the
Stanford checker to flag null deref.
Jeremy.
2007-10-10 11:38:54 -05:00
Jeremy Allison
3de0d9af69 r13669: Get rid of poor errno mapping table. Bounce through NTSTATUS instead.
DO NOT MERGE FOR 3.0.21c PLEASE.
Jeremy.
2007-10-10 11:10:22 -05:00
Jeremy Allison
e81227d044 r13664: Fix the cli_error codes to always detect a socket error.
This code needs a tidyup and common code with libsmb/errormap.c
merging. Should fix the winbindd crash Jerry found (I hope).
Jeremy.
2007-10-10 11:10:22 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Tim Potter
985dbb47d9 r8572: Remove crufty #define NO_SYSLOG as it's not used at all anymore. 2007-10-10 11:00:11 -05:00
Jeremy Allison
9506b8e145 r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
2007-10-10 10:58:00 -05:00
Jelmer Vernooij
31c21d520d r547: Add entry for NT_STATUS_DUPLICATE_NAME in the ntstatus to unix error mapping
table
2007-10-10 10:51:28 -05:00
Jeremy Allison
b8f6b83646 Eliminate valgrind error when client gets bad sig on list. Some reformatting.
Jeremy.
-
Tim Potter
2750418752 Spelling. -
Andrew Bartlett
c6c4f69b8d Merge SMB signing, cli buffer clobber and NTLMSSP signing tweaks from HEAD. -
Jelmer Vernooij
62dac3d6eb Add some more NT to unix error code mappings (from HEAD) -
Andrew Bartlett
3a7458f947 Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
-
Jeremy Allison
d8d351eb01 Cope with rw errors and timeout to peer.
Jeremy.
-
Jeremy Allison
28d2eb9343 Added error string for server timeout on client call.
Jeremy.
-
Gerald Carter
65e7b5273b sync'ing up for 3.0alpha20 release -
Tim Potter
1f007d3ed4 Renamed get_nt_error_msg() to nt_errstr(). -
Gerald Carter
50fa21c995 merge from 2.2 -
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Martin Pool
935955b50f Add more string explanations of RAP errors that are already documented
in clirap2.
-
Jeremy Allison
919b11a787 Treat RAP codes differently.
Jeremy.
-
Jeremy Allison
3c68b94199 RAP error strings take precedence as they are not encoded in the SMB header
(ie. the call can succeed, but still be an encoded error).
Jeremy.
-
Andrew Bartlett
6a919bcf3d Fix --enable-developer shadow warning -
Andrew Bartlett
cb84485a2b This patch applied, except without the structure changes to nmblib.c
Andrew Bartlett.

From kai@cmail.ru Mon Oct 29 18:50:42 2001
Date: Fri, 19 Oct 2001 17:26:06 +0300
From: Andrew V. Samoilov <kai@cmail.ru>
To: samba-technical@lists.samba.org
Subject: [patch]: makes some arrays const to be shared between processes

Hi!

This patch makes some arrays const. So these arrays go to text/rodata
segment and are shared between all of the processes which use shared
library with these arrays.

Regards,
Andrew V. Samoilov.

P.S. Please cc your answer to kai@cmail.ru,
I don't subscribed to this list.


ChangeLog:
	* cliconnect.c (prots): Make const.
	* clierror.c (rap_errmap): Likewise.
	* nmblib.c (nmb_header_opcode_names): Likewise.
	(lookup_opcode_name): Make opcode_namep const. Eliminate i.
	* nterr.c (nt_err_code_struct): Typedef const.
	* smberr.c (err_code_struct): Make const.
	(err_classes): Likewise.
-
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
Andrew Tridgell
55d5828e60 use cli_is_error() instead of looking in smb_rcls, otherwise NT status
codes don't work correctly
-
Andrew Tridgell
2d1829dfd0 fixed typo -
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 -
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
02fe0e18df Distinguish between NT informational and error codes. -
Tim Potter
e98f948123 Debug cleanups. -
Tim Potter
e9ceb17d77 Had the test for cli_is_error() reversed. You idiot Stimpy! -
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
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.
-
Tim Potter
66e62245ea Added a unix error code for NT_STATUS_PATH_NOT_COVERED. -
Richard Sharpe
bca6b7dd20 Add an extra error code translation to clierror.c so that libsmbclient
gets some more error codes correct ...
-