Bug 1399351 - can dhcp/omapip/errwarn.c use /etc/os-release BUG_REPORT_URL?
Summary: can dhcp/omapip/errwarn.c use /etc/os-release BUG_REPORT_URL?
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp
Version: rawhide
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Jiri Popelka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-28 20:01 UTC by Pat Riehecky
Modified: 2016-11-30 08:17 UTC (History)
2 users (show)

Fixed In Version: dhcp-4.3.5-2.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-30 08:17:15 UTC
Type: Bug


Attachments (Terms of Use)
work-in-progress patch (2.25 KB, patch)
2016-11-29 18:55 UTC, Jiri Popelka
no flags Details | Diff

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 :-)


Note You need to log in before you can comment on or make changes to this bug.