From bc2f71ffc680f8910367df8260b7d2fbeb6d175e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 23 May 2016 16:13:10 -0700 Subject: Few more drop_privilege calls in txr_main. * txr.c (txr_main): Drop setuid privilege as soon as we know we are just going to exit, before producing any diagnostic output, like in existing cases. --- txr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/txr.c b/txr.c index 8abe8949..dc439209 100644 --- a/txr.c +++ b/txr.c @@ -655,6 +655,7 @@ int txr_main(int argc, char **argv) prog_string, opt, org, nao); continue; } else { + drop_privilege(); format(std_error, lit("~a: option ~a requires YYDEBUG support compiled in\n"), prog_string, arg, nao); @@ -673,6 +674,7 @@ int txr_main(int argc, char **argv) val opt = chr_str(arg, one); if (!arg_list) { + drop_privilege(); requires_arg(opt); return EXIT_FAILURE; } -- cgit v1.2.3