Exit newrole if capabilities can't be dropped

Signed-off-by: Steve Lawrence <slawrence@tresys.com>
This commit is contained in:
Steve Lawrence 2010-12-17 15:20:05 -05:00
parent 16d1c1cbe5
commit cba027c249

View File

@ -1274,7 +1274,9 @@ int main(int argc, char *argv[])
goto err_close_pam_session;
#endif
drop_capabilities(TRUE);
if (drop_capabilities(TRUE))
goto err_close_pam_session;
/* Handle environment changes */
if (restore_environment(preserve_environment, old_environ, &pw)) {
fprintf(stderr, _("Unable to restore the environment, "