Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2143206

Summary: sscg should not generate dhparams.pem unless requested
Product: Red Hat Enterprise Linux 8 Reporter: Joe Orton <jorton>
Component: sscgAssignee: Stephen Gallagher <sgallagh>
Status: CLOSED ERRATA QA Contact: icesalov
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.6CC: aogburn, csaggin, icesalov, michele, ppitonak
Target Milestone: rcKeywords: AutoVerified, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sscg-3.0.0-7.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2149064 (view as bug list) Environment:
Last Closed: 2023-05-16 08:37:27 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 2149064    

Description Joe Orton 2022-11-16 10:58:26 UTC
Description of problem:
sscg started generating "dhparams.pem" in 8.7/9.1 and I think this is arguably a regression

It looks like it is breaking the httpd containers because the cwd isn't writable when sscg is invoked 

https://github.com/sclorg/httpd-container/issues/171#issuecomment-1315446275

even outside of the containers it is creating a "/dhparams.pem" which wasn't requested. For typical use-cases apps should use the OpenSSL builtin dhparams anyway.

Version-Release number of selected component (if applicable):
sscg-3.0.0-5.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1. dnf install mod_ssl
2. systemctl start httpd-init

Actual results:
/dhparams.pem exists

Expected results:
no /dhparams.pem should be created

Additional info:

Comment 1 Stephen Gallagher 2022-11-16 19:37:21 UTC
That's easy enough to change, but I'm concerned that altering it at this point might break consumers that are relying on the current behavior. How do you feel about it if I write the file "opportunistically". If the file can be opened for writing, do so. If not, skip it (rather than treating it as an error)?

Comment 2 Stephen Gallagher 2022-11-16 20:32:55 UTC
I have a proposed patch at https://github.com/sgallagher/sscg/pull/62 which behaves as follows:

== Scenario 1 ==
User calls `sscg` without specifying `--dhparams-file`.

SSCG will attempt to write out the default location of `./dhparams.pem`. If it cannot do so, it will log it and continue on.


== Scenario 2 ==
User calls `sscg --dhparams-file /some/path`.

SSCG will attempt to write out the parameters to `/some/path`. If it cannot do so, it will throw an error and return nonzero.

Comment 3 Joe Orton 2022-11-17 08:45:01 UTC
Make sense to me, thanks Stephen!

Comment 4 Joe Orton 2022-11-23 17:08:56 UTC
It looks like we can workaround the new behaviour in the container scripts which will likely be the fastest way to ship fixes. PR here for review upstream: https://github.com/sclorg/httpd-container/pull/172

I think it's right to fix the sscg behaviour as suggested in comment 2 though.

Comment 5 Stephen Gallagher 2022-11-28 15:01:33 UTC
I have a patch ready for sscg, I just haven't had a chance to land it yet and get it built for 8.8 yet. I'll do that today or tomorrow as time permits.

Comment 22 errata-xmlrpc 2023-05-16 08:37:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (sscg bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2836