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

648 Commits

Author SHA1 Message Date
Tim Potter
b16a15a13e Converted a bunch of 0x85 constants to SMBkeepalive. -
Jeremy Allison
7c1688fd67 Restored old Bmpx code - actually used by OS/2.
Jeremy.
-
Andrew Tridgell
38a43d75e2 split session setup code out of reply.c in preparation for adding
NTLMSSP and kerberos support in smbd
-
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
Andrew Bartlett
c04f063573 Kill of the reply.c end of the workstaion trust account mess.
Fix the NT errror codes, this time in line with WinXP/2k.
 - Return the normal error codes, expect for bad user/bad password.  These map
   to logon failure, as a quick security hack.  We follow suit.

Simplfy some of the password extraction code, the auth subsytem has the
 intelegence to sort this stuff out, no need to do it here.

Move to 'global_encrypted_passwords_negotiated' to determine the use of
unencrypted hacks, replacing the current mess.

Andrew Bartlett
-
Andrew Bartlett
b6048e28ab Lets call an NTSTATUS an nt_status, not an ecode. -
Andrew Bartlett
d417b6b5cb Zero out these pstrings before we start: makes for much easier debugging. -
Andrew Bartlett
67947bf6e3 Fix up NT_STATUS return for session setups, Win2k objects to anything other
than NT_STATUS_LOGON_FAILURE.  This also brings us (almost) back in line with
their implementation.

Kill off SMBENCRYPT() macro

Kill off 'nt smb support' paramater - tridge okayed this one.

Andrew Bartlett
-
Andrew Tridgell
c82f7828c0 fixed the error code handling in can_delete() by converting it to
NTSTATUS. This gets the right error codes in SMBunlink
-
Simo Sorce
a95943fde0 move to SAFE_FREE() -
Andrew Tridgell
2d507ec669 fixed ctemp in server and client. It turns out that ctemp on NT is completely broken, and it's pointless to emulate their brokenness completely in this case, but at least this makes us use approximately the same packet format. The spec is complelet wrong in this case -
Andrew Bartlett
7f04a139b2 Fix up workstaion and kickoff time checks, moved to auth_smbpasswd.c where
they can have general effect.

Fixed up workstaion support in the rest of samba, so that we can do these
checks.

Pass through the workstation for cli_net_logon(), if supplied.
-
Andrew Bartlett
d618880661 Start pushing the NTSTATUS stuff out to the wire for session setups.
Rework the 'map to guest' code, its now possible to follow what its trying
to do...

Add an NT_STATUS_EQUAL(x,y) macro to make this stuff sane to look at.

Andrew Bartlett
-
Andrew Bartlett
fb0c3629c3 Kill off the //server/share%user hack in share level security.
This should help make much of this code simpiler.

Andrew Bartlett
-
Andrew Bartlett
51baa1614d Oops... For reference, NTLMv2 passwords are > 24 chars in length, while
NTLMv1 passwords (and old LM passwords) are exactly 24 in lenghth.
-
Andrew Bartlett
21baa33946 This looked suspicious now we are attempting to to NTLMv2.
Andrew Bartlett
-
Tim Potter
d34fd8ec07 Some patches to authentication:
- the usersupplied_info now contains a smb_username (as it comes across on
   the wire) and a unix_username (after being passed through mapping
   functions)

 - when doing security={server,domain} use the smb_username, otherwise use
   the unix_username
-
Andrew Tridgell
60d2973034 convert more code to using d_printf -
Jeremy Allison
fa8d626a27 #ifdef out function when not used.
Jeremy.
-
Jeremy Allison
ce9f959964 Fix the 62bit locking onto 32 bit NFS mounts problem generically for HPUX.
Don. please check this out.
Jeremy.
-
Jeremy Allison
c05e794536 Merge of transfer file code from 2.2, fix for readbraw.
Jeremy.
-
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
8a49b2f7df more NTSTATUS changes -
Jeremy Allison
a6f04d1661 Fix crash bug with indirecting through null pointer on recursive delete.
Jeremy.
-
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 -
Andrew Tridgell
ef5f4866fb flush on a invalid fsp should give an error -
Andrew Bartlett
22de76a920 Fix to only send the status32 error for status32 clients, not to other
nt_smb clients.  As spotted by Thursby.
-
Andrew Bartlett
b068ad3005 A few changes:
drop paramaters:
 status
 utmp hostname

change session code to always record each vuid current on the server.  The sessionid struct is no longer packed, as I couldn't get that to work ;-)

change smbstatus to show this info and less of the connections.tdb info (its not actualy that accurate).

I'll get swat doing some of this shortly.
-
Jean-François Micouleau
59018c58e4 The DELL powervault 705 is sending a tcon&x with the service name being
"share" instead of "\\server\share".
Fix that. Still not able to get the user list but that's something else.

Jeremy I don't think I broke anything ;-)

	J.F.
-
Andrew Tridgell
a25911d58c two fixes for NT clients -> share level Samba server -
Andrew Bartlett
15c87e404f smbd/auth_server: Doco, we want to use cli_nt_error here soon
smbd/password.c: We don't use globals here anymore

smbd/reply.c: Tidyness, global_myworkgroup must die!

smbd/service.c:  Move some of the make_connection code into a helper
                 function.
-
Andrew Bartlett
204da7ba96 One less getpwnam() call...
Andrew Bartlett
-
Jeremy Allison
e4a295b730 Always return NT_STATUS_DISK_FULL, even for quota errors.
Jeremy.
-
Jeremy Allison
3bf2419f4b Added fixes to return correct error codes on space allocation fail.
Jeremy.
-
Jeremy Allison
28b4ee1eba The write zero bytes is an allocate, not set EOF.
Jeremy.
-
Andrew Bartlett
b30b6202f3 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).
-
Andrew Tridgell
9a87d6f58f we need to pull passwords in client charset for crypto to work -
Andrew Bartlett
7cb517329b This patch fixes up a few issues where we would do lookups in the local system
on username we already know are perfectly valid, and in their final form.  In
particular we don't want to do a lookup for DOMAIN\nobody, it just does not
make sense, nor should we do map_username and the like if the username is as
specified in the vuid - we have done it already.

Andrew Bartlett
-
Jeremy Allison
8db233c8b5 Toomas Soome's fix for joining a domain the old way.
Jeremy.
-
Andrew Bartlett
04f090c224 This removes unused paramaters from various authtication functions, and should
not change behaviour.

This should make my later diffs smaller, where I actualy start cleaning up this
mess...

Andrew Bartlett
-
Andrew Tridgell
4b35a3494c fixed bug where we looked at the first byte of a password to determine
if the password is blank. That ain't valid with encrypted passwords!

Jeremy, this changes the semantics of session setup. We no longer
automatically set guest=True when the client happens to choose their
username == the guest username. Instead we rely on the map_to_guest
code. I'm pretty sure this is now the right thing, but please look at
it carefully before putting it in 2.2

This is the bug that was causing the build farm to sometimes
fail. Basically we failed every 256 attempts - ie. when the first byte
of the encrypted password happened to be 0
-
Jeremy Allison
7efaefdf60 Fix for rabbit-pellet mode. Chris please test this. Thanks for Dave CB
for help on this.
Jeremy.
-
Andrew Tridgell
a1dee993cb fixed a bug in the parameters SMBctemp uses in open_file_shared() -
Andrew Tridgell
3b9eb528f5 use alpha_strcpy on the domain as it comes off the wire -
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.
-
Andrew Tridgell
657836599a check for bad usernames early in session setup -
Jeremy Allison
310d2af6b0 Fixed incorrect debug parameters for lock_pid.
Jeremy.
-