1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/lib/krb5_wrap
Alexander Bokovoy f3e349bebc krb5-samba: interdomain trust uses different salt principal
Salt principal for the interdomain trust is krbtgt/DOMAIN@REALM where
DOMAIN is the sAMAccountName without the dollar sign ($)

The salt principal for the BLA$ user object was generated wrong.

dn: CN=bla.base,CN=System,DC=w4edom-l4,DC=base
securityIdentifier: S-1-5-21-4053568372-2049667917-3384589010
trustDirection: 3
trustPartner: bla.base
trustPosixOffset: -2147483648
trustType: 2
trustAttributes: 8
flatName: BLA

dn: CN=BLA$,CN=Users,DC=w4edom-l4,DC=base
userAccountControl: 2080
primaryGroupID: 513
objectSid: S-1-5-21-278041429-3399921908-1452754838-1597
accountExpires: 9223372036854775807
sAMAccountName: BLA$
sAMAccountType: 805306370
pwdLastSet: 131485652467995000

The salt stored by Windows in the package_PrimaryKerberosBlob
(within supplementalCredentials) seems to be
'W4EDOM-L4.BASEkrbtgtBLA' for the above trust
and Samba stores 'W4EDOM-L4.BASEBLA$'.

While the salt used when building the keys from
trustAuthOutgoing/trustAuthIncoming is
'W4EDOM-L4.BASEkrbtgtBLA.BASE', which we handle correct.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13539

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Sep  5 03:57:22 CEST 2018 on sn-devel-144
2018-09-05 03:57:22 +02:00
..
enctype_convert.c libkrb5: Fix build with MIT Kerberos. 2012-08-29 12:23:37 +02:00
gss_samba.c krb5_wrap: Fix smb_gss_krb5_import_cred() picky-developer build 2017-03-14 15:22:12 +01:00
gss_samba.h lib/krb5_wrap: add smb_gss_krb5_import_cred wrapper 2017-03-08 18:00:11 +01:00
keytab_util.c krb5_wrap: Fix CID 1414755 Resource leak 2018-04-04 03:51:00 +02:00
krb5_samba.c krb5-samba: interdomain trust uses different salt principal 2018-09-05 03:57:22 +02:00
krb5_samba.h krb5-samba: interdomain trust uses different salt principal 2018-09-05 03:57:22 +02:00
wscript_build wscript: remove executable bits for all wscript* files 2017-01-11 20:21:01 +01:00