This check causes 4.1 domains to be unable to change their DNS backend
correctly as they do not have the saltPrincipal value stored.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10882
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
- if (saltPrincipal == NULL) {
- *perror_string = talloc_strdup(parent_ctx,
- "No saltPrincipal provided");
- return EINVAL;
- }
-
ret = krb5_kt_resolve(context, keytab_name, &keytab);
if (ret) {
*perror_string = smb_get_krb5_error_message(context,
ret = krb5_kt_resolve(context, keytab_name, &keytab);
if (ret) {
*perror_string = smb_get_krb5_error_message(context,
/* Create a new keytab. If during the cleanout we found
* entires for kvno -1, then don't try and duplicate them.
* Otherwise, add kvno, and kvno -1 */
/* Create a new keytab. If during the cleanout we found
* entires for kvno -1, then don't try and duplicate them.
* Otherwise, add kvno, and kvno -1 */
+ if (saltPrincipal == NULL) {
+ *perror_string = talloc_strdup(parent_ctx,
+ "No saltPrincipal provided");
+ ret = EINVAL;
+ goto done;
+ }
ret = create_keytab(tmp_ctx,
samAccountName, upper_realm, saltPrincipal,
ret = create_keytab(tmp_ctx,
samAccountName, upper_realm, saltPrincipal,