#8358 TTL of DNS record can be set to negative value
Closed: fixed by abbra. Opened by carbenium.

Issue

Executing

[root@master ~]# ipa dnsrecord-mod ipa.test test-host1 --ttl=-1
  Record name: test-host1
  Time to live: -1
  A record: 1.1.1.1

succeeds. There is also no upper limit specified.

Steps to Reproduce

  1. See above

Actual behavior

Command succeeds.

Expected behavior

Command should fail.

Version/Release/Distribution

d20cda218960960fa4d1ab790f31edd4cac49ccc

Additional info:

Upper limit is given by explicit check in https://pagure.io/bind-dyndb-ldap/blob/master/f/src/ldap_entry.c#_535 (2147483647).
Lower limit should be 0.


https://github.com/freeipa/freeipa/pull/4754

master:

  • 373f8cdce707e250e88f43cd59aeae3e1b5d9d12 Specify min and max values for TTL of a DNS record

ipa-4-6:

  • 4db65cac250073059c9b6b282081d12a250dacc0 Specify min and max values for TTL of a DNS record

ipa-4-8:

  • ac47599ebf006d34d06d23654cb93f707cbd7d1f Specify min and max values for TTL of a DNS record

Metadata Update from @abbra:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata