You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test suite fails on all my FreeBSD 11 and 12 smokers:
# Failed test 'Ubic::Cmd logged something on start'
# at t/cmd.t line 25.
# 'Starting sleeping-daemon... Failed to change group from cpansand to wheel: Operation not permitted at lib/Ubic/Credentials/OS/POSIX.pm line 178.
#
# '
# doesn't match '(?^:^Starting\ sleeping\-daemon\.\.\.\ started\ \(pid\ \d+\)\n$)'
Failed to change group from cpansand to wheel: Operation not permitted at lib/Ubic/Credentials/OS/POSIX.pm line 178.
# Looks like your test exited with 1 just after 1.
t/cmd.t ........................
Dubious, test returned 1 (wstat 256, 0x100)
Failed 8/8 subtests
(etc)
I don't see this failure on FreeBSD 9 + 10 smokers. In all cases the user "cpansand" is not member of the "wheel" group.
The text was updated successfully, but these errors were encountered:
OK, I found the issue: this happens because I use sudo su cpansand to change the user before starting the smokers etc. On FreeBSD systems it seems that sudo changes $LOGNAME, but the subsequent su does not change it, so $LOGNAME stays as root which leads to the problems.
I see two solutions:
use $USERNAME instead of $LOGNAME --- this one has the correct value
use (getpwuid($<))[0]
I would prefer the latter. In my experience getpwuid (if it's available) gives the most accurate results.
eserte
changed the title
FreeBSD 11+12: Failed to change group from ... to ...: Operation not permitted
Failed to change group from ... to ...: Operation not permitted (wrong $LOGNAME)
Dec 29, 2017
The test suite fails on all my FreeBSD 11 and 12 smokers:
I don't see this failure on FreeBSD 9 + 10 smokers. In all cases the user "cpansand" is not member of the "wheel" group.
The text was updated successfully, but these errors were encountered: