s4 dns: Make sure to remember incoming tkey name
authorKai Blin <kai@samba.org>
Tue, 4 Sep 2012 23:26:16 +0000 (01:26 +0200)
committerKai Blin <kai@samba.org>
Wed, 5 Sep 2012 17:08:33 +0000 (19:08 +0200)
source4/dns_server/dns_crypto.c

index 14dc4ca69b5c95d8db108237b2114f03eda05661..7362adc426b4338f23147802a4a03fd92689eb32 100644 (file)
@@ -223,6 +223,10 @@ WERROR dns_verify_tsig(struct dns_server *dns,
        }
 
        state->authenticated = true;
+       state->key_name = talloc_strdup(mem_ctx, tkey->name);
+       if (state->key_name == NULL) {
+               return WERR_NOMEM;
+       }
 
        return WERR_OK;
 }