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

116 Commits

Author SHA1 Message Date
Jeremy Allison
245fbf7efb Used cachegrind to track down some bottlenecks.
Removed calls to clobber_region when not compiling with developer as
they were hiding speed problems.
Added fast path to convert_string() when dealing with ascii -> ascii,
ucs2-le to ascii and ascii to ucs2-le with values <= 0x7F. This
gives a speedup of 22% on my nbench tests.
Next I will do this on convert_string_allocate.
Jeremy.
(This used to be commit ef140d15ea)
2003-09-04 01:12:39 +00:00
Jeremy Allison
fcdebdae6f Fix bug found by tridge in 2.2.x. Ensure that %U substitution is
restored on next valid packet if a logon fails. This has relevence
if people are using su.exe within logon scripts !
Jeremy.
(This used to be commit d405a93a9d)
2003-08-28 23:57:34 +00:00
Jeremy Allison
110abf10d2 Turns out I had my packet sequences wrong for oplock break code.
I was storing the mid of the oplock break - I should have been
storing the mid from the open. There are thus 2 types of deferred
packet sequence returns - ones that increment the sequence number
(returns from oplock causing opens) and ones that don't (change notify
returns etc). Running with signing forced on does lead to some
interesting tests :-).
Jeremy.
(This used to be commit 85907f02ce)
2003-08-07 02:59:52 +00:00
Jeremy Allison
ceb68ee051 Fix packet signing with asynchronous oplock breaks. Removed bad error message
due to w2k bug. I think this code is now working.... Need more testing of course
but works on all the obvious cases I can think of.
Jeremy.
(This used to be commit a6e537f661)
2003-07-24 19:05:32 +00:00
Jeremy Allison
0c9433c031 Ensure everywhere we defer an incoming SMB request (blocking lock queue,
in oplock break state, change notify queue) we also push the MID onto
the deferred signing queue. Tomorrow I will test this with valgrind and
oplock tests.
Jeremy.
(This used to be commit 33a377f372)
2003-07-24 06:56:56 +00:00
Jeremy Allison
1eff052300 Reformatting fixes to bring in line with the rest of the source.
Jeremy.
(This used to be commit 3c11d93623)
2003-07-16 18:06:27 +00:00
Jelmer Vernooij
06551c644c Patch from metze to add exit and interval events. Useful for modules
(This used to be commit 3033a63cef)
2003-05-06 02:34:59 +00:00
Andrew Bartlett
f071020f5e Merge from HEAD - save the type of channel used to contact the DC.
This allows us to join as a BDC, without appearing on the network as one
until we have the database replicated, and the admin changes the configuration.

This also change the SID retreval order from secrets.tdb, so we no longer
require a 'net rpc getsid' - the sid fetch during the domain join is sufficient.
Also minor fixes to 'net'.

Andrew Bartlett
(This used to be commit 876e00fd11)
2003-04-21 14:09:03 +00:00
Jelmer Vernooij
a8c95d79f8 Add support for the new modules system to auth/ (merge from HEAD)
(This used to be commit c7a1de090d)
2003-04-16 12:13:07 +00:00
Andrew Bartlett
1f499a79f5 (merge from HEAD)
Small clenaup patches:
 - safe_string.h - don't assume that __FUNCTION__ is available
 - process.c - use new workaround from safe_string.h for the same
 - util.c - Show how many bytes we smb_panic()ed trying to smb_xmalloc()
 - gencache.c - Keep valgrind quiet by always null terminating.
 - clistr.c - Add copyright
 - srvstr.h - move srvstr_push into a .c file again, as a real function.
 - srvstr.c - revive, with 'safe' checked srvstr_push
 - loadparm.c - set a default for the display charset.

 - connection.c - use safe_strcpy()
Andrew Bartlett
(This used to be commit c91e76bddb)
2003-03-22 13:47:42 +00:00
Jeremy Allison
fb3e4b8797 Fix to allow blocking lock notification to be done rapidly (no wait
for smb -> smb lock release). Adds new PENDING_LOCK type to lockdb
(does not interfere with existing locks).
Jeremy.
(This used to be commit 766928bbba)
2003-02-27 01:04:34 +00:00
Jeremy Allison
bbf9f09ee5 Add 3 second timeout when terminating server and sending print notify
messages. Stops build-up of large numbers of smbd's waiting to terminate
on large print throughput.
Jeremy.
(This used to be commit 07efebb984)
2003-01-30 23:55:58 +00:00
Tim Potter
142837e5d3 Merge of controversial 'max log size' fix.
(This used to be commit 71e2b60d8f)
2003-01-30 04:38:39 +00:00
Jeremy Allison
dd072d240b Fixed typo found by tpot.
Jeremy.
(This used to be commit 7e2bc1fe58)
2003-01-24 19:05:32 +00:00
Gerald Carter
071af8f007 [merge] make sure to update print queue cache during timeout_processing() to send notify events; CR 1491
(This used to be commit f8a915b14d)
2003-01-11 02:38:36 +00:00
Herb Lewis
195ec103d6 Moved smbd process counting functions from smbd/server.c to smbd/process.c
so that bin/vfstest can link.  merge from head
(This used to be commit 9151cd7d64)
2003-01-09 06:26:04 +00:00
Jeremy Allison
38aee23f80 Ensure we don't get an invalid number for total smbd's if the tdb update
fails.
Jeremy.
(This used to be commit e048259472)
2003-01-08 21:42:53 +00:00
Andrew Bartlett
634c54310c Merge from HEAD - make Samba compile with -Wwrite-strings without additional
warnings.  (Adds a lot of const).

Andrew Bartlett
(This used to be commit 3a7458f947)
2003-01-03 08:28:12 +00:00
Jeremy Allison
39c78bf516 Fixed auth module code. Added VALGRIND defines to reduce spurious warnings.
Jeremy.
(This used to be commit ec4ed45563)
2002-12-11 23:54:40 +00:00
Gerald Carter
612e1ffdba merges from HEAD - change_trust_account_password() must always talk to PDC
(This used to be commit af2fa43850)
2002-12-04 20:57:48 +00:00
Jeremy Allison
2f194322d4 Removed global_myworkgroup, global_myname, global_myscope. Added liberal
dashes of const. This is a rather large check-in, some things may break.
It does compile though :-).
Jeremy.
(This used to be commit f755711df8)
2002-11-12 23:20:50 +00:00
Gerald Carter
a834a73e34 sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273b)
2002-09-25 15:19:00 +00:00
Jelmer Vernooij
127e77e6e3 Sync 3.0 branch with head
(This used to be commit 42615b945e)
2002-08-17 15:27:10 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Jeremy Allison
840279f342 Now we have reliable signals take SIGTERM inband.
Jeremy.
(This used to be commit cad82926a8)
2002-03-14 02:15:08 +00:00
Andrew Bartlett
d79e11ad6d Various comment fixes from Rafal Szczesniak <mimir@diament.ists.pwr.wroc.pl>
(This used to be commit 3bf4b42771)
2002-03-01 01:24:30 +00:00
Jeremy Allison
69adbb0ce3 Fix from Michael Steffens <michael_steffens@hp.com> to make signal
processing work correctly in winbindd. This is a really good patch
that gives full select semantics to the Samba modified select.
Jeremy.
(This used to be commit 3af16ade17)
2002-01-31 23:26:12 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Jim McDonough
723b368dc2 Check request flag for unicode capability and respond accordingly, rather than only doing unicode. smbfs didn't work.
(This used to be commit 95857a3515)
2002-01-23 18:09:56 +00:00
Jeremy Allison
e400bfce39 Report write fail in smb_dump.
Jeremy.
(This used to be commit 832b9e7838)
2002-01-19 21:29:20 +00:00
Jeremy Allison
d6823366b8 Same fix as went into 2.2 (I'm waiting for jerry to finish some code).
Jeremy.
(This used to be commit 01ff6ce496)
2002-01-11 19:10:25 +00:00
Jeremy Allison
d2687a00e1 Fixed up atomic update code.
Jeremy.
(This used to be commit 274b04d4a6)
2002-01-09 02:35:08 +00:00
Andrew Bartlett
2e28f8ff0e I've decided to move the auth code around a bit more...
The auth_authsupplied_info typedef is now just a plain struct - auth_context,
but it has been modified to contain the function pointers to the rest
of the auth subsystem's components.

(Who needs non-static functions anyway?)

In working all this mess out, I fixed a number of memory leaks and moved the
entire auth subsystem over to talloc().

Note that the TALLOC_CTX attached to the auth_context can be rather long-lived,
it is provided for things that are intended to live as long.  (The
global_negprot_auth_context lasts the whole life of the smbd).

I've also adjusted a few things in auth_domain.c, mainly passing the domain as
a paramater to a few functions instead of looking up lp_workgroup().  I'm
hopign to make this entire thing a bit more trusted domains (as PDC) freindly
in the near future.

Other than that, I moved a bit of the code around, hence the rather messy diff.

Andrew Bartlett
(This used to be commit 12f5515f55)
2002-01-05 04:55:41 +00:00
Martin Pool
f55c47b1ff Fix talloc msg registration
(This used to be commit 9a473ecf96)
2002-01-03 05:57:41 +00:00
Martin Pool
af643d5f1f smbd children should also register for POOL_USAGE
(This used to be commit b46d874f47)
2002-01-03 05:41:13 +00:00
Andrew Tridgell
216f3ae908 cleanup a little namespace pollution
(This used to be commit e5b484451a)
2001-12-10 03:21:38 +00:00
Andrew Tridgell
1fb4d2f1b0 don't try to auto-change the trust password unless we are in domain
security
(This used to be commit 00e4f0c803)
2001-11-27 01:51:10 +00:00
Tim Potter
178f6a64b2 challange -> challenge
(This used to be commit d6318add27)
2001-11-26 04:05:28 +00:00
Andrew Bartlett
d0a2faf78d This is another rather major change to the samba authenticaion
subystem.

The particular aim is to modularized the interface - so that we
can have arbitrary password back-ends.

This code adds one such back-end, a 'winbind' module to authenticate
against the winbind_auth_crap functionality.  While fully-functional
this code is mainly useful as a demonstration, because we don't get
back the info3 as we would for direct ntdomain authentication.

This commit introduced the new 'auth methods' parameter, in the
spirit of the 'auth order' discussed on the lists.  It is renamed
because not all the methods may be consulted, even if previous
methods fail - they may not have a suitable challenge for example.

Also, we have a 'local' authentication method, for old-style
'unix if plaintext, sam if encrypted' authentication and a
'guest' module to handle guest logins in a single place.

While this current design is not ideal, I feel that it does
provide a better infrastructure than the current design, and can
be built upon.

The following parameters have changed:
 - use rhosts =

  This has been replaced by the 'rhosts' authentication method,
 and can be specified like 'auth methods = guest rhosts'

 - hosts equiv =

  This needs both this parameter and an 'auth methods' entry
  to be effective.  (auth methods = guest hostsequiv ....)

 - plaintext to smbpasswd =

  This is replaced by specifying 'sam' rather than 'local'
  in the auth methods.

The security = parameter is unchanged, and now provides defaults
for the 'auth methods' parameter.

The available auth methods are:

guest
rhosts
hostsequiv
sam (passdb direct hash access)
unix (PAM, crypt() etc)
local (the combination of the above, based on encryption)
smbserver (old security=server)
ntdomain (old security=domain)
winbind (use winbind to cache DC connections)


Assistance in testing, or the production of new and interesting
authentication modules is always appreciated.

Andrew Bartlett
(This used to be commit 8d31eae52a)
2001-11-24 12:12:38 +00:00
Tim Potter
d876260d88 Don't put a \n on the end of the arg to exit_server()
(This used to be commit dfb8566220)
2001-11-05 00:02:38 +00:00
Tim Potter
7cd889f566 Converted a bunch of 0x85 constants to SMBkeepalive.
(This used to be commit b16a15a13e)
2001-10-20 23:34:40 +00:00
Jeremy Allison
6cc3953196 Restored old Bmpx code - actually used by OS/2.
Jeremy.
(This used to be commit 7c1688fd67)
2001-10-19 00:56:03 +00:00
Jeremy Allison
c416ff851b Merge the become_XXX -> change_to_XXX fixes from 2.2.2 to HEAD.
Ensure make_conection() can only be called as root.
Jeremy.
(This used to be commit 8d23a7441b)
2001-10-18 20:15:12 +00:00
Andrew Tridgell
b728042334 added basic NTLMSSP support in smbd. This is still quite rough, and
loses things like username mapping. I wanted to get this in then
discuss it a bit to see how we want to split up the existing
session setup code
(This used to be commit b74fda69bf)
2001-10-17 08:54:19 +00:00
Jeremy Allison
d731149a41 Fixed inconsistent definitions of InBuf/OutBuf/last_char.
Noticed by albert chin (china@thewrittenword.com) .
Jeremy.
(This used to be commit f5781f11eb)
2001-10-17 01:38:23 +00:00
Jeremy Allison
76745313b1 Fixed bug when status=no and max smbd processes > 0.
Jeremy.
(This used to be commit d1adaee373)
2001-10-11 05:53:15 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Simo Sorce
61b2794968 move to SAFE_FREE()
(This used to be commit a95943fde0)
2001-09-17 11:25:41 +00:00
Jeremy Allison
45706091f3 Fix for second logic bug when handing oplock breaks and client messages
simultaneously.
Jeremy.
(This used to be commit 227325b2d6)
2001-09-10 23:03:14 +00:00
Jeremy Allison
11f0402a74 Fix I think for the fcntl spinning problem. Re-prioritize so
that oplock break messages get priority over incoming client messages.
Jeremy.
(This used to be commit 1779f6a223)
2001-09-05 22:45:48 +00:00