Bug 1399351

Summary: can dhcp/omapip/errwarn.c use /etc/os-release BUG_REPORT_URL?
Product: [Fedora] Fedora Reporter: Pat Riehecky <riehecky>
Component: dhcpAssignee: Jiri Popelka <jpopelka>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: jpopelka, thozza
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dhcp-4.3.5-2.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-30 08:17:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
work-in-progress patch none

Description Pat Riehecky 2016-11-28 20:01:24 UTC
Description of problem:
Now that fedora is provided a default bug report url via /etc/os-release, can dhcp's error message be altered to use that value rather than the hard coded bugzilla.redhat.com?

That change would allow me to alter the support url without recompiling DHCP.

Version-Release number of selected component (if applicable):dhcp-4.3.5-1.fc26


How reproducible:100%


Steps to Reproduce:
1.desire to have users who get the error directed to local support before fedora support
2.
3.

Actual results:
bugzilla.redhat.com is hard coded into the binary

Expected results:
Ability to customize without recompiling.

Additional info:

Comment 1 Jiri Popelka 2016-11-29 18:55:08 UTC
Created attachment 1225979 [details]
work-in-progress patch

I'm having this patch, but I'm getting:

error: format not a string literal and no format arguments [-Werror=format-security]

and I'm not sure how to make it work at the moment.

So saving it here as I'm not sure when I'll be having time to finish it.

Comment 2 Pat Riehecky 2016-11-29 19:39:15 UTC
I think it should be

+  log_error ("%s", bug_report_url());

rather than

+  log_error (bug_report_url());

Comment 3 Jiri Popelka 2016-11-30 08:17:15 UTC
Thanks, yes, I realized it too when I woke up today :-)