Bug 323161

Summary: system-config-bind doesn't handle rndc.key file
Product: Red Hat Enterprise Linux 5 Reporter: Flavio Leitner <fleitner>
Component: system-config-bindAssignee: Jaroslav Reznik <jreznik>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.1CC: atkac, tao
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 21:39:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 391501    
Attachments:
Description Flags
Proper handling of rndc.key file
none
Proper handling of rndc.key file none

Description Flavio Leitner 2007-10-08 15:17:56 UTC
Description of problem:
system-config-bind displays the key but can't do updates because it's on
external file, see the steps to reproduce section.

Version-Release number of selected component (if applicable):
system-config-bind 4.0.3-2.el5

How reproducible:
Always

Steps to Reproduce:
1. Install system-config-bind and bind
2. The default named.conf have the last line: include "/etc/rndc.key";
3. run system-config-bind
4. Change the rndc key on GUI
5. Hit Save
6. Error message is displayed

Additional info:

The bug happens because it parses named.conf and recognizes the key 'include' so
it expands and read the content of the file. Later on, when you hit 'save'
button it doesn't remember about the external file and just append a new key like:
...
include "/etc/rndc.key";
key "rndckey" {
   algorithm hmac-md5;
   secret "foobar";
};
...

then it runs named-checkconf which complains with the following message:
"/etc/named.conf:62: key 'rndckey': already exists previous definition:
/etc/rndc.key:1"

so it fails to update the named.conf and rndc.key files.

-Flavio

Comment 1 Ondrej Dvoracek 2007-10-09 08:18:44 UTC
Hi,
I can reproduce it as well. I will have a look at it and let you know.
Cheers Ondrej

Comment 2 RHEL Program Management 2007-12-03 20:46:45 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release.  This request will
be reviewed for a future Red Hat Enterprise Linux release.

Comment 3 RHEL Program Management 2008-06-02 20:30:46 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 5 Jaroslav Reznik 2008-07-23 12:17:35 UTC
Created attachment 312471 [details]
Proper handling of rndc.key file

Comment 6 Jaroslav Reznik 2008-07-23 12:18:31 UTC
Created attachment 312472 [details]
Proper handling of rndc.key file

This patch should solve this issue.

Comment 11 errata-xmlrpc 2009-01-20 21:39:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0167.html