From nobody Mon Sep 18 11:38:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Rq2pz3xYFz4t3Rr; Mon, 18 Sep 2023 11:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rq2pz3RbLz4F28; Mon, 18 Sep 2023 11:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695037083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cgy70eLtuYIRfMDKSpoCBljoJoSKUklphy0QSy0Y1kU=; b=p6FIPka3hSaMGrxBly1W2Mj4MnxL96TIRKGPr8LO0vSDF75l3DBAZp7hN/9Ma2jx6aN8CT 8O6pXX4ABsdGQ9xhugzxhsRT2OIbAD1SGNp1wmzlMFt9v+DIVa4RDw/CTrLp0DdtXH/LGi uPF/pv7N0ncKOiuPLRuiw7dL4ufxDa/uaiaGkvOm8dq18Dh86NDUBqxV3unb7Ow/phdTZ5 J+4O252leQ22OiHidBewo6an9k06ka2Dep/CAEtw4V70MGf4kwoC6nh64LgoS3okGJu8XE IQINREOeoK9J7bCUIAYbq3wIWtiEiNq7OmGqQngKKnvxOI5ZOf7HOxBoOxZNCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1695037083; a=rsa-sha256; cv=none; b=a4WFQ96DK1rluY68PXOsLP47XobuBdcamV8AHoBNEIwObN/2Xiw4dmGtq2wBS25UJhBxPV U1htVX0bRyQf2uRBRUKh8gghHmF47ghELQk7y33JzTkDV5Ga0lcRl1nXmUOKGMp0OeiMFs mVFkphliWuesg2XASLLAIBpy7hfKQ7YHrj0Ktl9I9J8y/0G43LYNQvCiKX7HVIfaU9h10B dr2ZYSLfZ+2TX5TLcOMiFFRzwMqiHAU4Uop0os8pFaYBNyow9O4e8UBxC9Ywhg1YJv0KMf 6vignfcsZWviJiVnqBjOHXfwKHj/TLbHaBIw9bhZ/Ybdgly8UZ9wznZpHPHvAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1695037083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cgy70eLtuYIRfMDKSpoCBljoJoSKUklphy0QSy0Y1kU=; b=ZxCvNnVrMTpe65sBgQRSkZ3aJdNklU+cU2R3nlnkgKXiXpZmnSnRWPrEHiKaQKnJcH1i0Y 3nWUIQcq6bZkC6YF7vb8GUrrz6POn1oT/vpcwwI6V416ZpUKFsMrOlHE6d97SrZ81VqCsc SsWxDwZodvotlPz5FOhcUeqi/cf+bxxRygnvoQNa2LmGuYNuwUPVQK1I8CT7svnN81nCSl Se11JyEi7pcH4Wwga+lf7mZmLhap70KFKNNS6uA5pZ/dAQty6h5CbOC75aP9gzqokL9hTm A8eCXkHbudAKFBU5c/zaAg9EPnuWpLmHblf0sV73noEHWdIntUIRPB0yTHyyoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Rq2pz2TsPzVG8; Mon, 18 Sep 2023 11:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38IBc3Pb013373; Mon, 18 Sep 2023 11:38:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38IBc35B013370; Mon, 18 Sep 2023 11:38:03 GMT (envelope-from git) Date: Mon, 18 Sep 2023 11:38:03 GMT Message-Id: <202309181138.38IBc35B013370@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Fernando =?utf-8?Q?Apestegu=C3=ADa?= Subject: git: 8dc9b10e388d - main - save-entropy: Add manual page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8dc9b10e388da19d63b3dd718a8243e8e969091d Auto-Submitted: auto-generated The branch main has been updated by fernape: URL: https://cgit.FreeBSD.org/src/commit/?id=8dc9b10e388da19d63b3dd718a8243e8e969091d commit 8dc9b10e388da19d63b3dd718a8243e8e969091d Author: Fernando ApesteguĂ­a AuthorDate: 2023-09-07 08:28:43 +0000 Commit: Fernando ApesteguĂ­a CommitDate: 2023-09-18 11:33:59 +0000 save-entropy: Add manual page Succinct manual page for save-entropy(8). PR: 223998 Reported by: AJ Jordan Reviewed by: carlavilla@, delphij@, lwhsu@, pauamma_gundo.com Approved by: delphi, lwhsu (src) Differential Revision: https://reviews.freebsd.org/D41768 --- libexec/save-entropy/Makefile | 1 + libexec/save-entropy/save-entropy.8 | 97 +++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) diff --git a/libexec/save-entropy/Makefile b/libexec/save-entropy/Makefile index 1c7eabf36c7f..0c541606411f 100644 --- a/libexec/save-entropy/Makefile +++ b/libexec/save-entropy/Makefile @@ -1,4 +1,5 @@ SCRIPTS= save-entropy.sh +MAN= save-entropy.8 .include diff --git a/libexec/save-entropy/save-entropy.8 b/libexec/save-entropy/save-entropy.8 new file mode 100644 index 000000000000..f7a93c8866fc --- /dev/null +++ b/libexec/save-entropy/save-entropy.8 @@ -0,0 +1,97 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2023 Fernando Apesteguia +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd September 18, 2023 +.Dt SAVE-ENTROPY 8 +.Os +.Sh NAME +.Nm save-entropy +.Nd Save bits of entropy to feed /dev/random at startup +.Sh SYNOPSIS +.Nm save-entropy +.Sh DESCRIPTION +The +.Nm +command is used to save entropy data from +.Pa /dev/random +to files in a specified output location. +The files saved are used at startup to provide additional entropy for +.Pa /dev/random . +The output file will be different in every invocation until the maximum number +of different files is reached. +(See +.Em entropy_save_num +for details). +By default this script is invoked via +.Xr cron 8 +every eleven minutes approximately. +.Pp +This command does nothing if executed inside a +.Xr jail 8 . +.Pp +Three variables in +.Pa /etc/rc.conf +regulate the behavior of the script: +.Bl -tag -width Ds +.It Va entropy_dir +Specify the directory for saved entropy files. +Defaults to +.Pa /var/db/entropy . +If set to "NO" it disables caching entropy via +.Xr cron 8 . +This setting is shared with +.Pa /etc/rc.d/random . +.It Va entropy_save_sz +Size of the entropy cache files. +Defaults to 4096. +.It Va entropy_save_num +Number of entropy cache files to save. +Defaults to 8. +.El +.Sh FILES +.Bl -tag -width Ds +.It Pa /etc/rc.conf +.El +.Sh EXIT STATUS +.Ex -std +Errors will be recorded in the system log. +.Sh SEE ALSO +.Xr syslog 3 , +.Xr random 4 , +.Xr rc.conf 5 , +.Xr cron 8 +.Sh HISTORY +The +.Nm +command first appeared in +.Fx 5.0 . +.Sh AUTHORS +The +.Nm +command was originally written by +.An Doug Barton . +This manual page was written by +.An Fernando Apesteguia .