Bug 183615 - [linprocfs] [patch] emulate /proc/sys/kernel/random/uuid
Summary: [linprocfs] [patch] emulate /proc/sys/kernel/random/uuid
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 9.1-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Eitan Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-03 13:10 UTC by florian.heigl
Modified: 2014-02-20 17:43 UTC (History)
0 users

See Also:


Attachments
linprocfs-random.patch (868 bytes, patch)
2013-11-06 23:02 UTC, Fernando Apesteguía
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description florian.heigl 2013-11-03 13:10:00 UTC
I followed (somewhat) the debian document about setting up a Debian Jail on FreeBSD at https://wiki.debian.org/Debian_GNU/kFreeBSD/Jails

Using the Linux module and mounting some filesystems I have this working OK and can ssh into it. With this, I'm trying to make some software available to FreeBSD.

linprocfs          4       4        0   100%    /srv/jail/debjail/proc
linsysfs           4       4        0   100%    /srv/jail/debjail/sys
tmpfs          36068      60    36008     0%    /srv/jail/debjail/run
devfs              1       1        0   100%    /srv/jail/debjail/dev
linprocfs          4       4        0   100%    /usr/compat/linux/proc

A problem I hit is that some application (in this case: Check_MK multisite) uses the procfs to gain easy access to uuid's for session handling and object id's.

What they do is: 
root@debjail:/omd/sites/freemon# grep -R "random/uuid" *
share/check_mk/web/htdocs/weblib.py:        sel_id = file('/proc/sys/kernel/random/uuid').read().strip()



In linprocfs we don't have this file available, or actually the whole directory ain't there:
builder@debjail:/build$ ls /proc/sys/kernel/
msgmni  osrelease  ostype  pid_max  sem  version


The following things are in there on Linux:
$ ls /proc/sys/kernel/random
boot_id        poolsize               uuid
entropy_avail  read_wakeup_threshold  write_wakeup_threshold

Could anyone look into this? 
in case of "uuid" it seems there's a FreeBSD system call that gives back an uuid.


Myself I'll try and see if i can create a pipe or something in that place that gives back a uuid on read?

How-To-Repeat: mount linux procfs, check for existance of /proc/sys/kernel/random/uuid

should be accessible like this:
$ cat /proc/sys/kernel/random/uuid 
bee78388-ce08-450a-be12-dcbbc6c4f3f1

(but isn't since we don't got it)
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2013-11-06 04:23:39 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-emulation

Over to maintainer(s).
Comment 2 florian.heigl 2013-11-07 08:07:51 UTC
Hi,

Thank you very much for the patch.
I will gladly test it, I=92ll try to do it on the weekend.

Florian
On 07.11.2013, at 00:02, Fernando Apestegu=EDa =
<fernando.apesteguia@gmail.com> wrote:

> Would you like to try this patch?
>=20
> <linprocfs-random.patch>
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2014-02-18 03:15:53 UTC
Responsible Changed
From-To: freebsd-emulation->eadler

I'll take it.
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2014-02-20 17:43:43 UTC
State Changed
From-To: open->closed

Per submitter request