1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-02 08:58:33 +03:00

558 Commits

Author SHA1 Message Date
Andrew Tridgell
9bae57cfe3 fixed some compilation errors in cli_netlogon.c - tim, you need to rerun configure to get the new NTSTATUS stuff right -
Andrew Tridgell
c04c67fec8 more warning fixes on solaris -
Tim Potter
4ca085f253 Merged cli_net_req_chal() and cli_net_auth2() from rpc_client/cli_login.c
except they are called new_cli_net_req_chal() and new_cli_net_auth2()
until they are working properly.
-
Andrew Tridgell
5bb7e4f0f6 it now all compiles - so try enabling it by default and see what explodes on the build farm -
Andrew Tridgell
dcd6e735f7 the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work -
Andrew Tridgell
ad648c5cd8 more NTSTATUS/WERROR conversion -
Andrew Tridgell
24f9ab683d the next step in our error code handling change
- added WERROR for win32 error codes
- added a configure test for immediate structures

still lots to do, so its not enabled by default, but the main
structure is there
-
Andrew Tridgell
8e70666fcc use a name not a number for ERRinsufficientbuffer -
Christopher R. Hertel
3af2de7ed2 Fuss, fuss, fuss...
Function name_status_query() performs a node status query, so it really
should be called "node_status_query()" just to be consistent.

Yeah, minor... but it's looking as though an overhaul of namequery.c is in
order and I am trying to do the tiny changes that impact other stuff first.

Chris -)-----
-
Tim Potter
7a68236c42 Should be dbgtext, not dbg_text. -
Christopher R. Hertel
29c6efc956 Patched to ensure that it won't break HEAD.
This isn't the final version, of course, I still need to get WINS failover
working.  This is just patched so it won't need lp_wins_server() (which I
renamed to lp_wins_server_list()).

I can't compile just now as something else is broken in HEAD.  Let me know
if this version of namequery.c causes trouble down the line.  Shouldn't,
as the changes are very small, but I've been known to rock the boat
before.

Chris -)-----
-
Tim Potter
3a60cb44f2 Merge of sam sync code from TNG.
Reverse-engineered the sam replication protocol from staring at hex dumps
for a while.  It's pretty similar to the sam sync protocol with a couple of
different delta header types.

I wasn't able to figure out the format of the privilege stuff - needs more
time and a whiteboard.  (-:

The impressive bit is that the sam sync stuff from tng basically just
worked thanks mainly to Luke Leighton's efforts in this area.
-
Andrew Tridgell
2d1829dfd0 fixed typo -
Tim Potter
9e69f59d6c Convert to NTSTATUS. -
Andrew Tridgell
1d36250e33 converted another bunch of stuff to NTSTATUS -
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
-
Herb Lewis
0768991d04 get rid of compiler warnings -
Jeremy Allison
fe85a19b4b Re-added readbraw call to test with smbtorture. This code not yet
tested...
Jeremy.
-
Andrew Tridgell
22b372f8a7 fixed handling of 139/445 in clients -
Tim Potter
946f6eb932 Fixed debug in cli_establish_connection() - print out the called name on
connection failure rather than the calling name.
-
Tim Potter
b4e79ab34b Make domain_client_validate return a status code instead of a boolean. -
Andrew Tridgell
ae669720d8 fixed shortname length in trans2 list -
Andrew Tridgell
759ca19f32 use 32 bit locking if client doesn't do 64 bit -
Andrew Tridgell
a896dc299e better error reporting for servers that don't do port 445 -
Andrew Tridgell
0c3120ae47 added port 445 support to our client code -
Andrew Tridgell
5a3fd3317e a fix for directory listing with the dave/thursby client -
Andrew Tridgell
fe414d5e1a string terminate in mkdir -
Tim Potter
afaafc3e5a Added cli_lsa_open_policy2() -
Tim Potter
02fe0e18df Distinguish between NT informational and error codes. -
Andrew Tridgell
b6c78d4c6f allow for the NULL in make_nmb_name() -
Andrew Tridgell
3eba9606f7 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
-
Jeremy Allison
9cabc3fd63 Realloc fix.
Jeremy.
-
Jeremy Allison
31804cb7a8 Use tparam not tdata when reallocing params to make clearer.
Jeremy.
-
Jean-François Micouleau
5e9a36bd9c more useful debug messages and check if the size are non null.
that fix the notification backend channel for spoolss.

	J.F.
-
Tim Potter
a7863f0f03 Fixed crash bug when attempting to list contents of non-existent
directory.
-
Simo Sorce
fa8e55b8b4 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.
-
Andrew Bartlett
ea1c547ac8 This patch does a number of things, mostly smaller than they look :-)
In particuar, it moves the domain_client_validate stuff out of
auth_domain.c to somwhere where they (I hope) they can be shared
with winbind better.  (This may need some work)

The main purpose of this patch was however to improve some of the
internal documentation and to correctly place become_root()/unbecome_root()
calls within the code.

Finally this patch moves some more of auth.c into other files, auth_unix.c
in this case.

Andrew Bartlett
-
Simo Sorce
fd54412ce9 - avoid possible mem leaks in rpcclient/cmd_*.c (talloc_destroy not performed)
- ported two rpc back from TNG (WINREG: shutdown and abort shutdown)
- some optimizations and changed some DEBUG statement in loadparm.c
- changed rpcclient a bit moved from non reentrant next_token_nr to next_token
- in cmd_reg.c not sure if getopt will work ok on all platforms only setting optind=0
-
Tim Potter
e98f948123 Debug cleanups. -
Tim Potter
e9ceb17d77 Had the test for cli_is_error() reversed. You idiot Stimpy! -
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.
-
Tim Potter
fb60798a77 Changed the order of arguments in make_oem_passwd_hash(). All the other
encryption functions have outputs as the last arguments.
-
Tim Potter
04d978258b Factored out common rpc pipe initialisation and shutdown code. -
Tim Potter
4c9f010a1e Fixed another possible memleak in cli_initialise() -
Tim Potter
b5373f4b59 Cleaned up error handling in cli_initialise() to fix a memleak found by
Claudia Moroder <claudiamoroder@st-ulrich.suedtirol.net>
-
Tim Potter
99ce277fc8 Changed lone malloc() call to talloc(). Spotted by
Claudia Moroder <claudiamoroder@st-ulrich.suedtirol.net>
-
Jeremy Allison
840802f106 Added "use mmap" for HPUX.
Jeremy.
-
Jeremy Allison
e3580b4033 Throw out crappy (non-ascii unaware) mbtows stuff and use proper unicode
push calls. If this breaks authentication then good, it needed fixing anyway :-).
Jeremy.
-