Bug 270016

Summary: sysutils/iocage: patch to add support allow_mount_fdescfs filesystem
Product: Ports & Packages Reporter: echoxxzz <echoxxzz>
Component: Individual Port(s)Assignee: Michael Gmelin <grembo>
Status: New ---    
Severity: Affects Many People CC: cgqix35t4, dgeo, mikhail.maximov, vedad
Priority: --- Flags: bugzilla: maintainer-feedback? (grembo)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patches to add support so users can mount fdescfs filesystem inside jails. none

Description echoxxzz 2023-03-07 20:44:59 UTC
Created attachment 240649 [details]
Patches to add support so users can mount fdescfs filesystem inside jails.

Iocage has no property to allow the user to mount the fdescfs filesytem inside a jail. This prevents one from running a Samba 4.16 Domain Controller inside a jail.

I modified/added the port patch files and the port Makefile to add support for this feature.

Now you can: iocage set allow_mount_fdescfs=1 <jail>.
Comment 1 geoffroy desvernay 2023-09-01 07:54:33 UTC
Please add this, needed here too for samba controller in jail
Comment 2 geoffroy desvernay 2023-09-01 18:37:36 UTC
FYI: merged upstream, but next release may never comeā€¦
https://github.com/iocage/iocage/pull/1294

The used patch is build from https://bugs.https://bugs.freebsd.org/bugzilla/attachment.cgi?id=240649 but not useable on 1.2, echoxzzz's is ok for that.
Comment 3 echoxxzz 2023-09-01 18:41:55 UTC
The patches I uploaded where created using the last port 1.2_10.
Comment 4 mikhail.maximov 2024-03-12 02:31:22 UTC
May I upvote this?
I have the same situation - running Samba in  Jail.
To fix the problem, I build locally with Poudriere and apply local patch, but it would be better to have it without such hassle.
Also, upstream shows some fresh merges. Still no releases there...
Comment 5 vedad 2024-03-12 08:10:19 UTC
There is a fairly straigthforward workaround this issue: mounting fdescfs from within the host.

With iocage, that's achieved by adding:

fdescfs /path/to/iocage/jails/jail_name/root/var/run/samba4/fd  fdescfs  rw,nodup  0  0

to the:

/path/to/iocage/jails/jail_name/fstab

file. iocage will automatically mount/unmount it on jail start/stop.

The only downside is `service samba_server stop/restart` (from within the jail) complaining about not being able to unmount it, but it works just fine.

hth,
Comment 6 geoffroy desvernay 2024-05-29 13:17:34 UTC
last iocage version has this patch, see #269298
Comment 7 geoffroy desvernay 2024-05-29 13:18:49 UTC
last iocage version has this patch, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269298