1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-04 05:18:06 +03:00
Commit Graph

236 Commits

Author SHA1 Message Date
Günther Deschner
503d035814 spnego: share spnego_parse.
Guenther
2009-09-17 01:12:20 +02:00
Jeremy Allison
48a0732147 Fix bug #6551 - win98 clients cannot connect after server upgrade to samba-3.4.0.
The values of vuid and tid were not being correctly updated in the struct smb_request
when passed to chain_reply inside sessionsetupX and tconX.
Jeremy.
2009-07-15 13:59:11 -07:00
Stefan Metzmacher
75d03970b7 s3:smbd: move more session specific globals to struct smbd_server_connection
metze
2009-06-03 17:54:37 +02:00
Stefan Metzmacher
356f0336e5 s3:smbd: move some session specific globals to struct smbd_server_connection
metze
2009-06-03 17:54:37 +02:00
Stefan Metzmacher
e16e7146b3 s3:smbd: move negprot related globals to struct smbd_server_connection
metze
2009-06-03 17:54:37 +02:00
Stefan Metzmacher
f20ded603b s3:smbd: move pending_auth_data list to struct smbd_server_connection
metze
2009-06-03 17:54:36 +02:00
Andrew Bartlett
574a6a8c35 s3:kerberos Rework smb_krb5_unparse_name() to take a talloc context
Signed-off-by: Günther Deschner <gd@samba.org>
2009-04-07 13:25:36 +02:00
Stefan Metzmacher
c16c90a1cb s3:smbd: use new simplified snb_signing code in the server
We keep the seqnum/mid mapping in the smb_request structure.

This also moves one global variable into the
smbd_server_connection struct.

metze
2009-03-23 12:21:13 +01:00
Jeremy Allison
faa1100d22 More warning fixes for Solaris.
Jeremy.
2009-02-23 16:22:43 -08:00
Volker Lendecke
4aed9abbf8 Remove the static "chal" from ntlmssp.c:get_challenge() 2009-02-21 14:04:14 +01:00
Dan Sledz
d96248a9b4 Add two new parameters to control how we verify kerberos tickets. Removes lp_use_kerberos_keytab parameter.
The first is "kerberos method" and replaces the "use kerberos keytab"
with an enum.  Valid options are:
secrets only - use only the secrets for ticket verification (default)
system keytab - use only the system keytab for ticket verification
dedicated keytab - use a dedicated keytab for ticket verification.
secrets and keytab - use the secrets.tdb first, then the system keytab

For existing installs:
"use kerberos keytab = yes" corresponds to secrets and keytab
"use kerberos keytab = no" corresponds to secrets only

The major difference between "system keytab" and "dedicated keytab" is
that the latter method relies on kerberos to find the correct keytab
entry instead of filtering based on expected principals.

The second parameter is "dedicated keytab file", which is the keytab
to use when in "dedicated keytab" mode.  This keytab is only used in
ads_verify_ticket.
2009-02-01 20:23:31 -08:00
Michael Adam
39ec8791f8 s3: make better use of ccache by not including version.h in every C-file.
version.h changes rather frequently. Since it is included via includes.h,
this means each C file will be a cache miss. This applies to the following
situations:

* When building a new package with a new Samba version

* building in a git branch after calling mkversion.sh
  after a new commit (i.e. virtually always)

This patch improves the situation in the following way:

* remove inlude "version.h" from includes.h

* Use samba_version_string() instead of SAMBA_VERSION_STRING
  in files that use no other macro from version.h instead of
  SAMBA_VERSION_STRING.

* explicitly include "version.h" in those files that use more
  macros from "version.h" than just SAMBA_VERSION_STRING.

Michael
2009-01-15 22:56:01 +01:00
Stefan Metzmacher
3dde0cbb76 s3:smbd: move all globals and static variables in globals.[ch]
The goal is to move all this variables into a big context structure.

metze
2009-01-08 12:22:21 +01:00
Volker Lendecke
cf79461f4e Move a comment to its place 2008-12-30 11:26:10 +01:00
root
01a444b422 s3 sesssetup.c: Add missing line break to debug message.
Karolin
2008-12-12 16:51:34 +01:00
Volker Lendecke
599707c87a Remove two direct inbuf references from reply_sesssetup_and_X_spnego() 2008-11-28 08:23:12 +01:00
Volker Lendecke
2bab73a18d Remove a bunch of direct inbuf references by adding "vwv" to smb_request 2008-11-02 16:58:19 +01:00
Volker Lendecke
af7cf4f992 Remove some direct inbuf references by adding smbreq_bufrem 2008-11-02 09:22:40 +01:00
Volker Lendecke
a31fab8156 Simplify params of srvstr_pull_buf_talloc()
Now that "req" is available everywhere, use it. Rename srvstr_pull_buf_talloc()
to srvstr_pull_req()
2008-11-02 09:22:40 +01:00
Volker Lendecke
fa47f03356 Kill some fstrings 2008-11-01 23:21:54 +01:00
Volker Lendecke
7bdb571ec4 Remove a bunch of direct inbuf references by adding "buf" to smb_request 2008-11-01 19:41:08 +01:00
Volker Lendecke
7f9d6f80ef Add a "buflen" struct member to smb_request
This removes some explicit inbuf references and also removes a pointless check
in reply_echo. The buflen can never be more than 64k, this is just a 16 bit
value.
2008-11-01 19:41:07 +01:00
Volker Lendecke
ff274e57ea Remove a pointles call to smb_bufrem
This call expanded to

(smb_buflen(req->inbuf)
  - PTR_DIFF(smb_buf(req->inbuf) - smb_buf(req->inbuf)))

which seems pretty pointless :-)
2008-10-31 22:06:22 +01:00
Günther Deschner
c0cf457c85 s3-asn1: make all of s3 asn1 code do a proper asn1_init() first.
Guenther
2008-10-22 21:37:36 +02:00
Günther Deschner
d9f1fff5b3 s3: use shared asn1 code.
Guenther
2008-10-22 21:37:36 +02:00
Volker Lendecke
6c019b8755 Slightly simplify reply_sesssetup_blob(): Remove an else branch 2008-10-22 17:53:22 +02:00
Volker Lendecke
84df0a6870 Don't push the data out to the client in reply_sesssetup_blob()
Sending the data at this level breaks the assumption at higher levels that
req->outbuf == NULL means this request is deferred. It also breaks potential
chaining (Kerberos session setup and tcon X in one request)
2008-10-22 17:53:22 +02:00
Jeremy Allison
4a5ccfb91f Don't re-initialize a token when we already have one. This fixes the build farm failures when winbindd connects as guest.
This one took a *lot* of tracking down :-).
Jeremy.
(This used to be commit dca8277912)
2008-08-22 13:49:46 -07:00
Volker Lendecke
c38a1e06b5 Fix type error in debug message
(This used to be commit eb281532b1)
2008-05-20 23:08:42 +02:00
Karolin Seeger
bdcc7ddc1e sesssetup.c: Add debug message.
Log when we kill other smbd sessions like when we hit the VC == 0 case.
This one fixes BUG #5476.
Initial patch from Björn Jacke <bj@sernet.de>.

Karolin
(This used to be commit 1429f3b7cf)
2008-05-20 11:09:06 +02:00
Volker Lendecke
6b6bb484a8 Fix a memleak in new auth_serversupplied code
(This used to be commit f23e970848)
2008-05-11 00:23:36 +02:00
Volker Lendecke
4f9b325fb2 Fix a memleak
(This used to be commit 9891c7c308)
2008-05-10 23:27:21 +02:00
Volker Lendecke
0283e95a7c Add a mem_ctx argument to make_server_info_guest()
(This used to be commit e4a9492967)
2008-05-10 11:16:59 +02:00
Volker Lendecke
64ddd381b7 Rename server_info->was_mapped to server_info->nss_token
"nss_token" from my point of view much better reflects what this flag actually
represents
(This used to be commit b121a5acb2)
2008-05-07 14:47:29 +02:00
Volker Lendecke
0636236eec Fix typo
(This used to be commit 8047a1991a)
2008-05-05 18:28:59 +02:00
Volker Lendecke
82d2f07dae Remove "session_key" from "struct user_struct"
This one took a bit -- I hope I covered all data paths
(This used to be commit 74c88a4442)
2008-05-05 18:28:59 +02:00
Bill Ricker
f700ee6418 Fix Kerberos interop with Mac OS X 10.5 clients.
Ignore optional req_flags. Use the Kerberos mechanism OID negotiated
with the client rather than hardcoding OID_KERBEROS5_OLD.
(This used to be commit 59a2bcf30f)
2008-04-07 15:05:51 -07:00
Jeremy Allison
7752494cf1 Fix up the comments on security=share to explain we're
ignoring passwords.
Jeremy.
(This used to be commit e7b6ea4653)
2008-03-27 16:08:39 -07:00
Michael Adam
be2fab1fef smbd: fix session setup with security = share.
Broken by pstring removal in 9ed12bfc48.
Jeremy, please check.

Thanks to Yannick Bergeron <yaberger@ca.ibm.com> for noting this.

Michael
(This used to be commit 008c4bdbe5)
2008-03-20 17:00:36 +01:00
Günther Deschner
23cd8e5ea7 Be more verbose why create local token has failed during
NTLMSSP and Kerberos session setup

Guenther
(This used to be commit 18b8c2c19e)
2008-03-06 12:27:11 +01:00
Günther Deschner
65fc3ae070 Use new structs in reply_spnego_kerberos().
Guenther
(This used to be commit c55160f8e8)
2008-02-17 02:11:59 +01:00
Jeremy Allison
4754c2bafe Correctly use SPNEGO to negotiate down from krb5 to NTLMSSP.
Previously we didn't implement the 'NEGO' part of SPNEGO :-).
Jeremy.
(This used to be commit 8767a0dab9)
2008-02-14 18:10:50 -08:00
Stefan Metzmacher
de48cd925a smbd: use make usage of wbcDomainInfo()
metze
(This used to be commit 9d6b43ea10)
2008-02-11 18:14:15 +01:00
Jeremy Allison
43717a16e2 Fix CID 476. Ensure a valid pac_data pointer is always passed to
ads_verify_ticket as it's always derefed.
Jeremy.
(This used to be commit 0599d57eff)
2008-01-11 23:53:27 -08:00
Jeremy Allison
d5bd2e7000 Can't use logical operations on boolean values.
Jeremy.
(This used to be commit 34cd9b5b51)
2008-01-04 22:56:06 -08:00
Jeremy Allison
29562987c3 Now conn is part of smb_request, we don't need it as
an extra parameter. This cleans up quite a few places
we were passing it around without needing it.
Jeremy.
(This used to be commit 8f36def18e)
2008-01-04 15:37:24 -08:00
Jeremy Allison
9254bb4ef1 Refactor the crypto code after a very helpful conversation
with Volker. Mostly making sure we have data on the incoming
packet type, not stored in the smb header.
Jeremy.
(This used to be commit c4e5a50504)
2008-01-04 12:56:23 -08:00
Jeremy Allison
41ae2a0a17 Remove last pstring from sesssetup.c
Jeremy.
(This used to be commit 9ed12bfc48)
2007-11-10 15:36:47 -08:00
Jeremy Allison
5b0b4f23ef Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch
this space.
Jeremy.
(This used to be commit 963fc76852)
2007-11-03 23:20:10 -07:00
Jeremy Allison
25074433f4 I can't get away without a 'length' arg. :-).
Jeremy.
(This used to be commit 95d01279a5)
2007-11-03 18:41:26 -07:00