Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jun 2006 12:39:30 +1000
From:      "Scott, Brian" <Brian.Scott@det.nsw.edu.au>
To:        <olivier.taylor@phonext.com>, <davids@webmaster.com>
Cc:        freebsd-stable@freebsd.org
Subject:   RE: save-entropy
Message-ID:  <93F091C9B5CFAF409180B07728D682E9165A91@ALF6.riverina.det.win>

next in thread | raw e-mail | index | archive | help
That would be the old 'accidentally deleted a # from a line in rc.conf' p=
roblem. There are likely to be several lines beginning '# -- ' in the fil=
e. New users often accidentally remove the # making the '--' into a comma=
nd. There will also be a few messages during startup that will also compl=
ain about the '--' command but most people ignore these.=20

-----Original Message-----
From: owner-freebsd-stable@freebsd.org [mailto:owner-freebsd-stable@freeb=
sd.org] On Behalf Of olivier.taylor
Sent: Thursday, 15 June 2006 8:59 PM
To: davids@webmaster.com
Cc: freebsd-stable@freebsd.org
Subject: Re: save-entropy


=20  freebsd 5.4
=20  #!/bin/sh
=20  #
=20  # Copyright (c) 2001-2005 Douglas Barton, [1]DougB@FreeBSD.org
=20  # All rights reserved.
=20  #
=20  # Redistribution and use in source and binary forms, with or without=

=20  # modification, are permitted provided that the following conditions=

=20  # are met:
=20  # 1. Redistributions of source code must retain the above copyright
=20  #    notice, this list of conditions and the following disclaimer.
=20  # 2. Redistributions in binary form must reproduce the above copyrig=
ht
=20  #    notice, this list of conditions and the following disclaimer in=

=20  the
=20  #    documentation and/or other materials provided with the
=20  distribution.
=20  #
=20  # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS''=

=20  AND
=20  # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
=20  THE
=20  # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR=

=20  PURPOSE
=20  # ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE
=20  LIABLE
=20  # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
=20  CONSEQUENTIAL
=20  # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
=20  GOODS
=20  # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
=20  INTERRUPTION)
=20  # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT=
,
=20  STRICT
=20  # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
=20  ANY WAY
=20  # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILIT=
Y
=20  OF
=20  # SUCH DAMAGE.
=20  #
=20  # $FreeBSD: src/libexec/save-entropy/save-entropy.sh,v 1.2.12.1
=20  2005/04/14 21:49:13 dougb Exp $
=20  # This script is called by cron to store bits of randomness which ar=
e
=20  # then used to seed /dev/random on boot.
=20  # Originally developed by Doug Barton, [2]DougB@FreeBSD.org
=20  PATH=3D/bin:/usr/bin
=20  # If there is a global system configuration file, suck it in.
=20  #
=20  if [ -r /etc/defaults/rc.conf ]; then
=20      . /etc/defaults/rc.conf
=20      source_rc_confs
=20  elif [ -r /etc/rc.conf ]; then
=20      . /etc/rc.conf
=20  fi
=20  case ${entropy_dir} in
=20  [Nn][Oo])
=20      exit 0
=20      ;;
=20  *)
=20      entropy_dir=3D${entropy_dir:-/var/db/entropy}
=20      ;;
=20  esac
=20  entropy_save_sz=3D${entropy_save_sz:-2048}
=20  entropy_save_num=3D${entropy_save_num:-8}
=20  if [ ! -d "${entropy_dir}" ]; then
=20      umask 077
=20      mkdir "${entropy_dir}" || {
=20          logger -is -t "$0" The entropy directory "${entropy_dir}" do=
es
=20  not \
=20  exist, and cannot be created.  Therefore no entropy can be saved. ;
=20          exit 1;}
=20      /usr/sbin/chown operator:operator "${entropy_dir}"
=20      chmod 0700 "${entropy_dir}"
=20  fi
=20  umask 377
=20  for file_num in `jot ${entropy_save_num} ${entropy_save_num} 1`; do
=20      if [ -e "${entropy_dir}/saved-entropy.${file_num}" ]; then
=20          if [ -f "${entropy_dir}/saved-entropy.${file_num}" ]; then
=20              new_num=3D$(($file_num + 1))
=20              if [ "${new_num}" -gt "${entropy_save_num}" ]; then
=20                  rm -f "${entropy_dir}/saved-entropy.${file_num}"
=20              else
=20                  mv "${entropy_dir}/saved-entropy.${file_num}" \
=20                      "${entropy_dir}/saved-entropy.${new_num}"
=20              fi
=20          else
=20              logger -is -t "$0" \
=20  "${entropy_dir}/saved-entropy.${file_num} is not a regular file, and=

=20  therefore \
=20  it will not be rotated. Entropy file harvesting is aborted."
=20              exit 1
=20          fi
=20      fi
=20  done
=20  dd if=3D/dev/random of=3D"${entropy_dir}/saved-entropy.1" \
=20      bs=3D"$entropy_save_sz" count=3D1 2> /dev/null
=20  exit 0
=20  David Schwartz a =E9crit :

Since a few days, I receive this in /var/mail/root
Any idea?

Olivier

=20From [3]operator@xxx.be Thu Jun 15 11:11:00 2006
Return-Path: [4]<operator@xxx.be>
Received: from xxx.be (localhost [127.0.0.1])
=20  by finalcut.be (8.13.3/8.13.3) with ESMTP id k5F9B0Pu051577
=20  for [5]<operator@xxx.be>; Thu, 15 Jun 2006 11:11:00 +0200 (CEST)
=20  (envelope-from [6]operator@xxx.be)
Received: (from operator@localhost)
=20  by finalcut.be (8.13.3/8.13.3/Submit) id k5F9B0jf051566;
=20  Thu, 15 Jun 2006 11:11:00 +0200 (CEST)
=20  (envelope-from operator)
Date: Thu, 15 Jun 2006 11:11:00 +0200 (CEST)
Message-Id: [7]<200606150911.k5F9B0jf051566@xxx.be>
From: [8]operator@xxx.be (Cron Daemon)
To: [9]operator@xxx.be
Subject: Cron <operator@xxx> /usr/libexec/save-entropy
X-Cron-Env: <SHELL=3D/bin/sh>
X-Cron-Env: <PATH=3D/etc:/bin:/sbin:/usr/bin:/usr/sbin>
X-Cron-Env: <HOME=3D/>
X-Cron-Env: <LOGNAME=3Doperator>
X-Cron-Env: <USER=3Doperator>

--: not found



=20       FreeBSD version? Contents of /usr/libexec/save-entropy?

=20       DS


_______________________________________________
[10]freebsd-stable@freebsd.org mailing list
[11]http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [12]"freebsd-stable-unsubscribe@freebsd.=
org"

References

=20  1. mailto:DougB@FreeBSD.org
=20  2. mailto:DougB@FreeBSD.org
=20  3. mailto:operator@xxx.be
=20  4. mailto:operator@xxx.be
=20  5. mailto:operator@xxx.be
=20  6. mailto:operator@xxx.be
=20  7. mailto:200606150911.k5F9B0jf051566@xxx.be
=20  8. mailto:operator@xxx.be
=20  9. mailto:operator@xxx.be
=20 10. mailto:freebsd-stable@freebsd.org
=20 11. http://lists.freebsd.org/mailman/listinfo/freebsd-stable
=20 12. mailto:freebsd-stable-unsubscribe@freebsd.org
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"=

**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?93F091C9B5CFAF409180B07728D682E9165A91>