// elevate our privileges
if (setreuid (geteuid (), geteuid ()))
error("setreuid failed: %s", strerror(errno));
debug("running with uid: %d, gid: %d\n", getuid(), getgid());
Is this necessary? It seems to me like this is something that can be
done in mock.py for the cases where it is necessary, as mock.py might
need to know the user id of the person running mock, and so it can
switch back to that user for writing output files.
Another option is to pass the original user in a environment variable
(like sudo does).