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

328 Commits

Author SHA1 Message Date
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.
-
Jeremy Allison
a3925cb9c6 Fixed the nastiest locking bug to track down.... smb_pids are sent in the
lockingX calls - use that instead of smb_pid in the packet.
Jeremy.
-
Jeremy Allison
5c42845b5b Fixed the first locking error (test #8 found by locktest code from
Clarion locktest.
Jeremy.
-
Jeremy Allison
52143c0853 Always use DOMAIN\user first that this is the more specific case.
Jeremy.
-
Jeremy Allison
f8c121c69c Log debug before and after netbios names copied so we know if they've been
changed.
Jeremy.
-
Jeremy Allison
e059fffd03 Added other_safe_chars to alpha_strcpy(). Needs testing but is a better
fix for the problem.
Jeremy.
-
Jeremy Allison
17c3faa367 Better fix for client name vulnarability.
Jeremy.
-
Jeremy Allison
0187cd6aef Andrew - please look this over. I've fixed a long standing (maybe 4-5
years old) bug when chainging a sessionsetup_and_X and tcon together.
The wrong username was being entered into the tdb, even though the
correct user was used for accessing files. This is related to the fact
that authorise_login() is not used for sessionsetup, but only for tcon
auths.
Jeremy.
-
Jeremy Allison
244aec8ea6 Following info from TAKAHASHI Motonobu <monyo@samba.gr.jp>,
Samba Users Group Japan, ensure that we don't use dos_to_unix(xx,True),
but always use dos_to_unix(xx,False) to prevent overwriting.
Jeremy.
-
Jeremy Allison
2c2fc85136 Extra debug in open.c, fix for bad debug message in reply.c
Jeremy.
-
Tim Potter
a542f4513a Removed commented out msdfs code that was being called anyway. -
Jeremy Allison
1b3977c536 *Wonderful* patch from Andrew Bartlett that will help ensure tdb's are
cleaned on clients abending connections. Thanks Andrew !
Jeremy.
-
Jeremy Allison
6d65556ae8 Set correct reply word in large writeX (greater than 64k) replies.
Also added smbtorture test for this.
Jeremy.
-
Jeremy Allison
810dae29b8 Deal with incorrect large writes from old NT4.x clients.
We still need to set the large write reply correctly.
Jeremy.
-
Andrew Tridgell
ee8cb88682 return an error code on password attack, rather than exiting.
otherwise security scanners may think we are vulnerable!
-
Jeremy Allison
19145bae72 Fixup the large_writex problem (a large_writex can send a full 64k of data,
we already have space for this we just need to understand the length correctly).
Jeremy.
-
Jeremy Allison
d7aa42e459 Defensive brlock and locking database cleaning code.
Jeremy.
-
Tim Potter
083b74c743 Fixes to get pam_auth() functionality working again. -
Gerald Carter
96d0e7c330 Patch from Simo:
o sed 's/pdb_clear_sam/pdb_free_sam/g'
  o add pdb_reset_sam()
  o password changing should be ok now as well.
-
Jean-François Micouleau
a4a4c02b12 Big cleanup of passdb and backends.
I did some basic tests but I have probably broken something. Notably the
password changing. So don't cry ;-)

	J.F.
-
Andrew Tridgell
c986a3c51e - fixed some compiler warnings
- fixed slprintf and vsprintf macros
-