Skip to content

Commit d3587f5

Browse files
authored
Merge pull request #6911 from jsquyres/pr/v4.0/mpirun-as-root-as-containers-env-var-fix
v4.0.x: mpirun as root as containers env var fix
2 parents f96994b + 549abea commit d3587f5

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

orte/tools/orterun/orterun.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -137,28 +137,6 @@ int orterun(int argc, char *argv[])
137137
exit(1);
138138
}
139139

140-
/* check if we are running as root - if we are, then only allow
141-
* us to proceed if the allow-run-as-root flag was given. Otherwise,
142-
* exit with a giant warning flag
143-
*/
144-
if (0 == geteuid() && !orte_cmd_options.run_as_root) {
145-
fprintf(stderr, "--------------------------------------------------------------------------\n");
146-
if (NULL != orte_cmd_options.help) {
147-
fprintf(stderr, "%s cannot provide the help message when run as root.\n", orte_basename);
148-
} else {
149-
/* show_help is not yet available, so print an error manually */
150-
fprintf(stderr, "%s has detected an attempt to run as root.\n", orte_basename);
151-
}
152-
fprintf(stderr, "Running at root is *strongly* discouraged as any mistake (e.g., in\n");
153-
fprintf(stderr, "defining TMPDIR) or bug can result in catastrophic damage to the OS\n");
154-
fprintf(stderr, "file system, leaving your system in an unusable state.\n\n");
155-
fprintf(stderr, "You can override this protection by adding the --allow-run-as-root\n");
156-
fprintf(stderr, "option to your cmd line. However, we reiterate our strong advice\n");
157-
fprintf(stderr, "against doing so - please do so at your own risk.\n");
158-
fprintf(stderr, "--------------------------------------------------------------------------\n");
159-
exit(1);
160-
}
161-
162140
/* setup to listen for commands sent specifically to me, even though I would probably
163141
* be the one sending them! Unfortunately, since I am a participating daemon,
164142
* there are times I need to send a command to "all daemons", and that means *I* have

0 commit comments

Comments
 (0)