gh-488 setuid functions

Implement functions which change their effective
user id ot the one of the definer during execution.