Message ID | 20180911182824.28272-1-matthias.fischer@ipfire.org |
---|---|
State | Superseded |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.ipfire.org [IPv6:2001:470:7183:25::1]) by web02.i.ipfire.org (Postfix) with ESMTP id A74E061A14 for <patchwork@web02.i.ipfire.org>; Tue, 11 Sep 2018 20:28:32 +0200 (CEST) Received: from mail01.i.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 2BFF710C8A44; Tue, 11 Sep 2018 19:28:32 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1536690512; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:list-id: list-unsubscribe:list-subscribe:list-post; bh=oDfQVPCDQf1h5UHkxdPNdZQXsrE9IMP0XTv9AUxuuiI=; b=hzYu+mhm/2Y2VA4tgcr0mHC4DFmTV4bBWvjnlhgymmzbO6VpLPHAX437XbAdkjpjPyGSTC 4nOkgClLvj7Mw9dYejc0lLyqKk1iDd6D+ryIEYIn+XeJJG+DYxEYeEXK1yxOja90tYw3l8 kntVkgn/TWlM6lRpCEOldwNmx6qyB3HhayHYyjMNhuqxirSQVQL66B2hZEWnUmJlQtEgiV 6gB6y4/vR9Nmf8IV0wL61dxapoHesL6qL1H2/dkLCKc0A2K/ojiiOxYuSFLfuKpyWQb2hd 2nWuSVTwtjIP3VNmwwGR0WxTS3t9S+otebJlskp6njsdZYCGWh0cz1pFbqFtcQ== Received: from Devel.localdomain (p5B0A0BE0.dip0.t-ipconnect.de [91.10.11.224]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 6DC6D109370B for <development@lists.ipfire.org>; Tue, 11 Sep 2018 19:28:29 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=201801; t=1536690509; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=oDfQVPCDQf1h5UHkxdPNdZQXsrE9IMP0XTv9AUxuuiI=; b=M0ovLrUIogC0I3WZ5bsEI65wub6jfa4HwOgjDn5aCwGtVW3G/rft8hYt+GKY7fsyUpFg62 KbjwLw8lW3lc+ddHtkWd9qr209g1GuMLy6u52LAyMnEF2jn37xUDii1LGqgUp0CAO8HFMu asE774NZpdWj244tQRaLVv/48l4wWQiJIr83w9uz6Hag7NVYEBxnkIvxuO5wT0QHHv+ckH fvDBrBSkouhOnhwdQy6+80UrF2CPL9AFXnTtVJ2OAENRMQJhnLINqA9f6fgCiXyqArqeau sRn/04zmuO92Ulj6fsPAd2cH0mTKX2+CKaim8fAV8Noiq3u4UofpaW5fBlp+jg== From: Matthias Fischer <matthias.fischer@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH] Suggested fix for 'rngd' service status Date: Tue, 11 Sep 2018 20:28:24 +0200 Message-Id: <20180911182824.28272-1-matthias.fischer@ipfire.org> X-Mailer: git-send-email 2.18.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.auth=mfischer smtp.mailfrom=matthias.fischer@ipfire.org X-Spamd-Result: default: False [-5.09 / 11.00]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; DKIM_SIGNED(0.00)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-2.99)[-0.998,0]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:3320, ipnet:91.0.0.0/10, country:DE]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Status: No, score=-5.09 X-Rspamd-Server: mail01.i.ipfire.org X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <https://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
Suggested fix for 'rngd' service status
|
|
Commit Message
Matthias Fischer
Sept. 12, 2018, 4:28 a.m. UTC
Hi,
Since https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=fd0a0384f07b399e9cb4cf46b4c5722b809ffe6a
'rngd' is running again with much higher values. STATUS / ENTROPY shows RUNNING. Thanks! ;-)
But '/var/run/rngd.pid' is created with wrong rights (0600). Therefore, STATUS / SERVICES tells me
'rngd' is stopped.
The suggested fix checks whether '/var/run/rngd.pid' exists and sets rights accordingly.
Best,
Matthias
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
---
src/initscripts/system/rngd | 3 +++
1 file changed, 3 insertions(+)
Comments
Hello, I support this patch. Quite a while ago, there was a similar one on this list but was not merged eventually. Michael stated it should be fixed in the upstream channel (which is basically right) - however, looking at our recent trouble with this software, I doubt it makes much sense to delay this until it reached the origin repository. Best regards, Peter Müller > Hi, > > Since https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=fd0a0384f07b399e9cb4cf46b4c5722b809ffe6a > 'rngd' is running again with much higher values. STATUS / ENTROPY shows RUNNING. Thanks! ;-) > > But '/var/run/rngd.pid' is created with wrong rights (0600). Therefore, STATUS / SERVICES tells me > 'rngd' is stopped. > > The suggested fix checks whether '/var/run/rngd.pid' exists and sets rights accordingly. > > Best, > Matthias > > Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org> > --- > src/initscripts/system/rngd | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/src/initscripts/system/rngd b/src/initscripts/system/rngd > index 91b70a7b4..8fe5c9363 100644 > --- a/src/initscripts/system/rngd > +++ b/src/initscripts/system/rngd > @@ -15,6 +15,9 @@ case "${1}" in > start) > boot_mesg "Starting Random Number Generator Daemon..." > loadproc /usr/sbin/rngd --quiet > + if [ -f "/var/run/rngd.pid" ]; then > + chmod 644 /var/run/rngd.pid > + fi > ;; > > stop) >
This initskript needs a rewrite. It's on my todo list... With the new kernel /dev/hwrng always exists even if there is no hardware present, so there are more things to do. Normal rngd will startet by udev if it found hardware but it was not startet if only rdrand was there. So the script need to fix the pid's, check if rngd is already running and should only start it if rdrand was present and not already running... Arne On 2018-09-11 21:55, Peter Müller wrote: > Hello, > > I support this patch. Quite a while ago, there was a similar > one on this list but was not merged eventually. > > Michael stated it should be fixed in the upstream channel (which > is basically right) - however, looking at our recent trouble > with this software, I doubt it makes much sense to delay this > until it reached the origin repository. > > Best regards, > Peter Müller > >> Hi, >> >> Since >> https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=fd0a0384f07b399e9cb4cf46b4c5722b809ffe6a >> 'rngd' is running again with much higher values. STATUS / ENTROPY >> shows RUNNING. Thanks! ;-) >> >> But '/var/run/rngd.pid' is created with wrong rights (0600). >> Therefore, STATUS / SERVICES tells me >> 'rngd' is stopped. >> >> The suggested fix checks whether '/var/run/rngd.pid' exists and sets >> rights accordingly. >> >> Best, >> Matthias >> >> Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org> >> --- >> src/initscripts/system/rngd | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/src/initscripts/system/rngd b/src/initscripts/system/rngd >> index 91b70a7b4..8fe5c9363 100644 >> --- a/src/initscripts/system/rngd >> +++ b/src/initscripts/system/rngd >> @@ -15,6 +15,9 @@ case "${1}" in >> start) >> boot_mesg "Starting Random Number Generator Daemon..." >> loadproc /usr/sbin/rngd --quiet >> + if [ -f "/var/run/rngd.pid" ]; then >> + chmod 644 /var/run/rngd.pid >> + fi >> ;; >> >> stop) >>
diff --git a/src/initscripts/system/rngd b/src/initscripts/system/rngd index 91b70a7b4..8fe5c9363 100644 --- a/src/initscripts/system/rngd +++ b/src/initscripts/system/rngd @@ -15,6 +15,9 @@ case "${1}" in start) boot_mesg "Starting Random Number Generator Daemon..." loadproc /usr/sbin/rngd --quiet + if [ -f "/var/run/rngd.pid" ]; then + chmod 644 /var/run/rngd.pid + fi ;; stop)