1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-21 01:59:07 +03:00

383 Commits

Author SHA1 Message Date
Jelmer Vernooij
42615b945e Sync 3.0 branch with head -
Andrew Tridgell
03ac082dcb updated the 3.0 branch from the head branch - ready for alpha18 -
Andrew Tridgell
be23d87a17 This split the mangling code up to allow for the possibility of multiple
mangling implementation, selectable using "mangling method = " in smb.conf

It also tidies the interface a little, although it is still nasty.
-
Jeremy Allison
16015c07ea Added Shirish's client side caching policy change.
Jeremy.
-
Andrew Bartlett
ad8aa47057 Reintroduce the 2.2 name mangling code, until we get are more flexible solution.
Even for a hash/cache setup, this code needs some more work, in particular
it needs to use mangle_get_prefix() etc and to move to unicode internals.

Andrew Bartlett
-
Jeremy Allison
2475c09b35 Fixed the error bad path for recursive mkdir so mkdir \a\b\c\d works.
Forward ported some of the code tidyups from 2.2.
Jeremy.
-
Jeremy Allison
4eb29ac559 Removed unused variable.
Jeremy.
-
Jeremy Allison
3b1b8ac435 Fix the mp3 rename bug - also tidy up our open code and remove the special
cases for rename and unlink. Had to add desired_access into the share mode record.
Jeremy.
-
Jeremy Allison
504e5ef049 Remove the "stat open" code - make it inline. This should fix the
bugs with opening and renaming mp3 files, also the word rename
problems that people have had for a while.
Needs a make clean :-) make.
Also added JohnR's printing fix.
Jeremy.
-
Jeremy Allison
ad1e858d8e Sync up vfs changes from 2.2.x.
Jeremy.
-
Tim Potter
1f007d3ed4 Renamed get_nt_error_msg() to nt_errstr(). -
Gerald Carter
5760315c1d syncing up printing code with SAMBA_2_2 (already done some merges
in the reverse).

  * add in new printer change notify code from SAMBA_2_2

  * add in se_map_standard() from 2.2 in _spoolss_open_printer_ex()

  * sync up the _print_queue_struct in smb.h (why did someone change the
    user/file names in fs_user/fs_file (or vice-versa) ? )

  * sync up some cli_spoolss_XXX functions
-
Tim Potter
6a053fa770 Fixed bodgy printf arguments in debug statment.
Who would have guessed it - we now use floating point maths in Samba.
-
Jeremy Allison
8aa9860ea2 include/smb_macros.h: Don't round up an allocation if the size is zero.
"One of these locks is not like the others... One of these locks is not
quite the same" :-). When is a zero timeout lock not zero ? When it's
being processed by Windows 2000 of course.. This code change, ugly though
it is - completely fixes the foxpro/access multi-user file system database
problems that people have been having. I used a *wonderful* test program
donated by "Gerald Drouillard" <gerald@drouillard.ca> which allowed me
to completely reproduce this problem, and to finally determine the correct
fix. This also explains why Windows 2000 is *so slow* when responding to
the smbtorture lock tests. I *love* it when all these things come together
and finally make sense :-).
Jeremy.
-
Andrew Tridgell
72cb43b912 make sure we give an error for unknown lockingX locktype bits -
Jeremy Allison
d9cb1bf20a Mask off the aDIR on setfileinfo.
Jeremy.
-
Jeremy Allison
9243a9778e Added "nt status support" parameter. Fix offline synchronisation.
Jeremy.
-
Tim Potter
6a58c9bd06 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
-
Jeremy Allison
248770d730 Fixed display of "remote downlevel document" in old print job submission
case.
Jeremy.
-
Jeremy Allison
01ff6ce496 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
-
Jeremy Allison
2db99fa49b Missed error return is can_rename fails.
Jeremy.
-
Jeremy Allison
e6b27f3d80 Re-wrote the guts of the rename_internals code to cope with a reported
bug (renaming name -> name was failing, on W2K it succeeds). Simplified
the common case, did a lot of work to ensure NT error codes are correctly
reported back to client.
Jeremy.
-
Jeremy Allison
fb1ab02553 Ensure modtime is set correctly on destination files in copy command.
Jeremy.
-
Simo Sorce
79254d2b04 passing NULL to print_queue_status()'s status parameter could end in a segfault -
Jeremy Allison
2405385854 Ensured filetimes set (by name) after close. Ignore errors. This is the
correct way to ensure times set in 'pending modtime' and 'time close'
are always set correctly. Inspired by patch from Juergen Hasch.
Jeremy.
-
Jeremy Allison
84b62d3c8e I think this is a fix for the "out of space" errors with oplocks=no.
Jeremy.
-
Jeremy Allison
9148bb9eaa Tidyups when I was doing the big merge...
Jeremy.
-
Jeremy Allison
60983782ed Fix from Herb. mincount/maxcount need to be ssize_t for comparisons.
Jeremy.
-
Jeremy Allison
ab607cdf15 Fixup __LPID -> _LPID.
Jeremy.
-
Andrew Bartlett
62f4e4bd0a Change to guest logon code.
This changes the way we process guest logons - we now treat them as normal
logons, but set the 'guest' flag.  In particular this is needed becouse Win2k
will do an NTLMSSP login with username "", therefore missing our previous guest
connection code - this is getting a pain to do as a special case all over the
shop.

Tridge:  We don't seem to be setting a guest bit for NTLMSSP, in either the
anonymous or authenticated case, can you take a look at this?

Also some cleanups in the check_password() code that should make some of the
debugs clearer.

Various other minor cleanups:

 - change the session code to just take a vuser, rather than having to do a
   vuid lookup on vuser.vuid

 - Change some of the global_client_caps linking

 - Better debug in authorise_login(): show the vuid.

Andrew Bartlett
-
Tim Potter
dfb8566220 Don't put a \n on the end of the arg to exit_server() -
Andrew Bartlett
514c91b16b Various post AuthRewrite cleanups, fixups and tidyups.
Zero out some of the plaintext passwords for paranoia

Fix up some of the other passdb backends with the change to *uid_t rather than
uid_t.

Make some of the code in srv_netlog_nt.c clearer, is passing an array around,
so pass its lenght in is definition, not as a seperate paramater.

Use sizeof() rather than magic numbers, it makes things easier to read.

Cope with a PAM authenticated user who is not in /etc/passwd - currently by
saying NO_SUCH_USER, but this can change in future.

Andrew Bartlett
-
Andrew Bartlett
531e249732 When you make a data_blob() then you probably need to free it too... -
Andrew Bartlett
f70fb819b2 This is a farily large patch (3300 lines) and reworks most of the AuthRewrite
code.

In particular this assists tpot in some of his work, becouse it provides the
connection between the authenticaion and the vuid generation.

Major Changes:
	- Fully malloc'ed structures.
	  - Massive rework of the code so that all structures are made and destroyed
	    using malloc and free, rather than hanging around on the stack.
	- SAM_ACCOUNT unix uids and gids are now pointers to the same, to allow them
	   to be declared 'invalid' without the chance that people might get ROOT by
	   default.

	- kill off some of the "DOMAIN\user" lookups.  These can be readded at a more
	  appropriate place (probably domain_client_validate.c) in the future. They
	  don't belong in session setups.

	- Massive introduction of DATA_BLOB structures, particularly for passwords.

	- Use NTLMSSP flags to tell the backend what its getting, rather than magic
	  lenghths.

	- Fix winbind back up again, but tpot is redoing this soon anyway.

	- Abstract much of the work in srv_netlog_nt back into auth helper functions.

This is a LARGE change, and any assistance is testing it is appriciated.

Domain logons are still broken (as far as I can tell) but other functionality
seems
intact.

Needs testing with a wide variety of MS clients.

Andrew Bartlett
-
Simo Sorce
92f953c156 another few changes to the new mangle code -
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.
-