Amend cleanup procedure in mknod07: the cleanup in mknod07 didn't work for me, because the test yields root, removes search permission on its current directory and then tries to chdir("..") which fails due to the missing permission. This patch fixes that by re-gaining root before the cleanup.
 - restore root privileges before tmp directory cleanup. This is needed, because as nonprivileged user, we don't have search permission on the current directory,
 - because of that, do not drop root completely by setuid(), change effective uid instead,
 - call cleanup in one case when setup fails,
Signed-Off-By: Jiri Palecek <jpalecek@web.de>.
1 file changed