1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

5952 Commits

Author SHA1 Message Date
Tim Potter
62f7f6a022 Use the new client error api.
(This used to be commit 688da3c41d)
2001-08-10 06:01:11 +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 6dbdb0d813)
2001-08-10 06:00:33 +00:00
Tim Potter
4bbd1ddb27 More constant conversions.
(This used to be commit 00703d306f)
2001-08-10 05:50:47 +00:00
Tim Potter
af0af3d42a Removed nt_error field from cli_state as it was not used anywhere.
(This used to be commit 589aaa5fb1)
2001-08-10 05:50:20 +00:00
Tim Potter
047a7c88d7 Replaced the duplicate DOS constants with appropriate ones from doserr.h to
emphasise the fact that the spoolss pipe returns DOS error codes instead of
32-bit nt status codes.
(This used to be commit 5f5ed41ee8)
2001-08-10 05:41:53 +00:00
Tim Potter
7d9358cf58 Moved dos error codes from smb.h into new file doserr.h
(This used to be commit 1bd8b6f797)
2001-08-10 05:37:52 +00:00
Tim Potter
c4495240f6 Changed the order of arguments in make_oem_passwd_hash(). All the other
encryption functions have outputs as the last arguments.
(This used to be commit fb60798a77)
2001-08-10 04:59:05 +00:00
Gerald Carter
de5f42c9d9 merge from 2.2
(This used to be commit 6ab0e949d1)
2001-08-10 04:27:26 +00:00
Jeremy Allison
fc0fe941d8 Fixed typo in patch.
Jeremy.
(This used to be commit 36e01dcdbd)
2001-08-10 03:17:58 +00:00
Jeremy Allison
c604830585 Fixed wrong placement of allocate code :-(.
Changed alignment offset to 1 to allow netmon to parse ok.
Jeremy.
(This used to be commit fd89261a2c)
2001-08-09 20:01:35 +00:00
Jeremy Allison
4f181227e5 Added fix from Dan Thibadeau @ HP for parsing problem.
Jeremy.
(This used to be commit 635f3a3ee2)
2001-08-09 19:36:12 +00:00
Jeremy Allison
541f2b73bc Fix inspired by Don @ HP. Close down password server connection if keepalive
fails.
Jeremy.
(This used to be commit 1f6e3d18cd)
2001-08-09 19:22:51 +00:00
Jeremy Allison
f0ce79331f Merged John's fix.
Jeremy.
(This used to be commit 61141c371a)
2001-08-09 18:20:43 +00:00
Gerald Carter
f8d3cac8af a few cleanups while mergeing the passdb code into 2.2
(This used to be commit ef01739708)
2001-08-09 15:53:49 +00:00
Andrew Bartlett
3dbd870d37 Try to set the socket options early for some OSs (like Sol 8) where they
can't be set after the listen().

Andrew Bartlett
(This used to be commit 23b6772a24)
2001-08-09 12:52:05 +00:00
Tim Potter
d41606d6d9 Link fix for smbpasswd.
(This used to be commit 2c73ae4ac7)
2001-08-09 03:41:18 +00:00
Simo Sorce
2f844bf447 Change all realloc() statements to Realloc() (ecxept for tdb.c)
changed some code to exploit the fact that Realloc(NULL, size) == malloc(size)
fixed some possible mem leaks, or seg faults.

thanks to andreas moroder (mallocs not checked in client/client.c, client/smbumount.c)
(This used to be commit 7f33c01688)
2001-08-08 16:54:16 +00:00
Andrew Bartlett
0897979a8b Some better debugs for our security=server code. I want to track down why
we occasionally don't make the connection to the server.
(This used to be commit 08e99f4c12)
2001-08-08 03:25:47 +00:00
Tim Potter
013ef477b2 Merge of modesty patch from 2.2 spec file.
(This used to be commit 4c4d128d08)
2001-08-08 03:21:43 +00:00
Tim Potter
49eea105fd Factored out common rpc pipe initialisation and shutdown code.
(This used to be commit 04d978258b)
2001-08-08 03:18:49 +00:00
Tim Potter
ef67997d0f Patch for having spaces in tdb keys, NULL termination fixes and other
stuff.  From Andrew Esh <AEsh@tricord.com>
(This used to be commit 78207d0fc8)
2001-08-07 23:21:45 +00:00
Jeremy Allison
9d96f7321e Update to work with no crypt available, just like it will in Samba.
Jermey.
(This used to be commit 84e15b8199)
2001-08-07 19:48:54 +00:00
Gerald Carter
db3ad91012 merge from 2.2
(This used to be commit a7bf5e2ab8)
2001-08-07 19:34:38 +00:00
Jeremy Allison
64c24ebf6d Always return NT_STATUS_DISK_FULL, even for quota errors.
Jeremy.
(This used to be commit e4a295b730)
2001-08-07 19:18:27 +00:00
Jeremy Allison
0c218e1abe Added fixes to return correct error codes on space allocation fail.
Jeremy.
(This used to be commit 3bf2419f4b)
2001-08-07 01:19:32 +00:00
Jeremy Allison
d851036d82 Correctly report amount written in debug when allocation space.
Jeremy.
(This used to be commit d1e7cf6073)
2001-08-07 00:36:10 +00:00
Tim Potter
a2bac4d2ca A collection of fixes/cleanups to the security descriptor code by
matt_zinkevicius@hp.com
(This used to be commit ce22267ec8)
2001-08-07 00:01:41 +00:00
Tim Potter
a6234ad6f2 Fixed another possible memleak in cli_initialise()
(This used to be commit 4c9f010a1e)
2001-08-06 23:29:25 +00:00
Jeremy Allison
b026e6edf2 Added Gerald's lanman printing only change to HEAD.
Jeremy.
(This used to be commit b7bd512d9a)
2001-08-06 22:39:51 +00:00
Jeremy Allison
f8d9da9983 Fix for getting allocate_file_space to return the correct errno.
Jeremy.
(This used to be commit 298595e8cb)
2001-08-06 19:21:23 +00:00
Andrew Bartlett
ac989cbe07 Record the NT_STATUS constant rather than its number in the logfiles
Fix typo in lmhosts manpage
(This used to be commit 9fff946cf1)
2001-08-06 09:35:08 +00:00
Richard Sharpe
c2316f4c2d Stop HP/UX building shared libraries for the moment ...
(This used to be commit 8878a44868)
2001-08-06 08:52:39 +00:00
Tim Potter
4acf4dfe19 We don't use indent in the HEAD branch.
(This used to be commit 0b3fbd9e6e)
2001-08-06 02:35:14 +00:00
Tim Potter
9f08cea054 Cleaned up error handling in cli_initialise() to fix a memleak found by
Claudia Moroder <claudiamoroder@st-ulrich.suedtirol.net>
(This used to be commit b5373f4b59)
2001-08-06 02:18:40 +00:00
Tim Potter
54fc7e1aba Changed lone malloc() call to talloc(). Spotted by
Claudia Moroder <claudiamoroder@st-ulrich.suedtirol.net>
(This used to be commit 99ce277fc8)
2001-08-06 02:13:23 +00:00
Tim Potter
6128f584a4 Added smbtree to list of ignored files.
(This used to be commit e4831d4d01)
2001-08-06 02:10:59 +00:00
Simo Sorce
92dbd04e0e me stupid.
never commit without building.
sorry.
(This used to be commit f87924aec4)
2001-08-05 16:05:40 +00:00
Tim Potter
a3f96dd229 Another winbind test - fill in later.
(This used to be commit 99071c45d0)
2001-08-05 11:19:34 +00:00
Simo Sorce
e485a1a498 Some fixes about malloc/Realloc and mem leak
thanks to andreas moroder
(This used to be commit b29a549cdd)
2001-08-05 10:10:16 +00:00
Volker Lendecke
efe1d83dbb Print an error message if database could not be opened.
Volker
(This used to be commit b4f06c3ecf)
2001-08-04 18:17:30 +00:00
Jeremy Allison
27bdf594fb Extra debug to see what errno is on write fail.
Jeremy.
(This used to be commit 352a02bf5c)
2001-08-04 00:24:54 +00:00
Jeremy Allison
4f415ef128 The write zero bytes is an allocate, not set EOF.
Jeremy.
(This used to be commit 28b4ee1eba)
2001-08-03 19:32:33 +00:00
Jeremy Allison
5b33eaedde Added include guards...
We may need to rename this file smbauth.h, as auth.h
is so generic it will probably conflict with system header
files on some systems.
Jeremy.
(This used to be commit dd4a6edd49)
2001-08-03 17:28:18 +00:00
Andrew Bartlett
384b522c92 This is the fix for the PAM bug I probably introduced in the previous commit,
which I will confirm once I can find a box it would break on in the first place.

(this is the pam accounts as nobody thing we had with 2.2.0)

Andrew Bartlett
(This used to be commit 9746ad12bd)
2001-08-03 13:24:38 +00:00
Andrew Bartlett
986372901e This is my 'Authentication Rewrite' version 1.01, mostly as submitted to
samba-technical a few weeks ago.

The idea here is to standardize the checking of user names and passwords,
thereby ensuring that all authtentications pass the same standards.  The
interface currently implemented in as

nt_status = check_password(user_info, server_info)

where user_info contains (mostly) the authentication data, and server_info
contains things like the user-id they got, and their resolved user name.

The current ugliness with the way the structures are created will be killed
the next revision, when they will be created and malloced by creator functions.

This patch also includes the first implementation of NTLMv2 in HEAD, but which
needs some more testing.  We also add a hack to allow plaintext passwords to be
compared with smbpasswd, not the system password database.

Finally, this patch probably reintroduces the PAM accounts bug we had in
2.2.0, I'll fix that once this hits the tree.  (I've just finished testing
it on a wide variety of platforms, so I want to get this patch in).
(This used to be commit b30b6202f3)
2001-08-03 13:09:23 +00:00
Tim Potter
8dad2a1310 Fix for smbpasswd set_userinfo24 was in the wrong place!
(This used to be commit c9cbe3237e)
2001-08-03 03:43:24 +00:00
Jeremy Allison
65bf96ed06 Allow smbpasswd to join a W2K hosted AD domain.
Jeremy.
(This used to be commit c51cfc7f0d)
2001-08-02 23:48:51 +00:00
Jeremy Allison
ad4144d81d Put HPUX on mmap blacklist.
Jeremy.
(This used to be commit 4d5fe9ed4f)
2001-08-02 20:52:57 +00:00
Jeremy Allison
3538c8bea9 Added mmap fix to pass lock test from HP.
Ok - now we're no longer trying to reach a silly 1k loc target,
change the formatting to be *readable* - eg.
change if (x) y else z to be :
if (x)
    y
else
    z

and other compact sillyness. Oh look - when I did this I found
some areas where we *WEREN'T CHECKING SYSTEM CALL ERROR RETURNS !!!!*
CompSci 101 guys....... :-).
Jeremy.
(This used to be commit 38d2e6983a)
2001-08-02 20:17:40 +00:00
Gerald Carter
b930ed5195 changed --with-profile to --with-profiling-data to "stop the madness!"
of people somehow thinking this was related to user profiles.
Hope this is ok Herb.




jerry
(This used to be commit 5704a9f0bb)
2001-08-02 14:33:32 +00:00