RT 88271 - Solaris setuid when root running as other user

Handles the situation where root has switched to an unprivileged account.
This fix only applies on solaris.

Ammend .gitignore based on noise after using patch