s4:kdc use a default kvno of 0 for trust keys
[idra/samba.git] / source4 / kdc / db-glue.c
index ed64685a4fc2cff11c8edcb68dd4901d9c594e52..74ebb1705df365806741832d94d40f8fc2c48a79 100644 (file)
@@ -872,7 +872,8 @@ static krb5_error_code samba_kdc_trust_message2entry(krb5_context context,
                goto out;
        }
 
-       entry_ex->entry.kvno = -1;
+       /* default to 0 if kvno is not available */
+       entry_ex->entry.kvno = 0;
        for (i=0; i < password_blob.count; i++) {
                if (password_blob.current.array[i].AuthType == TRUST_AUTH_TYPE_VERSION) {
                        entry_ex->entry.kvno = password_blob.current.array[i].AuthInfo.version.version;