1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

1120 Commits

Author SHA1 Message Date
Andrew Bartlett
4432cc73ae r7843: Use the new Heimdal gsskrb_acquire_creds API. This has the right
lifetime constraints, and works with the in-memory keytab.

Move initialize_krb5_error_table() into our kerberos startup code,
rather than in the GSSAPI code explitly.  (Hmm, we probably don't need
this at all..)

Andrew Bartlett
(This used to be commit bedf92da5c81066405c87c9e588842d3ca5ba945)
2007-10-10 13:18:42 -05:00
Andrew Bartlett
8a68f96f8c r7827: Add in-memory keytab to Samba4, using the new MEMORY_WILDCARD keytab
support in Heimdal.

This removes the 'ext_keytab' step from my Samba4/WinXP client howto.

In doing this work, I realised that the replay cache in Heimdal is
currently a no-op, so I have removed the calls to it, and therefore
the mutex calls from passdb/secrets.c.

This patch also includes a replacement 'magic' mechanism detection,
that does not issue extra error messages from deep inside the GSSAPI
code.

Andrew Bartlett
(This used to be commit c19d5706f4fa760415b727b970bc99e7f1abd064)
2007-10-10 13:18:41 -05:00
Andrew Bartlett
e578c33c2c r7757: Add NTLMv2 support to the NT1 Session setup (ie, not SPNEGO/NTLMSSP)
Session Setup code.

Add a mem_ctx argument to a few of the NTLMv2 support functions, and
add smb.conf options to control client NTLMv2 behaviour.

Andrew Bartlett
(This used to be commit 3f35cdb218a3dae08a05e77452ca9f73716ceb28)
2007-10-10 13:18:32 -05:00
Andrew Tridgell
ee57c76a68 r7704: - fixed open_nbt_connection() to return NULL when the connection failed
- got rid of smbcli_shutdown() and use talloc_free() instead.
(This used to be commit 1011b1bf51d420d6702ef448c894ea8ebeafa284)
2007-10-10 13:18:23 -05:00
Andrew Bartlett
5b19286df0 r7690: Move the NT hash generation into the credentials system, rather than
in all the callers.  This also allows us to be more flexible in the
type of password we store.

Andrew Bartlett
(This used to be commit 00b8588c68526e1d86fda0bd81c0b86f690b62c3)
2007-10-10 13:18:23 -05:00
Andrew Bartlett
949deaf9e3 r7687: Some more tests that must be done only when krb5_config is absent.
Andrew Bartlett
(This used to be commit 898f72d19654c68ba68d36a099bf4dbed5d09fe9)
2007-10-10 13:18:22 -05:00
Love Hörnquist Åstrand
c3948492d4 r7638: krb5_closelog in heimdal-0.7 not longer leaks memory, so remove that comment
(This used to be commit 3aa80b8e585a0acc57d4b7738dcccfba232948ca)
2007-10-10 13:18:16 -05:00
Andrew Bartlett
7a33552d82 r7637: Another useful Heimdal feature we need.
Andrew Bartlett
(This used to be commit 57ddedc954f49fd370225494758326fcbd0bb500)
2007-10-10 13:18:16 -05:00
Andrew Tridgell
af237084ec r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
(This used to be commit 3a3025485bdb8f600ab528c0b4b4eef0c65e3fc9)
2007-10-10 13:18:15 -05:00
Andrew Tridgell
6be47e9bc2 r7597: removed the bogus get_myfullname() and get_mydomname() calls, and put
them in the ntlmssp code, which is the only place they are
used. Andrew, please remove them completely once you have some more
reliable way to get this info

they are bogus as gethostname() may give us a short hostname (and does
on lot of systems), so the calls often give totally the wrong result
anyway
(This used to be commit 35ec292f86bf663618b4bd03133d9bbd6e2faf10)
2007-10-10 13:18:12 -05:00
Stefan Metzmacher
33bbe2b9e1 r7536: doesn't spam the smbd_log in the build_farm...
metze
(This used to be commit 9f4ed54c58a1d029b171ad199dd4a7ccf1f96f64)
2007-10-10 13:18:07 -05:00
Andrew Bartlett
e9fa8f7cce r7509: With the update to Heimdal 20050612 we no longer need krb5_freelog(),
as krb5_closelog() no longer leaks memory.

Andrew Bartlett
(This used to be commit b0bf8a4a5f04b65655f4005b27c80eb098039720)
2007-10-10 13:18:02 -05:00
Andrew Tridgell
bce8cda061 r7352: the internal heimdal build change. This changes quite a few things:
- if you want kerberos now, you need to unpack a lorikeet heimdal
   tree in source/heimdal/. If source/heimdal/ does not exist at
   configure time then all kerberos features are disabled. You cannot
   use an external kerberos library for now. That may change later.

 - moved lib/replace/ config stuff to lib/replace/ and create a
   lib/replace/replace.h. That allows the heimdal build to use our
   portability layer, and prevenets duplicate definitions of functions
   like strlcat()

 - if you do enable heimdal, then you will need to do 'make
   HEIMDAL_EXTERNAL' before you build Samba. That should be fixed once
   I explain the problem to jelmer (the problem is the inability to
   set a depend without also dragging in the object list of the
   dependency. We need this for building the heimdal asn1 compiler and
   et compiler.

 - disabled all of the m4 checks for external kerberos libraries. I
   left them in place in auth/kerberos/, but disabled it in
   configure.in

some of the heimdal_build/ code is still very rough, for example I
don't correctly detect the correct awk, flex, bison replacements for
heimdal_build/build_external.sh. I expect to fix that stuff up over
the next few days.
(This used to be commit d4648249b2c7fc8b5e7c0fc8d8f92ae043b5691f)
2007-10-10 13:17:45 -05:00
Andrew Bartlett
8107bdec7b r7306: Use a consistant #define for detecting support for the Heimdal krb5
log redirection code.

Andrew Bartlett
(This used to be commit 93335d587d9f48c46d9c3b91237f649693cf3003)
2007-10-10 13:17:39 -05:00
Stefan Metzmacher
2c499fe5aa r7303: autodetect the libkdc and our kdc support
btw: I use this for configuring heimdal

>>>
CONFIG="CFLAGS=\"-g -O -Wall -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Wdeclaration-after-statement\" \
	CC=gcc-4.0 \
	./configure -C --prefix=$HOME/prefix/heimdal-test \
	--sysconfdir=/etc \
	--enable-shared=no \
	--with-ldb=$HOME/prefix/ldb \
	--without-openldap \
	--without-openssl $@"

echo $CONFIG
eval $CONFIG
>>>

maybe you also want to use --disable-berkeley-db

metze
(This used to be commit 2aec140e00770df78ba31ef91109634ce0aa3d8a)
2007-10-10 13:17:39 -05:00
Andrew Bartlett
2e787b5b17 r7291: Additional notes on what we require from a kerberos implementation.
Andrew Bartlett
(This used to be commit a8d3493b6f7a0c28465b00bbadf24e152422e4b5)
2007-10-10 13:17:37 -05:00
Andrew Bartlett
e168c5fefa r7285: It appears that MIT Kerberos does not have the log redirection
facility that I'm using. This should let us compile the non-KDC
components on MIT again.

Andrew Bartlett
(This used to be commit ae9c2d2b54a979ab8467c847b62dd2c2a0fa059f)
2007-10-10 13:17:36 -05:00
Andrew Bartlett
d26f46f72c r7270: A big revamp to the way we handle kerberos errors in Samba4. We now
fill in the function pointers to handle the logging, and catch all the
kerberos warnings. (Currently at level 3).

To avoid a memory leak, this requries a new function: krb5_freelog(),
which I've added to lorikeet/heimdal.

This also required a revamp to how we handle the krb5_context, so as
to make it easier to handle with talloc destructors.

Andrew Bartlett
(This used to be commit 63272794c41231b335b73e7ccf349282f295c4d2)
2007-10-10 13:17:34 -05:00
Andrew Bartlett
8cd92242b9 r7269: talloc_steal() is preferred where possible, as it can't fail and does
not have some of the issues of talloc_reference().

Andrew Bartlett
(This used to be commit 2fb413355a7cd7b5cee02237d2fbff91381435e5)
2007-10-10 13:17:34 -05:00
Andrew Bartlett
5112e38393 r7258: Fix the final linking error with libkdc - we need to link libhdb as well.
With this fix, I can request tickets from our built-in KDC!

Andrew Bartlett
(This used to be commit d7cd76013bdf000831790b29b9d0b401151bf5c2)
2007-10-10 13:17:32 -05:00
Andrew Bartlett
7ea6543ce5 r7257: Ensure the error message can never be uninitialised.
Andrew Bartlett
(This used to be commit fdd964582a4b102978fbc29dbf71de52bd30a155)
2007-10-10 13:17:32 -05:00
Simo Sorce
6a71fa86fb r7242: typo
(This used to be commit 4444585f06cf8a061a615002107cbb7560604f7f)
2007-10-10 13:17:31 -05:00
Andrew Bartlett
089b538163 r7241: The KDC almost links...
Using current lorikeet/heimdal, and with the KDC module enabled (it is
disabled by default), I almost get the KDC to link.

(To enable the KDC for testing, comment out the only line in
smbd/config.m4, and add 'kdc' to the 'server services' line in
smb.conf).
(This used to be commit 26cd4b4f68a370390e08263067402c6c70e49ec8)
2007-10-10 13:17:30 -05:00
Andrew Bartlett
752ffdf49c r7240: Don't call our fancy error message routines on a null context.
Andrew Bartlett
(This used to be commit 35877387c8e345d30d7598d1a139067a26cc1f7f)
2007-10-10 13:17:30 -05:00
Simo Sorce
a27609822b r7233: what about filling that new element ?
(This used to be commit 6a5e48c35cba801b16172cf6ff06b1d4116fb018)
2007-10-10 13:17:29 -05:00
Simo Sorce
d870c3481e r7232: add some more auth stuff
enables us to authenticate against system users (only PAM support right now)
(This used to be commit 0c894de58b7850a2905b73eb17c42d7e87cb9f87)
2007-10-10 13:17:29 -05:00
Simo Sorce
0b4a3021e1 r7224: add some more usefull data to the auth_usersupplied_info struct
(This used to be commit e40c44e9cdc0be7c52207f8479568804e7d9cff2)
2007-10-10 13:17:28 -05:00
Andrew Bartlett
8c4733b412 r7219: Don't allow 'binding' to be used uninitilaised.
Andrew Bartlett
(This used to be commit 3dd730fbc880ddc4f2efc6105cd21ec45f4afdd5)
2007-10-10 13:17:27 -05:00
Andrew Bartlett
b910a7c5e3 r7218: Don't use an uninitialised variable in an error message.
Andrew Bartlett
(This used to be commit 1f68cf7d0eb5de18da7f9d14c729caf314740601)
2007-10-10 13:17:27 -05:00
Tim Potter
4888823524 r6939: Get rid of SUBSYSTEM::NDR since all it did was require NDR_RAW.
(This used to be commit e077d9948f1406c61982d49c2fd925852fdf6553)
2007-10-10 13:16:59 -05:00
Andrew Bartlett
db169af3b7 r6883: Move to what simo assures me is the 'correct' way to find the NetBIOS
and long names for a domain.

Add servicePrincipalName mapping table (administrator configurable),
in the same spot as microsoft uses.

Andrew Bartlett
(This used to be commit c25e78b4b34384a3a79a920f50f01be696a048ba)
2007-10-10 13:16:55 -05:00
Andrew Bartlett
ab92b82d83 r6882: Put in configure tests and #ifdef to keep Samba building on older Heimdal.
Andrew Bartlett
(This used to be commit f2e926192595c74bd9cc8a3343e0fcf27a1de38b)
2007-10-10 13:16:54 -05:00
Jelmer Vernooij
e73d051e20 r6839: Add support for building subsystems as shared libraries. This can be
done by setting:
OUTPUT_TYPE = SHARED_LIBRARY
in the [SUBSYSTEM::...] section belonging to a subsystem.

The idea is to allow multiple values to OUTPUT_TYPE simultaneously
(e.g. OUTPUT_TYPE = SHARED_LIBRARY, STATIC_LIBRARY, OBJLIST )
(This used to be commit b9d0ae93ba86fec0115f58e7940b2a6c908bc809)
2007-10-10 13:16:50 -05:00
Jelmer Vernooij
29a8069aee r6838: Remove unnecessary calls to gensec_gsskrb5
Make the build system give a proper warning about this in the future
(This used to be commit 2d980465af87d25ce17b8340c6b5f662ef29edd3)
2007-10-10 13:16:49 -05:00
Andrew Bartlett
e29cb65a90 r6819: More notes on krb5 requirements
Andrew Bartlett
(This used to be commit dbd845998723987c75dc0e6a427330116dce0bf4)
2007-10-10 13:16:47 -05:00
Tim Potter
d441930987 r6810: Rename auth/{ntlmssp,gensec,kerberos} mk and m4 files to be called
config.mk and config.m4 to be consistent with the rest of Samba.
(This used to be commit f377c71e4f0d60684326906dfb65e4581294ec34)
2007-10-10 13:16:46 -05:00
Jelmer Vernooij
3184d47c42 r6805: Remove two remaining references to gensec_gsskrb5
(This used to be commit a02e07739781eb00b521d050ab06d6b0aedf47bc)
2007-10-10 13:16:45 -05:00
Andrew Bartlett
1d0e2b9569 r6803: Try to bring in the correct GSSAPI headers for the krb5 mech. This
should allow us to ditch the local static storage for OIDs, as well as
fix the build on non-heimdal platforms.

Andrew Bartlett
(This used to be commit a7e2ecfac9aaacd673e3583b62139e4f4e114429)
2007-10-10 13:16:45 -05:00
Andrew Bartlett
c71a11c7ad r6801: It appears that krb5_make_principal, while convenient, is not portable.
Andrew Bartlett
(This used to be commit c8e8fa129ed0c80bcd289445935047c28d48da64)
2007-10-10 13:16:45 -05:00
Andrew Bartlett
5c6dd5e800 r6800: A big GENSEC update:
Finally remove the distinction between 'krb5' and 'ms_krb5'.  We now
don't do kerberos stuff twice on failure.  The solution to this is
slightly more general than perhaps was really required (as this is a
special case), but it works, and I'm happy with the cleanup I achived
in the process.  All modules have been updated to supply a
NULL-terminated list of OIDs.

In that process, SPNEGO code has been generalised, as I realised that
two of the functions should have been identical in behaviour.

Over in the actual modules, I have worked to remove the 'kinit' code
from gensec_krb5, and placed it in kerberos/kerberos_util.c.

The GSSAPI module has been extended to use this, so no longer requires
a manual kinit at the command line.  It will soon loose the
requirement for a on-disk keytab too.

The general kerberos code has also been updated to move from
error_message() to our routine which gets the Heimdal error string
(which may be much more useful) when available.

Andrew Bartlett
(This used to be commit 0101728d8e2ed9419eb31fe95047944a718ba135)
2007-10-10 13:16:45 -05:00
Andrew Bartlett
8f96c42027 r6799: Remove a rudundent variable from the context structure - we can figure
this out by asking GENSEC, just like everybody else.

Andrew Bartlett
(This used to be commit 0268d6c46b73bf2097247639df2532b5e8591531)
2007-10-10 13:16:45 -05:00
Rafal Szczesniak
2c08639e02 r6797: Typo fix.
rafal
(This used to be commit 0f9a2aef6c87bd53c962b33bf78bf773d2319b97)
2007-10-10 13:16:44 -05:00
Andrew Bartlett
50da9ed856 r6796: Remove the gensec_gsskrb5 module, which had had all of it's special
features merged back into gensec_gssapi.

(Removed because I've made some API changes, and it isn't worth
'fixing' the rudundent code to cope with changes)

Andrew Bartlett
(This used to be commit e8cf3d58ec956e41fc8d3e38363db3d5d838fe1d)
2007-10-10 13:16:44 -05:00
Jelmer Vernooij
5b18cf2268 r6795: Make some functions static and remove some unused ones.
(This used to be commit 46509eb89980bfe6dabd71264d570ea356ee5a22)
2007-10-10 13:16:44 -05:00
Simo Sorce
51b0f62b8f r6794: spellfix
(This used to be commit f5956d150154cb4393dc323ae8ae1f936adee355)
2007-10-10 13:16:44 -05:00
Andrew Bartlett
ae0cf9c240 r6793: Move auth_sam to use the dnsDomain rather than the
soon-to-be-depricated 'realm'.

Add torture test for this behaviour.

Andrew Bartlet
(This used to be commit 6b9020661a13fd5ec6c5d1e21344d9f654978987)
2007-10-10 13:16:44 -05:00
Andrew Bartlett
c0c1b26a76 r6792: Allow a mech to fail on the first pass at the packet, and still fall
back to the other options.

Andrew Bartlett
(This used to be commit 9153d7306124d5e4ffc0467728210e2e2235059f)
2007-10-10 13:16:43 -05:00
Andrew Bartlett
4f9fa5a81d r6791: My early notes on the particular things I have discovered as I learn
kerberos, and how Microsoft constructs their kerberos implementation.

Andrew Bartlett
(This used to be commit 5fa9be75d987af106fd798f6d5379b637a170b00)
2007-10-10 13:16:43 -05:00
Tim Potter
8aa0aec431 r6767: Fix compiler warning.
(This used to be commit 45a0692be10a03032f9a4e26da3de08696c03464)
2007-10-10 13:16:42 -05:00
Andrew Tridgell
3da16200e9 r6740: make gensec_gssapi.c compile again
(This used to be commit 6d15e9511115cc30ee213ec91320a2dccde15b8f)
2007-10-10 13:16:40 -05:00