File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,14 @@ int orterun(int argc, char *argv[])
142
142
* exit with a giant warning flag
143
143
*/
144
144
if (0 == geteuid () && !orte_cmd_options .run_as_root ) {
145
+ char * r1 , * r2 ;
146
+ if (NULL != (r1 = getenv ("OMPI_ALLOW_RUN_AS_ROOT" )) &&
147
+ NULL != (r2 = getenv ("OMPI_ALLOW_RUN_AS_ROOT_CONFIRM" ))) {
148
+ if (0 == strcmp (r1 , "1" ) && 0 == strcmp (r2 , "1" )) {
149
+ goto moveon ;
150
+ }
151
+ }
152
+
145
153
fprintf (stderr , "--------------------------------------------------------------------------\n" );
146
154
if (NULL != orte_cmd_options .help ) {
147
155
fprintf (stderr , "%s cannot provide the help message when run as root.\n" , orte_basename );
@@ -159,6 +167,7 @@ int orterun(int argc, char *argv[])
159
167
exit (1 );
160
168
}
161
169
170
+ moveon :
162
171
/* setup to listen for commands sent specifically to me, even though I would probably
163
172
* be the one sending them! Unfortunately, since I am a participating daemon,
164
173
* there are times I need to send a command to "all daemons", and that means *I* have
You can’t perform that action at this time.
0 commit comments