diff --git a/orte/orted/orted_submit.c b/orte/orted/orted_submit.c index a1ad7d7b522..4de3de3e790 100644 --- a/orte/orted/orted_submit.c +++ b/orte/orted/orted_submit.c @@ -323,7 +323,7 @@ int orte_submit_init(int argc, char *argv[], * us to proceed if the allow-run-as-root flag was given. Otherwise, * exit with a giant warning flag */ - if (0 == geteuid() && !orte_cmd_options.run_as_root) { + if (0 == geteuid() && !orte_cmd_options.run_as_root && getenv("OMPI_ALLOW_RUN_AS_ROOT") == NULL) { /* show_help is not yet available, so print an error manually */ fprintf(stderr, "--------------------------------------------------------------------------\n"); if (orte_cmd_options.help) { diff --git a/orte/tools/orte-dvm/orte-dvm.c b/orte/tools/orte-dvm/orte-dvm.c index 522c539af33..da0f84f0826 100644 --- a/orte/tools/orte-dvm/orte-dvm.c +++ b/orte/tools/orte-dvm/orte-dvm.c @@ -232,7 +232,7 @@ int main(int argc, char *argv[]) * us to proceed if the allow-run-as-root flag was given. Otherwise, * exit with a giant warning flag */ - if (0 == geteuid() && !myglobals.run_as_root) { + if (0 == geteuid() && !myglobals.run_as_root && getenv("OMPI_ALLOW_RUN_AS_ROOT") == NULL) { /* show_help is not yet available, so print an error manually */ fprintf(stderr, "--------------------------------------------------------------------------\n"); if (myglobals.help) { diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index 85aba0a0f33..d28ecd1740d 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -142,7 +142,7 @@ int orterun(int argc, char *argv[]) * us to proceed if the allow-run-as-root flag was given. Otherwise, * exit with a giant warning flag */ - if (0 == geteuid() && !orte_cmd_options.run_as_root) { + if (0 == geteuid() && !orte_cmd_options.run_as_root && getenv("OMPI_ALLOW_RUN_AS_ROOT") == NULL) { fprintf(stderr, "--------------------------------------------------------------------------\n"); if (NULL != orte_cmd_options.help) { fprintf(stderr, "%s cannot provide the help message when run as root.\n", orte_basename); diff --git a/orte/tools/prun/prun.c b/orte/tools/prun/prun.c index 17683b803f5..5a65af744c8 100644 --- a/orte/tools/prun/prun.c +++ b/orte/tools/prun/prun.c @@ -389,7 +389,7 @@ int prun(int argc, char *argv[]) * us to proceed if the allow-run-as-root flag was given. Otherwise, * exit with a giant warning flag */ - if (0 == geteuid() && !orte_cmd_options.run_as_root) { + if (0 == geteuid() && !orte_cmd_options.run_as_root && getenv("OMPI_ALLOW_RUN_AS_ROOT") == NULL) { /* show_help is not yet available, so print an error manually */ fprintf(stderr, "--------------------------------------------------------------------------\n"); if (orte_cmd_options.help) {