<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>45063</bug_id>
          
          <creation_ts>2023-01-27 19:22:50 +0300</creation_ts>
          <short_desc>При изменении имени компьютера создаётся некорректный ddns-key.conf</short_desc>
          <delta_ts>2023-02-01 10:15:36 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>alterator-bind</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="jqt4@altlinux.org">jqt4</reporter>
          <assigned_to name="Anton V. Boyarshinov">boyarsh</assigned_to>
          <cc>boyarsh</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>220820</commentid>
    <comment_count>0</comment_count>
    <who name="jqt4@altlinux.org">jqt4</who>
    <bug_when>2023-01-27 19:22:50 +0300</bug_when>
    <thetext>Система установлена из образа http://beta.altlinux.org/server/x86_64/alt-server-10.1-rc2-x86_64.iso и обновлена до Сизифа.

rpm -q bind alterator-bind
bind-9.16.37-alt1.x86_64
alterator-bind-0.9.5-alt1.1.1.x86_64

При изменении имени компьютера в acc (вкладка Ethernet-интерфейсы) создаётся файл:

cat /var/lib/bind/etc/ddns-key.conf
key ddns-key {
    algorithm hmac-md5;
    secret &quot;&quot;;
};

При этом в лог /var/run/alteratord/alteratord.log выдаётся:

recreate domain...
Cleaning up resolvconf zones...
dnssec-keygen: fatal: The -r option has been deprecated.
System random data is always used.

sed: невозможно прочитать .private: Нет такого файла или каталога
dnssec-keygen: fatal: The -r option has been deprecated.
System random data is always used.

sed: невозможно прочитать .private: Нет такого файла или каталога
/usr/bin/ddns-sh-functions: строка 450: out: не заданы границы переменной
could not read key from /var/lib/bind/etc/Kddns-key.+157+*.{private,key}: file not found
update failed: REFUSED

DHCP не работает с таким файлом:

dhcpd -t -cf /var/lib/bind/etc/ddns-key.conf ; echo $?
Internet Systems Consortium DHCP Server 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/var/lib/bind/etc/ddns-key.conf line 4: expecting a parameter or declaration
};
 ^
Configuration file errors encountered -- exiting
Please note the following before requesting help:
This software is a part of the Internet Software Consortium&apos;s DHCP suite
with modifications for ALT Linux.
The ISC folks quite reasonably require that you do not bother them with
questions on software that includes third-party modifications and might
not be based off their latest code.  Hence, please direct any questions
to the community@ mailing list instead; the subscription instructions
are given at http://lists.altlinux.org/mailman/listinfo/community .
Please also read the SUPPORT section on the README about
submitting bug reports and requests for help.
exiting.
1

Причина проблемы в том, что интерфейс командной строки утилиты dnssec-keygen из bind изменился и строки скрипта ddns-sh-functions из alterator-bind:

local key=&quot;$(/usr/sbin/dnssec-keygen -r /dev/urandom -a HMAC-MD5 -b 512 -n USER &quot;$name&quot;)&quot;
local secret=&quot;$(sed -n &apos;s/Key:[[:space:]]\+\([^[:space:]]\+\)/\1/p&apos; &quot;$key.private&quot;)&quot;

работают неправильно.

Прошу исправить.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>220914</commentid>
    <comment_count>1</comment_count>
    <who name="jqt4@altlinux.org">jqt4</who>
    <bug_when>2023-01-30 17:54:41 +0300</bug_when>
    <thetext>Лог сравнения help&apos;ов старого и нового bind&apos;ов:

$ diff -u ../../help-9.11.log ../../help-9.16.log
--- ../../help-9.11.log    2023-01-30 17:52:16.743546892 +0400
+++ ../../help-9.16.log    2023-01-30 17:53:05.858303207 +0400
@@ -2,41 +2,30 @@
 Usage:
     dnssec-keygen [options] name

-Version: 9.11.37
+Version: 9.16.35
     name: owner of the key
 Options:
     -K &lt;directory&gt;: write keys into directory
+    -k &lt;policy&gt;: generate keys for dnssec-policy
+    -l &lt;file&gt;: configuration file with dnssec-policy statement
     -a &lt;algorithm&gt;:
-        RSA | RSAMD5 | DSA | RSASHA1 | NSEC3RSASHA1 | NSEC3DSA |
-        RSASHA256 | RSASHA512 | ECCGOST |
+        RSASHA1 | NSEC3RSASHA1 |
+        RSASHA256 | RSASHA512 |
         ECDSAP256SHA256 | ECDSAP384SHA384 |
-        ED25519 | ED448 | DH |
-        HMAC-MD5 | HMAC-SHA1 | HMAC-SHA224 | HMAC-SHA256 | 
-        HMAC-SHA384 | HMAC-SHA512
-       (default: RSASHA1, or NSEC3RSASHA1 if using -3)
+        ED25519 | ED448 | DH
     -3: use NSEC3-capable algorithm
     -b &lt;key size in bits&gt;:
-        RSAMD5:    [512..4096]
-        RSASHA1:    [512..4096]
-        NSEC3RSASHA1:    [512..4096]
-        RSASHA256:    [512..4096]
+        RSASHA1:    [1024..4096]
+        NSEC3RSASHA1:    [1024..4096]
+        RSASHA256:    [1024..4096]
         RSASHA512:    [1024..4096]
         DH:        [128..4096]
-        DSA:        [512..1024] and divisible by 64
-        NSEC3DSA:    [512..1024] and divisible by 64
-        ECCGOST:    ignored
         ECDSAP256SHA256:    ignored
         ECDSAP384SHA384:    ignored
         ED25519:    ignored
         ED448:    ignored
-        HMAC-MD5:    [1..512]
-        HMAC-SHA1:    [1..160]
-        HMAC-SHA224:    [1..224]
-        HMAC-SHA256:    [1..256]
-        HMAC-SHA384:    [1..384]
-        HMAC-SHA512:    [1..512]
-        (if using the default algorithm, key size
-        defaults to 2048 for KSK, or 1024 for all others)
+        (key size defaults are set according to
+        algorithm and usage (ZSK or KSK)
     -n &lt;nametype&gt;: ZONE | HOST | ENTITY | USER | OTHER
         (DNSKEY generation defaults to ZONE)
     -c &lt;class&gt;: (default: IN)
@@ -47,7 +36,6 @@
     -g &lt;generator&gt;: use specified generator (DH only)
     -L &lt;ttl&gt;: default key TTL
     -p &lt;protocol&gt;: (default: 3 [dnssec])
-    -r &lt;randomdev&gt;: a file containing random data
     -s &lt;strength&gt;: strength value this key signs DNS records with (default: 0)
     -T &lt;rrtype&gt;: DNSKEY | KEY (default: DNSKEY; use KEY for SIG(0))
     -t &lt;type&gt;: AUTHCONF | NOAUTHCONF | NOAUTH | NOCONF (default: AUTHCONF)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>220990</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2023-02-01 10:15:36 +0300</bug_when>
    <thetext>alterator-bind-0.9.6-alt1 -&gt; sisyphus:

 Tue Jan 31 2023 Dmitry Terekhin &lt;jqt4@altlinux&gt; 0.9.6-alt1
 - ddns-sh-functions: Use tsig-keygen instead of dnssec-keygen (closes: #45063).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>