In /etc/init.d/tigervnc the checkconfig function fails if it cannot find ~user/.vnc/passwd. But this may also happen when the user doesn't allow access for other users and has his home on an nfs-server which maps root to nobody. To fix it the test should be run as the corresponding user. Patch attached.
If this is still reproducible, I'm not sure if this would be a Gentoo problem or an upstream problem. If upstream's sources can reproduce then a bug should be filed upstream. Of course if their sources can't reproduce then please reopen this bug.
Created attachment 686853 [details, diff] Fix tigervnc initskript to work with home on nfs
Seems I forgot to attach the patch... Sorry, fixed :) The problem exists in /etc/init.d/tigervnc which is not present upstream. So no way to fix this in upstream. ;)
I'm not sure this patch works as expected, the condition always fails even if the user doesn't exist (when it should succeed when the user exists so it fails into the `if`). ~ $ runuser -l "user" -c "[ ! -f ~/.vnc/passwd ]" || echo "false" pass ~ $ runuser -l "notauser" -c "[ ! -f ~/.vnc/passwd ]" || echo "false" runuser: user notauser does not exist or the user entry does not contain all the required fields pass
(In reply to John Helmert III (ajak) from comment #4) > I'm not sure this patch works as expected, the condition always fails even > if the user doesn't exist (when it should succeed when the user exists so it > fails into the `if`). > > ~ $ runuser -l "user" -c "[ ! -f ~/.vnc/passwd ]" || echo "false" > pass > ~ $ runuser -l "notauser" -c "[ ! -f ~/.vnc/passwd ]" || echo "false" > runuser: user notauser does not exist or the user entry does not contain all > the required fields > pass Well, I attempted some editing between what I ran and what I commented and made some typos, so 's/false/pass/'
Created attachment 687063 [details, diff] Fix to handle non-existing users You are right! I moved the exclamation mark to the front. I did not redirect stderr to /dev/null, so the user gets a hint that the missing file is not the only problem with the setup. :)
(In reply to Manuel Mommertz from comment #6) > Created attachment 687063 [details, diff] [details, diff] > Fix to handle non-existing users > > You are right! I moved the exclamation mark to the front. I did not redirect > stderr to /dev/null, so the user gets a hint that the missing file is not > the only problem with the setup. :) Alright, seems to work better now. I'm working on bumping the package for a number of bugs so if you'll comment your signoff (https://www.gentoo.org/glep/glep-0076.html#certificate-of-origin) I can include it in my bump.
(In reply to John Helmert III (ajak) from comment #7) > so if you'll comment your signoff I can include it in my bump. You mean just here? There you go: Signed-off-by: Manuel Mommertz <2kmm@gmx.de>
(In reply to Manuel Mommertz from comment #8) > (In reply to John Helmert III (ajak) from comment #7) > > so if you'll comment your signoff I can include it in my bump. > > You mean just here? There you go: > > Signed-off-by: Manuel Mommertz <2kmm@gmx.de> Exactly, thank you!
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2bda6cc82caf55afd1f0c5c213f6525cb2d2fd3d commit 2bda6cc82caf55afd1f0c5c213f6525cb2d2fd3d Author: Viorel Munteanu <ceamac.paragon@gmail.com> AuthorDate: 2022-04-02 06:48:39 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2022-04-03 09:56:23 +0000 net-misc/tigervnc: Fix bug in init script cannot start user-server when user-home is on nfs and not readable by root Closes: https://bugs.gentoo.org/690046 Signed-off-by: Manuel Mommertz <2kmm@gmx.de> Signed-off-by: Viorel Munteanu <ceamac.paragon@gmail.com> Signed-off-by: Florian Schmaus <flow@gentoo.org> net-misc/tigervnc/files/tigervnc-1.12.0.initd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)