mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
py: samba.dnsserver: add helper for record buffers
We *always* make these steps when we get a record. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
581d7a528e
commit
e9a265612a
@ -297,6 +297,13 @@ def flag_from_string(rec_type):
|
||||
raise DNSParseError('Unknown type of DNS record %s' % rec_type) from e
|
||||
|
||||
|
||||
def recbuf_from_string(*args, **kwargs):
|
||||
rec = record_from_string(*args, **kwargs)
|
||||
buf = dnsserver.DNS_RPC_RECORD_BUF()
|
||||
buf.rec = rec
|
||||
return buf
|
||||
|
||||
|
||||
def dns_name_equal(n1, n2):
|
||||
"""Match dns name (of type DNS_RPC_NAME)"""
|
||||
return n1.str.rstrip('.').lower() == n2.str.rstrip('.').lower()
|
||||
|
Loading…
x
Reference in New Issue
Block a user