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

307 Commits

Author SHA1 Message Date
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
-
Andrew Tridgell
f52a5014ee merge from 2.2 -
Jeremy Allison
121b59669f Removed mktemp from HEAD - same as done in 2.2.
Jeremy.
-
Jeremy Allison
fc76681812 Merge of Andrew's changes in 2.2.
Jeremy.
-
Jeremy Allison
e7d59d6de8 As Andrew suggested, make smbrun return a fd for a deleted file which can then
be read.
Jeremy.
-
Jeremy Allison
94747b4639 Got "medieval on our ass" about adding the -1 to slprintf.
Jeremy.
-
Andrew Tridgell
70d6b09ac9 converted reply_printqueue -
Andrew Tridgell
0331f93a81 converted reply_search -
Andrew Tridgell
dca433d035 fixed srvstr_push() call -
Andrew Tridgell
fbb3bf12df converted a bunch more fns to unicode -
Andrew Tridgell
a6dd666226 simpler and more correct srvstr_push()
it now uses outbuf not inbuf for the unicode flag, which
allows for some server fns to be ascii and means one less
parameter in push calls
-
Andrew Tridgell
1e92d340ce converted reply_tcon() -
Andrew Tridgell
a074600a09 converted a bunch more server functions to unicode -
Andrew Tridgell
242a6a96d1 - convert chkpath
- devicename in tconx is always ascii
-
Andrew Tridgell
b98b1435e9 this patch does a number of things:
- removes SMB_ALIGNMENT. That macro caused all sorts of problems with
  getting unicode aligned right in sub-protocols (such as SMBtrans and
  SMBtrans2). I believe the performance reasons for having
  SMB_ALIGNMENT has gone away with the new variants of the SMB
  protocol anyway, as newer commands tend to have their own internal
  alignment.

- fix the locations where we set smb_flg2 to absolute values. We must
  never do this if we want a hope of coping with unicode.

- add initial support for unicode on the wire in smbd. Currently
  enabled using SMBD_USE_UNICODE environment variable.
-
Jeremy Allison
0be41d5158 Merge of new 2.2 code into HEAD (Gerald I hate you :-) :-). Allows new SAMR
RPC code to merge with new passdb code.
Currently rpcclient doesn't compile. I'm working on it...
Jeremy.
-
Andrew Tridgell
2c8da0ae22 converted reply_open, reply_open_and_x and reply_fclose -
Andrew Tridgell
7684c1e672 started support for unicode on the wire in smbd. Using a very similar
method to what was used in the client I now have session setup and
tconx working.

Currently this is enabled with SMBD_USE_UNICODE environment
variable. Once the code is complete this will become a smb.conf
option.
-
Gerald Carter
1d84da779a merge of 'lanman auth' and 'min protocol' from 2.2 -
Jeremy Allison
3ded1e6bd5 configure configure.in smbd/posix_acls.c smbd/dosmode.c: Fix for zero permission W2K profiles.
libsmb/cliconnect.c rpc_client/cli_login.c smbd/reply.c: codepage fixes from Tim.
Jeremy.
-
Tim Potter
79045bd72a Merge of i18n fixes from appliance branch. Samba can now talk to a network
with a PDC that has international netbios name and domain name.  There's
still quite a bit of i18n stuff to fix though...
-
Jeremy Allison
c0517d6f4e Merge of JohnR's changes to appliance-head, JF's changes to 2.2,
updated the POSIX_ACL code to be in sync.
Jeremy.
-