which doesn't usually have passwd databases available due to chroot.
Without this, getpwuid(geteuid()) lookup was failing and the "return
current username" function tried to access boolean false as if it was
an array.
Handle the case where the script is run as the expected package uid nicely
(return the proper name), for others return numeric uid which isn't ideal
but there's not a lot more that can be done.