r11995: A big kerberos-related update.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 1 Dec 2005 05:20:39 +0000 (05:20 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:46:56 +0000 (13:46 -0500)
commit6b75573df49c6210e1b9d71e108a9490976bd41d
tree625c7711f2c9eb035a8d262ca31a31318a8e7093
parent88a7b7805c11cb3a1be3222d3e4b0b3ad8aff2aa
r11995: A big kerberos-related update.

This merges Samba4 up to current lorikeet-heimdal, which includes a
replacement for some Samba-specific hacks.

In particular, the credentials system now supplies GSS client and
server credentials.  These are imported into GSS with
gss_krb5_import_creds().  Unfortunetly this can't take an MEMORY
keytab, so we now create a FILE based keytab as provision and join
time.

Because the keytab is now created in advance, we don't spend .4s at
negprot doing sha1 s2k calls.  Also, because the keytab is read in
real time, any change in the server key will be correctly picked up by
the the krb5 code.

To mark entries in the secrets which should be exported to a keytab,
there is a new kerberosSecret objectClass.  The new routine
cli_credentials_update_all_keytabs() searches for these, and updates
the keytabs.

This is called in the provision.js via the ejs wrapper
credentials_update_all_keytabs().

We can now (in theory) use a system-provided /etc/krb5.keytab, if

krb5Keytab: FILE:/etc/krb5.keytab

is added to the secrets.ldb record.  By default the attribute

privateKeytab: secrets.keytab

is set, pointing to allow the whole private directory to be moved
without breaking the internal links.
27 files changed:
source/auth/credentials/credentials.c
source/auth/credentials/credentials.h
source/auth/credentials/credentials_files.c
source/auth/credentials/credentials_krb5.c
source/auth/gensec/gensec_gssapi.c
source/heimdal/kdc/kerberos5.c
source/heimdal/lib/gssapi/accept_sec_context.c
source/heimdal/lib/gssapi/acquire_cred.c
source/heimdal/lib/gssapi/arcfour.c
source/heimdal/lib/gssapi/copy_ccache.c
source/heimdal/lib/gssapi/gssapi.h
source/heimdal/lib/gssapi/gssapi_locl.h
source/heimdal/lib/gssapi/init_sec_context.c
source/heimdal/lib/gssapi/release_cred.c
source/heimdal/lib/hdb/db.c
source/heimdal/lib/hdb/hdb-protos.h
source/heimdal/lib/hdb/ndbm.c
source/heimdal/lib/krb5/cache.c
source/heimdal/lib/krb5/get_for_creds.c
source/heimdal/lib/krb5/keytab.c
source/heimdal/lib/krb5/krb5-private.h
source/heimdal/lib/krb5/krb5-protos.h
source/heimdal/lib/krb5/rd_cred.c
source/libnet/libnet_join.c
source/scripting/ejs/smbcalls_creds.c
source/scripting/libjs/provision.js
source/setup/secrets.ldif