omar-polo / gmid

a Gemini server
https://gmid.omarpolo.com
ISC License
98 stars 8 forks source link

Get "fatal in gmid: chroot path too long: /var/gemini/chroot #32

Open linuxcult opened 2 weeks ago

linuxcult commented 2 weeks ago

After a package update from 2.0.4 to 2.0.5 on FreeBSD 14.1-RELEASE-p0 I get the following error:

$ gmid -f
fatal in gmid: chroot path too long: /var/gemini/chroot
fatal in gmid: chroot path too long: /var/gemini/chroot
fatal in gmid: chroot path too long: /var/gemini/chroot
one child died, quitting
lost child: pid 79626 exited abnormally
lost child: pid 79495 exited abnormally
lost child: pid 79275 exited abnormally
fatal in gmid: chroot path too long: /var/gemini/chroot
lost child: pid 79712 exited abnormally
fatal in gmid: chroot path too long: /var/gemini/chroot
lost child: pid 79958 exited abnormally
parent terminating, pid 78990

Had to downgrade to 2.0.4 to work properly again. Can't help much with figuring out the error because it runs only on my production machine.

omar-polo commented 2 weeks ago

I'm afraid, this is due a typo that sneaked in just before 2.0.5 and was fixed in https://github.com/omar-polo/gmid/commit/c616a6d6f4299ab0070afdb23aebe46ff4fb2e6a. Instead of checking against the maximum path length, the chroot string was checked against the maximum username length :(

I haven't spotted since on my machine LOGIN_NAME_MAX is longer and /var/gemini still fits in. (and the chroot is not tested in the regress since it needs root -- but I may change it at least for the CI to add some more coverage.)

I'm still pondering whether to make another release just for this fix or wait a bit and release 2.1 which will also have new features.