Bug 247472 - /var/db/entropy not created with correct user/group
Summary: /var/db/entropy not created with correct user/group
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Kyle Evans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-22 08:43 UTC by Rajeev Pillai
Modified: 2020-06-25 14:55 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rajeev Pillai 2020-06-22 08:43:32 UTC
After installation, /var/db/entropy does not have the correct owner/group of
operator:operator. This causes /usr/libexec/save-entropy called by cron to
fail. Entropy is not saved.
Comment 1 Kyle Evans freebsd_committer 2020-06-23 04:43:59 UTC
Hi,

Some questions to try and narrow the problem down:

1.) Are you installing from official install meia, or a custom build?

For official media:

1a.) Which image in particular?

For custom build:

1b.) What filesystem is the builder using for the objdir (default /usr/obj)?

For either, to be clear:

2.) What filesystem is being installed?
Comment 2 Rajeev Pillai 2020-06-23 10:07:25 UTC
(In reply to Kyle Evans from comment #1)
> Some questions to try and narrow the problem down:
>
> 1.) Are you installing from official install meia, or a custom build?

Official media

> For official media:
>
> 1a.) Which image in particular?

FreeBSD-12.1-RELEASE-amd64-memstick.img

> For either, to be clear:
>
> 2.) What filesystem is being installed?

UFS
Comment 3 Conrad Meyer freebsd_committer 2020-06-23 21:39:35 UTC
Hmm:

$ curl -s https://download.freebsd.org/ftp/releases/amd64/12.1-RELEASE/base.txz | tar -tJvf - | rg entropy
drwx------  0 operator   operator     0 Oct 31  2019 ./var/db/entropy/


$ sudo mdconfig -f FreeBSD-12.1-RELEASE-amd64-memstick.img
md0
$ sudo mount -t ufs -o ro /dev/md0s2a ./tmp
$ ls -lhd tmp/var/db/entropy
drwx------ 2 operator operator 512 Oct 31  2019 tmp/var/db/entropy/


$ tar -tJvf tmp/usr/freebsd-dist/base.txz | rg entropy
drwx------  0 operator   operator     0 Oct 31  2019 ./var/db/entropy/


So it's 0700 operator:operator in every installation source I can find.
Comment 4 Conrad Meyer freebsd_committer 2020-06-23 21:45:14 UTC
Additionally, installer operator user/group ids match base.  The only other reference to /var/db/entropy I can see is installer's usr/libexec/save-entropy, which may create /var/db/entropy -- with correct owner/group and permissions -- if missing.  I suspect that's only on the installer filesystem, though.

What owner/group and permissions are you observing?
Comment 5 Rajeev Pillai 2020-06-24 04:14:11 UTC
(In reply to Conrad Meyer from comment #4)
> ...I suspect that's only on the installer filesystem, though.
>
I think you're right: I did a fresh install of FreeBSD-12.1-RELEASE,
then installed all my packages to match the old system and the
permissions of /var/db/entropy in the fresh install are correct.

It was (root:wheel) before I changed it to (operator:operator) in
the old install. I recall that the system locked up when I suspended
it using Fn+F1. I had to power-down it down, then use the USB install
stick to run fsck. I think the owner/group might have changed when
fsck fixed errors on that root partition.

Consider this bug report invalid. Thanks.
Comment 6 Kyle Evans freebsd_committer 2020-06-24 05:12:57 UTC
Hi,

I'm closing this as "Not a Bug" based on your last response, but please do feel free to revisit this if it's warranted. =)
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2020-06-25 14:55:56 UTC
^Triage: Assign to committer that resolved