webdevops/go-crond

Segfault when getting user id ?

danielkucera opened this issue · 2 comments

Running in docker (openshift) in image openshift/base-centos7 I'm getting following error:

sh-4.2$ go-crond --allow-unprivileged
go-crond: Starting go-crond version 0.6.0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x519652]

goroutine 1 [running]:
main.main()
        /Users/mblaschke/Projects/go-crond/main.go:371 +0x332  

I would be ok with being able to set EnableUserSwitching via commandline:

EnableUserSwitching bool

Or properly handling user.Current()

currentUser, _ := user.Current()