Check restore_perms() return value in all cases, pushing the

return value back up the call stack.
This commit is contained in:
Todd C. Miller
2015-06-25 11:12:36 -06:00
parent c5ed416a70
commit 81f94499bf
10 changed files with 154 additions and 86 deletions

View File

@@ -343,7 +343,8 @@ sudo_file_lookup(struct sudo_nss *nss, int validated, int pwflag)
#if defined(HAVE_SELINUX) || defined(HAVE_PRIV_SET)
done:
#endif
(void) restore_perms();
if (!restore_perms())
SET(validated, VALIDATE_ERROR);
debug_return_int(validated);
}