Bug 1252175 - allow to specify parameters to rngd in /etc/sysconfig [NEEDINFO]
allow to specify parameters to rngd in /etc/sysconfig
Status: NEW
Product: Fedora
Classification: Fedora
Component: rng-tools (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jeff Garzik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-10 17:44 EDT by Gerd v. Egidy
Modified: 2018-05-03 04:53 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
ruben: needinfo? (jgarzik)


Attachments (Terms of Use)
Patch to add a rngd file to /etc/sysconfig (1.71 KB, patch)
2015-08-10 17:44 EDT, Gerd v. Egidy
no flags Details | Diff

  None (edit)
Description Gerd v. Egidy 2015-08-10 17:44:08 EDT
Created attachment 1061265 [details]
Patch to add a rngd file to /etc/sysconfig

Description of problem:
rngd is run by systemd. But rngd.service currently does not allow to specify any commandline arguments for running rngd.

In some cases it would make sense to e.g. be able to activate Intel DRNG as full entropy source or to pull in random data from another hardware rng whose driver is running in userspace and is offering it's numbers not on /dev/hwrandom. All this is possible with commandline options. 

But currently you have to patch rngd.service when you want to apply them. This conflicts with further updates of the rpm and complicates the task.

So please add the file /etc/sysconfig/rngd to add parameters to rngd.

Version-Release number of selected component (if applicable):
rng-tools-5-5.fc22.x86_64

Attached is a patch which implements the necessary changes. Please apply or give feedback how it should be improved.
Comment 1 Jamie Lennox 2015-08-10 22:35:16 EDT
Yes please. I was going to file this exact bug for the same reasons. I want to run rngd from systemctl but set the source to something other than /dev/hwrandom.
Comment 2 Jan Kurik 2016-02-24 08:36:23 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 3 Ruben Kerkhof 2016-11-16 04:41:46 EST
Yes please. This used to work before this package was converted to systemd.
Comment 4 Ruben Kerkhof 2016-11-22 11:58:50 EST
A simple patch to do this with systemd dropins instead of a file in /etc/sysconfig/rngd  (we have too many of those already) below:

$ git diff rngd.service
diff --git a/rngd.service b/rngd.service
index 33829f6..2f72d64 100644
--- a/rngd.service
+++ b/rngd.service
@@ -2,7 +2,7 @@
 Description=Hardware RNG Entropy Gatherer Daemon
 
 [Service]
-ExecStart=/sbin/rngd -f
+ExecStart=/usr/sbin/rngd -f $OPTIONS
 SuccessExitStatus=66
 
 [Install]

That way you could do
sudo systemctl edit rngd.service

Add
[Service]
Environment="OPTIONS=--no-tpm=1"

Jeff, ok to apply?
Comment 5 Gerd v. Egidy 2016-11-23 04:17:08 EST
Using systemctl edit to set the options would work for me too.
Comment 6 Fedora End Of Life 2017-02-28 04:48:13 EST
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.
Comment 7 Fedora End Of Life 2018-05-03 04:48:26 EDT
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

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