Project

General

Profile

Tâche #29739

Scénario #29810: Mettre à niveau la configuration bind9 pour Seth 2.8.0

Le service bind9 s’appelle maintenant named sur EOLE 2.8 + mise à niveau apparmor

Added by Joël Cuissinat over 3 years ago. Updated about 3 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
03/11/2020
Due date:
% Done:

100%

Remaining (hours):
0.0

Description

Le service pour le DNS a été renommé.
Bien qu’un alias bind9 soit déclaré pour garder la compatibilité, ce changement pose problème au reconfigure :
  1. l’une des étapes consiste à désactiver le service bind9,
  2. le lien symbolique /etc/systemd/system/bind9.service est supprimé.
  3. la tentative de réactivation du service bind9 échoue.

Le lien peut être recréé en activant le service named puisque bind9 est déclaré comme alias.


Related issues

Related to Distribution EOLE - Tâche #30680: Occurences de bind9 à remplacer sur Amon 2.8 Fermé 09/21/2020
Copied from eole-dns - Tâche #29738: Le service bind9 s’appelle maintenant named sur EOLE 2.8 Fermé 03/11/2020

Associated revisions

Revision adc56425 (diff)
Added by Joël Cuissinat over 3 years ago

service bind9 => named

Ref: #29739

Revision f392893c (diff)
Added by Benjamin Bohard about 3 years ago

Remove duplicated apparmor permissions for named

Ref #29739

History

#1 Updated by Joël Cuissinat over 3 years ago

  • Copied from Tâche #29738: Le service bind9 s’appelle maintenant named sur EOLE 2.8 added

#2 Updated by Joël Cuissinat over 3 years ago

Il faut en profiter pour vérifier/mettre à niveau/supprimer le contenu du template

dicos/25_smb_ad.xml:        <file name='/etc/apparmor.d/local/usr.sbin.named' source='named.apparmor.conf'/>

$ cat tmpl/named.apparmor.conf 
# original file superseded by creole
%if %%getVar('ad_internal_dns_backend', 'oui') == 'non'
/run/samba/winbindd/pipe rw,
/var/lib/samba/bind-dns/dns.keytab rk,
/var/lib/samba/bind-dns/named.conf r,
/var/lib/samba/bind-dns/dns/** wrk,
/usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9_11.so m,
/usr/lib/x86_64-linux-gnu/samba/gensec/** m,
/usr/lib/x86_64-linux-gnu/samba/ldb/** m,
/usr/lib/x86_64-linux-gnu/ldb/modules/ldb/** m,
/etc/samba/smb.conf r,
/etc/samba/smb.conf.d/** r,
/var/tmp/** rwmk,
/dev/urandom rw,
%end if

#3 Updated by Joël Cuissinat over 3 years ago

aca.eolebase-2.8.0a0-Daily + bind9

root@eolebase:~# grep -A14 DLZ /etc/apparmor.d/usr.sbin.named 
  # Samba DLZ
  /{usr/,}lib/@{multiarch}/samba/bind9/*.so rm,
  /{usr/,}lib/@{multiarch}/samba/gensec/*.so rm,
  /{usr/,}lib/@{multiarch}/samba/ldb/*.so rm,
  /{usr/,}lib/@{multiarch}/ldb/modules/ldb/*.so rm,
  /var/lib/samba/bind-dns/dns.keytab rk,
  /var/lib/samba/bind-dns/named.conf r,
  /var/lib/samba/bind-dns/dns/** rwk,
  /var/lib/samba/private/dns.keytab rk,
  /var/lib/samba/private/named.conf r,
  /var/lib/samba/private/dns/** rwk,
  /etc/samba/smb.conf r,
  /dev/urandom rwmk,
  owner /var/tmp/krb5_* rwk,

#4 Updated by Joël Cuissinat over 3 years ago

  • Parent task changed from #29652 to #29749

#5 Updated by Joël Cuissinat over 3 years ago

  • Subject changed from Le service bind9 s’appelle maintenant named sur EOLE 2.8 to Le service bind9 s’appelle maintenant named sur EOLE 2.8 + mise à niveau apparmor
  • Assigned To deleted (Joël Cuissinat)
  • Parent task changed from #29749 to #29810

#6 Updated by Benjamin Bohard about 3 years ago

La seule différence notable est la permission de type rw sur /run/samba/winbindd/pipe et la permission de type r sur les sous-dossiers de /etc/samba/smb.conf.d.

Pour le premier, la tentative de communication avec winbindd ne semble pas être un élément essentiel du fonctionnement de named (d’ailleurs, mysqld et slapd essuient les mêmes refus).

#7 Updated by Benjamin Bohard about 3 years ago

  • Status changed from Nouveau to En cours

#8 Updated by Benjamin Bohard about 3 years ago

Après nettoyage des règles redondantes dans la configuration apparmor, test du fonctionnement avec quelques opérations :
  • samba-tool dns add 192.168.0.5 domseth.ac-test.fr dc2 A 192.168.0.6 -U administrator
  • samba-tool dns query 192.168.0.5 domseth.ac-test.fr @ ALL -U administrator
  • dig @192.168.0.5 dc2.domseth.ac-test.fr

Le dns répond bien.

#9 Updated by Benjamin Bohard about 3 years ago

  • Status changed from En cours to Résolu

#10 Updated by Joël Cuissinat about 3 years ago

  • Assigned To set to Benjamin Bohard
  • % Done changed from 0 to 100

#11 Updated by Joël Cuissinat about 3 years ago

OK pour le module Seth mais des corrections sont à prévoir ailleurs !

root@dc1:~# rgrep bind9 /usr/share/eole/ --color
/usr/share/eole/creole/distrib/named.conf.dlz:    database "dlopen /usr/lib/x86_64-linux-gnu/samba/bind9/dlz_bind9_12.so";
/usr/share/eole/creole/distrib/nginx.override:After=bind9.service
/usr/share/eole/creole/distrib/nginx.override:Wants=bind9.service
/usr/share/eole/creole/distrib/named.conf:// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
/usr/share/eole/creole/dicos/25_smb_ad.xml:        <file filelist='bind9' name='/etc/bind/named.conf' rm='True'/>
/usr/share/eole/creole/dicos/25_smb_ad.xml:        <file filelist='bind9' name='/etc/bind/named.conf.options' rm='True'/>
/usr/share/eole/creole/dicos/25_smb_ad.xml:        <service servicelist='bind9'>named</service>
/usr/share/eole/creole/dicos/25_smb_ad.xml:            <target type='servicelist'>bind9</target>
/usr/share/eole/creole/dicos/25_smb_ad.xml:            <target type='filelist'>bind9</target>
/usr/share/eole/posttemplate/01-bind-apparmor:# rechargement du profil apparmor pour bind9
/usr/share/eole/posttemplate/00-eole-common:    [ -f /etc/init.d/bind9 ] && CreoleService bind9 start > /dev/null
/usr/share/eole/posttemplate/00-eole-common:    [ -f /lib/systemd/system/bind9.service ] && CreoleService bind9 stop > /dev/null

=> #30680

#12 Updated by Joël Cuissinat about 3 years ago

  • Related to Tâche #30680: Occurences de bind9 à remplacer sur Amon 2.8 added

#13 Updated by Joël Cuissinat about 3 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) set to 0.0

Also available in: Atom PDF